zink: track a mask of arrayed io locations on shaders

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28466>
This commit is contained in:
Mike Blumenkrantz 2024-03-22 15:19:06 -04:00 committed by Marge Bot
parent 364a6ac1a3
commit 562cb8381e
2 changed files with 10 additions and 2 deletions

View file

@ -4652,10 +4652,16 @@ scan_nir(struct zink_screen *screen, nir_shader *shader, struct zink_shader *zs)
bool is_load = false;
bool is_input = false;
bool is_interp = false;
/* TODO: delete this once #10826 is fixed */
if (filter_io_instr(intr, &is_load, &is_input, &is_interp)) {
nir_io_semantics s = nir_intrinsic_io_semantics(intr);
if (io_instr_is_arrayed(intr) && s.location < VARYING_SLOT_PATCH0) {
if (is_input)
zs->arrayed_inputs |= BITFIELD64_BIT(s.location);
else
zs->arrayed_outputs |= BITFIELD64_BIT(s.location);
}
/* TODO: delete this once #10826 is fixed */
if (!(is_input && shader->info.stage == MESA_SHADER_VERTEX)) {
nir_io_semantics s = nir_intrinsic_io_semantics(intr);
if (is_clipcull_dist(s.location)) {
unsigned frac = nir_intrinsic_component(intr) + 1;
if (s.location < VARYING_SLOT_CULL_DIST0) {

View file

@ -818,6 +818,8 @@ struct zink_shader {
unsigned num_texel_buffers;
uint32_t ubos_used; // bitfield of which ubo indices are used
uint32_t ssbos_used; // bitfield of which ssbo indices are used
uint64_t arrayed_inputs; //mask of locations using arrayed io
uint64_t arrayed_outputs; //mask of locations using arrayed io
uint64_t flat_flags;
bool bindless;
bool can_inline;