[PATCH vkd3d 05/11] vkd3d: Do not ignore "src_box" in d3d12_command_list_CopyTextureRegion().

Henri Verbeet hverbeet at gmail.com
Thu Mar 14 10:05:11 CDT 2019


On Thu, 14 Mar 2019 at 14:05, Józef Kucia <joseph.kucia at gmail.com> wrote:
> -static void vk_buffer_image_copy_from_d3d12(VkBufferImageCopy *buffer_image_copy,
> +static void vk_buffer_image_copy_from_d3d12(VkBufferImageCopy *copy,
>          const D3D12_PLACED_SUBRESOURCE_FOOTPRINT *footprint, unsigned int sub_resource_idx,
>          const D3D12_RESOURCE_DESC *image_desc, const struct vkd3d_format *format,
> -        unsigned int dst_x, unsigned int dst_y, unsigned int dst_z)
> +        const D3D12_BOX *src_box, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z)
>  {
> -    buffer_image_copy->bufferOffset = footprint->Offset;
> -    buffer_image_copy->bufferRowLength = footprint->Footprint.RowPitch /
> +    copy->bufferOffset = footprint->Offset;
> +    if (src_box)
> +    {
> +        copy->bufferOffset += (src_box->left / format->block_width) * format->byte_count * format->block_byte_count;
> +        copy->bufferOffset += src_box->top * footprint->Footprint.RowPitch;
Should that take the block height into account as well?



More information about the wine-devel mailing list