From: Nicolai Hähnle <nicolai.haeh...@amd.com>

Account for the fact that max_layer is minified for higher levels.

Reviewed-by: Marek Olšák <marek.ol...@amd.com>
---
 src/gallium/drivers/radeonsi/si_blit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_blit.c 
b/src/gallium/drivers/radeonsi/si_blit.c
index a48c5bc..1148787 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -214,7 +214,7 @@ si_blit_decompress_zs_planes_in_place(struct si_context 
*sctx,
 
                /* The texture will always be dirty if some layers aren't 
flushed.
                 * I don't think this case occurs often though. */
-               if (first_layer == 0 && last_layer == max_layer) {
+               if (first_layer == 0 && last_layer >= max_layer) {
                        fully_decompressed_mask |= 1u << level;
                }
        }
@@ -361,7 +361,7 @@ static void si_blit_decompress_color(struct pipe_context 
*ctx,
 
                /* The texture will always be dirty if some layers aren't 
flushed.
                 * I don't think this case occurs often though. */
-               if (first_layer == 0 && last_layer == max_layer) {
+               if (first_layer == 0 && last_layer >= max_layer) {
                        rtex->dirty_level_mask &= ~(1 << level);
                }
        }
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to