swr/rast: Fix primitive replication issue in tesselation PA.
authorGeorge Kyriazis <george.kyriazis@intel.com>
Tue, 6 Feb 2018 23:28:12 +0000 (17:28 -0600)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 16 Feb 2018 16:54:01 +0000 (10:54 -0600)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/frontend.cpp
src/gallium/drivers/swr/rasterizer/core/pa.h

index 33533af630a767f2ce695347b35c58b75eead2a6..13c9f3670f7d1a59b16cfb98925f060552bb7553 100644 (file)
@@ -1338,7 +1338,7 @@ static void TessellationStages(
             tsData.ppIndices,
             tsData.NumPrimitives,
             tsState.postDSTopology,
-            numVertsPerPrim);
+            NumVertsPerPrim(tsState.postDSTopology, false));
 
         while (tessPa.HasWork())
         {
@@ -1431,7 +1431,7 @@ static void TessellationStages(
                         pfnClipFunc(pDC, tessPa, workerId, prim_simd16, GenMask(numPrims), primID, vViewportIdx, vRtIdx);
                     }
 #else
-                    // Gather data from the SVG if provided.
+                    // Gather data from the SGV if provided.
                     simdscalari vViewportIdx = SIMD::setzero_si();
                     simdscalari vRtIdx = SIMD::setzero_si();
                     SIMD::Vec4 svgAttrib[4];
index c88b4bfd97d0abd9b3ce536703fbe2348e50f781..ed644c044c3b5f849b2b46e1e533a72afe93a301 100644 (file)
@@ -1330,6 +1330,7 @@ struct PA_TESS : PA_STATE
         SWR_ASSERT(slot < m_numAttributes);
         SWR_ASSERT(primIndex < PA_TESS::NumPrims());
 
+
         const float* pVertDataBase = (const float*)&m_pVertexData[slot * m_attributeStrideInVectors * 4];
         for (uint32_t i = 0; i < m_numVertsPerPrim; ++i)
         {