diff options
author | Lionel Landwerlin <[email protected]> | 2019-10-01 11:55:46 +0300 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-10-01 12:30:07 -0700 |
commit | 2bbe4c69c83a3a0ac1a5925ec9c81164feff569e (patch) | |
tree | 9cf891327d931cf3cfeb217dc9bfa2c276c6d277 | |
parent | db56bc2c525b81c432359195ee5775c7ad7a234b (diff) |
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 <[email protected]>
Cc: <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
(cherry picked from commit 2208d79ddeebd1673f477611d508566ef82bd7c0)
-rw-r--r-- | src/mesa/main/shaderimage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c index 1712483c415..a5e85b02afc 100644 --- a/src/mesa/main/shaderimage.c +++ b/src/mesa/main/shaderimage.c @@ -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); } |