const struct util_format_description *desc;
LLVMTypeRef type;
LLVMValueRef packed = NULL;
- unsigned shift = 0;
+ LLVMValueRef swizzles[4];
+ LLVMValueRef shifted, casted, scaled, unswizzled;
+ LLVMValueRef shifts[4];
+ LLVMValueRef scales[4];
+ bool normalized;
+ unsigned shift;
unsigned i, j;
desc = util_format_description(format);
type = LLVMIntType(desc->block.bits);
- LLVMValueRef swizzles[4];
- LLVMValueRef shifted, casted, scaled, unswizzled;
-
-
/* Unswizzle the color components into the source vector. */
for (i = 0; i < 4; ++i) {
for (j = 0; j < 4; ++j) {
LLVMGetUndef(LLVMVectorType(LLVMFloatType(), 4)),
LLVMConstVector(swizzles, 4), "");
- LLVMValueRef shifts[4];
- LLVMValueRef scales[4];
- bool normalized = FALSE;
-
+ normalized = FALSE;
+ shift = 0;
for (i = 0; i < 4; ++i) {
unsigned bits = desc->channel[i].size;
{
const struct util_format_description *desc;
LLVMTypeRef type;
- unsigned shift = 0;
+ LLVMValueRef shifted, casted, scaled, masked;
+ LLVMValueRef shifts[4];
+ LLVMValueRef masks[4];
+ LLVMValueRef scales[4];
+ LLVMValueRef swizzles[4];
+ LLVMValueRef aux[4];
+ bool normalized;
+ int empty_channel;
+ unsigned shift;
unsigned i;
desc = util_format_description(format);
LLVMConstNull(LLVMVectorType(LLVMInt32Type(), 4)),
"");
- LLVMValueRef shifted, casted, scaled, masked, swizzled;
- LLVMValueRef shifts[4];
- LLVMValueRef masks[4];
- LLVMValueRef scales[4];
- bool normalized = FALSE;
- int empty_channel = -1;
-
/* Initialize vector constants */
+ normalized = FALSE;
+ empty_channel = -1;
+ shift = 0;
for (i = 0; i < 4; ++i) {
unsigned bits = desc->channel[i].size;
else
scaled = casted;
- LLVMValueRef swizzles[4];
- LLVMValueRef aux[4];
-
for (i = 0; i < 4; ++i)
aux[i] = LLVMGetUndef(LLVMFloatType());
}
}
- swizzled = LLVMBuildShuffleVector(builder, scaled, LLVMConstVector(aux, 4), LLVMConstVector(swizzles, 4), "");
-
- return swizzled;
+ return LLVMBuildShuffleVector(builder, scaled, LLVMConstVector(aux, 4), LLVMConstVector(swizzles, 4), "");
}