freedreno/a6xx: Set up multisample sysmem MRTs correctly
authorKristian H. Kristensen <hoegsberg@google.com>
Fri, 22 Nov 2019 06:48:32 +0000 (22:48 -0800)
committerKristian H. Kristensen <hoegsberg@google.com>
Thu, 19 Dec 2019 17:56:05 +0000 (09:56 -0800)
We had an extra factor of num_samples in the stride.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>

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

index dfff3ecc51216cfdf3b2c091d0298772853f4160..e8f0992f3106f97553bb41042522530eeb12d8ff 100644 (file)
@@ -112,7 +112,7 @@ emit_mrt(struct fd_ringbuffer *ring, struct pipe_framebuffer_state *pfb,
                offset = fd_resource_offset(rsc, psurf->u.tex.level,
                                psurf->u.tex.first_layer);
 
-               stride = slice->pitch * rsc->layout.cpp * pfb->samples;
+               stride = slice->pitch * rsc->layout.cpp;
                swap = fd6_resource_swap(rsc, pformat);
 
                tile_mode = fd_resource_tile_mode(psurf->texture, psurf->u.tex.level);
@@ -127,8 +127,6 @@ emit_mrt(struct fd_ringbuffer *ring, struct pipe_framebuffer_state *pfb,
                                type = LAYER_CUBEMAP;
                        else if (psurf->texture->target == PIPE_TEXTURE_3D)
                                type = LAYER_3D;
-
-                       stride /= pfb->samples;
                }
 
                debug_assert((offset + slice->size0) <= fd_bo_size(rsc->bo));