freedreno: fix sysmem rendering being used when clear is used
authorJonathan Marek <jonathan@marek.ca>
Wed, 23 Jan 2019 20:07:31 +0000 (15:07 -0500)
committerRob Clark <robdclark@gmail.com>
Tue, 29 Jan 2019 20:22:33 +0000 (20:22 +0000)
This batch->cleared value is only used to decide to use sysmem rendering
or not, so it should include any buffers that are affected by a clear.

This is required because the a2xx fast clear doesn't work with sysmem
rendering. The a22x "normal" clear path doesn't work with sysmem either.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
src/gallium/drivers/freedreno/freedreno_draw.c

index c35b0d9f4a1ab2be48b611edac9364b7b984d0d3..670388681048a0e9fa3c43bdfb375695467624a9 100644 (file)
@@ -410,7 +410,7 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
         * the depth buffer, etc)
         */
        cleared_buffers = buffers & (FD_BUFFER_ALL & ~batch->restore);
-       batch->cleared |= cleared_buffers;
+       batch->cleared |= buffers;
        batch->invalidated |= cleared_buffers;
 
        batch->resolve |= buffers;