[Mesa-dev] [PATCH 5/8] swr/rast: SIMD16 PA - rename Assemble_simd16 to Assemble

Tim Rowley timothy.o.rowley at intel.com
Tue Sep 5 18:57:31 UTC 2017


For consistency and to support overloading.
---
 src/gallium/drivers/swr/rasterizer/core/clip.h     | 18 +++++++++---------
 .../drivers/swr/rasterizer/core/frontend.cpp       |  6 +++---
 src/gallium/drivers/swr/rasterizer/core/pa.h       | 22 +++-------------------
 3 files changed, 15 insertions(+), 31 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.h b/src/gallium/drivers/swr/rasterizer/core/clip.h
index ffc69c4..5238284 100644
--- a/src/gallium/drivers/swr/rasterizer/core/clip.h
+++ b/src/gallium/drivers/swr/rasterizer/core/clip.h
@@ -399,8 +399,8 @@ public:
         simd16vector vClipCullDistLo[3];
         simd16vector vClipCullDistHi[3];
 
-        pa.Assemble_simd16(VERTEX_CLIPCULL_DIST_LO_SLOT, vClipCullDistLo);
-        pa.Assemble_simd16(VERTEX_CLIPCULL_DIST_HI_SLOT, vClipCullDistHi);
+        pa.Assemble(VERTEX_CLIPCULL_DIST_LO_SLOT, vClipCullDistLo);
+        pa.Assemble(VERTEX_CLIPCULL_DIST_HI_SLOT, vClipCullDistHi);
 
         DWORD index;
         while (_BitScanForward(&index, cullMask))
