radeonsi: expclear must be disabled on first Z/S clear
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 22 Apr 2016 21:59:17 +0000 (16:59 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 27 Apr 2016 16:16:40 +0000 (11:16 -0500)
The documentation and the HW team say so.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_blit.c

index b87275d8646064174e02c6e41355b5bc6012b028..6fa5b975d9d7e01e11133eeaf0db0988f537a1b1 100644 (file)
@@ -497,7 +497,7 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers,
                if (buffers & PIPE_CLEAR_DEPTH) {
                        /* Need to disable EXPCLEAR temporarily if clearing
                         * to a new value. */
-                       if (zstex->depth_cleared && zstex->depth_clear_value != depth) {
+                       if (!zstex->depth_cleared || zstex->depth_clear_value != depth) {
                                sctx->db_depth_disable_expclear = true;
                        }
 
@@ -513,7 +513,7 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers,
 
                        /* Need to disable EXPCLEAR temporarily if clearing
                         * to a new value. */
-                       if (zstex->stencil_cleared && zstex->stencil_clear_value != stencil) {
+                       if (!zstex->stencil_cleared || zstex->stencil_clear_value != stencil) {
                                sctx->db_stencil_disable_expclear = true;
                        }