From a0521762f4bc66ea73db11a6715291f736ef47ed Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Fri, 17 Apr 2026 00:19:25 +0200 Subject: [PATCH] radv: Fix gnu-empty-initializer errors in 8c10eab1 Fixes the following building errors: ../src/amd/vulkan/radv_rra.c:1369:43: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer] struct radv_bvh_stats_gfx12 stats = {}; ^ ../src/amd/vulkan/radv_rra.c:1376:45: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer] struct radv_bvh_stats_gfx10_3 stats = {}; ^ 2 errors generated. Fixes: 8c10eab1 ("radv: Add an option for dumping BVH stats") (cherry picked from commit dfca417db88dcb54fbcef0492136c593ed6fafb5) Part-of: --- .pick_status.json | 2 +- src/amd/vulkan/radv_rra.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 2c09135e633..ee2f4d55a86 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2014,7 +2014,7 @@ "description": "radv: Fix gnu-empty-initializer errors in 8c10eab1", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "8c10eab1f338ae297a7982b38592aded1a13a78e", "notes": null diff --git a/src/amd/vulkan/radv_rra.c b/src/amd/vulkan/radv_rra.c index bbe267a3226..d1af7ecdc28 100644 --- a/src/amd/vulkan/radv_rra.c +++ b/src/amd/vulkan/radv_rra.c @@ -1366,14 +1366,14 @@ dump_bvh_stats(struct radv_device *device, struct vk_acceleration_structure *acc float sah; float instance_sah; if (radv_use_bvh8(pdev)) { - struct radv_bvh_stats_gfx12 stats = {}; + struct radv_bvh_stats_gfx12 stats = {0}; radv_gather_bvh_stats_gfx12(data + header->bvh_offset, RADV_BVH_ROOT_NODE, 1, surface_area, blas_sah, &stats); sah = stats.sah; instance_sah = stats.instance_sah; fprintf(device->rra_trace.stats_file, ",%u,%u,%u,%u", stats.max_depth, stats.box_node_count, stats.primitive_node_count, stats.instance_node_count); } else { - struct radv_bvh_stats_gfx10_3 stats = {}; + struct radv_bvh_stats_gfx10_3 stats = {0}; radv_gather_bvh_stats_gfx10_3(data + header->bvh_offset, RADV_BVH_ROOT_NODE, 1, surface_area, blas_sah, &stats); sah = stats.sah; instance_sah = stats.instance_sah;