mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests/shader_runner_vulkan: Avoid using ok() for shader compilation failues in create_graphics_pipeline().
Using ok() may result in todo's succeeding when create_shader_stage() succeeds, but vkCreateGraphicsPipelines() fails. There's not much point in using ok() here in the first place though, because ultimately the draw operation is going to fail when shader compilation failed.
This commit is contained in:
parent
94900131a8
commit
a89ceb6590
Notes:
Henri Verbeet
2024-11-11 15:59:39 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1252
@ -602,9 +602,7 @@ static VkPipeline create_graphics_pipeline(struct vulkan_shader_runner *runner,
|
|||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
/* We ok() only when failing here, so that we don't result in a "todo
|
trace("Failed to compile HLSL shader(s).\n");
|
||||||
* succeeded" when the todo applies to pipeline linking. */
|
|
||||||
todo_if (runner->r.is_todo) ok(false, "Failed to compile shaders.\n");
|
|
||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -623,9 +621,9 @@ static VkPipeline create_graphics_pipeline(struct vulkan_shader_runner *runner,
|
|||||||
if (runner->r.shader_source[SHADER_TYPE_GS])
|
if (runner->r.shader_source[SHADER_TYPE_GS])
|
||||||
ret &= create_shader_stage(runner, &stage_desc[stage_count++], SHADER_TYPE_GS, VK_SHADER_STAGE_GEOMETRY_BIT);
|
ret &= create_shader_stage(runner, &stage_desc[stage_count++], SHADER_TYPE_GS, VK_SHADER_STAGE_GEOMETRY_BIT);
|
||||||
|
|
||||||
todo_if (runner->r.is_todo) ok(ret, "Failed to compile shaders.\n");
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
|
trace("Failed to compile SPIR-V shader(s).\n");
|
||||||
for (i = 0; i < ARRAY_SIZE(stage_desc); ++i)
|
for (i = 0; i < ARRAY_SIZE(stage_desc); ++i)
|
||||||
VK_CALL(vkDestroyShaderModule(device, stage_desc[i].module, NULL));
|
VK_CALL(vkDestroyShaderModule(device, stage_desc[i].module, NULL));
|
||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
|
Loading…
Reference in New Issue
Block a user