gsk/vulkan/renderpass: Don't scale scissor and render area
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 3 Apr 2023 13:06:18 +0000 (10:06 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 3 Apr 2023 13:59:45 +0000 (10:59 -0300)
commitdb1d2781007cb5a9e5ff4d03305743351286da11
tree5c4184d8d1bdb7652396b6bc2e6f9bd8458d5f27
parentdde029c3d1427e15ef522006967fad2766b28898
gsk/vulkan/renderpass: Don't scale scissor and render area

The rects passed to the clip region are in buffer coordinates, and
must not be scaled. Consider the following scenario: Wayland, with
a 1024x768@2 window. That gives us a 2048x1536 raw image. To setup
the Vulkan render pass code, we'd scale 2048x1536 *again*, to an
unreasonable 4196x3072, which is (1) incorrect and (2) really
incorrect and (3) can lead to crashes at best, full GPU resets
at worst - and a GPU reset is incredibly not fun!

Now that we pass the right clip regions at the right coordinates
at all times, remove the extra scaling from the render pass.
gsk/vulkan/gskvulkanrenderpass.c