mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d: Copy single layer for array textures in d3d12_command_list_CopyTextureRegion().
This commit is contained in:
parent
660ee7b090
commit
0dca9909d9
@ -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,
|
||||
|
@ -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 = desc->Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? 1 : desc->DepthOrArraySize;
|
||||
base_depth = d3d12_resource_desc_get_depth(desc);
|
||||
|
||||
if (first_sub_resource >= desc->MipLevels * array_size
|
||||
|| sub_resource_count > desc->MipLevels * array_size - first_sub_resource)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user