mesa/st: Set uses_sample_shading when forcing per-sample
In addition to requiring per-sample interpolation, sample shading changes the behaviour of gl_SampleMaskIn, so we need per-sample shading even if there are no shader-in variables at all. In that case, uses_sample_shading won't be set by glsl_to_nir. We need to do so here. Affected dEQP test on asahi: dEQP-GLES31.functional.shaders.sample_variables.sample_mask_in.bits_unique_per_two_samples.multisample_texture_4 Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22402>
This commit is contained in:

committed by
Marge Bot

parent
52ba7e967b
commit
d998217e17
@@ -937,6 +937,14 @@ st_create_fp_variant(struct st_context *st,
|
||||
nir_shader *shader = state.ir.nir;
|
||||
nir_foreach_shader_in_variable(var, shader)
|
||||
var->data.sample = true;
|
||||
|
||||
/* In addition to requiring per-sample interpolation, sample shading
|
||||
* changes the behaviour of gl_SampleMaskIn, so we need per-sample shading
|
||||
* even if there are no shader-in variables at all. In that case,
|
||||
* uses_sample_shading won't be set by glsl_to_nir. We need to do so here.
|
||||
*/
|
||||
shader->info.fs.uses_sample_shading = true;
|
||||
|
||||
finalize = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user