pvr: Add const to structs that are not supposed to be modified.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18707>
This commit is contained in:
Rajnesh Kanwal
2022-09-02 15:12:06 +01:00
parent 2fc20cff4c
commit ce5a34aadb
2 changed files with 17 additions and 5 deletions
+13 -5
View File
@@ -233,12 +233,10 @@ VkResult pvr_BindImageMemory2(VkDevice _device,
return VK_SUCCESS;
}
void pvr_GetImageSubresourceLayout(VkDevice device,
VkImage _image,
const VkImageSubresource *subresource,
VkSubresourceLayout *layout)
void pvr_get_image_subresource_layout(const struct pvr_image *image,
const VkImageSubresource *subresource,
VkSubresourceLayout *layout)
{
PVR_FROM_HANDLE(pvr_image, image, _image);
const struct pvr_mip_level *mip_level =
&image->mip_levels[subresource->mipLevel];
@@ -253,6 +251,16 @@ void pvr_GetImageSubresourceLayout(VkDevice device,
layout->size = mip_level->size;
}
void pvr_GetImageSubresourceLayout(VkDevice device,
VkImage _image,
const VkImageSubresource *subresource,
VkSubresourceLayout *layout)
{
PVR_FROM_HANDLE(pvr_image, image, _image);
pvr_get_image_subresource_layout(image, subresource, layout);
}
VkResult pvr_CreateImageView(VkDevice _device,
const VkImageViewCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator,
+4
View File
@@ -1489,6 +1489,10 @@ VkResult pvr_emit_ppp_from_template(
const struct pvr_static_clear_ppp_template *const template,
struct pvr_bo **const pvr_bo_out);
void pvr_get_image_subresource_layout(const struct pvr_image *image,
const VkImageSubresource *subresource,
VkSubresourceLayout *layout);
static inline struct pvr_compute_pipeline *
to_pvr_compute_pipeline(struct pvr_pipeline *pipeline)
{