radeonsi: print radeon_bo_flag when AMD_DEBUG=vm is used
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11449>
This commit is contained in:
committed by
Marge Bot
parent
22a8b7f589
commit
379f2b641e
@@ -201,8 +201,10 @@ bool si_alloc_resource(struct si_screen *sscreen, struct si_resource *res)
|
||||
|
||||
/* Print debug information. */
|
||||
if (sscreen->debug_flags & DBG(VM) && res->b.b.target == PIPE_BUFFER) {
|
||||
fprintf(stderr, "VM start=0x%" PRIX64 " end=0x%" PRIX64 " | Buffer %" PRIu64 " bytes\n",
|
||||
fprintf(stderr, "VM start=0x%" PRIX64 " end=0x%" PRIX64 " | Buffer %" PRIu64 " bytes | Flags: ",
|
||||
res->gpu_address, res->gpu_address + res->buf->size, res->buf->size);
|
||||
si_res_print_flags(res->flags);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
if (res->b.b.flags & SI_RESOURCE_FLAG_CLEAR)
|
||||
|
||||
@@ -1149,10 +1149,12 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen,
|
||||
if (sscreen->debug_flags & DBG(VM)) {
|
||||
fprintf(stderr,
|
||||
"VM start=0x%" PRIX64 " end=0x%" PRIX64
|
||||
" | Texture %ix%ix%i, %i levels, %i samples, %s\n",
|
||||
" | Texture %ix%ix%i, %i levels, %i samples, %s | Flags: ",
|
||||
tex->buffer.gpu_address, tex->buffer.gpu_address + tex->buffer.buf->size,
|
||||
base->width0, base->height0, util_num_layers(base, 0), base->last_level + 1,
|
||||
base->nr_samples ? base->nr_samples : 1, util_format_short_name(base->format));
|
||||
si_res_print_flags(tex->buffer.flags);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
if (sscreen->debug_flags & DBG(TEX)) {
|
||||
|
||||
@@ -83,6 +83,34 @@ enum radeon_bo_flag
|
||||
RADEON_FLAG_MALL_NOALLOC = (1 << 11), /* don't cache in the infinity cache */
|
||||
};
|
||||
|
||||
static inline void
|
||||
si_res_print_flags(enum radeon_bo_flag flags) {
|
||||
if (flags & RADEON_FLAG_GTT_WC)
|
||||
fprintf(stderr, "GTT_WC ");
|
||||
if (flags & RADEON_FLAG_NO_CPU_ACCESS)
|
||||
fprintf(stderr, "NO_CPU_ACCESS ");
|
||||
if (flags & RADEON_FLAG_NO_SUBALLOC)
|
||||
fprintf(stderr, "NO_SUBALLOC ");
|
||||
if (flags & RADEON_FLAG_SPARSE)
|
||||
fprintf(stderr, "SPARSE ");
|
||||
if (flags & RADEON_FLAG_NO_INTERPROCESS_SHARING)
|
||||
fprintf(stderr, "NO_INTERPROCESS_SHARING ");
|
||||
if (flags & RADEON_FLAG_READ_ONLY)
|
||||
fprintf(stderr, "READ_ONLY ");
|
||||
if (flags & RADEON_FLAG_32BIT)
|
||||
fprintf(stderr, "32BIT ");
|
||||
if (flags & RADEON_FLAG_ENCRYPTED)
|
||||
fprintf(stderr, "ENCRYPTED ");
|
||||
if (flags & RADEON_FLAG_GL2_BYPASS)
|
||||
fprintf(stderr, "GL2_BYPASS ");
|
||||
if (flags & RADEON_FLAG_DRIVER_INTERNAL)
|
||||
fprintf(stderr, "DRIVER_INTERNAL ");
|
||||
if (flags & RADEON_FLAG_DISCARDABLE)
|
||||
fprintf(stderr, "DISCARDABLE ");
|
||||
if (flags & RADEON_FLAG_MALL_NOALLOC)
|
||||
fprintf(stderr, "MALL_NOALLOC ");
|
||||
}
|
||||
|
||||
enum radeon_map_flags
|
||||
{
|
||||
/* Indicates that the caller will unmap the buffer.
|
||||
|
||||
Reference in New Issue
Block a user