Move setup triangle stuff to its own file
This commit is contained in:
parent
ace380d5fc
commit
a360a1963f
5 changed files with 675 additions and 894 deletions
|
|
@ -109,128 +109,3 @@ private:
|
|||
bool colorfill;
|
||||
int pixelsize;
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
||||
class DrawTriangleCodegen : public DrawerCodegen
|
||||
{
|
||||
public:
|
||||
void Generate(TriDrawVariant variant, TriBlendMode blendmode, bool truecolor, SSAValue args, SSAValue thread_data);
|
||||
|
||||
private:
|
||||
void LoadArgs(SSAValue args, SSAValue thread_data);
|
||||
SSATriVertex LoadTriVertex(SSAValue v);
|
||||
void LoadUniforms(SSAValue uniforms);
|
||||
void Setup();
|
||||
SSAInt FloatTo28_4(SSAFloat v);
|
||||
void LoopBlockY();
|
||||
void LoopBlockX();
|
||||
void LoopFullBlock();
|
||||
void LoopPartialBlock(bool isSingleStencilValue);
|
||||
void SetupAffineBlock();
|
||||
|
||||
SSAVec4i ProcessPixel32(SSAVec4i bg, SSAInt *varying);
|
||||
SSAInt ProcessPixel8(SSAInt bg, SSAInt *varying);
|
||||
|
||||
SSAVec4i TranslateSample32(SSAInt *varying);
|
||||
SSAInt TranslateSample8(SSAInt *varying);
|
||||
SSAVec4i Sample32(SSAInt *varying);
|
||||
SSAInt Sample8(SSAInt *varying);
|
||||
SSAInt Shade8(SSAInt c);
|
||||
SSAVec4i ToBgra(SSAInt index);
|
||||
SSAInt ToPal8(SSAVec4i c);
|
||||
|
||||
SSAVec4i FadeOut(SSAInt frac, SSAVec4i color);
|
||||
|
||||
void SetStencilBlock(SSAInt block);
|
||||
void StencilClear(SSAUByte value);
|
||||
SSAUByte StencilGetSingle();
|
||||
SSABool StencilIsSingleValue();
|
||||
|
||||
SSAFloat gradx(SSAFloat x0, SSAFloat y0, SSAFloat x1, SSAFloat y1, SSAFloat x2, SSAFloat y2, SSAFloat c0, SSAFloat c1, SSAFloat c2);
|
||||
SSAFloat grady(SSAFloat x0, SSAFloat y0, SSAFloat x1, SSAFloat y1, SSAFloat x2, SSAFloat y2, SSAFloat c0, SSAFloat c1, SSAFloat c2);
|
||||
|
||||
TriDrawVariant variant;
|
||||
TriBlendMode blendmode;
|
||||
bool truecolor;
|
||||
|
||||
SSAStack<SSAInt> stack_C1, stack_C2, stack_C3;
|
||||
SSAStack<SSAInt> stack_y;
|
||||
SSAStack<SSAUBytePtr> stack_dest;
|
||||
SSAStack<SSAInt> stack_x;
|
||||
SSAStack<SSAUBytePtr> stack_buffer;
|
||||
SSAStack<SSAInt> stack_iy, stack_ix;
|
||||
SSAStack<SSAInt> stack_CY1, stack_CY2, stack_CY3;
|
||||
SSAStack<SSAInt> stack_CX1, stack_CX2, stack_CX3;
|
||||
SSAStack<SSAFloat> stack_posy_w, stack_posy_varying[TriVertex::NumVarying];
|
||||
SSAStack<SSAFloat> stack_posx_w, stack_posx_varying[TriVertex::NumVarying];
|
||||
SSAStack<SSAFloat> stack_AffineW;
|
||||
SSAStack<SSAFloat> stack_AffineVaryingPosY[TriVertex::NumVarying];
|
||||
SSAStack<SSAInt> stack_AffineVaryingPosX[TriVertex::NumVarying];
|
||||
SSAStack<SSABool> stack_stencilblock_restored;
|
||||
SSAStack<SSAUByte> stack_stencilblock_lastval;
|
||||
|
||||
SSAUBytePtr dest;
|
||||
SSAInt pitch;
|
||||
SSATriVertex v1;
|
||||
SSATriVertex v2;
|
||||
SSATriVertex v3;
|
||||
SSAInt clipright;
|
||||
SSAInt clipbottom;
|
||||
SSAUBytePtr texturePixels;
|
||||
SSAInt textureWidth;
|
||||
SSAInt textureHeight;
|
||||
SSAUBytePtr translation;
|
||||
SSAInt color, srcalpha, destalpha;
|
||||
|
||||
SSAInt light;
|
||||
SSAShadeConstants shade_constants;
|
||||
SSABool is_simple_shade;
|
||||
SSABool is_nearest_filter;
|
||||
SSABool is_fixed_light;
|
||||
|
||||
SSAUBytePtr stencilValues;
|
||||
SSAIntPtr stencilMasks;
|
||||
SSAInt stencilPitch;
|
||||
SSAUByte stencilTestValue;
|
||||
SSAUByte stencilWriteValue;
|
||||
|
||||
SSAUBytePtr Colormaps;
|
||||
SSAUBytePtr RGB32k;
|
||||
SSAUBytePtr BaseColors;
|
||||
|
||||
SSAWorkerThread thread;
|
||||
|
||||
// Block size, standard 8x8 (must be power of two)
|
||||
const int q = 8;
|
||||
|
||||
SSAInt Y1, Y2, Y3;
|
||||
SSAInt X1, X2, X3;
|
||||
SSAInt DX12, DX23, DX31;
|
||||
SSAInt DY12, DY23, DY31;
|
||||
SSAInt FDX12, FDX23, FDX31;
|
||||
SSAInt FDY12, FDY23, FDY31;
|
||||
SSAInt minx, maxx, miny, maxy;
|
||||
SSAInt C1, C2, C3;
|
||||
SSAFloat gradWX, gradWY;
|
||||
SSAFloat gradVaryingX[TriVertex::NumVarying], gradVaryingY[TriVertex::NumVarying];
|
||||
SSAFloat shade;
|
||||
|
||||
SSAInt x, y;
|
||||
SSAInt x0, x1, y0, y1;
|
||||
SSAInt currentlight;
|
||||
SSAUBytePtr currentcolormap;
|
||||
SSAFloat AffineW;
|
||||
SSABool AffineLinear;
|
||||
SSAFloat AffineVaryingPosY[TriVertex::NumVarying];
|
||||
SSAInt AffineVaryingPosX[TriVertex::NumVarying];
|
||||
SSAInt AffineVaryingStepX[TriVertex::NumVarying];
|
||||
|
||||
SSAFloat posy_w, posy_varying[TriVertex::NumVarying];
|
||||
SSAFloat posx_w, posx_varying[TriVertex::NumVarying];
|
||||
|
||||
SSAUBytePtr StencilBlock;
|
||||
SSAIntPtr StencilBlockMask;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue