summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-16 22:39:37 -0700
committerKenneth Graunke <[email protected]>2013-09-19 10:52:57 -0700
commit4e4b0799165ae7b482da7d9af656ed8878500de1 (patch)
treeae95adc63aee9e6734a8e0d553918e124c9ce16c /src/mesa
parentfeaad189b45cafe860b5f23bf534618ff30b5bd2 (diff)
i965: Fix brw_vs_prog_data_compare to actually check field members.
&a and &b are the address of the local stack variables, not the actual structures. Instead of comparing the fields of a and b, we compared ...some stack memory. Caught by Valgrind on Piglit's glsl-lod-bias test (among many others). Signed-off-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68233 Reviewed-by: Chad Versace <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index d5909a5f35d..f5bf5905b91 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -188,7 +188,7 @@ brw_vs_prog_data_compare(const void *in_a, const void *in_b,
/* Compare the rest of the struct. */
const unsigned offset = sizeof(struct brw_vec4_prog_data);
- if (memcmp(((char *) &a) + offset, ((char *) &b) + offset,
+ if (memcmp(((char *) a) + offset, ((char *) b) + offset,
sizeof(struct brw_vs_prog_data) - offset)) {
return false;
}