summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_gather_info.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-05-09 17:15:21 -0700
committerJason Ekstrand <[email protected]>2016-05-14 13:33:52 -0700
commita2f50d87b6e9d07c6974ef309cc99acf56b2dc09 (patch)
tree5891e884fa731b051ea1b47caf399dc61ffacd28 /src/compiler/nir/nir_gather_info.c
parent59156b2e96315910f1e929c14c5b25ce88f75911 (diff)
nir: Add an info bit for uses_sample_qualifier
Reviewed-by: Kenneth Graunke <[email protected]>
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;