swr/rast: Change DS memory allocation
authorTim Rowley <timothy.o.rowley@intel.com>
Wed, 11 Oct 2017 21:21:21 +0000 (16:21 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 19 Oct 2017 18:10:55 +0000 (13:10 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/frontend.cpp
src/gallium/drivers/swr/rasterizer/core/state.h

index a803512b7cc85052d75b249d15d232008d5676cc..211e9e4b073d7f685641f570815382577247a3ed 100644 (file)
@@ -1212,9 +1212,9 @@ static void TessellationStages(
         // Allocate DS Output memory
         uint32_t requiredDSVectorInvocations = AlignUp(tsData.NumDomainPoints, KNOB_SIMD_WIDTH) / KNOB_SIMD_WIDTH;
 #if USE_SIMD16_FRONTEND
-        size_t requiredAllocSize = sizeof(simdvector) * RoundUpEven(requiredDSVectorInvocations) * tsState.numDsOutputAttribs;      // simd8 -> simd16, padding
+        size_t requiredAllocSize = sizeof(simdvector) * RoundUpEven(requiredDSVectorInvocations) * tsState.dsAllocationSize;      // simd8 -> simd16, padding
 #else
-        size_t requiredDSOutputVectors = requiredDSVectorInvocations * tsState.numDsOutputAttribs;
+        size_t requiredDSOutputVectors = requiredDSVectorInvocations * tsState.dsAllocationSize;
         size_t requiredAllocSize = sizeof(simdvector) * requiredDSOutputVectors;
 #endif
         if (requiredAllocSize > gt_pTessellationThreadData->dsOutputAllocSize)
index d9450fcbd7599406da0b33c35a5adac1aa734a5f..2af384fd9072cf8a440c7222043eadeb9bb60d05 100644 (file)
@@ -818,6 +818,7 @@ struct SWR_TS_STATE
     uint32_t                numHsInputAttribs;
     uint32_t                numHsOutputAttribs;
     uint32_t                numDsOutputAttribs;
+    uint32_t                dsAllocationSize;
 
     // Offset to the start of the attributes of the input vertices, in simdvector units
     uint32_t                vertexAttribOffset;