Attempt to work around the PowerVR bug again (pretransform undid the old workaround in landscape). See #12276

This commit is contained in:
Henrik Rydgård 2019-09-01 18:19:32 +02:00
parent 1d528d6f3b
commit 5847bf3201

View File

@ -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);