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
cc8d8b5e
Commit
cc8d8b5e
authored
May 25, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Prioritize stencil check over depth check in wglChoosePixelFormat().
Patch by Matteo Bruni. Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
parent
28ba7e41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
wgl.c
dlls/opengl32/wgl.c
+10
-10
No files found.
dlls/opengl32/wgl.c
View file @
cc8d8b5e
...
...
@@ -564,27 +564,27 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
continue
;
}
}
if
(
ppfd
->
c
DepthBits
&&
!
(
ppfd
->
dwFlags
&
PFD_DEPTH_DONTCARE
)
)
if
(
ppfd
->
c
StencilBits
)
{
if
(((
ppfd
->
c
DepthBits
>
best
.
cDepthBits
)
&&
(
format
.
cDepthBits
>
best
.
cDepth
Bits
))
||
((
format
.
c
DepthBits
>=
ppfd
->
cDepthBits
)
&&
(
format
.
cDepthBits
<
best
.
cDepth
Bits
)))
if
(((
ppfd
->
c
StencilBits
>
best
.
cStencilBits
)
&&
(
format
.
cStencilBits
>
best
.
cStencil
Bits
))
||
((
format
.
c
StencilBits
>=
ppfd
->
cStencilBits
)
&&
(
format
.
cStencilBits
<
best
.
cStencil
Bits
)))
goto
found
;
if
(
best
.
c
DepthBits
!=
format
.
cDepth
Bits
)
if
(
best
.
c
StencilBits
!=
format
.
cStencil
Bits
)
{
TRACE
(
"
depth
mismatch for iPixelFormat=%d
\n
"
,
i
);
TRACE
(
"
stencil
mismatch for iPixelFormat=%d
\n
"
,
i
);
continue
;
}
}
if
(
ppfd
->
c
StencilBits
)
if
(
ppfd
->
c
DepthBits
&&
!
(
ppfd
->
dwFlags
&
PFD_DEPTH_DONTCARE
)
)
{
if
(((
ppfd
->
c
StencilBits
>
best
.
cStencilBits
)
&&
(
format
.
cStencilBits
>
best
.
cStencil
Bits
))
||
((
format
.
c
StencilBits
>=
ppfd
->
cStencilBits
)
&&
(
format
.
cStencilBits
<
best
.
cStencil
Bits
)))
if
(((
ppfd
->
c
DepthBits
>
best
.
cDepthBits
)
&&
(
format
.
cDepthBits
>
best
.
cDepth
Bits
))
||
((
format
.
c
DepthBits
>=
ppfd
->
cDepthBits
)
&&
(
format
.
cDepthBits
<
best
.
cDepth
Bits
)))
goto
found
;
if
(
best
.
c
StencilBits
!=
format
.
cStencil
Bits
)
if
(
best
.
c
DepthBits
!=
format
.
cDepth
Bits
)
{
TRACE
(
"
stencil
mismatch for iPixelFormat=%d
\n
"
,
i
);
TRACE
(
"
depth
mismatch for iPixelFormat=%d
\n
"
,
i
);
continue
;
}
}
...
...
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