mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Some renaming. Store the BlendState/MaskState.
This commit is contained in:
1 parent
8447ede989
commit
c784c0e94b
7 files changed
+56
-53
No files matched your search
@@ -162,11 +162,9 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
|
||||
key.logicOp = VK_LOGIC_OP_CLEAR;
|
||||
}
|
||||
|
||||
GenericMaskState maskState;
|
||||
GenericMaskState &maskState = pipelineState_.maskState;
|
||||
GenericBlendState &blendState = pipelineState_.blendState;
|
||||
ConvertMaskState(maskState, gstate_c.allowFramebufferRead);
|
||||
|
||||
// Set blend - unless we need to do it in the shader.
|
||||
GenericBlendState blendState;
|
||||
ConvertBlendState(blendState, gstate_c.allowFramebufferRead, maskState.applyFramebufferRead);
|
||||
|
||||
if (blendState.applyFramebufferRead || maskState.applyFramebufferRead) {
|
||||
@@ -181,7 +179,7 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
|
||||
gstate_c.Dirty(DIRTY_FRAGMENTSHADER_STATE);
|
||||
}
|
||||
|
||||
if (blendState.enabled) {
|
||||
if (blendState.blendEnabled) {
|
||||
key.blendEnable = true;
|
||||
key.blendOpColor = vkBlendEqLookup[(size_t)blendState.eqColor];
|
||||
key.blendOpAlpha = vkBlendEqLookup[(size_t)blendState.eqAlpha];
|
||||
@@ -209,10 +207,10 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
|
||||
}
|
||||
|
||||
key.colorWriteMask =
|
||||
(maskState.rgba[0] ? VK_COLOR_COMPONENT_R_BIT : 0) |
|
||||
(maskState.rgba[1] ? VK_COLOR_COMPONENT_G_BIT : 0) |
|
||||
(maskState.rgba[2] ? VK_COLOR_COMPONENT_B_BIT : 0) |
|
||||
(maskState.rgba[3] ? VK_COLOR_COMPONENT_A_BIT : 0);
|
||||
(maskState.maskRGBA[0] ? VK_COLOR_COMPONENT_R_BIT : 0) |
|
||||
(maskState.maskRGBA[1] ? VK_COLOR_COMPONENT_G_BIT : 0) |
|
||||
(maskState.maskRGBA[2] ? VK_COLOR_COMPONENT_B_BIT : 0) |
|
||||
(maskState.maskRGBA[3] ? VK_COLOR_COMPONENT_A_BIT : 0);
|
||||
|
||||
// Workaround proposed in #10421, for bug where the color write mask is not applied correctly on Adreno.
|
||||
if ((gstate.pmskc & 0x00FFFFFF) == 0x00FFFFFF && g_Config.bVendorBugChecksEnabled && draw_->GetBugs().Has(Draw::Bugs::COLORWRITEMASK_BROKEN_WITH_DEPTHTEST)) {
|
||||
|
||||
Reference in new issue
Block a user