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
f1985edf
Commit
f1985edf
authored
Mar 25, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_texture_blt() in wined3d_device_copy_resource().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ee800283
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
device.c
dlls/wined3d/device.c
+15
-11
No files found.
dlls/wined3d/device.c
View file @
f1985edf
...
...
@@ -3825,10 +3825,9 @@ float CDECL wined3d_device_get_npatch_mode(const struct wined3d_device *device)
void
CDECL
wined3d_device_copy_resource
(
struct
wined3d_device
*
device
,
struct
wined3d_resource
*
dst_resource
,
struct
wined3d_resource
*
src_resource
)
{
struct
wined3d_surface
*
dst_surface
,
*
src_surface
;
struct
wined3d_texture
*
dst_texture
,
*
src_texture
;
RECT
dst_rect
,
src_rect
;
unsigned
int
i
,
count
;
unsigned
int
i
,
j
;
HRESULT
hr
;
TRACE
(
"device %p, dst_resource %p, src_resource %p.
\n
"
,
device
,
dst_resource
,
src_resource
);
...
...
@@ -3892,17 +3891,22 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
return
;
}
count
=
dst_texture
->
layer_count
*
dst_texture
->
level_count
;
for
(
i
=
0
;
i
<
count
;
++
i
)
for
(
i
=
0
;
i
<
dst_texture
->
level_count
;
++
i
)
{
dst_surface
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
dst_texture
,
i
));
src_surface
=
surface_from_resource
(
wined3d_texture_get_sub_resource
(
src_texture
,
i
));
SetRect
(
&
dst_rect
,
0
,
0
,
wined3d_texture_get_level_width
(
dst_texture
,
i
),
wined3d_texture_get_level_height
(
dst_texture
,
i
));
SetRect
(
&
src_rect
,
0
,
0
,
wined3d_texture_get_level_width
(
src_texture
,
i
),
wined3d_texture_get_level_height
(
dst_texture
,
i
));
for
(
j
=
0
;
j
<
dst_texture
->
layer_count
;
++
j
)
{
unsigned
int
idx
=
j
*
dst_texture
->
level_count
+
i
;
SetRect
(
&
dst_rect
,
0
,
0
,
dst_surface
->
resource
.
width
,
dst_surface
->
resource
.
height
);
SetRect
(
&
src_rect
,
0
,
0
,
src_surface
->
resource
.
width
,
src_surface
->
resource
.
height
);
if
(
FAILED
(
hr
=
wined3d_surface_blt
(
dst_surface
,
&
dst_rect
,
src_surface
,
&
src_rect
,
0
,
NULL
,
WINED3D_TEXF_POINT
)))
ERR
(
"Failed to blit, sub-resource %u, hr %#x.
\n
"
,
i
,
hr
);
if
(
FAILED
(
hr
=
wined3d_texture_blt
(
dst_texture
,
idx
,
&
dst_rect
,
src_texture
,
idx
,
&
src_rect
,
0
,
NULL
,
WINED3D_TEXF_POINT
)))
ERR
(
"Failed to blit, sub-resource %u, hr %#x.
\n
"
,
idx
,
hr
);
}
}
}
...
...
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