[vulkan] Apply 2d scale to clipping bounds

It was a little off-putting getting an incorrectly clipped console when
using non-unitary scale (especially since I was trying to show abbator
something).
This commit is contained in:
Bill Currie 2023-12-24 02:14:24 +09:00
parent 101c50e3e1
commit dd11a7b378

View file

@ -1803,6 +1803,10 @@ Vulkan_Draw_SetClip (int x, int y, int w, int h, vulkan_ctx_t *ctx)
h += y;
y = 0;
}
x *= ctx->twod_scale;
y *= ctx->twod_scale;
w *= ctx->twod_scale;
h *= ctx->twod_scale;
auto cr = &dframe->clip_range.a[dframe->clip_range.size - 1];
if (x != cr->clip.offset.x || y != cr->clip.offset.y
|| (uint32_t) w != cr->clip.extent.width