Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
676a7f21
Commit
676a7f21
authored
11 years ago
by
Stefan Dösinger
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wined3d: Make the callers of load_location responsible for allocating sysmem.
parent
28bfc205
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/wined3d/surface.c
+8
-4
8 additions, 4 deletions
dlls/wined3d/surface.c
dlls/wined3d/texture.c
+1
-0
1 addition, 0 deletions
dlls/wined3d/texture.c
dlls/wined3d/wined3d_private.h
+1
-0
1 addition, 0 deletions
dlls/wined3d/wined3d_private.h
with
10 additions
and
4 deletions
dlls/wined3d/surface.c
+
8
−
4
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
);
}
...
...
This diff is collapsed.
Click to expand it.
dlls/wined3d/texture.c
+
1
−
0
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
);
}
...
...
This diff is collapsed.
Click to expand it.
dlls/wined3d/wined3d_private.h
+
1
−
0
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment