radv: Fix gnu-empty-initializer errors in 8c10eab1
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41011>
This commit is contained in:
Mauro Rossi 2026-04-17 00:19:25 +02:00 committed by Marge Bot
parent 46d396d9d8
commit dfca417db8

View file

@ -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;