OSDN Git Service

swr/rast: Fix wrong type allocation
authorGeorge Kyriazis <george.kyriazis@intel.com>
Thu, 12 Apr 2018 18:10:05 +0000 (13:10 -0500)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 27 Apr 2018 19:36:41 +0000 (14:36 -0500)
ALLOCA pointer elements, not pointers.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp

index 09590b7..a43c787 100644 (file)
@@ -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