summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_gather_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_gather_info.c')
-rw-r--r--src/compiler/nir/nir_gather_info.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index d45b1a2fec0..89a6302d4fc 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -125,9 +125,15 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
shader->stage == MESA_SHADER_FRAGMENT ||
shader->stage == MESA_SHADER_COMPUTE);
+ bool uses_sample_qualifier = false;
shader->info.inputs_read = 0;
- foreach_list_typed(nir_variable, var, node, &shader->inputs)
+ foreach_list_typed(nir_variable, var, node, &shader->inputs) {
shader->info.inputs_read |= get_io_mask(var, shader->stage);
+ uses_sample_qualifier |= var->data.sample;
+ }
+
+ if (shader->stage == MESA_SHADER_FRAGMENT)
+ shader->info.fs.uses_sample_qualifier = uses_sample_qualifier;
/* TODO: Some day we may need to add stream support to NIR */
shader->info.outputs_written = 0;