Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
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
wine
vkd3d
Commits
0dca9909
Commit
0dca9909
authored
7 years ago
by
Józef Kucia
Browse files
Options
Downloads
Patches
Plain Diff
libs/vkd3d: Copy single layer for array textures in d3d12_command_list_CopyTextureRegion().
parent
660ee7b0
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
libs/vkd3d/command.c
+12
-3
12 additions, 3 deletions
libs/vkd3d/command.c
libs/vkd3d/device.c
+1
-1
1 addition, 1 deletion
libs/vkd3d/device.c
libs/vkd3d/vkd3d_private.h
+5
-0
5 additions, 0 deletions
libs/vkd3d/vkd3d_private.h
with
18 additions
and
4 deletions
libs/vkd3d/command.c
+
12
−
3
View file @
0dca9909
...
...
@@ -1833,9 +1833,18 @@ static void vk_image_copy_from_d3d12(VkImageCopy *image_copy,
image_copy
->
dstOffset
.
x
=
dst_x
;
image_copy
->
dstOffset
.
y
=
dst_y
;
image_copy
->
dstOffset
.
z
=
dst_z
;
image_copy
->
extent
.
width
=
src_box
?
(
src_box
->
right
-
src_box
->
left
)
:
src_desc
->
Width
;
image_copy
->
extent
.
height
=
src_box
?
(
src_box
->
bottom
-
src_box
->
top
)
:
src_desc
->
Height
;
image_copy
->
extent
.
depth
=
src_box
?
(
src_box
->
back
-
src_box
->
front
)
:
src_desc
->
DepthOrArraySize
;
if
(
src_box
)
{
image_copy
->
extent
.
width
=
src_box
->
right
-
src_box
->
left
;
image_copy
->
extent
.
height
=
src_box
->
bottom
-
src_box
->
top
;
image_copy
->
extent
.
depth
=
src_box
->
back
-
src_box
->
front
;
}
else
{
image_copy
->
extent
.
width
=
src_desc
->
Width
;
image_copy
->
extent
.
height
=
src_desc
->
Height
;
image_copy
->
extent
.
depth
=
d3d12_resource_desc_get_depth
(
src_desc
);
}
}
static
void
STDMETHODCALLTYPE
d3d12_command_list_CopyTextureRegion
(
ID3D12GraphicsCommandList
*
iface
,
...
...
This diff is collapsed.
Click to expand it.
libs/vkd3d/device.c
+
1
−
1
View file @
0dca9909
...
...
@@ -1429,7 +1429,7 @@ static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device *i
}
array_size
=
desc
->
Dimension
==
D3D12_RESOURCE_DIMENSION_TEXTURE3D
?
1
:
desc
->
DepthOrArraySize
;
base_depth
=
d
esc
->
Dimension
!=
D3D12_RESOURCE_DIMENSION_TEXTURE3D
?
1
:
desc
->
DepthOrArraySize
;
base_depth
=
d
3d12_resource_desc_get_depth
(
desc
)
;
if
(
first_sub_resource
>=
desc
->
MipLevels
*
array_size
||
sub_resource_count
>
desc
->
MipLevels
*
array_size
-
first_sub_resource
)
...
...
This diff is collapsed.
Click to expand it.
libs/vkd3d/vkd3d_private.h
+
5
−
0
View file @
0dca9909
...
...
@@ -579,6 +579,11 @@ static inline const struct vkd3d_format *vkd3d_format_from_d3d12_resource_desc(
desc
->
Flags
&
D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL
);
}
static
inline
unsigned
int
d3d12_resource_desc_get_depth
(
const
D3D12_RESOURCE_DESC
*
desc
)
{
return
desc
->
Dimension
!=
D3D12_RESOURCE_DIMENSION_TEXTURE3D
?
1
:
desc
->
DepthOrArraySize
;
}
enum
VkCompareOp
vk_compare_op_from_d3d12
(
D3D12_COMPARISON_FUNC
op
)
DECLSPEC_HIDDEN
;
bool
is_valid_feature_level
(
D3D_FEATURE_LEVEL
feature_level
)
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