summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-08-07 18:13:54 -0500
committerTim Rowley <[email protected]>2017-09-06 11:02:17 -0500
commit404ac6da9e7eadd62c38e20f382b5280b29fa8bb (patch)
treef058d5466de21d0fa294c24e8ef77ff6de1d6c51 /src/gallium/drivers/swr
parent6cb20c9f3a327fe3c1a99d6824632aea238d7d72 (diff)
swr/rast: SIMD16 PA - rename Assemble_simd16 to Assemble
For consistency and to support overloading. Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/clip.h18
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/frontend.cpp6
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/pa.h22
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 ffc69c42298..5238284e321 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 406a0e0becd..f882869eb71 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 b2ae8dafb97..e76dc044d7c 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[])
{