[Mesa-dev] [PATCH 02/20] swr/rast: Binner fixes for viewport index offset handling
Tim Rowley
timothy.o.rowley at intel.com
Thu Dec 14 21:34:42 UTC 2017
---
src/gallium/drivers/swr/rasterizer/core/binner.cpp | 9 ++++++++-
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 9d1f0d8799..52375f8956 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 0d3d78057f..9d8bbc19e6 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);
--
2.14.1
More information about the mesa-dev
mailing list