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>
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];
}