Skip to content

Commit

Permalink
Vulkan/adreno: Apply workaround for Harvest Moon issue #10421
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Dec 22, 2018
1 parent 4cef803 commit 79ef185
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions GPU/Vulkan/StateMappingVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,18 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
}

key.colorWriteMask = (rmask ? VK_COLOR_COMPONENT_R_BIT : 0) | (gmask ? VK_COLOR_COMPONENT_G_BIT : 0) | (bmask ? VK_COLOR_COMPONENT_B_BIT : 0) | (amask ? VK_COLOR_COMPONENT_A_BIT : 0);

// Workaround proposed in #10421
if ((gstate.pmskc & 0x00FFFFFF) == 0x00FFFFFF && vulkan_->GetPhysicalDeviceProperties(vulkan_->GetCurrentPhysicalDevice()).vendorID == VULKAN_VENDOR_QUALCOMM) {
key.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
key.blendEnable = true;
key.blendOpColor = VK_BLEND_OP_ADD;
key.blendOpAlpha = VK_BLEND_OP_ADD;

This comment has been minimized.

Copy link
@unknownbrackets

unknownbrackets Dec 22, 2018

Collaborator

Ah, for a long-term workaround, alpha probably needs more thought. In Harvest Moon, it was not using blend or stencil, but if stencil is active this might need a different value.

-[Unknown]

key.srcColor = VK_BLEND_FACTOR_ZERO;
key.srcAlpha = VK_BLEND_FACTOR_ZERO;
key.destColor = VK_BLEND_FACTOR_ONE;
key.destAlpha = VK_BLEND_FACTOR_ONE;
}
}
}

Expand Down

0 comments on commit 79ef185

Please sign in to comment.