Skip to content
Permalink
Browse files

Attempt to work around the PowerVR bug again (pretransform undid the …

…old workaround in landscape). See #12276
  • Loading branch information...
hrydgard committed Sep 1, 2019
1 parent 1d528d6 commit 5847bf3201f058a7b6b7e76962f64d9ca7a3fc9b
Showing with 4 additions and 1 deletion.
  1. +4 −1 Common/Vulkan/VulkanContext.cpp
@@ -933,9 +933,12 @@ bool VulkanContext::InitSwapchain() {
swapChainExtent_.height = clamp(surfCapabilities_.currentExtent.height, surfCapabilities_.minImageExtent.height, surfCapabilities_.maxImageExtent.height);

if (physicalDeviceProperties_[physical_device_].properties.vendorID == VULKAN_VENDOR_IMGTEC) {
ILOG("Applying PowerVR hack (rounding off the dimensions!)");
// Swap chain width hack to avoid issue #11743 (PowerVR driver bug).
// TODO: Check if still broken if pretransform is used!
// To keep the size consistent even with pretransform, also round off the height.
// This is fixed in newer PowerVR drivers but I don't know the cutoff.
swapChainExtent_.width &= ~31;
swapChainExtent_.height &= ~31;
}

ILOG("swapChainExtent: %dx%d", swapChainExtent_.width, swapChainExtent_.height);

0 comments on commit 5847bf3

Please sign in to comment.
You can’t perform that action at this time.