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
01c59b3f
Commit
01c59b3f
authored
Apr 10, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Fix bit shifts in pixel format description for RGBA formats.
parent
d70a652d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
opengl.c
dlls/opengl32/tests/opengl.c
+14
-1
opengl.c
dlls/winex11.drv/opengl.c
+8
-5
No files found.
dlls/opengl32/tests/opengl.c
View file @
01c59b3f
...
...
@@ -288,7 +288,20 @@ static void test_choosepixelformat(void)
pfd
.
iPixelType
=
PFD_TYPE_RGBA
;
pfd
.
cColorBits
=
32
;
ok
(
test_pfd
(
&
pfd
,
NULL
),
"Simple pfd failed
\n
"
);
ok
(
test_pfd
(
&
pfd
,
&
ret_fmt
),
"Simple pfd failed
\n
"
);
ok
(
ret_fmt
.
cColorBits
==
32
,
"Got %u.
\n
"
,
ret_fmt
.
cColorBits
);
ok
(
!
ret_fmt
.
cBlueShift
,
"Got %u.
\n
"
,
ret_fmt
.
cBlueShift
);
ok
(
ret_fmt
.
cBlueBits
==
8
,
"Got %u.
\n
"
,
ret_fmt
.
cBlueBits
);
ok
(
ret_fmt
.
cRedBits
==
8
,
"Got %u.
\n
"
,
ret_fmt
.
cRedBits
);
ok
(
ret_fmt
.
cGreenBits
==
8
,
"Got %u.
\n
"
,
ret_fmt
.
cGreenBits
);
ok
(
ret_fmt
.
cGreenShift
==
8
,
"Got %u.
\n
"
,
ret_fmt
.
cGreenShift
);
ok
(
ret_fmt
.
cRedShift
==
16
,
"Got %u.
\n
"
,
ret_fmt
.
cRedShift
);
ok
(
!
ret_fmt
.
cAlphaBits
||
ret_fmt
.
cAlphaBits
==
8
,
"Got %u.
\n
"
,
ret_fmt
.
cAlphaBits
);
if
(
ret_fmt
.
cAlphaBits
)
ok
(
ret_fmt
.
cAlphaShift
==
24
,
"Got %u.
\n
"
,
ret_fmt
.
cAlphaShift
);
else
ok
(
!
ret_fmt
.
cAlphaShift
,
"Got %u.
\n
"
,
ret_fmt
.
cAlphaShift
);
pfd
.
dwFlags
|=
PFD_DOUBLEBUFFER_DONTCARE
;
ok
(
test_pfd
(
&
pfd
,
NULL
),
"PFD_DOUBLEBUFFER_DONTCARE failed
\n
"
);
pfd
.
dwFlags
|=
PFD_STEREO_DONTCARE
;
...
...
dlls/winex11.drv/opengl.c
View file @
01c59b3f
...
...
@@ -1601,14 +1601,17 @@ static int describe_pixel_format( int iPixelFormat, PIXELFORMATDESCRIPTOR *ppfd,
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_BLUE_SIZE
,
&
bb
);
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_ALPHA_SIZE
,
&
ab
);
ppfd
->
cRedBits
=
rb
;
ppfd
->
cRedShift
=
gb
+
bb
+
ab
;
ppfd
->
cBlueBits
=
bb
;
ppfd
->
cBlueShift
=
ab
;
ppfd
->
cBlueShift
=
0
;
ppfd
->
cGreenBits
=
gb
;
ppfd
->
cGreenShift
=
bb
+
ab
;
ppfd
->
cGreenShift
=
bb
;
ppfd
->
cRedBits
=
rb
;
ppfd
->
cRedShift
=
gb
+
bb
;
ppfd
->
cAlphaBits
=
ab
;
ppfd
->
cAlphaShift
=
0
;
if
(
ab
)
ppfd
->
cAlphaShift
=
rb
+
gb
+
bb
;
else
ppfd
->
cAlphaShift
=
0
;
}
else
{
ppfd
->
cRedBits
=
0
;
ppfd
->
cRedShift
=
0
;
...
...
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