aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_gather_info.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-12-16 14:06:23 +1100
committerTimothy Arceri <[email protected]>2018-01-30 09:08:47 +1100
commitf63e05ae9ea0be38a8fb2dd0ae8f391b8699e757 (patch)
treea8560935b10101db258f692e50dff41efb996367 /src/compiler/nir/nir_gather_info.c
parentf6cc15dccd54ff70be987457af790cac1c8fe5bb (diff)
compiler: tidy up double_inputs_read uses
First we move double_inputs_read into a vs struct in the union, double_inputs_read is only used for vs inputs so this will save space and also allows us to add a new double_inputs field. We add the new field because c2acf97fcc9b changed the behaviour of double_inputs_read, and while it's no longer used to track actual reads in i965 we do still want to track this for gallium drivers. Reviewed-by: Marek Olšák <[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, 6 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index 946939657ec..e98129b22c8 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -234,7 +234,8 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader)
glsl_type_is_dual_slot(glsl_without_array(var->type))) {
for (uint i = 0; i < glsl_count_attribute_slots(var->type, false); i++) {
int idx = var->data.location + i;
- shader->info.double_inputs_read |= BITFIELD64_BIT(idx);
+ shader->info.vs.double_inputs |= BITFIELD64_BIT(idx);
+ shader->info.vs.double_inputs_read |= BITFIELD64_BIT(idx);
}
}
}
@@ -356,10 +357,13 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
shader->info.outputs_written = 0;
shader->info.outputs_read = 0;
shader->info.patch_outputs_read = 0;
- shader->info.double_inputs_read = 0;
shader->info.patch_inputs_read = 0;
shader->info.patch_outputs_written = 0;
shader->info.system_values_read = 0;
+ if (shader->info.stage == MESA_SHADER_VERTEX) {
+ shader->info.vs.double_inputs = 0;
+ shader->info.vs.double_inputs_read = 0;
+ }
if (shader->info.stage == MESA_SHADER_FRAGMENT) {
shader->info.fs.uses_sample_qualifier = false;
}