From ff4a632fbfc2b95d4d791680676eff9f897cbb75 Mon Sep 17 00:00:00 2001 From: Aliya Pazylbekova Date: Mon, 8 Jun 2020 11:39:55 -0400 Subject: [PATCH] Vk pixel history: fix scissor test bug For when scissor offset is negative --- renderdoc/driver/vulkan/vk_pixelhistory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_pixelhistory.cpp b/renderdoc/driver/vulkan/vk_pixelhistory.cpp index 739d3e306..3b866be24 100644 --- a/renderdoc/driver/vulkan/vk_pixelhistory.cpp +++ b/renderdoc/driver/vulkan/vk_pixelhistory.cpp @@ -1716,9 +1716,9 @@ private: { const VkOffset2D &offset = pScissors[i].offset; const VkExtent2D &extent = pScissors[i].extent; - if((m_CallbackInfo.x >= (uint32_t)offset.x) && (m_CallbackInfo.y >= (uint32_t)offset.y) && - (m_CallbackInfo.x < (offset.x + extent.width)) && - (m_CallbackInfo.y < (offset.y + extent.height))) + if(((int32_t)m_CallbackInfo.x >= offset.x) && ((int32_t)m_CallbackInfo.y >= offset.y) && + ((int32_t)m_CallbackInfo.x < ((int64_t)offset.x + (int64_t)extent.width)) && + ((int32_t)m_CallbackInfo.y < ((int64_t)offset.y + (int64_t)extent.height))) inRegion = true; else inAllRegions = false;