llvmpipe: Use const keyword for input array arguments.

This commit is contained in:
José Fonseca
2009-09-13 16:12:48 +01:00
parent faec23387e
commit 5e13e987da
4 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -337,7 +337,7 @@ LLVMValueRef
lp_build_select_aos(struct lp_build_context *bld,
LLVMValueRef a,
LLVMValueRef b,
boolean cond[4])
const boolean cond[4])
{
const union lp_type type = bld->type;
const unsigned n = type.length;
+1 -1
View File
@@ -66,7 +66,7 @@ LLVMValueRef
lp_build_select_aos(struct lp_build_context *bld,
LLVMValueRef a,
LLVMValueRef b,
boolean cond[4]);
const boolean cond[4]);
#endif /* !LP_BLD_LOGIC_H */
@@ -161,7 +161,7 @@ lp_build_broadcast_aos(struct lp_build_context *bld,
LLVMValueRef
lp_build_swizzle1_aos(struct lp_build_context *bld,
LLVMValueRef a,
unsigned char swizzle[4])
const unsigned char swizzle[4])
{
const unsigned n = bld->type.length;
unsigned i, j;
@@ -192,7 +192,7 @@ LLVMValueRef
lp_build_swizzle2_aos(struct lp_build_context *bld,
LLVMValueRef a,
LLVMValueRef b,
unsigned char swizzle[4])
const unsigned char swizzle[4])
{
const unsigned n = bld->type.length;
unsigned i, j;
@@ -201,11 +201,12 @@ lp_build_swizzle2_aos(struct lp_build_context *bld,
return lp_build_swizzle1_aos(bld, a, swizzle);
if(a == b) {
swizzle[0] %= 4;
swizzle[1] %= 4;
swizzle[2] %= 4;
swizzle[3] %= 4;
return lp_build_swizzle1_aos(bld, a, swizzle);
unsigned char swizzle1[4];
swizzle1[0] = swizzle[0] % 4;
swizzle1[1] = swizzle[1] % 4;
swizzle1[2] = swizzle[2] % 4;
swizzle1[3] = swizzle[3] % 4;
return lp_build_swizzle1_aos(bld, a, swizzle1);
}
if(swizzle[0] % 4 == 0 &&
@@ -73,7 +73,7 @@ lp_build_broadcast_aos(struct lp_build_context *bld,
LLVMValueRef
lp_build_swizzle1_aos(struct lp_build_context *bld,
LLVMValueRef a,
unsigned char swizzle[4]);
const unsigned char swizzle[4]);
/**
@@ -85,7 +85,7 @@ LLVMValueRef
lp_build_swizzle2_aos(struct lp_build_context *bld,
LLVMValueRef a,
LLVMValueRef b,
unsigned char swizzle[4]);
const unsigned char swizzle[4]);
#endif /* !LP_BLD_SWIZZLE_H */