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
4a7cbba0
Commit
4a7cbba0
authored
Dec 01, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move the surface map counting code to wined3d_surface_map().
parent
bf644e0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
surface.c
dlls/wined3d/surface.c
+13
-13
No files found.
dlls/wined3d/surface.c
View file @
4a7cbba0
...
...
@@ -527,19 +527,6 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
TRACE
(
"surface %p.
\n
"
,
surface
);
/* Performance optimization: Count how often a surface is locked, if it is
* locked regularly do not throw away the system memory copy. This avoids
* the need to download the surface from OpenGL all the time. The surface
* is still downloaded if the OpenGL texture is changed. */
if
(
!
(
surface
->
flags
&
SFLAG_DYNLOCK
))
{
if
(
++
surface
->
lockCount
>
MAXLOCKCOUNT
)
{
TRACE
(
"Surface is locked regularly, not freeing the system memory copy any more.
\n
"
);
surface
->
flags
|=
SFLAG_DYNLOCK
;
}
}
/* Create a PBO for dynamically locked surfaces but don't do it for
* converted or NPOT surfaces. Also don't create a PBO for systemmem
* surfaces. */
...
...
@@ -3718,6 +3705,19 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
if
(
!
(
surface
->
flags
&
SFLAG_LOCKABLE
))
WARN
(
"Trying to lock unlockable surface.
\n
"
);
/* Performance optimization: Count how often a surface is mapped, if it is
* mapped regularly do not throw away the system memory copy. This avoids
* the need to download the surface from OpenGL all the time. The surface
* is still downloaded if the OpenGL texture is changed. */
if
(
!
(
surface
->
flags
&
SFLAG_DYNLOCK
))
{
if
(
++
surface
->
lockCount
>
MAXLOCKCOUNT
)
{
TRACE
(
"Surface is mapped regularly, not freeing the system memory copy any more.
\n
"
);
surface
->
flags
|=
SFLAG_DYNLOCK
;
}
}
surface
->
surface_ops
->
surface_map
(
surface
,
rect
,
flags
);
if
(
format
->
flags
&
WINED3DFMT_FLAG_BROKEN_PITCH
)
...
...
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