etnaviv: don't use TS with multi-layer resources
Clear and render operations can target each layer of a multi-layer resource separately, which means we would need to track TS valid and clear color states for each layer separately to make TS work correctly. As multi-layer resources are very likely not primarily used for rendering, they are unlikely to profit much from TS, so instead of adding all this state, don't use TS for such resources at all. Fixes piglit spec@glsl-1.20@execution@tex-miplevel-selection 3d Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18045>
This commit is contained in:
@@ -114,7 +114,10 @@ etna_create_surface(struct pipe_context *pctx, struct pipe_resource *prsc,
|
||||
/* needs to be RS/BLT compatible for transfer_map/unmap */
|
||||
(rsc->levels[level].padded_width & ETNA_RS_WIDTH_MASK) == 0 &&
|
||||
(rsc->levels[level].padded_height & ETNA_RS_HEIGHT_MASK) == 0 &&
|
||||
etna_resource_hw_tileable(screen->specs.use_blt, prsc)) {
|
||||
etna_resource_hw_tileable(screen->specs.use_blt, prsc) &&
|
||||
/* Multi-layer resources would need to keep much more state (TS valid and
|
||||
* clear color per layer) and are unlikely to profit from TS usage. */
|
||||
prsc->depth0 == 1 && prsc->array_size == 1) {
|
||||
etna_screen_resource_alloc_ts(pctx->screen, rsc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user