mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
nine: fix incorrect calculation of layer count for 3D textures
Volume textures don't have a concept of "layers"
v1: set last_layer to zero for 3D textures (Axel Davy)
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5808>
(cherry picked from commit 845a50ee25)
This commit is contained in:
parent
33d59a3609
commit
370bd3ba47
2 changed files with 2 additions and 2 deletions
|
|
@ -2722,7 +2722,7 @@
|
|||
"description": "nine: fix incorrect calculation of layer count for 3D textures",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This,
|
|||
templ.format = resource->format;
|
||||
templ.u.tex.first_layer = 0;
|
||||
templ.u.tex.last_layer = resource->target == PIPE_TEXTURE_3D ?
|
||||
resource->depth0 - 1 : resource->array_size - 1;
|
||||
0 : resource->array_size - 1;
|
||||
templ.u.tex.first_level = 0;
|
||||
templ.u.tex.last_level = resource->last_level;
|
||||
templ.swizzle_r = swizzle[0];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue