diff --git a/src/freedreno/perfcntrs/fd5_perfcntr.c b/src/freedreno/perfcntrs/fd5_perfcntr.c index 3204028a0ab9..3d42ad9f997b 100644 --- a/src/freedreno/perfcntrs/fd5_perfcntr.c +++ b/src/freedreno/perfcntrs/fd5_perfcntr.c @@ -613,7 +613,7 @@ static const struct fd_perfcntr_countable vsc_countables[] = { COUNTABLE(PERF_VSC_EOT_NUM, UINT64, AVERAGE), }; -/* VBIF counters probably not too userful for userspace, and they make +/* VBIF counters probably not too useful for userspace, and they make * frameretrace take many more passes to collect all the metrics, so * for now let's hide them. */ diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_blitter.c b/src/gallium/drivers/freedreno/a5xx/fd5_blitter.c index 19873c7d88fa..151f767ae78b 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_blitter.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_blitter.c @@ -245,7 +245,7 @@ emit_blit_buffer(struct fd_ringbuffer *ring, const struct pipe_blit_info *info) assert((doff + w) <= fd_bo_size(dst->bo)); OUT_PKT7(ring, CP_SET_RENDER_MODE, 1); - OUT_RING(ring, CP_SET_RENDER_MODE_0_MODE(BLIT2D)); + OUT_RING(ring, CP_SET_RENDER_MODE_0_MODE(BLIT2DSCALE)); /* * Emit source: @@ -267,6 +267,28 @@ emit_blit_buffer(struct fd_ringbuffer *ring, const struct pipe_blit_info *info) OUT_RING(ring, A5XX_GRAS_2D_SRC_INFO_COLOR_FORMAT(RB5_R8_UNORM) | A5XX_GRAS_2D_SRC_INFO_COLOR_SWAP(WZYX)); + /* + * Blend? + */ + + OUT_PKT4(ring, REG_A5XX_RB_2D_BLEND_INFO, 10); + OUT_RING(ring, A5XX_RB_2D_BLEND_INFO_COLOR_FORMAT(RB5_R8_UNORM) | + A5XX_RB_2D_BLEND_INFO_TILE_MODE(TILE5_3) | + A5XX_RB_2D_BLEND_INFO_COLOR_SWAP(WZYX) | + A5XX_RB_2D_BLEND_INFO_FLAGS | + A5XX_RB_2D_BLEND_INFO_UNK_0 | + A5XX_RB_2D_BLEND_INFO_UNK_1); + OUT_RING(ring, A5XX_RB_2D_SRC_DIMS_WIDTH(info->src.resource->width0) | + A5XX_RB_2D_SRC_DIMS_HEIGHT(info->src.resource->height0)); /* RB_2D_SRC_DIMS */ + OUT_RELOC(ring, src->bo, soff, 0, 0); /* RB_2D_BLEND_LO/HI */ + // OUT_RING(ring, fd_bo_size(src->bo) * 8); + OUT_RING(ring, info->src.resource->width0 * info->src.resource->height0 * 8); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, 0x00000000); + /* * Emit destination: */ @@ -291,7 +313,7 @@ emit_blit_buffer(struct fd_ringbuffer *ring, const struct pipe_blit_info *info) * Blit command: */ OUT_PKT7(ring, CP_BLIT, 5); - OUT_RING(ring, CP_BLIT_0_OP(BLIT_OP_COPY)); + OUT_RING(ring, CP_BLIT_0_OP(BLIT_OP_SCALE)); OUT_RING(ring, CP_BLIT_1_SRC_X1(sshift) | CP_BLIT_1_SRC_Y1(0)); OUT_RING(ring, CP_BLIT_2_SRC_X2(sshift + w - 1) | CP_BLIT_2_SRC_Y2(0)); OUT_RING(ring, CP_BLIT_3_DST_X1(dshift) | CP_BLIT_3_DST_Y1(0));