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
64d41b3d
Commit
64d41b3d
authored
Jul 04, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Try harder to reuse the current context.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d7fd6414
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
41 deletions
+1
-41
context.c
dlls/wined3d/context.c
+1
-3
swapchain.c
dlls/wined3d/swapchain.c
+0
-38
No files found.
dlls/wined3d/context.c
View file @
64d41b3d
...
...
@@ -4215,14 +4215,12 @@ struct wined3d_context *wined3d_context_gl_acquire(const struct wined3d_device *
{
struct
wined3d_context
*
current_context
=
context_get_current
();
struct
wined3d_context
*
context
;
BOOL
swapchain_texture
;
TRACE
(
"device %p, texture %p, sub_resource_idx %u.
\n
"
,
device
,
texture
,
sub_resource_idx
);
if
(
current_context
&&
current_context
->
destroyed
)
current_context
=
NULL
;
swapchain_texture
=
texture
&&
texture
->
swapchain
;
if
(
!
texture
)
{
if
(
current_context
...
...
@@ -4248,7 +4246,7 @@ struct wined3d_context *wined3d_context_gl_acquire(const struct wined3d_device *
{
context
=
current_context
;
}
else
if
(
swapchain_texture
)
else
if
(
texture
&&
!
wined3d_resource_is_offscreen
(
&
texture
->
resource
)
)
{
TRACE
(
"Rendering onscreen.
\n
"
);
...
...
dlls/wined3d/swapchain.c
View file @
64d41b3d
...
...
@@ -717,25 +717,6 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s
*
quality
=
0
;
}
static
void
wined3d_swapchain_cs_init
(
void
*
object
)
{
struct
wined3d_swapchain
*
swapchain
=
object
;
struct
wined3d_context
*
context
;
if
(
!
(
context
=
context_acquire
(
swapchain
->
device
,
swapchain
->
front_buffer
,
0
)))
{
WARN
(
"Failed to acquire context.
\n
"
);
return
;
}
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
&&
(
!
swapchain
->
desc
.
enable_auto_depth_stencil
||
swapchain
->
desc
.
auto_depth_stencil_format
!=
swapchain
->
ds_format
->
id
))
FIXME
(
"Add OpenGL context recreation support.
\n
"
);
context_release
(
context
);
}
void
swapchain_set_max_frame_latency
(
struct
wined3d_swapchain
*
swapchain
,
const
struct
wined3d_device
*
device
)
{
/* Subtract 1 for the implicit OpenGL latency. */
...
...
@@ -890,25 +871,6 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
}
}
if
(
!
(
device
->
wined3d
->
flags
&
WINED3D_NO3D
))
{
if
(
!
(
swapchain
->
context
=
heap_alloc
(
sizeof
(
*
swapchain
->
context
))))
{
ERR
(
"Failed to create the context array.
\n
"
);
hr
=
E_OUTOFMEMORY
;
goto
err
;
}
wined3d_cs_init_object
(
device
->
cs
,
wined3d_swapchain_cs_init
,
swapchain
);
wined3d_cs_finish
(
device
->
cs
,
WINED3D_CS_QUEUE_DEFAULT
);
if
(
!
swapchain
->
num_contexts
)
{
hr
=
WINED3DERR_NOTAVAILABLE
;
goto
err
;
}
}
if
(
swapchain
->
desc
.
backbuffer_count
>
0
)
{
if
(
!
(
swapchain
->
back_buffers
=
heap_calloc
(
swapchain
->
desc
.
backbuffer_count
,
...
...
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