@@ -680,7 +680,7 @@ public:
                 {
 #if USE_SIMD16_FRONTEND
                     simd16vector attrib_simd16[NumVertsPerPrim];
-                    bool assemble = clipPa.Assemble_simd16(VERTEX_POSITION_SLOT, attrib_simd16);
+                    bool assemble = clipPa.Assemble(VERTEX_POSITION_SLOT, attrib_simd16);
 
                     if (assemble)
                     {
@@ -731,7 +731,7 @@ public:
 
         // assemble pos
         simd16vector tmpVector[NumVertsPerPrim];
-        pa.Assemble_simd16(VERTEX_POSITION_SLOT, tmpVector);
+        pa.Assemble(VERTEX_POSITION_SLOT, tmpVector);
         for (uint32_t i = 0; i < NumVertsPerPrim; ++i)
         {
             vertices[i].attrib[VERTEX_POSITION_SLOT] = tmpVector[i];
@@ -748,7 +748,7 @@ public:
             maxSlot = std::max<int32_t>(maxSlot, mapSlot);
             uint32_t inputSlot = backendState.vertexAttribOffset + mapSlot;
 
-            pa.Assemble_simd16(inputSlot, tmpVector);
+            pa.Assemble(inputSlot, tmpVector);
 
             // if constant interpolation enabled for this attribute, assign the provoking
             // vertex values to all edges
@@ -771,7 +771,7 @@ public:
         // assemble user clip distances if enabled
         if (this->state.rastState.clipDistanceMask & 0xf)
         {
-            pa.Assemble_simd16(VERTEX_CLIPCULL_DIST_LO_SLOT, tmpVector);
+            pa.Assemble(VERTEX_CLIPCULL_DIST_LO_SLOT, tmpVector);
             for (uint32_t i = 0; i < NumVertsPerPrim; ++i)
             {
                 vertices[i].attrib[VERTEX_CLIPCULL_DIST_LO_SLOT] = tmpVector[i];
@@ -780,7 +780,7 @@ public:
 
         if (this->state.rastState.clipDistanceMask & 0xf0)
         {
-            pa.Assemble_simd16(VERTEX_CLIPCULL_DIST_HI_SLOT, tmpVector);
+            pa.Assemble(VERTEX_CLIPCULL_DIST_HI_SLOT, tmpVector);
             for (uint32_t i = 0; i < NumVertsPerPrim; ++i)
             {
                 vertices[i].attrib[VERTEX_CLIPCULL_DIST_HI_SLOT] = tmpVector[i];
@@ -919,7 +919,7 @@ public:
                 do
                 {
                     simd16vector attrib[NumVertsPerPrim];
-                    bool assemble = clipPa.Assemble_simd16(VERTEX_POSITION_SLOT, attrib);
+                    bool assemble = clipPa.Assemble(VERTEX_POSITION_SLOT, attrib);
 
                     if (assemble)
                     {
@@ -1060,7 +1060,7 @@ public:
         if (state.backendState.readViewportArrayIndex)
         {
             simd16vector vpiAttrib[NumVertsPerPrim];
-            pa.Assemble_simd16(VERTEX_SGV_SLOT, vpiAttrib);
+            pa.Assemble(VERTEX_SGV_SLOT, vpiAttrib);
 
             // OOB indices => forced to zero.
             simd16scalari vpai = _simd16_castps_si(vpiAttrib[0][VERTEX_SGV_VAI_COMP]);
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
index 406a0e0..f882869 100644
--- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
@@ -929,7 +929,7 @@ static void GeometryShaderStage(
 #if USE_SIMD16_FRONTEND
                         simd16vector attrib_simd16[3];
 
-                        bool assemble = gsPa.Assemble_simd16(VERTEX_POSITION_SLOT, attrib_simd16);
+                        bool assemble = gsPa.Assemble(VERTEX_POSITION_SLOT, attrib_simd16);
 
 #else
                         bool assemble = gsPa.Assemble(VERTEX_POSITION_SLOT, attrib);
@@ -1297,7 +1297,7 @@ static void TessellationStages(
                     AR_BEGIN(FEPAAssemble, pDC->drawId);
                     bool assemble =
 #if USE_SIMD16_FRONTEND
-                        tessPa.Assemble_simd16(VERTEX_POSITION_SLOT, prim_simd16);
+                        tessPa.Assemble(VERTEX_POSITION_SLOT, prim_simd16);
 #else
                         tessPa.Assemble(VERTEX_POSITION_SLOT, prim);
 #endif
@@ -1646,7 +1646,7 @@ void ProcessDraw(
                 simd16vector prim_simd16[MAX_NUM_VERTS_PER_PRIM];
 
                 RDTSC_START(FEPAAssemble);
-                bool assemble = pa.Assemble_simd16(VERTEX_POSITION_SLOT, prim_simd16);
+                bool assemble = pa.Assemble(VERTEX_POSITION_SLOT, prim_simd16);
                 RDTSC_STOP(FEPAAssemble, 1, 0);
 
 #if KNOB_ENABLE_TOSS_POINTS
diff --git a/src/gallium/drivers/swr/rasterizer/core/pa.h b/src/gallium/drivers/swr/rasterizer/core/pa.h
index b2ae8da..e76dc04 100644
--- a/src/gallium/drivers/swr/rasterizer/core/pa.h
+++ b/src/gallium/drivers/swr/rasterizer/core/pa.h
@@ -90,7 +90,6 @@ struct PA_STATE
 #endif
     virtual bool Assemble(uint32_t slot, simdvector verts[]) = 0;
 #if ENABLE_AVX512_SIMD16
-    virtual bool Assemble_simd16(uint32_t slot, simd16vector verts[]) = 0;
     virtual bool Assemble(uint32_t slot, simd16vector verts[]) = 0;
 #endif
     virtual void AssembleSingle(uint32_t slot, uint32_t primIndex, simd4scalar verts[]) = 0;
@@ -199,14 +198,9 @@ struct PA_STATE_OPT : public PA_STATE
     }
 
 #if ENABLE_AVX512_SIMD16
-    bool Assemble_simd16(uint32_t slot, simd16vector verts[])
-    {
-        return this->pfnPaFunc_simd16(*this, slot, verts);
-    }
-
     bool Assemble(uint32_t slot, simd16vector verts[])
     {
-        return Assemble_simd16(slot, verts);
+        return this->pfnPaFunc_simd16(*this, slot, verts);
     }
 
 #endif
@@ -725,7 +719,7 @@ struct PA_STATE_CUT : public PA_STATE
     }
 
 #if ENABLE_AVX512_SIMD16
-    bool Assemble_simd16(uint32_t slot, simd16vector verts[])
+    bool Assemble(uint32_t slot, simd16vector verts[])
     {
         // process any outstanding verts
         ProcessVerts();
@@ -771,11 +765,6 @@ struct PA_STATE_CUT : public PA_STATE
         return true;
     }
 
-    bool Assemble(uint32_t slot, simd16vector verts[])
-    {
-        return Assemble_simd16(slot, verts);
-    }
-
 #endif
     void AssembleSingle(uint32_t slot, uint32_t triIndex, simd4scalar tri[3])
     {
@@ -1283,7 +1272,7 @@ struct PA_TESS : PA_STATE
     }
 
 #if ENABLE_AVX512_SIMD16
-    bool Assemble_simd16(uint32_t slot, simd16vector verts[])
+    bool Assemble(uint32_t slot, simd16vector verts[])
     {
         SWR_ASSERT(slot < m_numAttributes);
 
@@ -1330,11 +1319,6 @@ struct PA_TESS : PA_STATE
         return true;
     }
 
-    bool Assemble(uint32_t slot, simd16vector verts[])
-    {
-        return Assemble_simd16(slot, verts);
-    }
-
 #endif
     void AssembleSingle(uint32_t slot, uint32_t primIndex, simd4scalar verts[])
     {
-- 
2.7.4



More information about the mesa-dev mailing list