From 31c3d46925a058d29e5e50c43e8c6724e77e4193 Mon Sep 17 00:00:00 2001 From: Shaun Ren Date: Wed, 18 Dec 2024 19:02:03 -0500 Subject: [PATCH] tests/shader_runner_vulkan: Check if create_shader_stage() fails in create_compute_pipeline(). --- tests/shader_runner_vulkan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index 3d525025..42ddb5f4 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -861,12 +861,16 @@ static VkPipeline create_compute_pipeline(struct vulkan_shader_runner *runner, V bool ret; ret = compile_hlsl_and_scan(runner, SHADER_TYPE_CS); - todo_if (runner->r.is_todo) ok(ret, "Failed to compile shader.\n"); if (!ret) + { + trace("Failed to compile HLSL shader.\n"); return VK_NULL_HANDLE; + } ret = create_shader_stage(runner, &pipeline_desc.stage, SHADER_TYPE_CS, VK_SHADER_STAGE_COMPUTE_BIT); - ok(ret, "Failed to compile shader.\n"); + todo_if (runner->r.is_todo) ok(ret, "Failed to compile SPIR-V shader.\n"); + if (!ret) + return VK_NULL_HANDLE; pipeline_desc.layout = pipeline_layout;