asahi: do not use compression blits for uncompressed levels
pointless, it's much faster to just twiddle on the cpu. use the helpers to detect compression per-level the right way. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
parent
11a180c6e1
commit
611fcfc5ca
2 changed files with 8 additions and 5 deletions
|
|
@ -144,7 +144,8 @@ ail_detile(void *_tiled, void *_linear, struct ail_layout *tiled_layout,
|
|||
unsigned blocksize_B = util_format_get_blocksize(tiled_layout->format);
|
||||
|
||||
assert(level < tiled_layout->levels && "Mip level out of bounds");
|
||||
assert(tiled_layout->tiling == AIL_TILING_TWIDDLED && "Invalid usage");
|
||||
assert(ail_is_level_twiddled_uncompressed(tiled_layout, level) &&
|
||||
"Invalid usage");
|
||||
assert((sx_px + swidth_px) <= width_px && "Invalid usage");
|
||||
assert((sy_px + sheight_px) <= height_px && "Invalid usage");
|
||||
|
||||
|
|
@ -161,7 +162,8 @@ ail_tile(void *_tiled, void *_linear, struct ail_layout *tiled_layout,
|
|||
unsigned blocksize_B = util_format_get_blocksize(tiled_layout->format);
|
||||
|
||||
assert(level < tiled_layout->levels && "Mip level out of bounds");
|
||||
assert(tiled_layout->tiling == AIL_TILING_TWIDDLED && "Invalid usage");
|
||||
assert(ail_is_level_twiddled_uncompressed(tiled_layout, level) &&
|
||||
"Invalid usage");
|
||||
assert((sx_px + swidth_px) <= width_px && "Invalid usage");
|
||||
assert((sy_px + sheight_px) <= height_px && "Invalid usage");
|
||||
|
||||
|
|
|
|||
|
|
@ -974,7 +974,7 @@ agx_transfer_map(struct pipe_context *pctx, struct pipe_resource *resource,
|
|||
* compression in software. In some cases, we could use this path for
|
||||
* twiddled too, but we don't have a use case for that yet.
|
||||
*/
|
||||
if (rsrc->modifier == DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED) {
|
||||
if (ail_is_level_compressed(&rsrc->layout, level)) {
|
||||
/* Should never happen for buffers, and it's not safe */
|
||||
assert(resource->target != PIPE_BUFFER);
|
||||
|
||||
|
|
@ -1007,7 +1007,7 @@ agx_transfer_map(struct pipe_context *pctx, struct pipe_resource *resource,
|
|||
|
||||
agx_bo_mmap(rsrc->bo);
|
||||
|
||||
if (rsrc->modifier == DRM_FORMAT_MOD_APPLE_TWIDDLED) {
|
||||
if (ail_is_level_twiddled_uncompressed(&rsrc->layout, level)) {
|
||||
/* Should never happen for buffers, and it's not safe */
|
||||
assert(resource->target != PIPE_BUFFER);
|
||||
|
||||
|
|
@ -1066,7 +1066,8 @@ agx_transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *transfer)
|
|||
agx_flush_readers(agx_context(pctx), agx_resource(trans->staging.rsrc),
|
||||
"GPU write staging blit");
|
||||
} else if (trans->map && (transfer->usage & PIPE_MAP_WRITE)) {
|
||||
assert(rsrc->modifier == DRM_FORMAT_MOD_APPLE_TWIDDLED);
|
||||
assert(
|
||||
ail_is_level_twiddled_uncompressed(&rsrc->layout, transfer->level));
|
||||
|
||||
for (unsigned z = 0; z < transfer->box.depth; ++z) {
|
||||
uint8_t *map =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue