Commit e757926d by Chris Forbes

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/24588Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 26f1a86b
...@@ -88,21 +88,10 @@ namespace sw ...@@ -88,21 +88,10 @@ namespace sw
{ {
unsigned char component : 4; unsigned char component : 4;
unsigned char flat : 4; unsigned char flat : 4;
unsigned char project : 2;
bool centroid : 1; bool centroid : 1;
}; };
union Interpolant interpolant[MAX_FRAGMENT_INPUTS];
{
struct
{
Interpolant color[2];
Interpolant texture[8];
Interpolant fog;
};
Interpolant interpolant[MAX_FRAGMENT_INPUTS];
};
}; };
struct State : States struct State : States
......
...@@ -254,16 +254,6 @@ namespace sw ...@@ -254,16 +254,6 @@ namespace sw
} }
} }
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 xLeft[4];
Short4 xRight[4]; Short4 xRight[4];
......
...@@ -92,7 +92,7 @@ namespace sw ...@@ -92,7 +92,7 @@ namespace sw
return pass != 0x0; 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++) for(int index = 0; index < RENDERTARGETS; index++)
{ {
......
...@@ -34,7 +34,7 @@ namespace sw ...@@ -34,7 +34,7 @@ namespace sw
virtual void setBuiltins(Int &x, Int &y, Float4(&z)[4], Float4 &w); virtual void setBuiltins(Int &x, Int &y, Float4(&z)[4], Float4 &w);
virtual void applyShader(Int cMask[4]); virtual void applyShader(Int cMask[4]);
virtual Bool alphaTest(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: private:
// Color outputs // Color outputs
......
...@@ -159,34 +159,6 @@ namespace sw ...@@ -159,34 +159,6 @@ namespace sw
} }
} }
} }
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); setBuiltins(x, y, z, w);
...@@ -256,7 +228,7 @@ namespace sw ...@@ -256,7 +228,7 @@ namespace sw
AddAtomic(Pointer<Long>(&profiler.ropOperations), 4); AddAtomic(Pointer<Long>(&profiler.ropOperations), 4);
#endif #endif
rasterOperation(f, cBuffer, x, sMask, zMask, cMask); rasterOperation(cBuffer, x, sMask, zMask, cMask);
} }
} }
......
...@@ -42,7 +42,7 @@ namespace sw ...@@ -42,7 +42,7 @@ namespace sw
virtual void setBuiltins(Int &x, Int &y, Float4(&z)[4], Float4 &w) = 0; virtual void setBuiltins(Int &x, Int &y, Float4(&z)[4], Float4 &w) = 0;
virtual void applyShader(Int cMask[4]) = 0; virtual void applyShader(Int cMask[4]) = 0;
virtual Bool alphaTest(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); virtual void quad(Pointer<Byte> cBuffer[4], Pointer<Byte> &zBuffer, Pointer<Byte> &sBuffer, Int cMask[4], Int &x, Int &y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment