Mesa (main): ac/surface: don't print stencil info if tex has no stencil

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 29 22:07:41 UTC 2021


Module: Mesa
Branch: main
Commit: c564841fae9ec42006b03ea5793b09e1dde9cc23
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c564841fae9ec42006b03ea5793b09e1dde9cc23

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Fri Jun 25 13:58:14 2021 +0200

ac/surface: don't print stencil info if tex has no stencil

color/zs are stored in a union so testing for zs.stencil_offset
isn't the correct way to test for stencil.

Fixes: 988f148db3c ("ac/surface: overlap color and Z/S fields using a union in gfx9_surf_layout")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11625>

---

 src/amd/common/ac_surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index ac130807766..e6385111282 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -2817,7 +2817,7 @@ void ac_surface_print_info(FILE *out, const struct radeon_info *info,
                  surf->meta_offset, surf->meta_size, 1 << surf->meta_alignment_log2,
                  surf->u.gfx9.color.display_dcc_pitch_max, surf->num_meta_levels);
 
-      if (surf->u.gfx9.zs.stencil_offset)
+      if (surf->has_stencil)
          fprintf(out,
                  "    Stencil: offset=%" PRIu64 ", swmode=%u, epitch=%u\n",
                  surf->u.gfx9.zs.stencil_offset,



More information about the mesa-commit mailing list