diff options
author | Tim Rowley <[email protected]> | 2016-08-04 17:37:19 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-08-10 11:08:17 -0500 |
commit | 047493c1980deddc916294d8cb498d5e0633ad82 (patch) | |
tree | 0794463609310742e69dfc248b00f51de8bc050f | |
parent | a83beb936e6fb2caccea45d39f6d06da12575a6e (diff) |
swr: [rasterizer core] add rasterizerSampleCount to PS context
Signed-off-by: Tim Rowley <[email protected]>
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/backend.cpp | 4 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/state.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp index 900849dd3c9..c421179d5eb 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp @@ -470,6 +470,7 @@ void BackendSingleSample(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint3 psContext.pRecipW = work.pRecipW; psContext.pSamplePosX = (const float*)&T::MultisampleT::samplePosX; psContext.pSamplePosY = (const float*)&T::MultisampleT::samplePosY; + psContext.rasterizerSampleCount = T::MultisampleT::numSamples; for(uint32_t yy = y; yy < y + KNOB_TILE_Y_DIM; yy += SIMD_TILE_Y_DIM) { @@ -660,6 +661,7 @@ void BackendSampleRate(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_ psContext.recipDet = work.recipDet; psContext.pSamplePosX = (const float*)&T::MultisampleT::samplePosX; psContext.pSamplePosY = (const float*)&T::MultisampleT::samplePosY; + psContext.rasterizerSampleCount = T::MultisampleT::numSamples; for (uint32_t yy = y; yy < y + KNOB_TILE_Y_DIM; yy += SIMD_TILE_Y_DIM) { @@ -880,6 +882,8 @@ void BackendPixelRate(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t x, uint32_t psContext.recipDet = work.recipDet; psContext.pSamplePosX = (const float*)&T::MultisampleT::samplePosX; psContext.pSamplePosY = (const float*)&T::MultisampleT::samplePosY; + psContext.rasterizerSampleCount = T::MultisampleT::numSamples; + psContext.sampleIndex = 0; PixelRateZTestLoop<T> PixelRateZTest(pDC, work, coeffs, state, pDepthBase, pStencilBase, rastState.clipDistanceMask); diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h index f2ebf92e096..a3616bce069 100644 --- a/src/gallium/drivers/swr/rasterizer/core/state.h +++ b/src/gallium/drivers/swr/rasterizer/core/state.h @@ -340,6 +340,8 @@ struct SWR_PS_CONTEXT uint32_t primID; // IN: primitive ID uint32_t sampleIndex; // IN: sampleIndex + uint32_t rasterizerSampleCount; // IN: sample count used by the rasterizer + }; ////////////////////////////////////////////////////////////////////////// |