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
6ea4445c
Commit
6ea4445c
authored
Mar 26, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle 3D textures in wined3d_device_copy_sub_resource_region().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
92403165
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
device.c
dlls/wined3d/device.c
+6
-9
No files found.
dlls/wined3d/device.c
View file @
6ea4445c
...
...
@@ -4158,7 +4158,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
wined3d_box_set
(
&
dst_box
,
dst_x
,
0
,
dst_x
+
(
src_box
->
right
-
src_box
->
left
),
1
,
0
,
1
);
}
else
if
(
dst_resource
->
type
==
WINED3D_RTYPE_TEXTURE_2D
)
else
{
struct
wined3d_texture
*
dst_texture
=
texture_from_resource
(
dst_resource
);
struct
wined3d_texture
*
src_texture
=
texture_from_resource
(
src_resource
);
...
...
@@ -4190,16 +4190,18 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
if
(
!
src_box
)
{
unsigned
int
src_w
,
src_h
,
dst_w
,
dst_h
,
dst_level
;
unsigned
int
src_w
,
src_h
,
src_d
,
dst_w
,
dst_h
,
dst_d
,
dst_level
;
src_w
=
wined3d_texture_get_level_width
(
src_texture
,
src_level
);
src_h
=
wined3d_texture_get_level_height
(
src_texture
,
src_level
);
src_d
=
wined3d_texture_get_level_depth
(
src_texture
,
src_level
);
dst_level
=
dst_sub_resource_idx
%
dst_texture
->
level_count
;
dst_w
=
wined3d_texture_get_level_width
(
dst_texture
,
dst_level
)
-
dst_x
;
dst_h
=
wined3d_texture_get_level_height
(
dst_texture
,
dst_level
)
-
dst_y
;
dst_d
=
wined3d_texture_get_level_depth
(
dst_texture
,
dst_level
)
-
dst_z
;
wined3d_box_set
(
&
b
,
0
,
0
,
min
(
src_w
,
dst_w
),
min
(
src_h
,
dst_h
),
0
,
1
);
wined3d_box_set
(
&
b
,
0
,
0
,
min
(
src_w
,
dst_w
),
min
(
src_h
,
dst_h
),
0
,
min
(
src_d
,
dst_d
)
);
src_box
=
&
b
;
}
else
if
(
FAILED
(
wined3d_texture_check_box_dimensions
(
src_texture
,
src_level
,
src_box
)))
...
...
@@ -4209,7 +4211,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
}
wined3d_box_set
(
&
dst_box
,
dst_x
,
dst_y
,
dst_x
+
(
src_box
->
right
-
src_box
->
left
),
dst_y
+
(
src_box
->
bottom
-
src_box
->
top
),
0
,
1
);
dst_y
+
(
src_box
->
bottom
-
src_box
->
top
),
dst_z
,
dst_z
+
(
src_box
->
back
-
src_box
->
front
)
);
if
(
FAILED
(
wined3d_texture_check_box_dimensions
(
dst_texture
,
dst_sub_resource_idx
%
dst_texture
->
level_count
,
&
dst_box
)))
{
...
...
@@ -4217,11 +4219,6 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
return
WINED3DERR_INVALIDCALL
;
}
}
else
{
FIXME
(
"Not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
dst_resource
->
type
));
return
WINED3DERR_INVALIDCALL
;
}
wined3d_cs_emit_blt_sub_resource
(
device
->
cs
,
dst_resource
,
dst_sub_resource_idx
,
&
dst_box
,
src_resource
,
src_sub_resource_idx
,
src_box
,
WINED3D_BLT_RAW
,
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