From aef49b36052c4f53e9be0ac94a68486c71449fd4 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 20 Jan 2025 23:45:24 -0500 Subject: [PATCH] SDL: Properly initialize enable_color_write_mask --- src/FNA3D_Driver_SDL.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/FNA3D_Driver_SDL.c b/src/FNA3D_Driver_SDL.c index 3b691824..9ad04720 100644 --- a/src/FNA3D_Driver_SDL.c +++ b/src/FNA3D_Driver_SDL.c @@ -1551,9 +1551,6 @@ static SDL_GPUGraphicsPipeline* SDLGPU_INTERNAL_FetchGraphicsPipeline( colorAttachmentDescriptions[0].blend_state.alpha_blend_op = XNAToSDL_BlendOp[ renderer->fnaBlendState.alphaBlendFunction ]; - - /* FIXME: Can this be disabled when mask is R|G|B|A? -flibit */ - colorAttachmentDescriptions[0].blend_state.enable_color_write_mask = true; } else { @@ -1578,6 +1575,12 @@ static SDL_GPUGraphicsPipeline* SDLGPU_INTERNAL_FetchGraphicsPipeline( colorAttachmentDescriptions[3].blend_state.color_write_mask = renderer->fnaBlendState.colorWriteEnable3; + /* FIXME: Can this be disabled when mask is R|G|B|A? -flibit */ + colorAttachmentDescriptions[0].blend_state.enable_color_write_mask = true; + colorAttachmentDescriptions[1].blend_state.enable_color_write_mask = true; + colorAttachmentDescriptions[2].blend_state.enable_color_write_mask = true; + colorAttachmentDescriptions[3].blend_state.enable_color_write_mask = true; + colorAttachmentDescriptions[0].format = hash.colorFormats[0]; colorAttachmentDescriptions[1].format = hash.colorFormats[1]; colorAttachmentDescriptions[2].format = hash.colorFormats[2];