summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-10-18 16:51:07 -0500
committerTim Rowley <[email protected]>2017-11-20 13:49:59 -0600
commite612231f20883aa31a6ed5b260872f1cdb84c223 (patch)
tree64ee01c5766eaa79f6934e12af69c22b703dbf58
parent3f17d3c01753020ff01e8d30a25edff6ca453971 (diff)
swr/rast: Support flexible vertex layout for DS output
Reviewed-by: Bruce Cherniak <[email protected]>
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/frontend.cpp1
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/state.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
index 211e9e4b073..e15b3009796 100644
--- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
@@ -1237,6 +1237,7 @@ static void TessellationStages(
dsContext.pDomainU = (simdscalar*)tsData.pDomainPointsU;
dsContext.pDomainV = (simdscalar*)tsData.pDomainPointsV;
dsContext.pOutputData = gt_pTessellationThreadData->pDSOutput;
+ dsContext.outVertexAttribOffset = tsState.dsOutVtxAttribOffset;
#if USE_SIMD16_FRONTEND
dsContext.vectorStride = RoundUpEven(requiredDSVectorInvocations); // simd8 -> simd16
#else
diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h
index 2af384fd907..d11ffc69b01 100644
--- a/src/gallium/drivers/swr/rasterizer/core/state.h
+++ b/src/gallium/drivers/swr/rasterizer/core/state.h
@@ -288,6 +288,7 @@ struct SWR_DS_CONTEXT
uint32_t PrimitiveID; // IN: (SCALAR) PrimitiveID for the patch associated with the DS invocation
uint32_t vectorOffset; // IN: (SCALAR) vector index offset into SIMD data.
uint32_t vectorStride; // IN: (SCALAR) stride (in vectors) of output data per attribute-component
+ uint32_t outVertexAttribOffset; // IN: (SCALAR) Offset to the attributes as processed by the next shader stage.
ScalarPatch* pCpIn; // IN: (SCALAR) Control patch
simdscalar* pDomainU; // IN: (SIMD) Domain Point U coords
simdscalar* pDomainV; // IN: (SIMD) Domain Point V coords
@@ -819,6 +820,7 @@ struct SWR_TS_STATE
uint32_t numHsOutputAttribs;
uint32_t numDsOutputAttribs;
uint32_t dsAllocationSize;
+ uint32_t dsOutVtxAttribOffset;
// Offset to the start of the attributes of the input vertices, in simdvector units
uint32_t vertexAttribOffset;