mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 23:20:08 +01:00
radeonsi: handle DBG(TEX) after tc_compatible_htile is set
Otherwise the value printed might be incorrect. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29612>
This commit is contained in:
parent
f4e7204e73
commit
19e342b877
1 changed files with 16 additions and 10 deletions
|
|
@ -977,6 +977,19 @@ void si_print_texture_info(struct si_screen *sscreen, struct si_texture *tex,
|
|||
}
|
||||
}
|
||||
|
||||
static void print_debug_tex(struct si_screen *sscreen, struct si_texture *tex)
|
||||
{
|
||||
if (sscreen->debug_flags & DBG(TEX)) {
|
||||
puts("Texture:");
|
||||
struct u_log_context log;
|
||||
u_log_context_init(&log);
|
||||
si_print_texture_info(sscreen, tex, &log);
|
||||
u_log_new_page_print(&log, stdout);
|
||||
fflush(stdout);
|
||||
u_log_context_destroy(&log);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Common function for si_texture_create and si_texture_from_handle.
|
||||
*
|
||||
|
|
@ -1077,17 +1090,8 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen,
|
|||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
if (sscreen->debug_flags & DBG(TEX)) {
|
||||
puts("Texture:");
|
||||
struct u_log_context log;
|
||||
u_log_context_init(&log);
|
||||
si_print_texture_info(sscreen, tex, &log);
|
||||
u_log_new_page_print(&log, stdout);
|
||||
fflush(stdout);
|
||||
u_log_context_destroy(&log);
|
||||
}
|
||||
|
||||
if (sscreen->info.gfx_level >= GFX12) {
|
||||
print_debug_tex(sscreen, tex);
|
||||
if (tex->is_depth) {
|
||||
/* Z24 is no longer supported. We should use Z32_FLOAT instead. */
|
||||
if (base->format == PIPE_FORMAT_Z16_UNORM) {
|
||||
|
|
@ -1126,6 +1130,8 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen,
|
|||
tex->surface.flags & RADEON_SURF_TC_COMPATIBLE_HTILE &&
|
||||
tex->buffer.b.b.last_level > 0);
|
||||
|
||||
print_debug_tex(sscreen, tex);
|
||||
|
||||
/* TC-compatible HTILE:
|
||||
* - GFX8 only supports Z32_FLOAT.
|
||||
* - GFX9 only supports Z32_FLOAT and Z16_UNORM. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue