[virglrenderer-devel] [PATCH v2] vrend: Set scissor_state_dirty correctly.

Lepton Wu lepton at chromium.org
Tue Jul 24 23:20:55 UTC 2018


We forgot to set scissor_state_dirty when we disable GL_SCISSOR_TEST
in vrend_renderer_blit_int. This fixes bug mentioned in
https://lists.freedesktop.org/archives/virglrenderer-devel/2018-July/001230.html

Signed-off-by: Lepton Wu <lepton at chromium.org>
---
 src/vrend_renderer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 8a60fa6..3c2ce51 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -6765,10 +6765,10 @@ static void vrend_renderer_blit_int(struct vrend_context *ctx,
 
    if (info->scissor_enable) {
       glScissor(info->scissor.minx, info->scissor.miny, info->scissor.maxx - info->scissor.minx, info->scissor.maxy - info->scissor.miny);
-      ctx->sub->scissor_state_dirty = (1 << 0);
       glEnable(GL_SCISSOR_TEST);
    } else
       glDisable(GL_SCISSOR_TEST);
+   ctx->sub->scissor_state_dirty = (1 << 0);
 
    /* An GLES GL_INVALID_OPERATION is generated if one wants to blit from a
     * multi-sample fbo to a non multi-sample fbo and the source and destination
-- 
2.18.0.233.g985f88cf7e-goog



More information about the virglrenderer-devel mailing list