Commit e4a0767e authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Get rid of SFLAG_LOCKABLE.

parent bff422f3
...@@ -3476,7 +3476,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, ...@@ -3476,7 +3476,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
++surface->resource.map_count; ++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"); WARN("Trying to lock unlockable surface.\n");
/* Performance optimization: Count how often a surface is mapped, if it is /* 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 ...@@ -6876,7 +6876,8 @@ static HRESULT surface_init(struct wined3d_surface *surface, UINT alignment, UIN
if (flags & WINED3D_SURFACE_PIN_SYSMEM) if (flags & WINED3D_SURFACE_PIN_SYSMEM)
surface->flags |= SFLAG_PIN_SYSMEM; surface->flags |= SFLAG_PIN_SYSMEM;
if (lockable || format_id == WINED3DFMT_D16_LOCKABLE) 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 /* 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 * seems reasonable to assume that lockable render targets will get
* locked, so we might as well set SFLAG_DYNLOCK right at surface * locked, so we might as well set SFLAG_DYNLOCK right at surface
......
...@@ -2298,26 +2298,25 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D ...@@ -2298,26 +2298,25 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D
#define SFLAG_DISCARD 0x00000002 /* ??? */ #define SFLAG_DISCARD 0x00000002 /* ??? */
#define SFLAG_NONPOW2 0x00000004 /* Surface sizes are not a power of 2 */ #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_NORMCOORD 0x00000008 /* Set if GL texture coordinates are normalized (non-texture rectangle). */
#define SFLAG_LOCKABLE 0x00000010 /* Surface can be locked. */ #define SFLAG_DYNLOCK 0x00000010 /* Surface is often locked by the application. */
#define SFLAG_DYNLOCK 0x00000020 /* Surface is often locked by the application. */ #define SFLAG_PIN_SYSMEM 0x00000020 /* Keep the surface in sysmem, at the same address. */
#define SFLAG_PIN_SYSMEM 0x00000040 /* Keep the surface in sysmem, at the same address. */ #define SFLAG_DCINUSE 0x00000040 /* Set between GetDC and ReleaseDC calls. */
#define SFLAG_DCINUSE 0x00000080 /* Set between GetDC and ReleaseDC calls. */ #define SFLAG_LOST 0x00000080 /* Surface lost flag for ddraw. */
#define SFLAG_LOST 0x00000100 /* Surface lost flag for ddraw. */ #define SFLAG_GLCKEY 0x00000100 /* The GL texture was created with a color key. */
#define SFLAG_GLCKEY 0x00000200 /* The GL texture was created with a color key. */ #define SFLAG_CLIENT 0x00000200 /* GL_APPLE_client_storage is used with this surface. */
#define SFLAG_CLIENT 0x00000400 /* GL_APPLE_client_storage is used with this surface. */ #define SFLAG_INOVERLAYDRAW 0x00000400 /* Overlay drawing is in progress. Recursion prevention. */
#define SFLAG_INOVERLAYDRAW 0x00000800 /* Overlay drawing is in progress. Recursion prevention. */ #define SFLAG_DIBSECTION 0x00000800 /* Has a DIB section attached for GetDC. */
#define SFLAG_DIBSECTION 0x00001000 /* Has a DIB section attached for GetDC. */ #define SFLAG_USERPTR 0x00001000 /* The application allocated the memory for this surface. */
#define SFLAG_USERPTR 0x00002000 /* The application allocated the memory for this surface. */ #define SFLAG_ALLOCATED 0x00002000 /* A GL texture is allocated for this surface. */
#define SFLAG_ALLOCATED 0x00004000 /* A GL texture is allocated for this surface. */ #define SFLAG_SRGBALLOCATED 0x00004000 /* A sRGB GL texture is allocated for this surface. */
#define SFLAG_SRGBALLOCATED 0x00008000 /* A sRGB GL texture is allocated for this surface. */ #define SFLAG_PBO 0x00008000 /* The surface has a PBO. */
#define SFLAG_PBO 0x00010000 /* The surface has a PBO. */ #define SFLAG_INSYSMEM 0x00010000 /* The system memory copy is current. */
#define SFLAG_INSYSMEM 0x00020000 /* The system memory copy is current. */ #define SFLAG_INTEXTURE 0x00020000 /* The GL texture is current. */
#define SFLAG_INTEXTURE 0x00040000 /* The GL texture is current. */ #define SFLAG_INSRGBTEX 0x00040000 /* The GL sRGB texture is current. */
#define SFLAG_INSRGBTEX 0x00080000 /* The GL sRGB texture is current. */ #define SFLAG_INDRAWABLE 0x00080000 /* The GL drawable is current. */
#define SFLAG_INDRAWABLE 0x00100000 /* The GL drawable is current. */ #define SFLAG_INRB_MULTISAMPLE 0x00100000 /* The multisample renderbuffer is current. */
#define SFLAG_INRB_MULTISAMPLE 0x00200000 /* The multisample renderbuffer is current. */ #define SFLAG_INRB_RESOLVED 0x00200000 /* The resolved renderbuffer is current. */
#define SFLAG_INRB_RESOLVED 0x00400000 /* The resolved renderbuffer is current. */ #define SFLAG_DISCARDED 0x00400000 /* Surface was discarded, allocating new location is enough. */
#define SFLAG_DISCARDED 0x00800000 /* Surface was discarded, allocating new location is enough. */
/* In some conditions the surface memory must not be freed: /* In some conditions the surface memory must not be freed:
* SFLAG_CONVERTED: Converting the data back would take too long * SFLAG_CONVERTED: Converting the data back would take too long
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment