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: 988f148db3 ("ac/surface: overlap color and Z/S fields using a union in gfx9_surf_layout")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11625>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-06-25 13:58:14 +02:00
parent 822f377736
commit c564841fae
1 changed files with 1 additions and 1 deletions

View File

@ -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,