From 015fde5e231b4da88a4fcaf1d03d0f46c2cc6072 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 4 Mar 2024 15:26:44 +0100 Subject: [PATCH] tests/shader_runner: Set the vkd3d-shader API version in the Vulkan runner. --- tests/shader_runner_vulkan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index 35db729b..c919e256 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -420,7 +420,8 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour struct vkd3d_shader_resource_binding bindings[MAX_RESOURCES + MAX_SAMPLERS]; struct vkd3d_shader_push_constant_buffer push_constants; struct vkd3d_shader_resource_binding *binding; - struct vkd3d_shader_compile_option options[1]; + struct vkd3d_shader_compile_option options[2]; + struct vkd3d_shader_compile_option *option; unsigned int i, compile_options; char profile[7]; char *messages; @@ -449,10 +450,14 @@ static bool compile_shader(struct vulkan_shader_runner *runner, const char *sour info.options = options; info.option_count = 0; + + option = &options[info.option_count++]; + option->name = VKD3D_SHADER_COMPILE_OPTION_API_VERSION; + option->value = VKD3D_SHADER_API_VERSION_1_10; + compile_options = runner->r.compile_options; if (compile_options) { - struct vkd3d_shader_compile_option *option; if (compile_options & (D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR)) {