[Mesa-dev] [PATCH 03/21] swr/rast: Fix wrong type allocation

George Kyriazis george.kyriazis at intel.com
Wed Apr 25 19:21:42 UTC 2018


ALLOCA pointer elements, not pointers.
---
 src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
index 09590b7..a43c787 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
@@ -1014,7 +1014,7 @@ template<typename T> Value* FetchJit::GetSimdValidIndicesHelper(Value* pIndices,
 
     {
         // store 0 index on stack to be used to conditionally load from if index address is OOB
-        Value* pZeroIndex = ALLOCA(Ty);
+        Value* pZeroIndex = ALLOCA(Ty->getPointerElementType());
         STORE(C((T)0), pZeroIndex);
 
         // Load a SIMD of index pointers
-- 
2.7.4



More information about the mesa-dev mailing list