mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa: Fix up program_parse.y to avoid uninitialized $$
Without this patch, $$.negate, $$.rgba_valid, and $$.xyzw_valid take on garbage values. At the moment this problem is benign (the garbage values happen to be zero), but in my experiments executing GL operations on a background thread, the garbage values change, leading to piglit failures. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
ea6cf2b686
commit
fe955dc6b6
1 changed files with 5 additions and 0 deletions
|
|
@ -709,6 +709,7 @@ extSwizSel: INTEGER
|
|||
}
|
||||
|
||||
$$.swz = ($1 == 0) ? SWIZZLE_ZERO : SWIZZLE_ONE;
|
||||
$$.negate = 0;
|
||||
|
||||
/* 0 and 1 are valid for both RGBA swizzle names and XYZW
|
||||
* swizzle names.
|
||||
|
|
@ -728,6 +729,10 @@ extSwizSel: INTEGER
|
|||
s = $1[0];
|
||||
free($1);
|
||||
|
||||
$$.rgba_valid = 0;
|
||||
$$.xyzw_valid = 0;
|
||||
$$.negate = 0;
|
||||
|
||||
switch (s) {
|
||||
case 'x':
|
||||
$$.swz = SWIZZLE_X;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue