etnaviv: remove always true assert in etna_transfer_unmap

The level parameter is already checked in etna_transfer_map, so there
is no way that the unmap could end up violating the assert.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24164>
This commit is contained in:
Lucas Stach 2023-07-14 18:59:56 +02:00 committed by Marge Bot
parent ab1d4ac338
commit 4b17bab6b4

View file

@ -106,7 +106,7 @@ etna_transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *ptrans)
struct etna_context *ctx = etna_context(pctx);
struct etna_transfer *trans = etna_transfer(ptrans);
struct etna_resource *rsc = etna_resource(ptrans->resource);
struct etna_resource_level *res_level;
struct etna_resource_level *res_level = &rsc->levels[ptrans->level];
/* XXX
* When writing to a resource that is already in use, replace the resource
@ -114,13 +114,10 @@ etna_transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *ptrans)
* and free the old one using a fenced free.
* The most tricky case to implement will be: tiled or supertiled surface,
* partial write, target not aligned to 4/64. */
assert(ptrans->level <= rsc->base.last_level);
if (rsc->texture && !etna_resource_newer(rsc, etna_resource(rsc->texture)))
rsc = etna_resource(rsc->texture); /* switch to using the texture resource */
res_level = &rsc->levels[ptrans->level];
/*
* Temporary resources are always pulled into the CPU domain, must push them
* back into GPU domain before the RS execs the blit to the base resource.