diff --git a/src/nouveau/nil/extent.rs b/src/nouveau/nil/extent.rs index 3b53c31176a..3e48d537058 100644 --- a/src/nouveau/nil/extent.rs +++ b/src/nouveau/nil/extent.rs @@ -15,21 +15,6 @@ pub struct Extent4D { pub array_len: u32, } -#[no_mangle] -pub extern "C" fn nil_extent4d( - width: u32, - height: u32, - depth: u32, - array_len: u32, -) -> Extent4D { - Extent4D { - width, - height, - depth, - array_len, - } -} - impl Extent4D { pub fn new( width: u32, @@ -145,11 +130,6 @@ pub struct Offset4D { pub a: u32, } -#[no_mangle] -pub extern "C" fn nil_offset4d(x: u32, y: u32, z: u32, a: u32) -> Offset4D { - Offset4D { x, y, z, a } -} - impl Offset4D { fn div_floor(self, other: Extent4D) -> Self { Self { diff --git a/src/nouveau/vulkan/nvk_cmd_copy.c b/src/nouveau/vulkan/nvk_cmd_copy.c index 820f1c7e64b..3517128957c 100644 --- a/src/nouveau/vulkan/nvk_cmd_copy.c +++ b/src/nouveau/vulkan/nvk_cmd_copy.c @@ -68,13 +68,23 @@ nouveau_copy_rect_buffer(struct nvk_buffer *buf, static struct nil_offset4d vk_to_nil_offset(VkOffset3D offset, uint32_t base_array_layer) { - return nil_offset4d(offset.x, offset.y, offset.z, base_array_layer); + return (struct nil_offset4d) { + .x = offset.x, + .y = offset.y, + .z = offset.z, + .a = base_array_layer + }; } static struct nil_extent4d vk_to_nil_extent(VkExtent3D extent, uint32_t array_layers) { - return nil_extent4d(extent.width, extent.height, extent.depth, array_layers); + return (struct nil_extent4d) { + .width = extent.width, + .height = extent.height, + .depth = extent.depth, + .array_len = array_layers, + }; } static struct nouveau_copy_buffer