mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 12:00:12 +01:00
asahi: Make STAGING resources linear
As intended by the flag. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21063>
This commit is contained in:
parent
e7b97899ac
commit
0a5c3764c7
1 changed files with 6 additions and 0 deletions
|
|
@ -395,6 +395,12 @@ agx_select_modifier_from_list(const struct agx_resource *pres,
|
|||
static uint64_t
|
||||
agx_select_best_modifier(const struct agx_resource *pres)
|
||||
{
|
||||
/* Prefer linear for staging resources, which should be as fast as possible
|
||||
* to write from the CPU.
|
||||
*/
|
||||
if (agx_linear_allowed(pres) && pres->base.usage == PIPE_USAGE_STAGING)
|
||||
return DRM_FORMAT_MOD_LINEAR;
|
||||
|
||||
if (agx_twiddled_allowed(pres)) {
|
||||
if (agx_compression_allowed(pres))
|
||||
return DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue