From 7c294462324fd3dc1951fc003290b926fbc0b07e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 25 Nov 2010 01:25:03 +0100 Subject: [PATCH] r300/compiler: remove duplicate function rc_mask_to_swz --- .../drivers/dri/r300/compiler/radeon_pair_schedule.c | 2 +- src/mesa/drivers/dri/r300/compiler/radeon_program.c | 11 ----------- src/mesa/drivers/dri/r300/compiler/radeon_program.h | 3 +-- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c index cbb5ef6237e..9beb5d63579 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c @@ -701,7 +701,7 @@ static int convert_rgb_to_alpha( get_reg_valuep(s, RC_FILE_TEMPORARY, pair_inst->RGB.DestIndex, - rc_mask_to_swz(old_mask)); + rc_mask_to_swizzle(old_mask)); new_index = i; *new_regvalp = *old_regvalp; *old_regvalp = NULL; diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.c b/src/mesa/drivers/dri/r300/compiler/radeon_program.c index d7bedc57291..707882882a5 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.c @@ -244,14 +244,3 @@ unsigned int rc_recompute_ips(struct radeon_compiler * c) return ip; } - -rc_swizzle rc_mask_to_swizzle(unsigned int mask) -{ - switch(mask) { - case RC_MASK_X: return RC_SWIZZLE_X; - case RC_MASK_Y: return RC_SWIZZLE_Y; - case RC_MASK_Z: return RC_SWIZZLE_Z; - case RC_MASK_W: return RC_SWIZZLE_W; - default: return RC_SWIZZLE_UNUSED; - } -} diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h index be078b4f4fa..913815b24d0 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h @@ -194,14 +194,13 @@ static inline unsigned int combine_swizzles(unsigned int src, unsigned int swz) /** * @param mask Must be either RC_MASK_X, RC_MASK_Y, RC_MASK_Z, or RC_MASK_W */ -static inline rc_swizzle rc_mask_to_swz(unsigned int mask) +static inline rc_swizzle rc_mask_to_swizzle(unsigned int mask) { switch (mask) { case RC_MASK_X: return RC_SWIZZLE_X; case RC_MASK_Y: return RC_SWIZZLE_Y; case RC_MASK_Z: return RC_SWIZZLE_Z; case RC_MASK_W: return RC_SWIZZLE_W; - default: assert(0); } return RC_SWIZZLE_UNUSED; } -- 2.30.2