zink: fix cubemap lowering bit size

this isn't always 32

Fixes: 2d745904ca ("zink: add a gently mangled version of the d3d12 cubemap -> array compiler pass")

fixes:
dEQP-GL45-ES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_*

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17008>
(cherry picked from commit 87c7e75721)
This commit is contained in:
Mike Blumenkrantz 2022-06-11 10:59:59 -04:00 committed by Dylan Baker
parent 3fb2d7b7a8
commit dfd2cd3ebc
2 changed files with 2 additions and 2 deletions

View file

@ -1102,7 +1102,7 @@
"description": "zink: fix cubemap lowering bit size",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "2d745904ca7022afdc86cb66e294cedfafa0fcb1"
},

View file

@ -176,7 +176,7 @@ create_array_tex_from_cube_tex(nir_builder *b, nir_tex_instr *tex, nir_ssa_def *
}
nir_ssa_dest_init(&array_tex->instr, &array_tex->dest,
nir_tex_instr_dest_size(array_tex), 32, NULL);
nir_tex_instr_dest_size(array_tex), nir_dest_bit_size(tex->dest), NULL);
nir_builder_instr_insert(b, &array_tex->instr);
return &array_tex->dest.ssa;
}