vkd3d: Mask colour writes on graphics pipelines without fragment shaders.

Vulkan leaves the contents of colour attachments undefined in this case.
This commit is contained in:
Evan Tang
2025-07-02 16:23:51 -05:00
committed by Henri Verbeet
parent 3163e589bc
commit 39db6731c0
Notes: Henri Verbeet 2025-07-16 18:16:36 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1617

View File

@@ -3401,6 +3401,11 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
if (!desc->ps.pShaderBytecode) if (!desc->ps.pShaderBytecode)
{ {
for (i = 0; i < rt_count; i++)
{
graphics->blend_attachments[i].colorWriteMask = 0;
}
if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count], if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count],
VK_SHADER_STAGE_FRAGMENT_BIT, &default_ps, NULL))) VK_SHADER_STAGE_FRAGMENT_BIT, &default_ps, NULL)))
goto fail; goto fail;