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
41d93e1d
Commit
41d93e1d
authored
Jun 18, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make sure we have a context in stretch_rect_fbo().
Specifically, in case the source surface was offscreen, we would sometimes to GL calls without active context.
parent
87366355
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
device.c
dlls/wined3d/device.c
+6
-8
No files found.
dlls/wined3d/device.c
View file @
41d93e1d
...
...
@@ -6432,11 +6432,16 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
/* Attach src surface to src fbo */
src_swapchain
=
get_swapchain
(
src_surface
);
dst_swapchain
=
get_swapchain
(
dst_surface
);
if
(
src_swapchain
)
ActivateContext
(
This
,
src_surface
,
CTXUSAGE_RESOURCELOAD
);
else
if
(
dst_swapchain
)
ActivateContext
(
This
,
dst_surface
,
CTXUSAGE_RESOURCELOAD
);
else
ActivateContext
(
This
,
This
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
if
(
src_swapchain
)
{
GLenum
buffer
=
surface_get_gl_buffer
(
src_surface
,
src_swapchain
);
TRACE
(
"Source surface %p is onscreen
\n
"
,
src_surface
);
ActivateContext
(
This
,
src_surface
,
CTXUSAGE_RESOURCELOAD
);
/* Make sure the drawable is up to date. In the offscreen case
* attach_surface_fbo() implicitly takes care of this. */
IWineD3DSurface_LoadLocation
(
src_surface
,
SFLAG_INDRAWABLE
,
NULL
);
...
...
@@ -6471,12 +6476,10 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
LEAVE_GL
();
/* Attach dst surface to dst fbo */
dst_swapchain
=
get_swapchain
(
dst_surface
);
if
(
dst_swapchain
)
{
GLenum
buffer
=
surface_get_gl_buffer
(
dst_surface
,
dst_swapchain
);
TRACE
(
"Destination surface %p is onscreen
\n
"
,
dst_surface
);
ActivateContext
(
This
,
dst_surface
,
CTXUSAGE_RESOURCELOAD
);
/* Make sure the drawable is up to date. In the offscreen case
* attach_surface_fbo() implicitly takes care of this. */
IWineD3DSurface_LoadLocation
(
dst_surface
,
SFLAG_INDRAWABLE
,
NULL
);
...
...
@@ -6503,11 +6506,6 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
}
else
{
TRACE
(
"Destination surface %p is offscreen
\n
"
,
dst_surface
);
/* No src or dst swapchain? Make sure some context is active(multithreading) */
if
(
!
src_swapchain
)
{
ActivateContext
(
This
,
This
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
}
ENTER_GL
();
context_bind_fbo
(
iface
,
GL_DRAW_FRAMEBUFFER_EXT
,
&
This
->
activeContext
->
dst_fbo
);
context_attach_surface_fbo
(
This
,
GL_DRAW_FRAMEBUFFER_EXT
,
0
,
dst_surface
);
...
...
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