[gtk/wip/chergert/glproto] read initial bit before unifrom data
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] read initial bit before unifrom data
- Date: Wed, 10 Feb 2021 23:34:58 +0000 (UTC)
commit 1ee743aa2d217913484bc54ca2ac3130adb2db8d
Author: Christian Hergert <chergert redhat com>
Date: Wed Feb 10 15:34:49 2021 -0800
read initial bit before unifrom data
otherwise we do a read of unitialized data which makes valgrind sad.
gsk/next/gskgluniformstateprivate.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/next/gskgluniformstateprivate.h b/gsk/next/gskgluniformstateprivate.h
index ba9a64ffae..76fd546737 100644
--- a/gsk/next/gskgluniformstateprivate.h
+++ b/gsk/next/gskgluniformstateprivate.h
@@ -581,7 +581,7 @@ gsk_gl_uniform_state_set_texture (GskGLUniformState *state,
if ((u = gsk_gl_uniform_state_get_value (state, program, GSK_GL_UNIFORM_FORMAT_TEXTURE, 1, location,
&info)))
{
- if (*u != texture_slot || info->initial)
+ if (info->initial || *u != texture_slot)
{
GSK_GL_UNIFORM_STATE_REPLACE (info, u, guint, 1);
*u = texture_slot;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]