mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 14:50:10 +01:00
ac/gpu_info: print 32bpp modifiers
Reviewed-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31187>
This commit is contained in:
parent
f7199b9971
commit
246051ebc6
1 changed files with 26 additions and 0 deletions
|
|
@ -346,6 +346,11 @@ static intptr_t readlink(const char *path, char *buf, size_t bufsiz)
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
extern char *
|
||||
drmGetFormatModifierName(uint64_t modifier)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
#include "drm-uapi/amdgpu_drm.h"
|
||||
#include <amdgpu.h>
|
||||
|
|
@ -2110,6 +2115,27 @@ void ac_print_gpu_info(const struct radeon_info *info, FILE *f)
|
|||
fprintf(f, " row_size = %u\n", 1024 << G_0098F8_ROW_SIZE(info->gb_addr_config));
|
||||
fprintf(f, " num_lower_pipes = %u (raw)\n", G_0098F8_NUM_LOWER_PIPES(info->gb_addr_config));
|
||||
}
|
||||
|
||||
struct ac_modifier_options modifier_options = {
|
||||
.dcc = true,
|
||||
.dcc_retile = true,
|
||||
};
|
||||
uint64_t modifiers[256];
|
||||
unsigned modifier_count = ARRAY_SIZE(modifiers);
|
||||
|
||||
/* Get the number of modifiers. */
|
||||
if (ac_get_supported_modifiers(info, &modifier_options, PIPE_FORMAT_R8G8B8A8_UNORM,
|
||||
&modifier_count, modifiers)) {
|
||||
if (modifier_count)
|
||||
fprintf(f, "Modifiers (32bpp):\n");
|
||||
|
||||
for (unsigned i = 0; i < modifier_count; i++) {
|
||||
char *name = drmGetFormatModifierName(modifiers[i]);
|
||||
|
||||
fprintf(f, " %s\n", name);
|
||||
free(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ac_get_gs_table_depth(enum amd_gfx_level gfx_level, enum radeon_family family)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue