summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-09-02 12:13:46 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-09-11 13:01:31 +0100
commit34ea50f6720d6aca970613da560a1f25f5b5772c (patch)
treebf36b5ab29f7b6f6bc089c8d23f48b390c40e6ad
parent96c6e7e73e5d6df929e0c0189a98f6df30ff59f2 (diff)
gallivm: s/lp_build_broadcast_aos/lp_build_swizzle_scalar_aos/
More accurate description of this function purpose.
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_swizzle.c11
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_swizzle.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c2
3 files changed, 9 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
index fced983396..d4d2f2b307 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
@@ -95,10 +95,13 @@ lp_build_broadcast_scalar(struct lp_build_context *bld,
}
+/**
+ * Swizzle one channel into all other three channels.
+ */
LLVMValueRef
-lp_build_broadcast_aos(struct lp_build_context *bld,
- LLVMValueRef a,
- unsigned channel)
+lp_build_swizzle_scalar_aos(struct lp_build_context *bld,
+ LLVMValueRef a,
+ unsigned channel)
{
const struct lp_type type = bld->type;
const unsigned n = type.length;
@@ -203,7 +206,7 @@ lp_build_swizzle_aos(struct lp_build_context *bld,
case PIPE_SWIZZLE_GREEN:
case PIPE_SWIZZLE_BLUE:
case PIPE_SWIZZLE_ALPHA:
- return lp_build_broadcast_aos(bld, a, swizzles[0]);
+ return lp_build_swizzle_scalar_aos(bld, a, swizzles[0]);
case PIPE_SWIZZLE_ZERO:
return bld->zero;
case PIPE_SWIZZLE_ONE:
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.h b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.h
index 315e1bcb54..f9b6a5e725 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.h
@@ -60,7 +60,7 @@ lp_build_broadcast_scalar(struct lp_build_context *bld,
* all four channel.
*/
LLVMValueRef
-lp_build_broadcast_aos(struct lp_build_context *bld,
+lp_build_swizzle_scalar_aos(struct lp_build_context *bld,
LLVMValueRef a,
unsigned channel);
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
index e49d353b74..b5924cbb7d 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
@@ -197,7 +197,7 @@ lp_build_blend_swizzle(struct lp_build_blend_aos_context *bld,
swizzled_rgb = rgb;
break;
case LP_BUILD_BLEND_SWIZZLE_AAAA:
- swizzled_rgb = lp_build_broadcast_aos(&bld->base, rgb, alpha_swizzle);
+ swizzled_rgb = lp_build_swizzle_scalar_aos(&bld->base, rgb, alpha_swizzle);
break;
default:
assert(0);