This function has enough arguments as it is... Motivated by wanting to unit test
this monster.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15991>
.line_stride = whandle->stride,
};
- bool valid = pan_image_layout_init(dev, &rsc->image.layout, mod,
+ bool valid = pan_image_layout_init(&rsc->image.layout, mod,
templat->format, dim,
prsc->width0, prsc->height0,
prsc->depth0, prsc->array_size,
fmt = PIPE_FORMAT_Z32_FLOAT;
ASSERTED bool valid =
- pan_image_layout_init(dev, &pres->image.layout,
+ pan_image_layout_init(&pres->image.layout,
chosen_mod, fmt, dim,
pres->base.width0,
pres->base.height0,
}
bool
-pan_image_layout_init(const struct panfrost_device *dev,
- struct pan_image_layout *layout,
+pan_image_layout_init(struct pan_image_layout *layout,
uint64_t modifier,
enum pipe_format format,
enum mali_texture_dimension dim,
};
bool
-pan_image_layout_init(const struct panfrost_device *dev,
- struct pan_image_layout *layout,
+pan_image_layout_init(struct pan_image_layout *layout,
uint64_t modifier,
enum pipe_format format,
enum mali_texture_dimension dim,
const VkSubresourceLayout *plane_layouts)
{
VK_FROM_HANDLE(panvk_device, device, _device);
- const struct panfrost_device *pdev = &device->physical_device->pdev;
struct panvk_image *image = NULL;
image = vk_image_create(&device->vk, pCreateInfo, alloc, sizeof(*image));
if (!image)
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
- pan_image_layout_init(pdev, &image->pimage.layout, modifier,
+ pan_image_layout_init(&image->pimage.layout, modifier,
vk_format_to_pipe_format(image->vk.format),
panvk_image_type_to_mali_tex_dim(image->vk.image_type),
image->vk.extent.width, image->vk.extent.height,