Mesa (master): r300/compiler: Fix rc_normal_rewrite_writemask()

Tom Stellard tstellar at kemper.freedesktop.org
Sun Oct 2 22:47:49 UTC 2011


Module: Mesa
Branch: master
Commit: 8b0418e478f9def2783060d90d1b267a54a9c6c3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b0418e478f9def2783060d90d1b267a54a9c6c3

Author: Tom Stellard <tstellar at gmail.com>
Date:   Sat Oct  1 15:18:18 2011 -0700

r300/compiler: Fix rc_normal_rewrite_writemask()

This function had not been updated to use conversion swizzles.

---

 .../drivers/r300/compiler/radeon_compiler_util.c   |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/r300/compiler/radeon_compiler_util.c b/src/gallium/drivers/r300/compiler/radeon_compiler_util.c
index 36a6341..b609d9f 100644
--- a/src/gallium/drivers/r300/compiler/radeon_compiler_util.c
+++ b/src/gallium/drivers/r300/compiler/radeon_compiler_util.c
@@ -211,8 +211,8 @@ static void normal_rewrite_writemask_cb(
 	struct rc_instruction * inst,
 	struct rc_src_register * src)
 {
-	unsigned int * new_mask = (unsigned int *)userdata;
-	src->Swizzle = rc_adjust_channels(src->Swizzle, *new_mask);
+	unsigned int * conversion_swizzle = (unsigned int *)userdata;
+	src->Swizzle = rc_adjust_channels(src->Swizzle, *conversion_swizzle);
 }
 
 /**
@@ -223,7 +223,6 @@ void rc_normal_rewrite_writemask(
 	struct rc_instruction * inst,
 	unsigned int conversion_swizzle)
 {
-	unsigned int new_mask;
 	struct rc_sub_instruction * sub = &inst->U.I;
 	const struct rc_opcode_info * info = rc_get_opcode_info(sub->Opcode);
 	sub->DstReg.WriteMask =
@@ -244,8 +243,8 @@ void rc_normal_rewrite_writemask(
 		return;
 	}
 
-	new_mask = sub->DstReg.WriteMask;
-	rc_for_all_reads_src(inst, normal_rewrite_writemask_cb, &new_mask);
+	rc_for_all_reads_src(inst, normal_rewrite_writemask_cb,
+							&conversion_swizzle);
 }
 
 /**




More information about the mesa-commit mailing list