diff options
author | Tim Rowley <[email protected]> | 2017-10-11 16:21:21 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-10-19 13:10:55 -0500 |
commit | 49090ccf54798f7c9081f9b20d0ed0d0433ec026 (patch) | |
tree | 2828ff185128684cd1bc0329192eda973ee5bc82 /src/gallium/drivers/swr | |
parent | 04ea03d99d8810a7df5aca059ff00c26ecaa71ee (diff) |
swr/rast: Change DS memory allocation
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/frontend.cpp | 4 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/state.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp index a803512b7cc..211e9e4b073 100644 --- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp @@ -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) diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h index d9450fcbd75..2af384fd907 100644 --- a/src/gallium/drivers/swr/rasterizer/core/state.h +++ b/src/gallium/drivers/swr/rasterizer/core/state.h @@ -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; |