Skip to content

Commit

Permalink
SDL: Properly initialize enable_color_write_mask
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Jan 21, 2025
1 parent 3d160cb commit aef49b3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/FNA3D_Driver_SDL.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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];
Expand Down

0 comments on commit aef49b3

Please sign in to comment.