From 39db6731c056f19793a901613db61ce7f3d29021 Mon Sep 17 00:00:00 2001 From: Evan Tang Date: Wed, 2 Jul 2025 16:23:51 -0500 Subject: [PATCH] vkd3d: Mask colour writes on graphics pipelines without fragment shaders. Vulkan leaves the contents of colour attachments undefined in this case. --- libs/vkd3d/state.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 0a5bd1122..517354c90 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -3401,6 +3401,11 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s 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], VK_SHADER_STAGE_FRAGMENT_BIT, &default_ps, NULL))) goto fail;