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
676a7f21
Commit
676a7f21
authored
Jan 13, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the callers of load_location responsible for allocating sysmem.
parent
28bfc205
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
surface.c
dlls/wined3d/surface.c
+8
-4
texture.c
dlls/wined3d/texture.c
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/surface.c
View file @
676a7f21
...
...
@@ -589,7 +589,7 @@ static void surface_create_pbo(struct wined3d_surface *surface, const struct win
context_release
(
context
);
}
static
void
surface_prepare_system_memory
(
struct
wined3d_surface
*
surface
)
void
surface_prepare_system_memory
(
struct
wined3d_surface
*
surface
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
surface
->
resource
.
device
->
adapter
->
gl_info
;
...
...
@@ -767,6 +767,7 @@ static void surface_realize_palette(struct wined3d_surface *surface)
if
(
!
(
surface
->
flags
&
surface
->
map_binding
))
{
TRACE
(
"Palette changed with surface that does not have an up to date system memory copy.
\n
"
);
surface_prepare_system_memory
(
surface
);
surface_load_location
(
surface
,
surface
->
map_binding
);
}
surface_invalidate_location
(
surface
,
~
surface
->
map_binding
);
...
...
@@ -802,10 +803,10 @@ static BYTE *surface_map(struct wined3d_surface *surface, const RECT *rect, DWOR
TRACE
(
"surface %p, rect %s, flags %#x.
\n
"
,
surface
,
wine_dbgstr_rect
(
rect
),
flags
);
surface_prepare_system_memory
(
surface
);
if
(
flags
&
WINED3D_MAP_DISCARD
)
{
TRACE
(
"WINED3D_MAP_DISCARD flag passed, marking SYSMEM as up to date.
\n
"
);
surface_prepare_system_memory
(
surface
);
surface_validate_location
(
surface
,
surface
->
map_binding
);
}
else
...
...
@@ -1391,6 +1392,7 @@ static void surface_unload(struct wined3d_resource *resource)
}
else
{
surface_prepare_system_memory
(
surface
);
surface_load_location
(
surface
,
surface
->
map_binding
);
}
surface_invalidate_location
(
surface
,
~
surface
->
map_binding
);
...
...
@@ -2321,6 +2323,7 @@ void surface_load(struct wined3d_surface *surface, BOOL srgb)
/* To perform the color key conversion we need a sysmem copy of
* the surface. Make sure we have it. */
surface_prepare_system_memory
(
surface
);
surface_load_location
(
surface
,
surface
->
map_binding
);
surface_invalidate_location
(
surface
,
~
surface
->
map_binding
);
/* Switching color keying on / off may change the internal format. */
...
...
@@ -4907,8 +4910,6 @@ static DWORD resource_access_from_location(DWORD location)
static
void
surface_load_sysmem
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
DWORD
dst_location
)
{
surface_prepare_system_memory
(
surface
);
if
(
surface
->
flags
&
(
SFLAG_INRB_MULTISAMPLE
|
SFLAG_INRB_RESOLVED
))
surface_load_location
(
surface
,
SFLAG_INTEXTURE
);
...
...
@@ -5023,6 +5024,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
/* Performance warning... */
FIXME
(
"Downloading RGB surface %p to reload it as sRGB.
\n
"
,
surface
);
surface_prepare_system_memory
(
surface
);
surface_load_location
(
surface
,
surface
->
map_binding
);
}
}
...
...
@@ -5032,6 +5034,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
/* Performance warning... */
FIXME
(
"Downloading sRGB surface %p to reload it as RGB.
\n
"
,
surface
);
surface_prepare_system_memory
(
surface
);
surface_load_location
(
surface
,
surface
->
map_binding
);
}
}
...
...
@@ -5040,6 +5043,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
{
WARN
(
"Trying to load a texture from sysmem, but SFLAG_INSYSMEM is not set.
\n
"
);
/* Lets hope we get it from somewhere... */
surface_prepare_system_memory
(
surface
);
surface_load_location
(
surface
,
SFLAG_INSYSMEM
);
}
...
...
dlls/wined3d/texture.c
View file @
676a7f21
...
...
@@ -735,6 +735,7 @@ static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub
{
struct
wined3d_surface
*
surface
=
surface_from_resource
(
sub_resource
);
surface_prepare_system_memory
(
surface
);
surface_load_location
(
surface
,
surface
->
map_binding
);
surface_invalidate_location
(
surface
,
~
surface
->
map_binding
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
676a7f21
...
...
@@ -2273,6 +2273,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
void
surface_validate_location
(
struct
wined3d_surface
*
surface
,
DWORD
location
)
DECLSPEC_HIDDEN
;
HRESULT
CDECL
wined3d_surface_create
(
struct
wined3d_texture
*
container
,
const
struct
wined3d_resource_desc
*
desc
,
DWORD
flags
,
struct
wined3d_surface
**
surface
)
DECLSPEC_HIDDEN
;
void
surface_prepare_system_memory
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
get_drawable_size_swapchain
(
const
struct
wined3d_context
*
context
,
UINT
*
width
,
UINT
*
height
)
DECLSPEC_HIDDEN
;
void
get_drawable_size_backbuffer
(
const
struct
wined3d_context
*
context
,
UINT
*
width
,
UINT
*
height
)
DECLSPEC_HIDDEN
;
...
...
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