etnaviv: compiled_framebuffer_state: get rid of SE_SCISSOR_*
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 22 Mar 2020 21:42:35 +0000 (22:42 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 15:30:15 +0000 (15:30 +0000)
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>

src/gallium/drivers/etnaviv/etnaviv_internal.h
src/gallium/drivers/etnaviv/etnaviv_state.c

index 0a846c4fbc1c0dd91d60c8832c9be77fecfa4832..fabd43199eefafbcf389526ab99b04ed7e8fa9d8 100644 (file)
@@ -187,10 +187,6 @@ struct compiled_framebuffer_state {
    struct etna_reloc PE_PIPE_COLOR_ADDR[ETNA_MAX_PIXELPIPES];
    uint32_t PE_COLOR_STRIDE;
    uint32_t PE_MEM_CONFIG;
-   uint32_t SE_SCISSOR_LEFT;
-   uint32_t SE_SCISSOR_TOP;
-   uint32_t SE_SCISSOR_RIGHT;
-   uint32_t SE_SCISSOR_BOTTOM;
    uint32_t RA_MULTISAMPLE_UNK00E04;
    uint32_t RA_MULTISAMPLE_UNK00E10[VIVS_RA_MULTISAMPLE_UNK00E10__LEN];
    uint32_t RA_CENTROID_TABLE[VIVS_RA_CENTROID_TABLE__LEN];
index d1cf4711eff2d05a29e5ac282085b4a5cc716269..5559cc54f0b6f0e2020edfc8c7ad6eeb492207de 100644 (file)
@@ -349,12 +349,6 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
       break;
    }
 
-   /* Scissor setup */
-   cs->SE_SCISSOR_LEFT = 0; /* affected by rasterizer and scissor state as well */
-   cs->SE_SCISSOR_TOP = 0;
-   cs->SE_SCISSOR_RIGHT = fb->width;
-   cs->SE_SCISSOR_BOTTOM = fb->height;
-
    cs->TS_MEM_CONFIG = ts_mem_config;
    cs->PE_MEM_CONFIG = pe_mem_config;
 
@@ -657,16 +651,13 @@ static bool
 etna_update_clipping(struct etna_context *ctx)
 {
    const struct etna_rasterizer_state *rasterizer = etna_rasterizer_state(ctx->rasterizer);
+   const struct pipe_framebuffer_state *fb = &ctx->framebuffer_s;
 
    /* clip framebuffer against viewport */
-   uint32_t scissor_left =
-      MAX2(ctx->framebuffer.SE_SCISSOR_LEFT, ctx->viewport.SE_SCISSOR_LEFT);
-   uint32_t scissor_top =
-      MAX2(ctx->framebuffer.SE_SCISSOR_TOP, ctx->viewport.SE_SCISSOR_TOP);
-   uint32_t scissor_right =
-      MIN2(ctx->framebuffer.SE_SCISSOR_RIGHT, ctx->viewport.SE_SCISSOR_RIGHT);
-   uint32_t scissor_bottom =
-      MIN2(ctx->framebuffer.SE_SCISSOR_BOTTOM, ctx->viewport.SE_SCISSOR_BOTTOM);
+   uint32_t scissor_left = ctx->viewport.SE_SCISSOR_LEFT;
+   uint32_t scissor_top = ctx->viewport.SE_SCISSOR_TOP;
+   uint32_t scissor_right = MIN2(fb->width, ctx->viewport.SE_SCISSOR_RIGHT);
+   uint32_t scissor_bottom = MIN2(fb->height, ctx->viewport.SE_SCISSOR_BOTTOM);
 
    /* clip against scissor */
    if (rasterizer->scissor) {