mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
etnaviv: properly check number of layers in surface creation
3D textures store their number of layers in the resource depth. As the assert only checks the array_size, it fails on perfectly valid surface creation requests. Use the proper helper to get the number of layers. Fixes piglit spec@arb_framebuffer_object@fbo-incomplete 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/17996>
This commit is contained in:
parent
88fd397c74
commit
2d93327cc4
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ etna_create_surface(struct pipe_context *pctx, struct pipe_resource *prsc,
|
|||
assert(templat->u.tex.first_layer == templat->u.tex.last_layer);
|
||||
unsigned layer = templat->u.tex.first_layer;
|
||||
unsigned level = templat->u.tex.level;
|
||||
assert(layer < rsc->base.array_size);
|
||||
assert(layer <= util_max_layer(prsc, level));
|
||||
|
||||
surf->base.context = pctx;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue