mesa: don't set ES versions to GLSLVersion in _mesa_init_constants

No place in Mesa expects an ES version there.
Drivers don't even set it like this.

Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: allow forcing >=3.1 compatibility contexts with MESA_GL_VERSION_OVERRIDE

E.g. the 4.0 compatibility profile can be forced with:

MESA_GL_VERSION_OVERRIDE=4.0COMPAT

Some tests that I have require 4.0 compatibility.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: drop dependence on API profile in st_init_extensions

The extensions and limits being set in the conditional block are core-only
anyway and don't have any effect on other profiles.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: use UniformBooleanTrue in glsl_to_tgsi

Just for consistency. This doesn't fix anything as the original code was
already pretty good.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: don't set coord_enable for gl_PointCoord if using TGSI_SEMANTIC_PCOORD

This was missed when Christoph Bumiller added PIPE_CAP_TGSI_TEXCOORD.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: redefine mapping from VARYING_SLOT_TEXi/PNTC/VARi to TGSI GENERIC[i]

Generic varyings in TGSI were based on the value of VARYING_SLOT_TEX0, so VAR0
was always GENERIC[22] (with tessellation patches). Some drivers might not
be able to cope with that.

This commit defines a proper mapping, so that PNTC is GENERIC[8] and VAR0 is
GENERIC[9].

Reviewed-by: Brian Paul <brianp@vmware.com>
r300g: implement MSAA copies by resolving and upsampling

There's no other way. It will use hw resolve + blit.
radeonsi: document what si_descriptors.c does

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: remove unused variable si_pipe_shader::sprite_coord_enable

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: move DB registers from draw_vbo into new db_render_state

It's called db_misc_state in r600g.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: remove shader.ps_conservative_z, set db_shader_control instead

Also set the field on SI too. It's not just specific to CIK.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: set KILL_ENABLE during shader compilation, remove uses_kill flag

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: move DB_SHADER_CONTROL into db_render_state

I will need this for fixing sample shading with 1 sample.

The good news is that all shader pm4 states no longer use the current context
state, so we can generate the pm4 states outside of draw_vbo if needed.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: only update MSAA-specific framebuffer state if nr_samples is changed

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: disable gl_SampleMask fragment shader output if MSAA is disabled

This fixes piglit: arb_sample_shading-builtin-gl-sample-mask 0

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: merge si_pipe_shader into si_shader

One is part of the other anyway.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: shorten si_pipe_* prefixes to si_*

This was the original naming convention in r600g and it somehow crept
into radeonsi.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: don't snoop currently-bound GS shader when compiling ES

Instead, pass the layout of GS inputs in memory to the ES using the shader
key. Only 64 bits are needed to represent the layout in the key.

Mixing and matching different VS and GS shaders should now always work.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: don't pass the context to the shader translator

This should prevent accessing context state there.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: don't use pipe_constant_buffer for GS rings

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>