mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
panvk: Take resource index in valhall_lower_get_ssbo_size
Previously we were not extracting the resource index from the resource
handle.
This fixes failures with PanVK+ANGLE on "dEQP-GLES31.functional.ssbo.array_length.unsized_*".
Fixes: e4613f8b23 ("panvk: Lower get_ssbo_size() on Valhall")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34697>
This commit is contained in:
parent
7ec937b81e
commit
845611bb43
1 changed files with 4 additions and 3 deletions
|
|
@ -506,10 +506,11 @@ valhall_lower_get_ssbo_size(struct nir_builder *b,
|
|||
|
||||
b->cursor = nir_before_instr(&intr->instr);
|
||||
|
||||
nir_def *table_idx =
|
||||
nir_ushr_imm(b, nir_channel(b, intr->src[0].ssa, 0), 24);
|
||||
nir_def *res_handle = nir_channel(b, intr->src[0].ssa, 0);
|
||||
nir_def *table_idx = nir_ushr_imm(b, res_handle, 24);
|
||||
nir_def *res_idx = nir_iand_imm(b, res_handle, BITFIELD_MASK(24));
|
||||
nir_def *res_table = nir_ior_imm(b, table_idx, pan_res_handle(62, 0));
|
||||
nir_def *buf_idx = nir_channel(b, intr->src[0].ssa, 1);
|
||||
nir_def *buf_idx = nir_iadd(b, res_idx, nir_channel(b, intr->src[0].ssa, 1));
|
||||
nir_def *desc_offset = nir_imul_imm(b, buf_idx, PANVK_DESCRIPTOR_SIZE);
|
||||
nir_def *size = nir_load_ubo(
|
||||
b, 1, 32, res_table, nir_iadd_imm(b, desc_offset, 4), .range = ~0u,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue