summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-12-18 16:49:43 +1000
committerDave Airlie <[email protected]>2017-12-19 06:44:11 +1000
commit0e8e7ccf9dc80588e569e9ff11c880f3d5d57607 (patch)
tree4bf3af41d817ae74bf370dd8666ef556585698f7 /src
parent3be382cd7cb637f463a4618dc19d87d66a644b0e (diff)
nir/linking: always set the used_across_stages/outputs_read bits
If we don't remap and output this code would trample the outputs read bits. This fixes a regression in dEQP-VK.tessellation.shader_input_output.barrier Fixes: 1c9c42d16b4c (nir: add varying component packing helpers) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_linking_helpers.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index 9f0122d4519..6459c6a24d2 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -297,14 +297,15 @@ remap_slots_and_components(struct exec_list *var_list, gl_shader_stage stage,
unsigned location = var->data.location - VARYING_SLOT_VAR0;
struct varying_loc *new_loc = &remap[location][var->data.location_frac];
- if (new_loc->location) {
- uint64_t slots = (((uint64_t)1 << num_slots) - 1) << var->data.location;
- if (slots & *slots_used)
- used_across_stages = true;
- if (slots & *out_slots_read)
- outputs_read = true;
+ uint64_t slots = (((uint64_t)1 << num_slots) - 1) << var->data.location;
+ if (slots & *slots_used)
+ used_across_stages = true;
+
+ if (slots & *out_slots_read)
+ outputs_read = true;
+ if (new_loc->location) {
var->data.location = new_loc->location;
var->data.location_frac = new_loc->component;
}