summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-01-23 11:30:13 -0600
committerTim Rowley <[email protected]>2017-02-08 13:57:33 -0600
commit8780706c62edaa8bf29b57763272d9fe29893265 (patch)
tree2965ebb10a6ba3326749d393848726cc3f87b84b /src/gallium
parentd159b0bf34d1a591cf6d534952ebb80c7445062d (diff)
swr: [rasterizer jitter] Change SimdVector representation to array
Make all SimdVectors in LLVM represented as simdscalar[4] rather than a struct. Fixes issues with promotion of values from i32 to i64 to match register width. Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp6
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/JitManager.h2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index d77dffb98c8..74ffd27c46e 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -133,8 +133,6 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core)
mInt8Ty = Type::getInt8Ty(mContext);
mInt32Ty = Type::getInt32Ty(mContext); // int type
mInt64Ty = Type::getInt64Ty(mContext); // int type
- mV4FP32Ty = StructType::get(mContext, std::vector<Type*>(4, mFP32Ty), false); // vector4 float type (represented as structure)
- mV4Int32Ty = StructType::get(mContext, std::vector<Type*>(4, mInt32Ty), false); // vector4 int type
// fetch function signature
// typedef void(__cdecl *PFN_FETCH_FUNC)(SWR_FETCH_CONTEXT& fetchInfo, simdvertex& out);
@@ -147,8 +145,8 @@ JitManager::JitManager(uint32_t simdWidth, const char *arch, const char* core)
mSimtFP32Ty = VectorType::get(mFP32Ty, mVWidth);
mSimtInt32Ty = VectorType::get(mInt32Ty, mVWidth);
- mSimdVectorTy = StructType::get(mContext, std::vector<Type*>(4, mSimtFP32Ty), false);
- mSimdVectorInt32Ty = StructType::get(mContext, std::vector<Type*>(4, mSimtInt32Ty), false);
+ mSimdVectorTy = ArrayType::get(mSimtFP32Ty, 4);
+ mSimdVectorInt32Ty = ArrayType::get(mSimtInt32Ty, 4);
#if defined(_WIN32)
// explicitly instantiate used symbols from potentially staticly linked libs
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h
index ed7216b89f4..e45ad142b32 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.h
@@ -164,8 +164,6 @@ struct JitManager
llvm::Type* mInt32Ty;
llvm::Type* mInt64Ty;
llvm::Type* mFP32Ty;
- llvm::StructType* mV4FP32Ty;
- llvm::StructType* mV4Int32Ty;
llvm::Type* mSimtFP32Ty;
llvm::Type* mSimtInt32Ty;