asahi: Require tiling for cube maps

Makes my dEQP happy.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053>
This commit is contained in:
Alyssa Rosenzweig 2021-07-24 13:06:32 -04:00
parent 3ecc14a747
commit 41417a9949
1 changed files with 20 additions and 1 deletions

View File

@ -137,6 +137,21 @@ agx_is_2d(const struct agx_resource *pres)
}
}
static bool
agx_must_tile(const struct agx_resource *pres)
{
switch (pres->base.target) {
case PIPE_TEXTURE_CUBE:
case PIPE_TEXTURE_3D:
/* We don't know how to do linear for these */
return true;
default:
break;
}
return false;
}
static bool
agx_should_tile(const struct agx_resource *pres)
{
@ -155,7 +170,11 @@ agx_should_tile(const struct agx_resource *pres)
&& (bpp == 32)
&& ((pres->base.bind & ~valid_binding) == 0);
return can_tile && (pres->base.usage != PIPE_USAGE_STREAM);
bool should_tile = (pres->base.usage != PIPE_USAGE_STREAM);
bool must_tile = agx_must_tile(pres);
assert(!(must_tile && !can_tile));
return must_tile || (can_tile && should_tile);
}
static struct pipe_resource *