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
e6ab3832
Commit
e6ab3832
authored
May 10, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
May 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set SFLAG_DYNLOCK for lockable render targets.
parent
a1950b96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
surface.c
dlls/wined3d/surface.c
+9
-0
No files found.
dlls/wined3d/surface.c
View file @
e6ab3832
...
@@ -7423,6 +7423,15 @@ HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE surface_ty
...
@@ -7423,6 +7423,15 @@ HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE surface_ty
surface
->
flags
|=
SFLAG_DISCARD
;
surface
->
flags
|=
SFLAG_DISCARD
;
if
(
lockable
||
format_id
==
WINED3DFMT_D16_LOCKABLE
)
if
(
lockable
||
format_id
==
WINED3DFMT_D16_LOCKABLE
)
surface
->
flags
|=
SFLAG_LOCKABLE
;
surface
->
flags
|=
SFLAG_LOCKABLE
;
/* I'm not sure if this qualifies as a hack or as an optimization. It
* seems reasonable to assume that lockable render targets will get
* locked, so we might as well set SFLAG_DYNLOCK right at surface
* creation. However, the other reason we want to do this is that several
* ddraw applications access surface memory while the surface isn't
* mapped. The SFLAG_DYNLOCK behaviour of keeping SYSMEM around for
* future locks prevents these from crashing. */
if
(
lockable
&&
(
usage
&
WINED3DUSAGE_RENDERTARGET
))
surface
->
flags
|=
SFLAG_DYNLOCK
;
/* Mark the texture as dirty so that it gets loaded first time around. */
/* Mark the texture as dirty so that it gets loaded first time around. */
surface_add_dirty_rect
(
surface
,
NULL
);
surface_add_dirty_rect
(
surface
,
NULL
);
...
...
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