freedreno/a6xx: Move CP_SET_MARKER to setup helper
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 3 Jul 2020 22:18:01 +0000 (15:18 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Jul 2020 06:12:22 +0000 (06:12 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>

src/gallium/drivers/freedreno/a6xx/fd6_blitter.c

index 24e3f7225bc6c8aca9d18d676995b46f32d9d583..4aa6b946d42673dd4c5358fa338fbf674dc86c26 100644 (file)
@@ -240,6 +240,9 @@ emit_blit_setup(struct fd_ringbuffer *ring,
        bool is_srgb = util_format_is_srgb(pfmt);
        enum a6xx_2d_ifmt ifmt = fd6_ifmt(fmt);
 
+       OUT_PKT7(ring, CP_SET_MARKER, 1);
+       OUT_RING(ring, A6XX_CP_SET_MARKER_0_MODE(RM6_BLIT2DSCALE));
+
        if (is_srgb) {
                assert(ifmt == R2D_UNORM8);
                ifmt = R2D_UNORM8_SRGB;
@@ -338,9 +341,6 @@ emit_blit_buffer(struct fd_context *ctx, struct fd_ringbuffer *ring,
        sshift = sbox->x & 0x3f;
        dshift = dbox->x & 0x3f;
 
-       OUT_PKT7(ring, CP_SET_MARKER, 1);
-       OUT_RING(ring, A6XX_CP_SET_MARKER_0_MODE(RM6_BLIT2DSCALE));
-
        emit_blit_setup(ring, PIPE_FORMAT_R8_UNORM, false, NULL);
 
        for (unsigned off = 0; off < sbox->width; off += (0x4000 - 0x40)) {
@@ -536,9 +536,6 @@ emit_blit_or_clear_texture(struct fd_context *ctx, struct fd_ringbuffer *ring,
 
        dfmt = fd6_pipe2color(info->dst.format);
 
-       OUT_PKT7(ring, CP_SET_MARKER, 1);
-       OUT_RING(ring, A6XX_CP_SET_MARKER_0_MODE(RM6_BLIT2DSCALE));
-
        uint32_t nr_samples = fd_resource_nr_samples(&dst->base);
 
        if (!color) {