From 95bdcc0bd38ed36d230f2d4580b449cda1a6d29b Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 11 Oct 2020 03:19:39 +0100 Subject: [PATCH] c/main: Round viewport to cover the same as scissors --- src/xrt/compositor/main/comp_renderer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c index 66b6d5ab9..d5343e680 100644 --- a/src/xrt/compositor/main/comp_renderer.c +++ b/src/xrt/compositor/main/comp_renderer.c @@ -229,15 +229,15 @@ renderer_set_viewport_scissor(float scale_x, VkRect2D *s, struct xrt_view *view) { - v->x = view->viewport.x_pixels * scale_x; - v->y = view->viewport.y_pixels * scale_y; - v->width = view->viewport.w_pixels * scale_x; - v->height = view->viewport.h_pixels * scale_y; - s->offset.x = (int32_t)(view->viewport.x_pixels * scale_x); s->offset.y = (int32_t)(view->viewport.y_pixels * scale_y); s->extent.width = (uint32_t)(view->viewport.w_pixels * scale_x); s->extent.height = (uint32_t)(view->viewport.h_pixels * scale_y); + + v->x = s->offset.x; + v->y = s->offset.y; + v->width = s->extent.width; + v->height = s->extent.height; } static void