Skip to content

Commit

Permalink
Merge pull request #11691 from hrydgard/workaround-harvest-moon-adren…
Browse files Browse the repository at this point in the history
…o-bug

WIP: Vulkan/adreno: Apply workaround for Harvest Moon issue #10421
  • Loading branch information
unknownbrackets authored Dec 23, 2018
2 parents f32ac21 + 0037da5 commit 2dbdd73
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions GPU/Vulkan/StateMappingVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ 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, for bug where the color write mask is not applied correctly on Adreno.
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;
if (!key.blendEnable) {
key.blendEnable = true;
key.blendOpAlpha = VK_BLEND_OP_ADD;
key.srcAlpha = VK_BLEND_FACTOR_ZERO;
key.destAlpha = VK_BLEND_FACTOR_ONE;
}
key.blendOpColor = VK_BLEND_OP_ADD;
key.srcColor = VK_BLEND_FACTOR_ZERO;
key.destColor = VK_BLEND_FACTOR_ONE;
}
}
}

Expand Down

0 comments on commit 2dbdd73

Please sign in to comment.