summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/storagesoa.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@pixel.(none)>2008-03-01 08:04:21 -0500
committerZack Rusin <zack@tungstengraphics.com>2008-03-01 15:28:00 -0500
commite884c7ed9a14aabaa86f6710c594d20812ed11d9 (patch)
treeadc183000e92d518f6db34fe18dc41e54363c8ac /src/gallium/auxiliary/gallivm/storagesoa.cpp
parent07d6347e8a51fc7bbd5c586a5739f17c68c5eafd (diff)
start implementing start of bultins
Diffstat (limited to 'src/gallium/auxiliary/gallivm/storagesoa.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/storagesoa.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/gallivm/storagesoa.cpp b/src/gallium/auxiliary/gallivm/storagesoa.cpp
index ed0674a96f..bb6fe3d7e1 100644
--- a/src/gallium/auxiliary/gallivm/storagesoa.cpp
+++ b/src/gallium/auxiliary/gallivm/storagesoa.cpp
@@ -277,7 +277,7 @@ llvm::Constant * StorageSoa::createConstGlobalVector(const std::vector<float> &v
return constVector;
}
-std::vector<llvm::Value*> StorageSoa::load(Argument type, int idx, int swizzle,
+std::vector<llvm::Value*> StorageSoa::load(enum tgsi_file_type type, int idx, int swizzle,
llvm::Value *indIdx)
{
std::vector<llvm::Value*> val(4);
@@ -292,25 +292,29 @@ std::vector<llvm::Value*> StorageSoa::load(Argument type, int idx, int swizzle,
debug_printf("XXXXXXXXX realIdx = %p, indIdx = %p\n", realIndex, indIdx);
switch(type) {
- case Input:
+ case TGSI_FILE_INPUT:
val = inputElement(realIndex);
break;
- case Output:
+ case TGSI_FILE_OUTPUT:
val = outputElement(realIndex);
break;
- case Temp:
+ case TGSI_FILE_TEMPORARY:
val = tempElement(realIndex);
break;
- case Const:
+ case TGSI_FILE_CONSTANT:
val = constElement(realIndex);
break;
- case Immediate:
+ case TGSI_FILE_IMMEDIATE:
val = immediateElement(realIndex);
break;
- case Address:
+ case TGSI_FILE_ADDRESS:
debug_printf("Address not handled in the load phase!\n");
assert(0);
break;
+ default:
+ debug_printf("Unknown load!\n");
+ assert(0);
+ break;
}
if (!gallivm_is_swizzle(swizzle))
return val;
@@ -324,21 +328,21 @@ std::vector<llvm::Value*> StorageSoa::load(Argument type, int idx, int swizzle,
return res;
}
-void StorageSoa::store(Argument type, int idx, const std::vector<llvm::Value*> &val,
+void StorageSoa::store(enum tgsi_file_type type, int idx, const std::vector<llvm::Value*> &val,
int mask)
{
llvm::Value *out = 0;
switch(type) {
- case Output:
+ case TGSI_FILE_OUTPUT:
out = m_output;
break;
- case Temp:
+ case TGSI_FILE_TEMPORARY:
out = m_temps;
break;
- case Input:
+ case TGSI_FILE_INPUT:
out = m_input;
break;
- case Address: {
+ case TGSI_FILE_ADDRESS: {
llvm::Value *addr = m_addresses[idx];
if (!addr) {
addAddress(idx);