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
28233dd3
Commit
28233dd3
authored
Apr 09, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Apr 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Allow replacing either context in wglShareLists.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=11436
parent
c3eca06a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
22 deletions
+24
-22
opengl.c
dlls/opengl32/tests/opengl.c
+2
-3
opengl.c
dlls/winex11.drv/opengl.c
+22
-19
No files found.
dlls/opengl32/tests/opengl.c
View file @
28233dd3
...
...
@@ -577,7 +577,6 @@ static void test_sharelists(HDC winhdc)
if
(
source_sharing
)
{
res
=
wglShareLists
(
other
,
source
);
todo_wine_if
(
source_current
)
ok
(
res
,
"Sharing of display lists from other to source failed
\n
"
);
}
if
(
dest_current
)
...
...
@@ -588,12 +587,12 @@ static void test_sharelists(HDC winhdc)
if
(
dest_sharing
)
{
res
=
wglShareLists
(
other
,
dest
);
todo_wine_if
(
dest_current
)
todo_wine_if
(
source_sharing
&&
dest_current
)
ok
(
res
,
"Sharing of display lists from other to dest failed
\n
"
);
}
res
=
wglShareLists
(
source
,
dest
);
todo_wine_if
(
dest_current
||
dest_sharing
)
todo_wine_if
(
(
source_current
||
source_sharing
)
&&
(
dest_current
||
dest_sharing
)
)
ok
(
res
||
broken
(
nvidia
&&
!
source_sharing
&&
dest_sharing
),
"Sharing of display lists from source to dest failed
\n
"
);
...
...
dlls/winex11.drv/opengl.c
View file @
28233dd3
...
...
@@ -1916,6 +1916,8 @@ done:
*/
static
BOOL
glxdrv_wglShareLists
(
struct
wgl_context
*
org
,
struct
wgl_context
*
dest
)
{
struct
wgl_context
*
keep
,
*
clobber
;
TRACE
(
"(%p, %p)
\n
"
,
org
,
dest
);
/* Sharing of display lists works differently in GLX and WGL. In case of GLX it is done
...
...
@@ -1926,34 +1928,35 @@ static BOOL glxdrv_wglShareLists(struct wgl_context *org, struct wgl_context *de
* so there delaying context creation doesn't work.
*
* The new approach is to create a GLX context in wglCreateContext / wglCreateContextAttribsARB
* and when a program requests sharing we recreate the destination
context if it hasn't been made
*
current or when
it hasn't shared display lists before.
* and when a program requests sharing we recreate the destination
or source context if it
*
hasn't been made current and
it hasn't shared display lists before.
*/
if
(
dest
->
has_been_current
)
if
(
!
dest
->
has_been_current
&&
!
dest
->
sharing
)
{
ERR
(
"Could not share display lists because the destination context has already been current
\n
"
)
;
return
FALSE
;
keep
=
org
;
clobber
=
dest
;
}
else
if
(
dest
->
sharing
)
else
if
(
!
org
->
has_been_current
&&
!
org
->
sharing
)
{
ERR
(
"Could not share display lists because the destination context has already shared lists
\n
"
)
;
return
FALSE
;
keep
=
dest
;
clobber
=
org
;
}
else
{
/* Re-create the GLX context and share display lists */
pglXDestroyContext
(
gdi_display
,
dest
->
ctx
);
dest
->
ctx
=
create_glxcontext
(
gdi_display
,
dest
,
org
->
ctx
);
TRACE
(
" re-created context (%p) for Wine context %p (%s) sharing lists with ctx %p (%s)
\n
"
,
dest
->
ctx
,
dest
,
debugstr_fbconfig
(
dest
->
fmt
->
fbconfig
),
org
->
ctx
,
debugstr_fbconfig
(
org
->
fmt
->
fbconfig
));
org
->
sharing
=
TRUE
;
dest
->
sharing
=
TRUE
;
return
TRUE
;
ERR
(
"Could not share display lists because both of the contexts have already been current or shared
\n
"
);
return
FALSE
;
}
return
FALSE
;
pglXDestroyContext
(
gdi_display
,
clobber
->
ctx
);
clobber
->
ctx
=
create_glxcontext
(
gdi_display
,
clobber
,
keep
->
ctx
);
TRACE
(
"re-created context (%p) for Wine context %p (%s) sharing lists with ctx %p (%s)
\n
"
,
clobber
->
ctx
,
clobber
,
debugstr_fbconfig
(
clobber
->
fmt
->
fbconfig
),
keep
->
ctx
,
debugstr_fbconfig
(
keep
->
fmt
->
fbconfig
));
org
->
sharing
=
TRUE
;
dest
->
sharing
=
TRUE
;
return
TRUE
;
}
static
void
wglFinish
(
void
)
...
...
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