Remove various legacy parts of FS plumbing
Vulkan has no purpose for this
Bug: b/124177079
Change-Id: If2a3c824fac2645386091f6104c89a079f242d22
Reviewed-on: https://swiftshader-review.googlesource.com/c/24588
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Device/PixelProcessor.hpp b/src/Device/PixelProcessor.hpp
index ae3472b..7a92dc5 100644
--- a/src/Device/PixelProcessor.hpp
+++ b/src/Device/PixelProcessor.hpp
@@ -88,21 +88,10 @@
{
unsigned char component : 4;
unsigned char flat : 4;
- unsigned char project : 2;
bool centroid : 1;
};
- union
- {
- struct
- {
- Interpolant color[2];
- Interpolant texture[8];
- Interpolant fog;
- };
-
- Interpolant interpolant[MAX_FRAGMENT_INPUTS];
- };
+ Interpolant interpolant[MAX_FRAGMENT_INPUTS];
};
struct State : States
diff --git a/src/Device/QuadRasterizer.cpp b/src/Device/QuadRasterizer.cpp
index 237c9e3..770bf28 100644
--- a/src/Device/QuadRasterizer.cpp
+++ b/src/Device/QuadRasterizer.cpp
@@ -254,16 +254,6 @@
}
}
- if(state.fog.component)
- {
- Df = *Pointer<Float4>(primitive + OFFSET(Primitive,f.C), 16);
-
- if(!state.fog.flat)
- {
- Df += yyyy * *Pointer<Float4>(primitive + OFFSET(Primitive,f.B), 16);
- }
- }
-
Short4 xLeft[4];
Short4 xRight[4];
diff --git a/src/Pipeline/PixelProgram.cpp b/src/Pipeline/PixelProgram.cpp
index 901e5ec..6282d52 100644
--- a/src/Pipeline/PixelProgram.cpp
+++ b/src/Pipeline/PixelProgram.cpp
@@ -92,7 +92,7 @@
return pass != 0x0;
}
- void PixelProgram::rasterOperation(Float4 &fog, Pointer<Byte> cBuffer[4], Int &x, Int sMask[4], Int zMask[4], Int cMask[4])
+ void PixelProgram::rasterOperation(Pointer<Byte> cBuffer[4], Int &x, Int sMask[4], Int zMask[4], Int cMask[4])
{
for(int index = 0; index < RENDERTARGETS; index++)
{
diff --git a/src/Pipeline/PixelProgram.hpp b/src/Pipeline/PixelProgram.hpp
index 3f15ba6..2151ad1 100644
--- a/src/Pipeline/PixelProgram.hpp
+++ b/src/Pipeline/PixelProgram.hpp
@@ -34,7 +34,7 @@
virtual void setBuiltins(Int &x, Int &y, Float4(&z)[4], Float4 &w);
virtual void applyShader(Int cMask[4]);
virtual Bool alphaTest(Int cMask[4]);
- virtual void rasterOperation(Float4 &fog, Pointer<Byte> cBuffer[4], Int &x, Int sMask[4], Int zMask[4], Int cMask[4]);
+ virtual void rasterOperation(Pointer<Byte> cBuffer[4], Int &x, Int sMask[4], Int zMask[4], Int cMask[4]);
private:
// Color outputs
diff --git a/src/Pipeline/PixelRoutine.cpp b/src/Pipeline/PixelRoutine.cpp
index 09714aa..2c47be4 100644
--- a/src/Pipeline/PixelRoutine.cpp
+++ b/src/Pipeline/PixelRoutine.cpp
@@ -159,34 +159,6 @@
}
}
}
-
- Float4 rcp;
-
- switch(state.interpolant[interpolant].project)
- {
- case 0:
- break;
- case 1:
- rcp = reciprocal(v[interpolant].y);
- v[interpolant].x = v[interpolant].x * rcp;
- break;
- case 2:
- rcp = reciprocal(v[interpolant].z);
- v[interpolant].x = v[interpolant].x * rcp;
- v[interpolant].y = v[interpolant].y * rcp;
- break;
- case 3:
- rcp = reciprocal(v[interpolant].w);
- v[interpolant].x = v[interpolant].x * rcp;
- v[interpolant].y = v[interpolant].y * rcp;
- v[interpolant].z = v[interpolant].z * rcp;
- break;
- }
- }
-
- if(state.fog.component)
- {
- f = interpolate(xxxx, Df, rhw, primitive + OFFSET(Primitive,f), state.fog.flat & 0x01, state.perspective, false);
}
setBuiltins(x, y, z, w);
@@ -256,7 +228,7 @@
AddAtomic(Pointer<Long>(&profiler.ropOperations), 4);
#endif
- rasterOperation(f, cBuffer, x, sMask, zMask, cMask);
+ rasterOperation(cBuffer, x, sMask, zMask, cMask);
}
}
diff --git a/src/Pipeline/PixelRoutine.hpp b/src/Pipeline/PixelRoutine.hpp
index 0c2d8f3..744dfbe 100644
--- a/src/Pipeline/PixelRoutine.hpp
+++ b/src/Pipeline/PixelRoutine.hpp
@@ -42,7 +42,7 @@
virtual void setBuiltins(Int &x, Int &y, Float4(&z)[4], Float4 &w) = 0;
virtual void applyShader(Int cMask[4]) = 0;
virtual Bool alphaTest(Int cMask[4]) = 0;
- virtual void rasterOperation(Float4 &fog, Pointer<Byte> cBuffer[4], Int &x, Int sMask[4], Int zMask[4], Int cMask[4]) = 0;
+ virtual void rasterOperation(Pointer<Byte> cBuffer[4], Int &x, Int sMask[4], Int zMask[4], Int cMask[4]) = 0;
virtual void quad(Pointer<Byte> cBuffer[4], Pointer<Byte> &zBuffer, Pointer<Byte> &sBuffer, Int cMask[4], Int &x, Int &y);