Skip to content

Commit

Permalink
vkd3d: Add missing sTypes for mapped memory range.
Browse files Browse the repository at this point in the history
Signed-off-by: Hans-Kristian Arntzen <[email protected]>
  • Loading branch information
HansKristian-Work committed Feb 12, 2025
1 parent e86c90b commit ca335c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/vkd3d/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ static void vkd3d_memory_transfer_queue_clear_allocation(struct vkd3d_memory_tra

vk_procs = &device->vk_procs;

mapped_range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
mapped_range.memory = allocation->device_allocation.vk_memory;
mapped_range.offset = allocation->offset;
mapped_range.size = allocation->resource.size;
Expand Down
2 changes: 2 additions & 0 deletions libs/vkd3d/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_WriteToSubresource(d3d12_resourc
vkd3d_format_copy_data(format, src_data, src_row_pitch, src_slice_pitch, dst_data,
subresource_layout->row_pitch, subresource_layout->depth_pitch, extent.width, extent.height, extent.depth);

mapped_range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
mapped_range.memory = resource->mem.device_allocation.vk_memory;
mapped_range.offset = resource->mem.offset + subresource_layout->offset;
mapped_range.size = (extent.depth - 1) * subresource_layout->depth_pitch +
Expand Down Expand Up @@ -2341,6 +2342,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_ReadFromSubresource(d3d12_resour
src_data += subresource_layout->offset + vkd3d_format_get_data_offset(format,
subresource_layout->row_pitch, subresource_layout->depth_pitch, src_box->left, src_box->top, src_box->front);

mapped_range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
mapped_range.memory = resource->mem.device_allocation.vk_memory;
mapped_range.offset = resource->mem.offset + subresource_layout->offset;
mapped_range.size = (src_box->back - src_box->front - 1) * subresource_layout->depth_pitch +
Expand Down

0 comments on commit ca335c6

Please sign in to comment.