d3d12: Fix offset for buf/image copies with suballocated buffers
Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14933>
This commit is contained in:
parent
fb08bc8d76
commit
d0f4f8efae
|
@ -732,7 +732,7 @@ transfer_buf_to_image_part(struct d3d12_context *ctx,
|
||||||
struct copy_info copy_info;
|
struct copy_info copy_info;
|
||||||
copy_info.src = staging_res;
|
copy_info.src = staging_res;
|
||||||
copy_info.src_loc = fill_buffer_location(ctx, res, staging_res, trans, depth, resid, z);
|
copy_info.src_loc = fill_buffer_location(ctx, res, staging_res, trans, depth, resid, z);
|
||||||
copy_info.src_loc.PlacedFootprint.Offset = (z - start_z) * trans->base.b.layer_stride;
|
copy_info.src_loc.PlacedFootprint.Offset += (z - start_z) * trans->base.b.layer_stride;
|
||||||
copy_info.src_box = nullptr;
|
copy_info.src_box = nullptr;
|
||||||
copy_info.dst = res;
|
copy_info.dst = res;
|
||||||
copy_info.dst_loc = fill_texture_location(res, trans, resid, z);
|
copy_info.dst_loc = fill_texture_location(res, trans, resid, z);
|
||||||
|
@ -792,7 +792,7 @@ transfer_image_part_to_buf(struct d3d12_context *ctx,
|
||||||
copy_info.dst = staging_res;
|
copy_info.dst = staging_res;
|
||||||
copy_info.dst_loc = fill_buffer_location(ctx, res, staging_res, trans,
|
copy_info.dst_loc = fill_buffer_location(ctx, res, staging_res, trans,
|
||||||
depth, resid, z);
|
depth, resid, z);
|
||||||
copy_info.dst_loc.PlacedFootprint.Offset = (z - start_layer) * trans->base.b.layer_stride;
|
copy_info.dst_loc.PlacedFootprint.Offset += (z - start_layer) * trans->base.b.layer_stride;
|
||||||
copy_info.dst_x = copy_info.dst_y = copy_info.dst_z = 0;
|
copy_info.dst_x = copy_info.dst_y = copy_info.dst_z = 0;
|
||||||
|
|
||||||
bool whole_resource = util_texrange_covers_whole_level(&res->base.b, trans->base.b.level,
|
bool whole_resource = util_texrange_covers_whole_level(&res->base.b, trans->base.b.level,
|
||||||
|
|
Loading…
Reference in New Issue