Mesa (master): mesa/bindless: fix missing image _Layer initialization
Ilia Mirkin
imirkin at kemper.freedesktop.org
Thu Jan 4 07:22:51 UTC 2018
Module: Mesa
Branch: master
Commit: e923075a82af63e5b5019c17dcf86a573deb7282
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e923075a82af63e5b5019c17dcf86a573deb7282
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Dec 30 00:28:51 2017 -0500
mesa/bindless: fix missing image _Layer initialization
Some later code relies on _Layer to set first/last_layer. Make sure it's
always initialized.
Detected by valgrind's conditional jump/move with uninit value logic.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mesa/main/texturebindless.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/main/texturebindless.c b/src/mesa/main/texturebindless.c
index f062ea904a..9aaa0367c2 100644
--- a/src/mesa/main/texturebindless.c
+++ b/src/mesa/main/texturebindless.c
@@ -327,6 +327,7 @@ get_image_handle(struct gl_context *ctx, struct gl_texture_object *texObj,
} else {
imgObj.Layered = GL_FALSE;
imgObj.Layer = 0;
+ imgObj._Layer = 0;
}
/* Request a new image handle from the driver. */
More information about the mesa-commit
mailing list