[PATCH v2 1/3] wined3d: Make sure scissor offsets are not negative.
Jan Sikorski
jsikorski at codeweavers.com
Tue May 4 05:43:56 CDT 2021
Signed-off-by: Jan Sikorski <jsikorski at codeweavers.com>
---
v2: Added a reference to the spec that mandates this.
---
dlls/wined3d/context_vk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c
index fbc1e294fcd..83b1d081514 100644
--- a/dlls/wined3d/context_vk.c
+++ b/dlls/wined3d/context_vk.c
@@ -2204,6 +2204,11 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte
key->scissor.extent.width = key->viewport.width;
key->scissor.extent.height = key->viewport.height;
}
+ /* Scissor offsets need to be non-negative (VUID-VkPipelineViewportStateCreateInfo-x-02821) */
+ if (key->scissor.offset.x < 0)
+ key->scissor.offset.x = 0;
+ if (key->scissor.offset.y < 0)
+ key->scissor.offset.y = 0;
key->viewport.y += key->viewport.height;
key->viewport.height = -key->viewport.height;
--
2.30.2
More information about the wine-devel
mailing list