Commit 916b5639 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: Fix glBlendColorEXT for use on RivaTNT.

parent be853b6f
......@@ -83,6 +83,7 @@ static const struct {
{"GL_ARB_shader_objects", ARB_SHADER_OBJECTS, 0 },
/* EXT */
{"GL_EXT_blend_color", EXT_BLEND_COLOR, 0 },
{"GL_EXT_blend_minmax", EXT_BLEND_MINMAX, 0 },
{"GL_EXT_fog_coord", EXT_FOG_COORD, 0 },
{"GL_EXT_framebuffer_blit", EXT_FRAMEBUFFER_BLIT, 0 },
......@@ -2224,8 +2225,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DPCMPCAPS_NEVER |
WINED3DPCMPCAPS_NOTEQUAL;
*pCaps->SrcBlendCaps = WINED3DPBLENDCAPS_BLENDFACTOR |
WINED3DPBLENDCAPS_BOTHINVSRCALPHA |
*pCaps->SrcBlendCaps = WINED3DPBLENDCAPS_BOTHINVSRCALPHA |
WINED3DPBLENDCAPS_BOTHSRCALPHA |
WINED3DPBLENDCAPS_DESTALPHA |
WINED3DPBLENDCAPS_DESTCOLOR |
......@@ -2239,8 +2239,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DPBLENDCAPS_SRCCOLOR |
WINED3DPBLENDCAPS_ZERO;
*pCaps->DestBlendCaps = WINED3DPBLENDCAPS_BLENDFACTOR |
WINED3DPBLENDCAPS_DESTALPHA |
*pCaps->DestBlendCaps = WINED3DPBLENDCAPS_DESTALPHA |
WINED3DPBLENDCAPS_DESTCOLOR |
WINED3DPBLENDCAPS_INVDESTALPHA |
WINED3DPBLENDCAPS_INVDESTCOLOR |
......@@ -2257,6 +2256,12 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
* legacy settings for srcblend only
*/
if( GL_SUPPORT(EXT_BLEND_COLOR)) {
*pCaps->SrcBlendCaps |= WINED3DPBLENDCAPS_BLENDFACTOR;
*pCaps->DestBlendCaps |= WINED3DPBLENDCAPS_BLENDFACTOR;
}
*pCaps->AlphaCmpCaps = WINED3DPCMPCAPS_ALWAYS |
WINED3DPCMPCAPS_EQUAL |
WINED3DPCMPCAPS_GREATER |
......
......@@ -356,6 +356,11 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
static void state_blendfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
float col[4];
if(!GL_SUPPORT(EXT_BLEND_COLOR)) {
WARN("Unsupported in local OpenGL implementation: glBlendColorEXT\n");
return;
}
TRACE("Setting BlendFactor to %d\n", stateblock->renderState[WINED3DRS_BLENDFACTOR]);
D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_BLENDFACTOR], col);
GL_EXTCALL(glBlendColorEXT (col[0],col[1],col[2],col[3]));
......
......@@ -3188,6 +3188,7 @@ typedef enum _GL_SupportedExt {
ARB_VERTEX_SHADER,
ARB_SHADER_OBJECTS,
/* EXT */
EXT_BLEND_COLOR,
EXT_BLEND_MINMAX,
EXT_FOG_COORD,
EXT_FRAMEBUFFER_OBJECT,
......@@ -3257,7 +3258,7 @@ typedef enum _GL_SupportedExt {
/* GL_ARB_draw_buffers */ \
USE_GL_FUNC(PGLFNDRAWBUFFERSARBPROC, glDrawBuffersARB, ARB_DRAW_BUFFERS, NULL );\
/* GL_ARB_imaging, GL_EXT_blend_minmax */ \
USE_GL_FUNC(PGLFNBLENDCOLORPROC, glBlendColorEXT, EXT_BLEND_MINMAX, NULL );\
USE_GL_FUNC(PGLFNBLENDCOLORPROC, glBlendColorEXT, EXT_BLEND_COLOR, NULL );\
USE_GL_FUNC(PGLFNBLENDEQUATIONPROC, glBlendEquationEXT, EXT_BLEND_MINMAX, NULL );\
/* GL_ARB_multisample */ \
USE_GL_FUNC(WINED3D_PFNGLSAMPLECOVERAGEARBPROC, glSampleCoverageARB, ARB_MULTISAMPLE, NULL );\
......
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