Fix viewport overlay when using -ve viewport height on KHR_maintenance1

This commit is contained in:
baldurk
2019-08-15 14:56:22 +01:00
parent 0522a636ad
commit b403c32b87
+6
View File
@@ -972,8 +972,14 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, CompType typeHint, Floa
if(m_pDriver->m_ExtensionsEnabled[VkCheckExt_AMD_neg_viewport] ||
m_pDriver->m_ExtensionsEnabled[VkCheckExt_KHR_maintenance1])
{
ubo->RectSize.y = fabs(viewport.height);
// VK_KHR_maintenance1 requires the position to be adjusted as well
if(m_pDriver->m_ExtensionsEnabled[VkCheckExt_KHR_maintenance1] && viewport.height < 0.0f)
ubo->RectPosition.y += viewport.height;
}
m_Overlay.m_CheckerUBO.Unmap();
vt->CmdBindPipeline(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS,