freedreno: scissor vs disabled scissor micro-opt
[mesa.git] / src / gallium / drivers / freedreno / freedreno_state.c
index b2e8c53676c3c85e227f5ffd8ef67f9849d9df5a..698ca82e521437515d7327d5a52c608c8d2b77fd 100644 (file)
@@ -400,6 +400,12 @@ fd_rasterizer_state_bind(struct pipe_context *pctx, void *hwcso)
        ctx->rasterizer = hwcso;
        ctx->dirty |= FD_DIRTY_RASTERIZER;
 
+       if (ctx->rasterizer && ctx->rasterizer->scissor) {
+               ctx->current_scissor = &ctx->scissor;
+       } else {
+               ctx->current_scissor = &ctx->disabled_scissor;
+       }
+
        /* if scissor enable bit changed we need to mark scissor
         * state as dirty as well:
         * NOTE: we can do a shallow compare, since we only care