Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4651dd86
Commit
4651dd86
authored
Mar 25, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement independent color write masks.
parent
13a57c81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
directx.c
dlls/wined3d/directx.c
+2
-1
state.c
dlls/wined3d/state.c
+33
-0
No files found.
dlls/wined3d/directx.c
View file @
4651dd86
...
...
@@ -4264,13 +4264,14 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING
;
/* TODO:
WINED3DPMISCCAPS_NULLREFERENCE
WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS
WINED3DPMISCCAPS_FOGANDSPECULARALPHA
WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS
WINED3DPMISCCAPS_FOGVERTEXCLAMPED */
if
(
gl_info
->
supported
[
EXT_BLEND_EQUATION_SEPARATE
]
&&
gl_info
->
supported
[
EXT_BLEND_FUNC_SEPARATE
])
pCaps
->
PrimitiveMiscCaps
|=
WINED3DPMISCCAPS_SEPARATEALPHABLEND
;
if
(
gl_info
->
supported
[
EXT_DRAW_BUFFERS2
])
pCaps
->
PrimitiveMiscCaps
|=
WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS
;
pCaps
->
RasterCaps
=
WINED3DPRASTERCAPS_DITHER
|
WINED3DPRASTERCAPS_PAT
|
...
...
dlls/wined3d/state.c
View file @
4651dd86
...
...
@@ -1549,6 +1549,35 @@ static void state_colorwrite(DWORD state, IWineD3DStateBlockImpl *stateblock, st
}
}
static
void
set_color_mask
(
struct
wined3d_context
*
context
,
UINT
index
,
DWORD
mask
)
{
GL_EXTCALL
(
glColorMaskIndexedEXT
(
index
,
mask
&
WINED3DCOLORWRITEENABLE_RED
?
GL_TRUE
:
GL_FALSE
,
mask
&
WINED3DCOLORWRITEENABLE_GREEN
?
GL_TRUE
:
GL_FALSE
,
mask
&
WINED3DCOLORWRITEENABLE_BLUE
?
GL_TRUE
:
GL_FALSE
,
mask
&
WINED3DCOLORWRITEENABLE_ALPHA
?
GL_TRUE
:
GL_FALSE
));
}
static
void
state_colorwrite0
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
set_color_mask
(
context
,
0
,
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE
]);
}
static
void
state_colorwrite1
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
set_color_mask
(
context
,
1
,
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE1
]);
}
static
void
state_colorwrite2
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
set_color_mask
(
context
,
2
,
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE2
]);
}
static
void
state_colorwrite3
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
set_color_mask
(
context
,
3
,
stateblock
->
renderState
[
WINED3DRS_COLORWRITEENABLE3
]);
}
static
void
state_localviewer
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
if
(
stateblock
->
renderState
[
WINED3DRS_LOCALVIEWER
])
{
...
...
@@ -4992,13 +5021,17 @@ const struct StateEntryTemplate misc_state_template[] = {
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
state_msaa_w
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEMASK
),
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEMASK
),
state_multisampmask
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_DEBUGMONITORTOKEN
),
{
STATE_RENDER
(
WINED3DRS_DEBUGMONITORTOKEN
),
state_debug_monitor
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_colorwrite0
},
EXT_DRAW_BUFFERS2
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_colorwrite
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_BLENDOP
),
{
STATE_RENDER
(
WINED3DRS_BLENDOP
),
state_blendop
},
EXT_BLEND_MINMAX
},
{
STATE_RENDER
(
WINED3DRS_BLENDOP
),
{
STATE_RENDER
(
WINED3DRS_BLENDOP
),
state_blendop_w
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
),
{
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
),
state_scissor
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_SLOPESCALEDEPTHBIAS
),
{
STATE_RENDER
(
WINED3DRS_DEPTHBIAS
),
state_depthbias
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE1
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE1
),
state_colorwrite1
},
EXT_DRAW_BUFFERS2
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE1
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_colorwrite
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE2
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE2
),
state_colorwrite2
},
EXT_DRAW_BUFFERS2
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE2
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_colorwrite
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
),
state_colorwrite3
},
EXT_DRAW_BUFFERS2
},
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
),
{
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE
),
state_colorwrite
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_BLENDFACTOR
),
{
STATE_RENDER
(
WINED3DRS_BLENDFACTOR
),
state_blendfactor
},
EXT_BLEND_COLOR
},
{
STATE_RENDER
(
WINED3DRS_BLENDFACTOR
),
{
STATE_RENDER
(
WINED3DRS_BLENDFACTOR
),
state_blendfactor_w
},
WINED3D_GL_EXT_NONE
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment