vulkan/runtime: Fix gnu-empty-initializer error in vk_pipeline.c

Fixes the following building error happening with clang:

FAILED: src/vulkan/runtime/libvulkan_runtime.a.p/vk_pipeline.c.o
...
../src/vulkan/runtime/vk_pipeline.c:3689:41: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
         struct vk_shader *shaders[3] = {};
                                        ^
1 error generated.

Fixes: 51966cc4 ("vulkan: add vk_shader_ops::replay_at vfunc stub")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39642>
This commit is contained in:
Mauro Rossi 2026-02-01 23:11:16 +01:00
parent 184747e240
commit 1e2cbd2c29

View file

@ -3686,7 +3686,7 @@ vk_create_rt_pipeline(struct vk_device *device,
if (pipeline_flags &
VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR) {
const struct vk_device_shader_ops *ops = device->shader_ops;
struct vk_shader *shaders[3] = {};
struct vk_shader *shaders[3] = {0};
for (uint32_t s = 0; s < group->stage_count; s++)
shaders[s] = group->stages[s].shader;
ops->replay_rt_shader_group(