mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(RGL PS3) Replace more GCM_FUNC entries
This commit is contained in:
parent
41a65eb32a
commit
7167ccb5b9
@ -150,6 +150,38 @@ static inline GLuint rglPlatformGetBitsPerPixel (GLenum internalFormat)
|
||||
(thisContext->current)[1] = (control1); \
|
||||
(thisContext->current) += 2;
|
||||
|
||||
#define rglGcmSetBlendEnable(thisContext, enable) \
|
||||
{ \
|
||||
bool continue_func = true; \
|
||||
if(thisContext->current + (2) > thisContext->end) \
|
||||
{ \
|
||||
if((*thisContext->callback)(thisContext, (2)) != 0) \
|
||||
continue_func = false; \
|
||||
} \
|
||||
if (continue_func) \
|
||||
{ \
|
||||
(thisContext->current)[0] = (((1) << (18)) | ((0x00000310))); \
|
||||
(thisContext->current)[1] = (enable); \
|
||||
(thisContext->current) += 2; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define rglGcmSetBlendEnableMrt(thisContext, mrt1, mrt2, mrt3) \
|
||||
(thisContext->current)[0] = (((1) << (18)) | ((0x0000036c))); \
|
||||
(thisContext->current)[1] = (((mrt1) << 1)|((mrt2) << 2)|((mrt3) << 3)); \
|
||||
(thisContext->current) += 2
|
||||
|
||||
#define rglGcmSetBlendEquation(thisContext, color, alpha) \
|
||||
(thisContext->current)[0] = (((1) << (18)) | ((0x00000320))); \
|
||||
(thisContext->current)[1] = (((color)) | (((alpha)) << 16)); \
|
||||
(thisContext->current) += 2
|
||||
|
||||
#define rglGcmSetBlendFunc(thisContext, sfcolor, dfcolor, sfalpha, dfalpha) \
|
||||
(thisContext->current)[0] = (((2) << (18)) | ((0x00000314))); \
|
||||
(thisContext->current)[1] = (((sfcolor)) | (((sfalpha)) << 16)); \
|
||||
(thisContext->current)[2] = (((dfcolor)) | (((dfalpha)) << 16)); \
|
||||
(thisContext->current) += 3
|
||||
|
||||
#define rglGcmSetUserClipPlaneControl(thisContext, plane0, plane1, plane2, plane3, plane4, plane5) \
|
||||
(thisContext->current)[0] = (((1) << (18)) | CELL_GCM_NV4097_SET_USER_CLIP_PLANE_CONTROL); \
|
||||
(thisContext->current)[1] = ((plane0) | ((plane1) << 4) | ((plane2) << 8) | ((plane3) << 12) | ((plane4) << 16) | ((plane5) << 20)); \
|
||||
|
@ -1587,15 +1587,13 @@ GLboolean rglGcmInitFromRM( rglGcmResource *rmResource )
|
||||
rglGcmFifoFinish(ref, offset_bytes);
|
||||
|
||||
// Set the GPU to a known state
|
||||
|
||||
// initialize the default OpenGL state
|
||||
rglGcmSetBlendColor(gCellGcmCurrentContext, 0, 0);
|
||||
GCM_FUNC( cellGcmSetBlendEquation, RGLGCM_FUNC_ADD, RGLGCM_FUNC_ADD );
|
||||
GCM_FUNC( cellGcmSetBlendFunc, RGLGCM_ONE, RGLGCM_ZERO, RGLGCM_ONE, RGLGCM_ZERO );
|
||||
rglGcmSetBlendEquation(gCellGcmCurrentContext, RGLGCM_FUNC_ADD, RGLGCM_FUNC_ADD );
|
||||
rglGcmSetBlendFunc(gCellGcmCurrentContext, RGLGCM_ONE, RGLGCM_ZERO, RGLGCM_ONE, RGLGCM_ZERO );
|
||||
rglGcmSetClearColor(thisContext, 0 );
|
||||
GCM_FUNC( cellGcmSetBlendEnable, RGLGCM_FALSE );
|
||||
GCM_FUNC( cellGcmSetBlendEnableMrt, RGLGCM_FALSE, RGLGCM_FALSE, RGLGCM_FALSE );
|
||||
GCM_FUNC( cellGcmSetFragmentProgramGammaEnable, RGLGCM_FALSE );
|
||||
rglGcmSetBlendEnable(gCellGcmCurrentContext, RGLGCM_FALSE );
|
||||
rglGcmSetBlendEnableMrt(gCellGcmCurrentContext, RGLGCM_FALSE, RGLGCM_FALSE, RGLGCM_FALSE );
|
||||
|
||||
for ( i = 0; i < RGLGCM_ATTRIB_COUNT; i++ )
|
||||
{
|
||||
|
@ -1667,7 +1667,7 @@ GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count)
|
||||
{
|
||||
if ((LContext->Blending))
|
||||
{
|
||||
GCM_FUNC( cellGcmSetBlendEnable, LContext->Blending );
|
||||
rglGcmSetBlendEnable(gCellGcmCurrentContext, LContext->Blending );
|
||||
|
||||
rglGcmBlendState *blend = &rglGcmState_i.state.blend;
|
||||
GLuint hwColor;
|
||||
@ -1683,9 +1683,9 @@ GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count)
|
||||
rglGcmSetBlendColor(gCellGcmCurrentContext, hwColor, hwColor);
|
||||
}
|
||||
|
||||
GCM_FUNC( cellGcmSetBlendEquation, (rglGcmEnum)LContext->BlendEquationRGB,
|
||||
(rglGcmEnum)LContext->BlendEquationAlpha );
|
||||
GCM_FUNC( cellGcmSetBlendFunc, (rglGcmEnum)LContext->BlendFactorSrcRGB,(rglGcmEnum)LContext->BlendFactorDestRGB,(rglGcmEnum)LContext->BlendFactorSrcAlpha,(rglGcmEnum)LContext->BlendFactorDestAlpha);
|
||||
rglGcmSetBlendEquation(gCellGcmCurrentContext, LContext->BlendEquationRGB, LContext->BlendEquationAlpha);
|
||||
rglGcmSetBlendFunc(gCellGcmCurrentContext, LContext->BlendFactorSrcRGB, LContext->BlendFactorDestRGB,
|
||||
LContext->BlendFactorSrcAlpha, LContext->BlendFactorDestAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user