Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
65f9abc8
Commit
65f9abc8
authored
Apr 07, 2008
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
Apr 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move PreLoad to avoid calling it with gl lock held.
parent
7f2257ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
surface.c
dlls/wined3d/surface.c
+10
-8
No files found.
dlls/wined3d/surface.c
View file @
65f9abc8
...
...
@@ -2642,8 +2642,8 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D
ActivateContext
(
myDevice
,
SrcSurface
,
CTXUSAGE_BLIT
);
ENTER_GL
();
IWineD3DSurface_PreLoad
((
IWineD3DSurface
*
)
This
);
ENTER_GL
();
/* TODO: Do we need GL_TEXTURE_2D enabled fpr copyteximage? */
glEnable
(
This
->
glDescription
.
target
);
...
...
@@ -2733,14 +2733,20 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
UINT
fbheight
=
Src
->
currentDesc
.
Height
;
GLenum
drawBuffer
=
GL_BACK
;
GLenum
texture_target
;
BOOL
noBackBufferBackup
;
TRACE
(
"Using hwstretch blit
\n
"
);
/* Activate the Proper context for reading from the source surface, set it up for blitting */
ActivateContext
(
myDevice
,
SrcSurface
,
CTXUSAGE_BLIT
);
ENTER_GL
();
IWineD3DSurface_PreLoad
((
IWineD3DSurface
*
)
This
);
noBackBufferBackup
=
!
swapchain
&&
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
;
if
(
!
noBackBufferBackup
&&
Src
->
glDescription
.
textureName
==
0
)
{
/* Get it a description */
IWineD3DSurface_PreLoad
(
SrcSurface
);
}
ENTER_GL
();
/* Try to use an aux buffer for drawing the rectangle. This way it doesn't need restoring.
* This way we don't have to wait for the 2nd readback to finish to leave this function.
*/
...
...
@@ -2752,7 +2758,7 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
drawBuffer
=
GL_AUX0
;
}
if
(
!
swapchain
&&
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
if
(
noBackBufferBackup
)
{
glGenTextures
(
1
,
&
backup
);
checkGLcall
(
"glGenTextures
\n
"
);
glBindTexture
(
GL_TEXTURE_2D
,
backup
);
...
...
@@ -2762,10 +2768,6 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
/* Backup the back buffer and copy the source buffer into a texture to draw an upside down stretched quad. If
* we are reading from the back buffer, the backup can be used as source texture
*/
if
(
Src
->
glDescription
.
textureName
==
0
)
{
/* Get it a description */
IWineD3DSurface_PreLoad
(
SrcSurface
);
}
texture_target
=
Src
->
glDescription
.
target
;
glBindTexture
(
texture_target
,
Src
->
glDescription
.
textureName
);
checkGLcall
(
"glBindTexture(texture_target, Src->glDescription.textureName)"
);
...
...
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