llvm::Value *temps);
- std::vector<llvm::Value*> argument(Argument type, int idx, int swizzle,
- llvm::Value *indIdx =0);
+ std::vector<llvm::Value*> load(Argument type, int idx, int swizzle,
+ llvm::Value *indIdx =0);
void store(Argument type, int idx, const std::vector<llvm::Value*> &val,
int mask);
indIdx = storage->extractIndex(indIdx);
}
if (src->SrcRegister.File == TGSI_FILE_CONSTANT) {
- val = storage->argument(StorageSoa::Const,
- src->SrcRegister.Index, swizzle, indIdx);
+ val = storage->load(StorageSoa::Const,
+ src->SrcRegister.Index, swizzle, indIdx);
} else if (src->SrcRegister.File == TGSI_FILE_INPUT) {
- val = storage->argument(StorageSoa::Input,
- src->SrcRegister.Index, swizzle, indIdx);
+ val = storage->load(StorageSoa::Input,
+ src->SrcRegister.Index, swizzle, indIdx);
} else if (src->SrcRegister.File == TGSI_FILE_TEMPORARY) {
- val = storage->argument(StorageSoa::Temp,
- src->SrcRegister.Index, swizzle);
+ val = storage->load(StorageSoa::Temp,
+ src->SrcRegister.Index, swizzle);
} else if (src->SrcRegister.File == TGSI_FILE_OUTPUT) {
- val = storage->argument(StorageSoa::Output,
- src->SrcRegister.Index, swizzle, indIdx);
+ val = storage->load(StorageSoa::Output,
+ src->SrcRegister.Index, swizzle, indIdx);
} else if (src->SrcRegister.File == TGSI_FILE_IMMEDIATE) {
- val = storage->argument(StorageSoa::Immediate,
- src->SrcRegister.Index, swizzle);
+ val = storage->load(StorageSoa::Immediate,
+ src->SrcRegister.Index, swizzle);
} else {
fprintf(stderr, "ERROR: not supported llvm source %d\n", src->SrcRegister.File);
return;