mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
zink: fix big tcs output io
as in the producer case, big io needs to reserve the appropriate number
of slots
fixes:
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-float-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-float-index-wr-before-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec2-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec2-index-wr-before-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec3-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec3-index-wr-before-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec4-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec4-index-wr-before-barrier,Fail
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
(cherry picked from commit ee6ba2bb57)
This commit is contained in:
parent
6029e2d7c2
commit
54067b533a
2 changed files with 10 additions and 3 deletions
|
|
@ -40,7 +40,7 @@
|
|||
"description": "zink: fix big tcs output io",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2659,11 +2659,18 @@ assign_consumer_var_io(gl_shader_stage stage, nir_variable *var, unsigned *reser
|
|||
var->data.driver_location = -1;
|
||||
return true;
|
||||
}
|
||||
/* patch variables may be read in the workgroup */
|
||||
if (stage != MESA_SHADER_TESS_CTRL)
|
||||
/* dead io */
|
||||
return false;
|
||||
/* patch variables may be read in the workgroup */
|
||||
slot_map[slot] = (*reserved)++;
|
||||
unsigned num_slots;
|
||||
if (nir_is_arrayed_io(var, stage))
|
||||
num_slots = glsl_count_vec4_slots(glsl_get_array_element(var->type), false, false);
|
||||
else
|
||||
num_slots = glsl_count_vec4_slots(var->type, false, false);
|
||||
assert(*reserved + num_slots <= MAX_VARYING);
|
||||
for (unsigned i = 0; i < num_slots; i++)
|
||||
slot_map[slot + i] = (*reserved)++;
|
||||
}
|
||||
var->data.driver_location = slot_map[slot];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue