Synchronize GPU register names with the 3dbrew Wiki, again
This commit is contained in:
parent
bd36f283fd
commit
c14634f323
@ -274,14 +274,14 @@
|
|||||||
|
|
||||||
///@name Framebuffer registers (0x100-0x13F)
|
///@name Framebuffer registers (0x100-0x13F)
|
||||||
///@{
|
///@{
|
||||||
#define GPUREG_BLEND_ENABLE 0x0100 ///< Blend toggle.
|
#define GPUREG_COLOR_OPERATION 0x0100 ///< Configures fragment operation and blend mode.
|
||||||
#define GPUREG_BLEND_CONFIG 0x0101 ///< Blend configuration.
|
#define GPUREG_BLEND_FUNC 0x0101 ///< Blend function configuration.
|
||||||
#define GPUREG_LOGICOP_CONFIG 0x0102 ///< Logical operator configuration.
|
#define GPUREG_LOGIC_OP 0x0102 ///< Logical operator configuration.
|
||||||
#define GPUREG_BLEND_COLOR 0x0103 ///< Blend color.
|
#define GPUREG_BLEND_COLOR 0x0103 ///< Blend color.
|
||||||
#define GPUREG_ALPHATEST_CONFIG 0x0104 ///< Alpha test configuration.
|
#define GPUREG_FRAGOP_ALPHA_TEST 0x0104 ///< Alpha test configuration.
|
||||||
#define GPUREG_STENCIL_TEST 0x0105 ///< Stencil test configuration.
|
#define GPUREG_STENCIL_TEST 0x0105 ///< Stencil test configuration.
|
||||||
#define GPUREG_STENCIL_ACTION 0x0106 ///< Stencil test action.
|
#define GPUREG_STENCIL_OP 0x0106 ///< Stencil test operation.
|
||||||
#define GPUREG_DEPTHTEST_CONFIG 0x0107 ///< Depth test configuration.
|
#define GPUREG_DEPTH_COLOR_MASK 0x0107 ///< Depth test and color mask configuration.
|
||||||
#define GPUREG_0108 0x0108 ///< Unknown.
|
#define GPUREG_0108 0x0108 ///< Unknown.
|
||||||
#define GPUREG_0109 0x0109 ///< Unknown.
|
#define GPUREG_0109 0x0109 ///< Unknown.
|
||||||
#define GPUREG_010A 0x010A ///< Unknown.
|
#define GPUREG_010A 0x010A ///< Unknown.
|
||||||
|
@ -97,7 +97,7 @@ void GPU_DepthMap(float zScale, float zOffset)
|
|||||||
|
|
||||||
void GPU_SetAlphaTest(bool enable, GPU_TESTFUNC function, u8 ref)
|
void GPU_SetAlphaTest(bool enable, GPU_TESTFUNC function, u8 ref)
|
||||||
{
|
{
|
||||||
GPUCMD_AddWrite(GPUREG_ALPHATEST_CONFIG, (enable&1)|((function&7)<<4)|(ref<<8));
|
GPUCMD_AddWrite(GPUREG_FRAGOP_ALPHA_TEST, (enable&1)|((function&7)<<4)|(ref<<8));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU_SetStencilTest(bool enable, GPU_TESTFUNC function, u8 ref, u8 input_mask, u8 write_mask)
|
void GPU_SetStencilTest(bool enable, GPU_TESTFUNC function, u8 ref, u8 input_mask, u8 write_mask)
|
||||||
@ -107,26 +107,26 @@ void GPU_SetStencilTest(bool enable, GPU_TESTFUNC function, u8 ref, u8 input_mas
|
|||||||
|
|
||||||
void GPU_SetStencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass)
|
void GPU_SetStencilOp(GPU_STENCILOP sfail, GPU_STENCILOP dfail, GPU_STENCILOP pass)
|
||||||
{
|
{
|
||||||
GPUCMD_AddWrite(GPUREG_STENCIL_ACTION, sfail | (dfail << 4) | (pass << 8));
|
GPUCMD_AddWrite(GPUREG_STENCIL_OP, sfail | (dfail << 4) | (pass << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU_SetDepthTestAndWriteMask(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask)
|
void GPU_SetDepthTestAndWriteMask(bool enable, GPU_TESTFUNC function, GPU_WRITEMASK writemask)
|
||||||
{
|
{
|
||||||
GPUCMD_AddWrite(GPUREG_DEPTHTEST_CONFIG, (enable&1)|((function&7)<<4)|(writemask<<8));
|
GPUCMD_AddWrite(GPUREG_DEPTH_COLOR_MASK, (enable&1)|((function&7)<<4)|(writemask<<8));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU_SetAlphaBlending(GPU_BLENDEQUATION colorEquation, GPU_BLENDEQUATION alphaEquation,
|
void GPU_SetAlphaBlending(GPU_BLENDEQUATION colorEquation, GPU_BLENDEQUATION alphaEquation,
|
||||||
GPU_BLENDFACTOR colorSrc, GPU_BLENDFACTOR colorDst,
|
GPU_BLENDFACTOR colorSrc, GPU_BLENDFACTOR colorDst,
|
||||||
GPU_BLENDFACTOR alphaSrc, GPU_BLENDFACTOR alphaDst)
|
GPU_BLENDFACTOR alphaSrc, GPU_BLENDFACTOR alphaDst)
|
||||||
{
|
{
|
||||||
GPUCMD_AddWrite(GPUREG_BLEND_CONFIG, colorEquation | (alphaEquation<<8) | (colorSrc<<16) | (colorDst<<20) | (alphaSrc<<24) | (alphaDst<<28));
|
GPUCMD_AddWrite(GPUREG_BLEND_FUNC, colorEquation | (alphaEquation<<8) | (colorSrc<<16) | (colorDst<<20) | (alphaSrc<<24) | (alphaDst<<28));
|
||||||
GPUCMD_AddMaskedWrite(GPUREG_BLEND_ENABLE, 0x2, 0x00000100);
|
GPUCMD_AddMaskedWrite(GPUREG_COLOR_OPERATION, 0x2, 0x00000100);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU_SetColorLogicOp(GPU_LOGICOP op)
|
void GPU_SetColorLogicOp(GPU_LOGICOP op)
|
||||||
{
|
{
|
||||||
GPUCMD_AddWrite(GPUREG_LOGICOP_CONFIG, op);
|
GPUCMD_AddWrite(GPUREG_LOGIC_OP, op);
|
||||||
GPUCMD_AddMaskedWrite(GPUREG_BLEND_ENABLE, 0x2, 0x00000000);
|
GPUCMD_AddMaskedWrite(GPUREG_COLOR_OPERATION, 0x2, 0x00000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU_SetBlendingColor(u8 r, u8 g, u8 b, u8 a)
|
void GPU_SetBlendingColor(u8 r, u8 g, u8 b, u8 a)
|
||||||
|
Loading…
Reference in New Issue
Block a user