asahi: rename wip modifier
this is gpu-tiled, not twiddled. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
This commit is contained in:
committed by
Marge Bot
parent
42bc9f6400
commit
1100c2328a
@@ -501,11 +501,11 @@ ail_is_view_compatible(struct ail_layout *layout, enum pipe_format view)
|
||||
}
|
||||
|
||||
/* Fake values, pending UAPI upstreaming */
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_TWIDDLED
|
||||
#define DRM_FORMAT_MOD_APPLE_TWIDDLED (2)
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_GPU_TILED
|
||||
#define DRM_FORMAT_MOD_APPLE_GPU_TILED (2)
|
||||
#endif
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED
|
||||
#define DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED (3)
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED
|
||||
#define DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED (3)
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -518,8 +518,8 @@ ail_drm_modifier_to_tiling(uint64_t modifier)
|
||||
switch (modifier) {
|
||||
case DRM_FORMAT_MOD_LINEAR:
|
||||
return AIL_TILING_LINEAR;
|
||||
case DRM_FORMAT_MOD_APPLE_TWIDDLED:
|
||||
case DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED:
|
||||
case DRM_FORMAT_MOD_APPLE_GPU_TILED:
|
||||
case DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED:
|
||||
return AIL_TILING_GPU;
|
||||
default:
|
||||
unreachable("Unsupported modifier");
|
||||
@@ -531,9 +531,9 @@ ail_is_drm_modifier_compressed(uint64_t modifier)
|
||||
{
|
||||
switch (modifier) {
|
||||
case DRM_FORMAT_MOD_LINEAR:
|
||||
case DRM_FORMAT_MOD_APPLE_TWIDDLED:
|
||||
case DRM_FORMAT_MOD_APPLE_GPU_TILED:
|
||||
return false;
|
||||
case DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED:
|
||||
case DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED:
|
||||
return true;
|
||||
default:
|
||||
unreachable("Unsupported modifier");
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#include "vk_format.h"
|
||||
|
||||
uint64_t agx_best_modifiers[] = {
|
||||
DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED,
|
||||
DRM_FORMAT_MOD_APPLE_TWIDDLED,
|
||||
DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED,
|
||||
DRM_FORMAT_MOD_APPLE_GPU_TILED,
|
||||
DRM_FORMAT_MOD_LINEAR,
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ hk_modifier_features(const struct agx_device *dev, uint64_t mod,
|
||||
}
|
||||
|
||||
/* Don't advertise compression for the uncompressable */
|
||||
if (mod == DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED &&
|
||||
if (mod == DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED &&
|
||||
!hk_can_compress_format(dev, vk_format))
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -775,10 +775,10 @@ static uint32_t
|
||||
modifier_get_score(uint64_t mod)
|
||||
{
|
||||
switch (mod) {
|
||||
case DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED:
|
||||
case DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED:
|
||||
return 10;
|
||||
|
||||
case DRM_FORMAT_MOD_APPLE_TWIDDLED:
|
||||
case DRM_FORMAT_MOD_APPLE_GPU_TILED:
|
||||
return 5;
|
||||
|
||||
case DRM_FORMAT_MOD_LINEAR:
|
||||
@@ -805,7 +805,7 @@ choose_drm_format_mod(struct hk_device *dev, uint8_t plane_count,
|
||||
|
||||
for (uint32_t i = 0; i < modifier_count; ++i) {
|
||||
if (!can_compress &&
|
||||
modifiers[i] == DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED)
|
||||
modifiers[i] == DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED)
|
||||
continue;
|
||||
|
||||
uint32_t score = modifier_get_score(modifiers[i]);
|
||||
|
||||
@@ -55,16 +55,16 @@
|
||||
#include "shader_enums.h"
|
||||
|
||||
/* Fake values, pending UAPI upstreaming */
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_TWIDDLED
|
||||
#define DRM_FORMAT_MOD_APPLE_TWIDDLED (2)
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_GPU_TILED
|
||||
#define DRM_FORMAT_MOD_APPLE_GPU_TILED (2)
|
||||
#endif
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED
|
||||
#define DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED (3)
|
||||
#ifndef DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED
|
||||
#define DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED (3)
|
||||
#endif
|
||||
|
||||
uint64_t agx_best_modifiers[] = {
|
||||
DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED,
|
||||
DRM_FORMAT_MOD_APPLE_TWIDDLED,
|
||||
DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED,
|
||||
DRM_FORMAT_MOD_APPLE_GPU_TILED,
|
||||
DRM_FORMAT_MOD_LINEAR,
|
||||
};
|
||||
|
||||
@@ -432,13 +432,13 @@ agx_select_modifier_from_list(const struct agx_resource *pres,
|
||||
const uint64_t *modifiers, int count)
|
||||
{
|
||||
if (agx_twiddled_allowed(pres) && agx_compression_allowed(pres) &&
|
||||
drm_find_modifier(DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED, modifiers,
|
||||
drm_find_modifier(DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED, modifiers,
|
||||
count))
|
||||
return DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED;
|
||||
return DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED;
|
||||
|
||||
if (agx_twiddled_allowed(pres) &&
|
||||
drm_find_modifier(DRM_FORMAT_MOD_APPLE_TWIDDLED, modifiers, count))
|
||||
return DRM_FORMAT_MOD_APPLE_TWIDDLED;
|
||||
drm_find_modifier(DRM_FORMAT_MOD_APPLE_GPU_TILED, modifiers, count))
|
||||
return DRM_FORMAT_MOD_APPLE_GPU_TILED;
|
||||
|
||||
if (agx_linear_allowed(pres) &&
|
||||
drm_find_modifier(DRM_FORMAT_MOD_LINEAR, modifiers, count))
|
||||
@@ -468,9 +468,9 @@ agx_select_best_modifier(const struct agx_resource *pres)
|
||||
|
||||
if (agx_twiddled_allowed(pres)) {
|
||||
if (agx_compression_allowed(pres))
|
||||
return DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED;
|
||||
return DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED;
|
||||
else
|
||||
return DRM_FORMAT_MOD_APPLE_TWIDDLED;
|
||||
return DRM_FORMAT_MOD_APPLE_GPU_TILED;
|
||||
}
|
||||
|
||||
if (agx_linear_allowed(pres))
|
||||
@@ -511,7 +511,7 @@ agx_resource_create_with_modifiers(struct pipe_screen *screen,
|
||||
* inferring the shader image flag. Do so to avoid reallocation in case the
|
||||
* resource is later used as an image.
|
||||
*/
|
||||
if (nresource->modifier != DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED &&
|
||||
if (nresource->modifier != DRM_FORMAT_MOD_APPLE_GPU_TILED_COMPRESSED &&
|
||||
templ->depth0 == 1) {
|
||||
|
||||
nresource->base.bind |= PIPE_BIND_SHADER_IMAGE;
|
||||
|
||||
Reference in New Issue
Block a user