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
25c58e68
Commit
25c58e68
authored
Apr 25, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Support _SHIFT_ARB attributes in X11DRV_wglGetPixelFormatAttribivARB().
parent
a82b3eb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
opengl.c
dlls/opengl32/tests/opengl.c
+7
-1
opengl.c
dlls/winex11.drv/opengl.c
+24
-0
No files found.
dlls/opengl32/tests/opengl.c
View file @
25c58e68
...
...
@@ -750,7 +750,8 @@ static void test_makecurrent(HDC winhdc)
static
void
test_colorbits
(
HDC
hdc
)
{
const
int
iAttribList
[]
=
{
WGL_COLOR_BITS_ARB
,
WGL_RED_BITS_ARB
,
WGL_GREEN_BITS_ARB
,
WGL_BLUE_BITS_ARB
,
WGL_ALPHA_BITS_ARB
};
WGL_BLUE_BITS_ARB
,
WGL_ALPHA_BITS_ARB
,
WGL_BLUE_SHIFT_ARB
,
WGL_GREEN_SHIFT_ARB
,
WGL_RED_SHIFT_ARB
,
WGL_ALPHA_SHIFT_ARB
,
};
int
iAttribRet
[
ARRAY_SIZE
(
iAttribList
)];
const
int
iAttribs
[]
=
{
WGL_ALPHA_BITS_ARB
,
1
,
0
};
unsigned
int
nFormats
;
...
...
@@ -778,6 +779,11 @@ static void test_colorbits(HDC hdc)
skip
(
"wglGetPixelFormatAttribivARB failed
\n
"
);
return
;
}
ok
(
!
iAttribRet
[
5
],
"got %d.
\n
"
,
iAttribRet
[
5
]);
ok
(
iAttribRet
[
6
]
==
iAttribRet
[
3
],
"got %d.
\n
"
,
iAttribRet
[
6
]);
ok
(
iAttribRet
[
7
]
==
iAttribRet
[
6
]
+
iAttribRet
[
2
],
"got %d.
\n
"
,
iAttribRet
[
7
]);
ok
(
iAttribRet
[
8
]
==
iAttribRet
[
7
]
+
iAttribRet
[
1
],
"got %d.
\n
"
,
iAttribRet
[
8
]);
iAttribRet
[
1
]
+=
iAttribRet
[
2
]
+
iAttribRet
[
3
]
+
iAttribRet
[
4
];
ok
(
iAttribRet
[
0
]
==
iAttribRet
[
1
],
"WGL_COLOR_BITS_ARB (%d) does not equal R+G+B+A (%d)!
\n
"
,
iAttribRet
[
0
],
iAttribRet
[
1
]);
...
...
dlls/winex11.drv/opengl.c
View file @
25c58e68
...
...
@@ -2691,6 +2691,7 @@ static BOOL X11DRV_wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int
int
hTest
;
int
tmp
;
int
curGLXAttr
=
0
;
PIXELFORMATDESCRIPTOR
pfd
;
TRACE
(
"(%p, %d, %d, %d, %p, %p)
\n
"
,
hdc
,
iPixelFormat
,
iLayerPlane
,
nAttributes
,
piAttributes
,
piValues
);
...
...
@@ -2707,6 +2708,12 @@ static BOOL X11DRV_wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int
WARN
(
"Unable to convert iPixelFormat %d to a GLX one!
\n
"
,
iPixelFormat
);
}
if
(
!
describe_pixel_format
(
iPixelFormat
,
&
pfd
))
{
WARN
(
"describe_pixel_format failed.
\n
"
);
memset
(
&
pfd
,
0
,
sizeof
(
pfd
));
}
for
(
i
=
0
;
i
<
nAttributes
;
++
i
)
{
const
int
curWGLAttr
=
piAttributes
[
i
];
TRACE
(
"pAttr[%d] = %x
\n
"
,
i
,
curWGLAttr
);
...
...
@@ -2808,6 +2815,23 @@ static BOOL X11DRV_wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int
curGLXAttr
=
GLX_AUX_BUFFERS
;
break
;
case
WGL_RED_SHIFT_ARB
:
if
(
!
pfd
.
nSize
)
goto
pix_error
;
piValues
[
i
]
=
pfd
.
cRedShift
;
continue
;
case
WGL_GREEN_SHIFT_ARB
:
if
(
!
pfd
.
nSize
)
goto
pix_error
;
piValues
[
i
]
=
pfd
.
cGreenShift
;
continue
;
case
WGL_BLUE_SHIFT_ARB
:
if
(
!
pfd
.
nSize
)
goto
pix_error
;
piValues
[
i
]
=
pfd
.
cBlueShift
;
continue
;
case
WGL_ALPHA_SHIFT_ARB
:
if
(
!
pfd
.
nSize
)
goto
pix_error
;
piValues
[
i
]
=
pfd
.
cAlphaShift
;
continue
;
case
WGL_SUPPORT_GDI_ARB
:
if
(
!
fmt
)
goto
pix_error
;
piValues
[
i
]
=
(
fmt
->
dwFlags
&
PFD_SUPPORT_GDI
)
!=
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