diff options
author | Tim Rowley <[email protected]> | 2017-11-29 10:46:49 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-12-15 10:55:19 -0600 |
commit | 0e9e24768785a4e09a785c1f3ab9c0117e82da4e (patch) | |
tree | a8a1628bd102b5c231b9bebe96a72a1b17dcbddc /src/gallium/drivers | |
parent | f2e3900a1e7b48b640bd9fa32d2e1285e397fad0 (diff) |
swr/rast: Binner fixes for viewport index offset handling
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/binner.cpp | 9 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/clip.h | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/binner.cpp b/src/gallium/drivers/swr/rasterizer/core/binner.cpp index 9d1f0d87994..52375f8956c 100644 --- a/src/gallium/drivers/swr/rasterizer/core/binner.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/binner.cpp @@ -470,6 +470,10 @@ void SIMDCALL BinTrianglesImpl( typename SIMD_T::Integer vClearMask = SIMD_T::cmplt_epi32(vpai, vNumViewports); viewportIdx = SIMD_T::and_si(vClearMask, vpai); } + else + { + viewportIdx = vpai; + } if (feState.vpTransformDisable) { @@ -1326,6 +1330,10 @@ void BinPointsImpl( typename SIMD_T::Integer vClearMask = SIMD_T::cmplt_epi32(vpai, vNumViewports); viewportIdx = SIMD_T::and_si(vClearMask, vpai); } + else + { + viewportIdx = vpai; + } if (!feState.vpTransformDisable) { @@ -1647,7 +1655,6 @@ void SIMDCALL BinLinesImpl( if (state.backendState.readViewportArrayIndex) { pa.Assemble(VERTEX_SGV_SLOT, vpiAttrib); - vpai = SIMD_T::castps_si(vpiAttrib[0][VERTEX_SGV_VAI_COMP]); } diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.h b/src/gallium/drivers/swr/rasterizer/core/clip.h index 0d3d78057ff..9d8bbc19e63 100644 --- a/src/gallium/drivers/swr/rasterizer/core/clip.h +++ b/src/gallium/drivers/swr/rasterizer/core/clip.h @@ -694,7 +694,6 @@ public: if (state.backendState.readViewportArrayIndex) { pa.Assemble(VERTEX_SGV_SLOT, vpiAttrib); - vpai = SIMD_T::castps_si(vpiAttrib[0][VERTEX_SGV_VAI_COMP]); } @@ -707,6 +706,10 @@ public: typename SIMD_T::Integer vClearMask = SIMD_T::cmplt_epi32(vpai, vNumViewports); viewportIdx = SIMD_T::and_si(vClearMask, vpai); } + else + { + viewportIdx = vpai; + } ComputeClipCodes(prim, viewportIdx); |