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
e4a0767e
Commit
e4a0767e
authored
Oct 08, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of SFLAG_LOCKABLE.
parent
bff422f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
surface.c
dlls/wined3d/surface.c
+3
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+19
-20
No files found.
dlls/wined3d/surface.c
View file @
e4a0767e
...
...
@@ -3476,7 +3476,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
++
surface
->
resource
.
map_count
;
if
(
!
(
surface
->
flags
&
SFLAG_LOCKABLE
))
if
(
!
(
surface
->
resource
.
access_flags
&
WINED3D_RESOURCE_ACCESS_CPU
))
WARN
(
"Trying to lock unlockable surface.
\n
"
);
/* Performance optimization: Count how often a surface is mapped, if it is
...
...
@@ -6876,7 +6876,8 @@ static HRESULT surface_init(struct wined3d_surface *surface, UINT alignment, UIN
if
(
flags
&
WINED3D_SURFACE_PIN_SYSMEM
)
surface
->
flags
|=
SFLAG_PIN_SYSMEM
;
if
(
lockable
||
format_id
==
WINED3DFMT_D16_LOCKABLE
)
surface
->
flags
|=
SFLAG_LOCKABLE
;
surface
->
resource
.
access_flags
|=
WINED3D_RESOURCE_ACCESS_CPU
;
/* 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
...
...
dlls/wined3d/wined3d_private.h
View file @
e4a0767e
...
...
@@ -2298,26 +2298,25 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D
#define SFLAG_DISCARD 0x00000002
/* ??? */
#define SFLAG_NONPOW2 0x00000004
/* Surface sizes are not a power of 2 */
#define SFLAG_NORMCOORD 0x00000008
/* Set if GL texture coordinates are normalized (non-texture rectangle). */
#define SFLAG_LOCKABLE 0x00000010
/* Surface can be locked. */
#define SFLAG_DYNLOCK 0x00000020
/* Surface is often locked by the application. */
#define SFLAG_PIN_SYSMEM 0x00000040
/* Keep the surface in sysmem, at the same address. */
#define SFLAG_DCINUSE 0x00000080
/* Set between GetDC and ReleaseDC calls. */
#define SFLAG_LOST 0x00000100
/* Surface lost flag for ddraw. */
#define SFLAG_GLCKEY 0x00000200
/* The GL texture was created with a color key. */
#define SFLAG_CLIENT 0x00000400
/* GL_APPLE_client_storage is used with this surface. */
#define SFLAG_INOVERLAYDRAW 0x00000800
/* Overlay drawing is in progress. Recursion prevention. */
#define SFLAG_DIBSECTION 0x00001000
/* Has a DIB section attached for GetDC. */
#define SFLAG_USERPTR 0x00002000
/* The application allocated the memory for this surface. */
#define SFLAG_ALLOCATED 0x00004000
/* A GL texture is allocated for this surface. */
#define SFLAG_SRGBALLOCATED 0x00008000
/* A sRGB GL texture is allocated for this surface. */
#define SFLAG_PBO 0x00010000
/* The surface has a PBO. */
#define SFLAG_INSYSMEM 0x00020000
/* The system memory copy is current. */
#define SFLAG_INTEXTURE 0x00040000
/* The GL texture is current. */
#define SFLAG_INSRGBTEX 0x00080000
/* The GL sRGB texture is current. */
#define SFLAG_INDRAWABLE 0x00100000
/* The GL drawable is current. */
#define SFLAG_INRB_MULTISAMPLE 0x00200000
/* The multisample renderbuffer is current. */
#define SFLAG_INRB_RESOLVED 0x00400000
/* The resolved renderbuffer is current. */
#define SFLAG_DISCARDED 0x00800000
/* Surface was discarded, allocating new location is enough. */
#define SFLAG_DYNLOCK 0x00000010
/* Surface is often locked by the application. */
#define SFLAG_PIN_SYSMEM 0x00000020
/* Keep the surface in sysmem, at the same address. */
#define SFLAG_DCINUSE 0x00000040
/* Set between GetDC and ReleaseDC calls. */
#define SFLAG_LOST 0x00000080
/* Surface lost flag for ddraw. */
#define SFLAG_GLCKEY 0x00000100
/* The GL texture was created with a color key. */
#define SFLAG_CLIENT 0x00000200
/* GL_APPLE_client_storage is used with this surface. */
#define SFLAG_INOVERLAYDRAW 0x00000400
/* Overlay drawing is in progress. Recursion prevention. */
#define SFLAG_DIBSECTION 0x00000800
/* Has a DIB section attached for GetDC. */
#define SFLAG_USERPTR 0x00001000
/* The application allocated the memory for this surface. */
#define SFLAG_ALLOCATED 0x00002000
/* A GL texture is allocated for this surface. */
#define SFLAG_SRGBALLOCATED 0x00004000
/* A sRGB GL texture is allocated for this surface. */
#define SFLAG_PBO 0x00008000
/* The surface has a PBO. */
#define SFLAG_INSYSMEM 0x00010000
/* The system memory copy is current. */
#define SFLAG_INTEXTURE 0x00020000
/* The GL texture is current. */
#define SFLAG_INSRGBTEX 0x00040000
/* The GL sRGB texture is current. */
#define SFLAG_INDRAWABLE 0x00080000
/* The GL drawable is current. */
#define SFLAG_INRB_MULTISAMPLE 0x00100000
/* The multisample renderbuffer is current. */
#define SFLAG_INRB_RESOLVED 0x00200000
/* The resolved renderbuffer is current. */
#define SFLAG_DISCARDED 0x00400000
/* Surface was discarded, allocating new location is enough. */
/* In some conditions the surface memory must not be freed:
* SFLAG_CONVERTED: Converting the data back would take too long
...
...
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