mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
panfrost: Add a gpu_revision argument to panfrost_get_quirks
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8149>
This commit is contained in:
parent
0322653b71
commit
48c676c501
3 changed files with 10 additions and 3 deletions
|
|
@ -78,7 +78,7 @@
|
|||
#define BIFROST_QUIRKS (IS_BIFROST | NO_BLEND_PACKS | MIDGARD_NO_AFBC)
|
||||
|
||||
static inline unsigned
|
||||
panfrost_get_quirks(unsigned gpu_id)
|
||||
panfrost_get_quirks(unsigned gpu_id, unsigned gpu_revision)
|
||||
{
|
||||
switch (gpu_id) {
|
||||
case 0x600:
|
||||
|
|
|
|||
|
|
@ -77,6 +77,12 @@ panfrost_query_gpu_version(int fd)
|
|||
return panfrost_query_raw(fd, DRM_PANFROST_PARAM_GPU_PROD_ID, true, 0);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
panfrost_query_gpu_revision(int fd)
|
||||
{
|
||||
return panfrost_query_raw(fd, DRM_PANFROST_PARAM_GPU_REVISION, true, 0);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
panfrost_query_core_count(int fd)
|
||||
{
|
||||
|
|
@ -218,7 +224,8 @@ panfrost_open_device(void *memctx, int fd, struct panfrost_device *dev)
|
|||
dev->core_count = panfrost_query_core_count(fd);
|
||||
dev->thread_tls_alloc = panfrost_query_thread_tls_alloc(fd, dev->arch);
|
||||
dev->kernel_version = drmGetVersion(fd);
|
||||
dev->quirks = panfrost_get_quirks(dev->gpu_id);
|
||||
unsigned revision = panfrost_query_gpu_revision(fd);
|
||||
dev->quirks = panfrost_get_quirks(dev->gpu_id, revision);
|
||||
dev->compressed_formats = panfrost_query_compressed_formats(fd);
|
||||
|
||||
if (dev->quirks & HAS_SWIZZLES)
|
||||
|
|
|
|||
|
|
@ -2830,7 +2830,7 @@ midgard_compile_shader_nir(void *mem_ctx, nir_shader *nir,
|
|||
NIR_PASS_V(nir, nir_lower_var_copies);
|
||||
NIR_PASS_V(nir, nir_lower_vars_to_ssa);
|
||||
|
||||
unsigned pan_quirks = panfrost_get_quirks(inputs->gpu_id);
|
||||
unsigned pan_quirks = panfrost_get_quirks(inputs->gpu_id, 0);
|
||||
NIR_PASS_V(nir, pan_lower_framebuffer,
|
||||
inputs->rt_formats, inputs->is_blend, pan_quirks);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue