From bc2bf6c1a76f3d4cc012325130ec5b4e20df4f12 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Tue, 22 Apr 2025 12:47:50 +0000 Subject: [PATCH] panvk: reset dyn_bufs map count to 0 in create_copy_table We were forgetting to reset the map count to 0 in case of dyn_bufs in create_copy_table. This was causing invalid copy entries to be added to the table causing invalid copies in most situation with holes in the set definition while still binding set 0 or at worst an assert to be triggered in cmd_fill_dyn_bufs. This fixes "dEQP-GLES3.functional.ubo.*" and dEQP-GLES31.functional.ubo.*" on PanVK+ANGLE. Signed-off-by: Mary Guillemard Fixes: e350c334b6b2 ("panvk: Extend the descriptor lowering pass to support Valhall") Reviewed-by: Boris Brezillon Reviewed-by: Eric R. Smith Part-of: (cherry picked from commit 8d2e16cc110b081c4fd8910aac93715cdf6d005c) --- .pick_status.json | 2 +- src/panfrost/vulkan/panvk_vX_nir_lower_descriptors.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7193155ec2f..b4d28fac0d7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -294,7 +294,7 @@ "description": "panvk: reset dyn_bufs map count to 0 in create_copy_table", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e350c334b6b2c7b420f326501533984c43d7c900", "notes": null diff --git a/src/panfrost/vulkan/panvk_vX_nir_lower_descriptors.c b/src/panfrost/vulkan/panvk_vX_nir_lower_descriptors.c index 19dc09b6e55..6349aa0baf4 100644 --- a/src/panfrost/vulkan/panvk_vX_nir_lower_descriptors.c +++ b/src/panfrost/vulkan/panvk_vX_nir_lower_descriptors.c @@ -1016,7 +1016,7 @@ create_copy_table(nir_shader *nir, struct lower_desc_ctx *ctx) } desc_info->dummy_sampler_handle = pan_res_handle(0, dummy_sampler_idx); - copy_count = desc_info->dyn_bufs.count + desc_info->dyn_bufs.count; + copy_count = desc_info->dyn_bufs.count; #endif if (copy_count == 0) @@ -1043,6 +1043,7 @@ create_copy_table(nir_shader *nir, struct lower_desc_ctx *ctx) desc_info->dyn_bufs_start = dummy_sampler_idx + 1; desc_info->dyn_bufs.map = rzalloc_array(ctx->ht, uint32_t, copy_count); + desc_info->dyn_bufs.count = 0; assert(desc_info->dyn_bufs.map); #endif