Module: Mesa Branch: main Commit: 383842fab812497a04a85e87d841e2d6af098320 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=383842fab812497a04a85e87d841e2d6af098320
Author: Tatsuyuki Ishi <ishitatsuy...@gmail.com> Date: Wed Sep 6 21:51:44 2023 +0900 radv: Fix dumping vertex descriptors with RADV_DEBUG=hang. Adding 3 words should be done before the uint32_t ** cast. This is in line with other places which uses pointer arithmetic on trace_id_ptr. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25081> --- src/amd/vulkan/radv_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index 68a1465f69e..8f683d998db 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -409,9 +409,9 @@ static void radv_dump_vertex_descriptors(const struct radv_device *device, const struct radv_graphics_pipeline *pipeline, FILE *f) { struct radv_shader *vs = radv_get_shader(pipeline->base.shaders, MESA_SHADER_VERTEX); - void *ptr = (uint64_t *)device->trace_id_ptr; + uint64_t *ptr = (uint64_t *)device->trace_id_ptr; uint32_t count = util_bitcount(vs->info.vs.vb_desc_usage_mask); - uint32_t *vb_ptr = &((uint32_t *)ptr)[3]; + uint32_t *vb_ptr = *(uint32_t **)(ptr + 3); if (!count) return;