mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests/shader_runner: Pass only valid stages to vkCreateGraphicsPipelines().
The first thing that's broken is that the "sType" field isn't VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, but we're also passing invalid "module" handles.
This commit is contained in:
parent
7fbd753cf7
commit
037e8436c9
Notes:
Alexandre Julliard
2024-04-22 23:38:55 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/813
@ -731,19 +731,24 @@ static VkPipeline create_graphics_pipeline(struct vulkan_shader_runner *runner,
|
|||||||
VkPipelineShaderStageCreateInfo stage_desc[4];
|
VkPipelineShaderStageCreateInfo stage_desc[4];
|
||||||
struct vkd3d_shader_code vs_dxbc;
|
struct vkd3d_shader_code vs_dxbc;
|
||||||
VkDevice device = runner->device;
|
VkDevice device = runner->device;
|
||||||
|
unsigned int stage_count = 0;
|
||||||
VkPipeline pipeline;
|
VkPipeline pipeline;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
VkResult vr;
|
VkResult vr;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
memset(stage_desc, 0, sizeof(stage_desc));
|
memset(stage_desc, 0, sizeof(stage_desc));
|
||||||
ret = create_shader_stage(runner, &stage_desc[0], "vs", VK_SHADER_STAGE_VERTEX_BIT, runner->r.vs_source, &vs_dxbc)
|
ret = create_shader_stage(runner, &stage_desc[stage_count++], "vs",
|
||||||
&& create_shader_stage(runner, &stage_desc[1], "ps", VK_SHADER_STAGE_FRAGMENT_BIT, runner->r.ps_source, NULL);
|
VK_SHADER_STAGE_VERTEX_BIT, runner->r.vs_source, &vs_dxbc);
|
||||||
|
ret &= create_shader_stage(runner, &stage_desc[stage_count++], "ps",
|
||||||
|
VK_SHADER_STAGE_FRAGMENT_BIT, runner->r.ps_source, NULL);
|
||||||
|
|
||||||
if (runner->r.hs_source)
|
if (runner->r.hs_source)
|
||||||
{
|
{
|
||||||
ret &= create_shader_stage(runner, &stage_desc[1], "hs", VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, runner->r.hs_source, NULL);
|
ret &= create_shader_stage(runner, &stage_desc[stage_count++], "hs",
|
||||||
ret &= create_shader_stage(runner, &stage_desc[2], "ds", VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, runner->r.ds_source, NULL);
|
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, runner->r.hs_source, NULL);
|
||||||
|
ret &= create_shader_stage(runner, &stage_desc[stage_count++], "ds",
|
||||||
|
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, runner->r.ds_source, NULL);
|
||||||
}
|
}
|
||||||
todo_if (runner->r.is_todo) ok(ret, "Failed to compile shaders.\n");
|
todo_if (runner->r.is_todo) ok(ret, "Failed to compile shaders.\n");
|
||||||
if (!ret)
|
if (!ret)
|
||||||
@ -842,7 +847,7 @@ static VkPipeline create_graphics_pipeline(struct vulkan_shader_runner *runner,
|
|||||||
|
|
||||||
ms_desc.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
|
ms_desc.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
|
||||||
|
|
||||||
pipeline_desc.stageCount = ARRAY_SIZE(stage_desc);
|
pipeline_desc.stageCount = stage_count;
|
||||||
pipeline_desc.pStages = stage_desc;
|
pipeline_desc.pStages = stage_desc;
|
||||||
pipeline_desc.pVertexInputState = &input_desc;
|
pipeline_desc.pVertexInputState = &input_desc;
|
||||||
pipeline_desc.pInputAssemblyState = &ia_desc;
|
pipeline_desc.pInputAssemblyState = &ia_desc;
|
||||||
|
Loading…
Reference in New Issue
Block a user