freedreno/a6xx: Don't emit src state when clearing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
This commit is contained in:
parent
416513d915
commit
ab61393bc7
|
@ -518,21 +518,24 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||||
OUT_RING(ring, A6XX_CP_SET_MARKER_0_MODE(RM6_BLIT2DSCALE));
|
OUT_RING(ring, A6XX_CP_SET_MARKER_0_MODE(RM6_BLIT2DSCALE));
|
||||||
|
|
||||||
uint32_t nr_samples = fd_resource_nr_samples(&dst->base);
|
uint32_t nr_samples = fd_resource_nr_samples(&dst->base);
|
||||||
|
|
||||||
|
if (!color) {
|
||||||
sx1 = sbox->x * nr_samples;
|
sx1 = sbox->x * nr_samples;
|
||||||
sy1 = sbox->y;
|
sy1 = sbox->y;
|
||||||
sx2 = (sbox->x + sbox->width) * nr_samples - 1;
|
sx2 = (sbox->x + sbox->width) * nr_samples - 1;
|
||||||
sy2 = sbox->y + sbox->height - 1;
|
sy2 = sbox->y + sbox->height - 1;
|
||||||
|
|
||||||
dx1 = dbox->x * nr_samples;
|
|
||||||
dy1 = dbox->y;
|
|
||||||
dx2 = (dbox->x + dbox->width) * nr_samples - 1;
|
|
||||||
dy2 = dbox->y + dbox->height - 1;
|
|
||||||
|
|
||||||
OUT_PKT4(ring, REG_A6XX_GRAS_2D_SRC_TL_X, 4);
|
OUT_PKT4(ring, REG_A6XX_GRAS_2D_SRC_TL_X, 4);
|
||||||
OUT_RING(ring, A6XX_GRAS_2D_SRC_TL_X_X(sx1));
|
OUT_RING(ring, A6XX_GRAS_2D_SRC_TL_X_X(sx1));
|
||||||
OUT_RING(ring, A6XX_GRAS_2D_SRC_BR_X_X(sx2));
|
OUT_RING(ring, A6XX_GRAS_2D_SRC_BR_X_X(sx2));
|
||||||
OUT_RING(ring, A6XX_GRAS_2D_SRC_TL_Y_Y(sy1));
|
OUT_RING(ring, A6XX_GRAS_2D_SRC_TL_Y_Y(sy1));
|
||||||
OUT_RING(ring, A6XX_GRAS_2D_SRC_BR_Y_Y(sy2));
|
OUT_RING(ring, A6XX_GRAS_2D_SRC_BR_Y_Y(sy2));
|
||||||
|
}
|
||||||
|
|
||||||
|
dx1 = dbox->x * nr_samples;
|
||||||
|
dy1 = dbox->y;
|
||||||
|
dx2 = (dbox->x + dbox->width) * nr_samples - 1;
|
||||||
|
dy2 = dbox->y + dbox->height - 1;
|
||||||
|
|
||||||
OUT_PKT4(ring, REG_A6XX_GRAS_2D_DST_TL, 2);
|
OUT_PKT4(ring, REG_A6XX_GRAS_2D_DST_TL, 2);
|
||||||
OUT_RING(ring, A6XX_GRAS_2D_DST_TL_X(dx1) | A6XX_GRAS_2D_DST_TL_Y(dy1));
|
OUT_RING(ring, A6XX_GRAS_2D_DST_TL_X(dx1) | A6XX_GRAS_2D_DST_TL_Y(dy1));
|
||||||
|
@ -629,6 +632,7 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||||
|
|
||||||
for (unsigned i = 0; i < info->dst.box.depth; i++) {
|
for (unsigned i = 0; i < info->dst.box.depth; i++) {
|
||||||
|
|
||||||
|
if (!color)
|
||||||
emit_blit_src(ring, info, sbox->z + i, nr_samples);
|
emit_blit_src(ring, info, sbox->z + i, nr_samples);
|
||||||
|
|
||||||
emit_blit_dst(ring, info, dbox->z + i);
|
emit_blit_dst(ring, info, dbox->z + i);
|
||||||
|
|
Loading…
Reference in New Issue