vkd3d: Skip draw call if doing depth test on null DSV.

D3D12 validation layer errors out, so unless we can prove that specific
behavior is relied upon, we should be okay to just ignore.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-08-31 12:01:28 +02:00
parent b54a1a6c2b
commit ff74ad0ec5
1 changed files with 8 additions and 0 deletions

View File

@ -4745,6 +4745,14 @@ static bool d3d12_command_list_update_graphics_pipeline(struct d3d12_command_lis
return false;
}
/* Detect error case early, otherwise, we end up creating new pipelines
* and crash later when looking at DSV formats. */
if (!list->dsv.view && list->state->graphics.dsv_format)
{
FIXME_ONCE("Attempting to render to NULL DSV with non-NULL format in PSO. Skipping draw call.\n");
return false;
}
variant_flags = d3d12_command_list_variant_flags(list);
/* Try to grab the pipeline we compiled ahead of time. If we cannot do so, fall back. */