mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
mesa: don't forget to clear _Layer field on texture unit
On the Android Antutu benchmark we ran into an assert in ISL where the
(base layer + num layers) > total layers. It turns out the core of
mesa forgot to clear the _Layer variable, potentially leaving an
inconsistent value.
v2: Pull setting u->_Layer out of the conditional blocks (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 2208d79dde)
This commit is contained in:
parent
db56bc2c52
commit
2bbe4c69c8
1 changed files with 1 additions and 1 deletions
|
|
@ -593,11 +593,11 @@ set_image_binding(struct gl_image_unit *u, struct gl_texture_object *texObj,
|
|||
if (texObj && _mesa_tex_target_is_layered(texObj->Target)) {
|
||||
u->Layered = layered;
|
||||
u->Layer = layer;
|
||||
u->_Layer = (u->Layered ? 0 : u->Layer);
|
||||
} else {
|
||||
u->Layered = GL_FALSE;
|
||||
u->Layer = 0;
|
||||
}
|
||||
u->_Layer = (u->Layered ? 0 : u->Layer);
|
||||
|
||||
_mesa_reference_texobj(&u->TexObj, texObj);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue