Extra bits required to make room for the df field of the union don't get initialized in the constructor. Initialize them to zero before setting the rest of union's fields.
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reported-by: Francisco Jerez <[email protected]> --- src/mesa/drivers/dri/i965/brw_reg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h index 6d51623..3b76d7d 100644 --- a/src/mesa/drivers/dri/i965/brw_reg.h +++ b/src/mesa/drivers/dri/i965/brw_reg.h @@ -338,6 +338,9 @@ brw_reg(enum brw_reg_file file, reg.subnr = subnr * type_sz(type); reg.nr = nr; + /* Initialize all union's bits to zero before setting them. */ + reg.df = 0; + /* Could do better: If the reg is r5.3<0;1,0>, we probably want to * set swizzle and writemask to W, as the lower bits of subnr will * be lost when converted to align16. This is probably too much to -- 2.5.0 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
