Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
cd858dfa
Commit
cd858dfa
authored
17 years ago
by
Stefan Dösinger
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wined3d: Disable the SWAPEFFECT_DISCARD clear.
parent
de6aba11
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/wined3d/swapchain.c
+18
-2
18 additions, 2 deletions
dlls/wined3d/swapchain.c
with
18 additions
and
2 deletions
dlls/wined3d/swapchain.c
+
18
−
2
View file @
cd858dfa
...
...
@@ -274,8 +274,24 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
}
#endif
if
(
This
->
presentParms
.
SwapEffect
==
WINED3DSWAPEFFECT_DISCARD
)
{
TRACE
(
"Clearing the color buffer with pink color
\n
"
);
/* This is disabled, but the code left in for debug purposes.
*
* Since we're allowed to modify the new back buffer on a D3DSWAPEFFECT_DISCARD flip,
* we can clear it with some ugly color to make bad drawing visible and ease debugging.
* The Debug runtime does the same on Windows. However, a few games do not redraw the
* screen properly, like Max Payne 2, which leaves a few pixels undefined.
*
* Tests show that the content of the back buffer after a discard flip is indeed not
* reliable, so no game can depend on the exact content. However, it resembles the
* old contents in some way, for example by showing fragments at other locations. In
* general, the color theme is still intact. So Max payne, which draws rather dark scenes
* gets a dark background image. If we clear it with a bright ugly color, the game's
* bug shows up much more than it does on Windows, and the players see single pixels
* with wrong colors.
* (The Max Payne bug has been confirmed on Windows with the debug runtime)
*/
if
(
FALSE
&&
This
->
presentParms
.
SwapEffect
==
WINED3DSWAPEFFECT_DISCARD
)
{
TRACE
(
"Clearing the color buffer with cyan color
\n
"
);
IWineD3DDevice_Clear
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
0
,
NULL
,
WINED3DCLEAR_TARGET
,
0xff00ffff
,
1
.
0
,
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment