Signed-off-by: Jan Sikorski jsikorski@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;