From e0fda040135490fdd54e57000c7995e27dc70657 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sun, 22 Nov 2009 15:08:46 +0100 Subject: [PATCH] r300: fix VP source conflict resolution on 64-bit machines On 32bit machines we were lucky because the sizeof(reg) == sizeof(rc_src_register). On 64bit machines pointers are 8 bytes long, so we were overwriting other data. --- src/mesa/drivers/dri/r300/compiler/radeon_program.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h index 33db3ea0ff8..03592884eb2 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h @@ -191,7 +191,7 @@ struct rc_src_register lmul_swizzle(unsigned int swizzle, struct rc_src_register static inline void reset_srcreg(struct rc_src_register* reg) { - memset(reg, 0, sizeof(reg)); + memset(reg, 0, sizeof(struct rc_src_register)); reg->Swizzle = RC_SWIZZLE_XYZW; } -- 2.30.2