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
0cdae568
Commit
0cdae568
authored
Mar 08, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send resource copy calls through the command stream.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
95abd3c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
device.c
dlls/wined3d/device.c
+19
-15
No files found.
dlls/wined3d/device.c
View file @
0cdae568
...
...
@@ -3819,9 +3819,8 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
struct
wined3d_resource
*
dst_resource
,
struct
wined3d_resource
*
src_resource
)
{
struct
wined3d_texture
*
dst_texture
,
*
src_texture
;
RECT
dst_rect
,
src_rect
;
struct
wined3d_box
box
;
unsigned
int
i
,
j
;
HRESULT
hr
;
TRACE
(
"device %p, dst_resource %p, src_resource %p.
\n
"
,
device
,
dst_resource
,
src_resource
);
...
...
@@ -3859,10 +3858,15 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
if
(
dst_resource
->
type
==
WINED3D_RTYPE_BUFFER
)
{
if
(
FAILED
(
hr
=
wined3d_buffer_copy
(
buffer_from_resource
(
dst_resource
),
0
,
buffer_from_resource
(
src_resource
),
0
,
dst_resource
->
size
)))
ERR
(
"Failed to copy buffer, hr %#x.
\n
"
,
hr
);
box
.
left
=
0
;
box
.
top
=
0
;
box
.
right
=
src_resource
->
size
;
box
.
bottom
=
1
;
box
.
front
=
0
;
box
.
back
=
1
;
wined3d_cs_emit_blt_sub_resource
(
device
->
cs
,
dst_resource
,
0
,
&
box
,
src_resource
,
0
,
&
box
,
0
,
NULL
,
WINED3D_TEXF_POINT
);
return
;
}
...
...
@@ -3886,19 +3890,19 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
for
(
i
=
0
;
i
<
dst_texture
->
level_count
;
++
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
));
box
.
left
=
0
;
box
.
top
=
0
;
box
.
right
=
wined3d_texture_get_level_width
(
dst_texture
,
i
);
box
.
bottom
=
wined3d_texture_get_level_height
(
dst_texture
,
i
);
box
.
front
=
0
;
box
.
back
=
wined3d_texture_get_level_depth
(
dst_texture
,
i
);
for
(
j
=
0
;
j
<
dst_texture
->
layer_count
;
++
j
)
{
unsigned
int
idx
=
j
*
dst_texture
->
level_count
+
i
;
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
);
wined3d_cs_emit_blt_sub_resource
(
device
->
cs
,
dst_resource
,
idx
,
&
box
,
src_resource
,
idx
,
&
box
,
0
,
NULL
,
WINED3D_TEXF_POINT
);
}
}
}
...
...
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