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
db6d3c50
Commit
db6d3c50
authored
Jan 09, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove SFLAG_USERPTR.
parent
d1463cc4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
21 deletions
+15
-21
surface.c
dlls/wined3d/surface.c
+5
-9
wined3d_private.h
dlls/wined3d/wined3d_private.h
+10
-12
No files found.
dlls/wined3d/surface.c
View file @
db6d3c50
...
...
@@ -604,7 +604,8 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface)
static
void
surface_evict_sysmem
(
struct
wined3d_surface
*
surface
)
{
if
(
surface
->
resource
.
map_count
||
(
surface
->
flags
&
SFLAG_DONOTFREE
))
if
(
surface
->
resource
.
map_count
||
(
surface
->
flags
&
SFLAG_DONOTFREE
)
||
surface
->
user_memory
)
return
;
wined3d_resource_free_sysmem
(
&
surface
->
resource
);
...
...
@@ -2715,7 +2716,7 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface,
create_dib
=
TRUE
;
}
surface
->
flags
&=
~
(
SFLAG_LOCATIONS
|
SFLAG_USERPTR
)
;
surface
->
flags
&=
~
SFLAG_LOCATIONS
;
surface
->
resource
.
allocatedMemory
=
NULL
;
wined3d_resource_free_sysmem
(
&
surface
->
resource
);
...
...
@@ -2741,13 +2742,8 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface,
else
surface
->
flags
&=
~
SFLAG_NONPOW2
;
if
(
mem
)
{
surface
->
user_memory
=
mem
;
surface
->
flags
|=
SFLAG_USERPTR
;
}
surface
->
user_memory
=
mem
;
surface
->
pitch
=
pitch
;
surface
->
resource
.
format
=
format
;
surface
->
resource
.
multisample_type
=
multisample_type
;
surface
->
resource
.
multisample_quality
=
multisample_quality
;
...
...
@@ -3220,7 +3216,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
return
WINED3DERR_INVALIDCALL
;
/* Use the DIB section from now on if we are not using a PBO or user memory. */
if
(
!
(
surface
->
flags
&
(
SFLAG_PBO
|
SFLAG_PIN_SYSMEM
|
SFLAG_USERPTR
)
))
if
(
!
(
surface
->
flags
&
(
SFLAG_PBO
|
SFLAG_PIN_SYSMEM
)
||
surface
->
user_memory
))
{
wined3d_resource_free_sysmem
(
&
surface
->
resource
);
surface
->
resource
.
allocatedMemory
=
surface
->
dib
.
bitmap_data
;
...
...
dlls/wined3d/wined3d_private.h
View file @
db6d3c50
...
...
@@ -2294,17 +2294,16 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D
#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_DIBSECTION 0x00000400
/* Has a DIB section attached for GetDC. */
#define SFLAG_USERPTR 0x00000800
/* The application allocated the memory for this surface. */
#define SFLAG_ALLOCATED 0x00001000
/* A GL texture is allocated for this surface. */
#define SFLAG_SRGBALLOCATED 0x00002000
/* A sRGB GL texture is allocated for this surface. */
#define SFLAG_PBO 0x00004000
/* The surface has a PBO. */
#define SFLAG_INSYSMEM 0x00008000
/* The system memory copy is current. */
#define SFLAG_INTEXTURE 0x00010000
/* The GL texture is current. */
#define SFLAG_INSRGBTEX 0x00020000
/* The GL sRGB texture is current. */
#define SFLAG_INDRAWABLE 0x00040000
/* The GL drawable is current. */
#define SFLAG_INRB_MULTISAMPLE 0x00080000
/* The multisample renderbuffer is current. */
#define SFLAG_INRB_RESOLVED 0x00100000
/* The resolved renderbuffer is current. */
#define SFLAG_DISCARDED 0x00200000
/* Surface was discarded, allocating new location is enough. */
#define SFLAG_ALLOCATED 0x00000800
/* A GL texture is allocated for this surface. */
#define SFLAG_SRGBALLOCATED 0x00001000
/* A sRGB GL texture is allocated for this surface. */
#define SFLAG_PBO 0x00002000
/* The surface has a PBO. */
#define SFLAG_INSYSMEM 0x00004000
/* The system memory copy is current. */
#define SFLAG_INTEXTURE 0x00008000
/* The GL texture is current. */
#define SFLAG_INSRGBTEX 0x00010000
/* The GL sRGB texture is current. */
#define SFLAG_INDRAWABLE 0x00020000
/* The GL drawable is current. */
#define SFLAG_INRB_MULTISAMPLE 0x00040000
/* The multisample renderbuffer is current. */
#define SFLAG_INRB_RESOLVED 0x00080000
/* The resolved renderbuffer is current. */
#define SFLAG_DISCARDED 0x00100000
/* 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
...
...
@@ -2317,7 +2316,6 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D
SFLAG_DYNLOCK | \
SFLAG_CLIENT | \
SFLAG_DIBSECTION | \
SFLAG_USERPTR | \
SFLAG_PBO | \
SFLAG_PIN_SYSMEM)
...
...
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