On Thu, 14 Mar 2019 at 14:05, Józef Kucia joseph.kucia@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?