anv/pipeline: make FragCoord include sample positions when sample shading

We need to know if sample shading has been requested during shader
compilation since that affects the way fragment coordinates are
computed.

Notice that the semantics of fragment coordinates only depend on
whether sample shading has been requested, not on whether more
than one sample will actually be produced (that is,
minSampleShading and rasterizationSamples do not affect this
behavior).

Because this setting affects the code we generate for the shader, we also
need to include it in the WM prog key. Notice we don't need to alter the
OpenGL code because it doesn't ever use this behavior, so they key's
value is always false (the default).

Fixes:
dEQP-VK.glsl.builtin_var.fragcoord_msaa.*

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Iago Toral Quiroga
2017-03-23 11:56:06 +01:00
parent 023ea3772d
commit ddb2bb3ed4
3 changed files with 20 additions and 8 deletions

View File

@@ -292,6 +292,7 @@ struct brw_wm_prog_key {
bool clamp_fragment_color:1;
bool persample_interp:1;
bool multisample_fbo:1;
bool frag_coord_adds_sample_pos:1;
enum brw_wm_aa_enable line_aa:2;
bool high_quality_derivatives:1;
bool force_dual_color_blend:1;