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>
(cherry picked from commit 845611bb43b7c74f3a6cfb03ea3525bc6cac1620)
This commit is contained in:

committed by
Eric Engestrom

parent
a9b90aa1ce
commit
8d01b5577b
@@ -424,7 +424,7 @@
|
||||
"description": "panvk: Take resource index in valhall_lower_get_ssbo_size",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "e4613f8b2388e583b15bbbe9595458b2595f1cc2",
|
||||
"notes": null
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user