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
720aa5bf
Commit
720aa5bf
authored
Feb 15, 2010
by
Christian Costa
Committed by
Alexandre Julliard
Feb 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Fix D3DTBLEND_MODULATE emulation.
Alpha source should be selected with WINED3DTSS_ALPHAOP and not by changing the source itself.
parent
6b6db0dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
device.c
dlls/ddraw/device.c
+9
-16
No files found.
dlls/ddraw/device.c
View file @
720aa5bf
...
...
@@ -2580,7 +2580,8 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
}
if
(
!
(
colorop
==
WINED3DTOP_MODULATE
&&
colorarg1
==
WINED3DTA_TEXTURE
&&
colorarg2
==
WINED3DTA_CURRENT
&&
alphaop
==
WINED3DTOP_SELECTARG1
&&
alphaarg1
==
(
tex_alpha
?
WINED3DTA_TEXTURE
:
WINED3DTA_CURRENT
)))
alphaop
==
(
tex_alpha
?
WINED3DTOP_SELECTARG1
:
WINED3DTOP_SELECTARG2
)
&&
alphaarg1
==
WINED3DTA_TEXTURE
&&
alphaarg2
==
WINED3DTA_CURRENT
))
{
ERR
(
"Unexpected texture stage state setup, returning D3DTBLEND_MODULATE - likely erroneous
\n
"
);
}
...
...
@@ -2852,16 +2853,12 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
IWineD3DBaseTexture_Release
(
tex
);
}
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG1
);
if
(
tex_alpha
)
{
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_TEXTURE
);
}
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG1
);
else
{
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_CURRENT
);
}
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG1
,
WINED3DTA_TEXTURE
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLORARG2
,
WINED3DTA_CURRENT
);
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_COLOROP
,
WINED3DTOP_MODULATE
);
...
...
@@ -4664,15 +4661,11 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
IWineD3DBaseTexture_Release
(
tex
);
}
/*
alphaop is WINED3DTOP_SELECTARG1 if it's D3DTBLEND_MODULATE, so only modify alphaarg1
*/
/*
Arg 1/2 are already set to WINED3DTA_TEXTURE/WINED3DTA_CURRENT in case of D3DTBLEND_MODULATE
*/
if
(
tex_alpha
)
{
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_TEXTURE
);
}
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG1
);
else
{
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_CURRENT
);
}
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAOP
,
WINED3DTOP_SELECTARG2
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
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