summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/llvm/storage.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-02-12 23:08:42 -0500
committerZack Rusin <zack@tungstengraphics.com>2008-02-12 23:11:05 -0500
commit3c3c1ff5cd19af23033e080d8f0b9b5ae8363f2e (patch)
treede5cfa513de1fd1fd73403fdb2f1cc7c3a13befd /src/mesa/pipe/llvm/storage.cpp
parentcad7bc74d69ee053452aa4bd20740dc79ad6eab6 (diff)
stop generate llvm entry points
entrypoints are useless because we use the same paths as all other code. also simplify llvm swizzling code
Diffstat (limited to 'src/mesa/pipe/llvm/storage.cpp')
-rw-r--r--src/mesa/pipe/llvm/storage.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/pipe/llvm/storage.cpp b/src/mesa/pipe/llvm/storage.cpp
index 08b9d29a24..c4326de8c5 100644
--- a/src/mesa/pipe/llvm/storage.cpp
+++ b/src/mesa/pipe/llvm/storage.cpp
@@ -33,6 +33,8 @@
#include "storage.h"
+#include "gallivm_p.h"
+
#include "pipe/p_shader_tokens.h"
#include <llvm/BasicBlock.h>
#include <llvm/Module.h>
@@ -82,10 +84,10 @@ llvm::Constant *Storage::shuffleMask(int vec)
if (origVec == 0) {
const_vec = Constant::getNullValue(m_intVecType);
} else {
- int x = vec / 1000; vec -= x * 1000;
- int y = vec / 100; vec -= y * 100;
- int z = vec / 10; vec -= z * 10;
- int w = vec;
+ int x = gallivm_x_swizzle(vec);
+ int y = gallivm_y_swizzle(vec);
+ int z = gallivm_z_swizzle(vec);
+ int w = gallivm_w_swizzle(vec);
std::vector<Constant*> elems;
elems.push_back(constantInt(x));
elems.push_back(constantInt(y));