gallium: use u_box_3d to initialize pipe_box instead of non-designated initializers
This is the original utility for initializing pipe_box. It prevents breakage when pipe_box fields are reordered. Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27953>
This commit is contained in:
@@ -1313,7 +1313,8 @@ transfer_image_to_buf(struct d3d12_context *ctx,
|
||||
tmpl.nr_samples = 0;
|
||||
resolved_resource = d3d12_resource_create(ctx->base.screen, &tmpl);
|
||||
struct pipe_blit_info resolve_info = {};
|
||||
struct pipe_box box = {0,0,0, (int)res->base.b.width0, (int16_t)res->base.b.height0, (int16_t)res->base.b.depth0};
|
||||
struct pipe_box box;
|
||||
u_box_3d(0,0,0, (int)res->base.b.width0, (int16_t)res->base.b.height0, (int16_t)res->base.b.depth0, &box);
|
||||
resolve_info.dst.resource = resolved_resource;
|
||||
resolve_info.dst.box = box;
|
||||
resolve_info.dst.format = res->base.b.format;
|
||||
|
Reference in New Issue
Block a user