mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
panfrost: Remove MIDGARD_{NO_TYPED_BLEND_STORES,MISSING_LOADS}
These "quirks" are common for Midgard, yet are only consumed by pan_lower_framebuffer -- a Midgard-only pass. So the quirks should be removed and inlined into their users. Thid removes MIDGARD_QUIRKS altogether. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>
This commit is contained in:
parent
db497c27dc
commit
93f6c6586c
2 changed files with 13 additions and 38 deletions
|
|
@ -34,11 +34,7 @@
|
|||
|
||||
#define MIDGARD_NO_HIER_TILING (1 << 0)
|
||||
|
||||
/* bit 1-5 unused */
|
||||
|
||||
/* Whether this GPU lacks support for any typed stores in blend shader,
|
||||
* requiring packing instead */
|
||||
#define MIDGARD_NO_TYPED_BLEND_STORES (1 << 6)
|
||||
/* bit 1-6 unused */
|
||||
|
||||
/* Whether this GPU lacks support for any typed loads, requiring packing */
|
||||
#define MIDGARD_NO_TYPED_BLEND_LOADS (1 << 7)
|
||||
|
|
@ -46,18 +42,13 @@
|
|||
/* Lack support for colour pack/unpack opcodes */
|
||||
#define NO_BLEND_PACKS (1 << 8)
|
||||
|
||||
/* Has some missing formats for typed loads */
|
||||
#define MIDGARD_MISSING_LOADS (1 << 9)
|
||||
|
||||
/* bit 10 unused */
|
||||
/* bits 9-10 unused */
|
||||
|
||||
/* Does this GPU support anisotropic filtering? */
|
||||
#define HAS_ANISOTROPIC (1 << 11)
|
||||
|
||||
/* Quirk collections common to particular uarchs */
|
||||
|
||||
#define MIDGARD_QUIRKS (MIDGARD_NO_TYPED_BLEND_STORES | MIDGARD_MISSING_LOADS)
|
||||
|
||||
#define BIFROST_QUIRKS NO_BLEND_PACKS
|
||||
|
||||
static inline unsigned
|
||||
|
|
@ -66,23 +57,17 @@ panfrost_get_quirks(unsigned gpu_id, unsigned gpu_revision)
|
|||
switch (gpu_id) {
|
||||
case 0x600:
|
||||
case 0x620:
|
||||
return MIDGARD_QUIRKS
|
||||
| MIDGARD_NO_TYPED_BLEND_LOADS
|
||||
| NO_BLEND_PACKS;
|
||||
return MIDGARD_NO_TYPED_BLEND_LOADS | NO_BLEND_PACKS;
|
||||
|
||||
case 0x720:
|
||||
return MIDGARD_QUIRKS | MIDGARD_NO_HIER_TILING;
|
||||
|
||||
case 0x820:
|
||||
case 0x830:
|
||||
return MIDGARD_QUIRKS | MIDGARD_NO_HIER_TILING;
|
||||
return MIDGARD_NO_HIER_TILING;
|
||||
|
||||
case 0x750:
|
||||
return MIDGARD_QUIRKS;
|
||||
|
||||
case 0x860:
|
||||
case 0x880:
|
||||
return MIDGARD_QUIRKS;
|
||||
return 0;
|
||||
|
||||
case 0x6000: /* G71 */
|
||||
return BIFROST_QUIRKS;
|
||||
|
|
|
|||
|
|
@ -105,30 +105,20 @@ pan_format_class_load(const struct util_format_description *desc, unsigned quirk
|
|||
? PAN_FORMAT_SOFTWARE : PAN_FORMAT_PACK;
|
||||
}
|
||||
|
||||
/* Some formats are missing as typed on some GPUs but have unpacks */
|
||||
if (quirks & MIDGARD_MISSING_LOADS) {
|
||||
switch (desc->format) {
|
||||
case PIPE_FORMAT_R11G11B10_FLOAT:
|
||||
return PAN_FORMAT_PACK;
|
||||
default:
|
||||
return PAN_FORMAT_NATIVE;
|
||||
}
|
||||
/* Some formats are missing as typed but have unpacks */
|
||||
switch (desc->format) {
|
||||
case PIPE_FORMAT_R11G11B10_FLOAT:
|
||||
return PAN_FORMAT_PACK;
|
||||
default:
|
||||
return PAN_FORMAT_NATIVE;
|
||||
}
|
||||
|
||||
/* Otherwise, we can do native */
|
||||
return PAN_FORMAT_NATIVE;
|
||||
}
|
||||
|
||||
static enum pan_format_class
|
||||
pan_format_class_store(const struct util_format_description *desc, unsigned quirks)
|
||||
{
|
||||
/* Check if we can do anything better than software architecturally */
|
||||
if (quirks & MIDGARD_NO_TYPED_BLEND_STORES) {
|
||||
return (quirks & NO_BLEND_PACKS)
|
||||
? PAN_FORMAT_SOFTWARE : PAN_FORMAT_PACK;
|
||||
}
|
||||
|
||||
return PAN_FORMAT_NATIVE;
|
||||
return (quirks & NO_BLEND_PACKS) ? PAN_FORMAT_SOFTWARE :
|
||||
PAN_FORMAT_PACK;
|
||||
}
|
||||
|
||||
/* Convenience method */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue