mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
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 <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68233
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 4e4b079916)
This commit is contained in:
parent
3801e9a87e
commit
e021b50227
1 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue