mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-23 21:38:18 +02:00
pvr: implement GetDeviceImageSubresourceLayout
It's implemented like GetDeviceImageMemoryRequirements by creating a temporary image. Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
This commit is contained in:
parent
b5a22a43a6
commit
f5a3e02797
1 changed files with 20 additions and 0 deletions
|
|
@ -440,6 +440,26 @@ void pvr_GetImageSubresourceLayout2(VkDevice device,
|
|||
&pLayout->subresourceLayout);
|
||||
}
|
||||
|
||||
void pvr_GetDeviceImageSubresourceLayout(
|
||||
VkDevice _device,
|
||||
const VkDeviceImageSubresourceInfo *pInfo,
|
||||
VkSubresourceLayout2 *pLayout)
|
||||
{
|
||||
VK_FROM_HANDLE(pvr_device, device, _device);
|
||||
struct pvr_image image = { 0 };
|
||||
|
||||
vk_image_init(&device->vk, &image.vk, pInfo->pCreateInfo);
|
||||
pvr_image_init(device, pInfo->pCreateInfo, &image);
|
||||
|
||||
pvr_GetImageSubresourceLayout2(_device,
|
||||
pvr_image_to_handle(&image),
|
||||
pInfo->pSubresource,
|
||||
pLayout);
|
||||
|
||||
pvr_image_fini(device, &image);
|
||||
vk_image_finish(&image.vk);
|
||||
}
|
||||
|
||||
/* Leave this at the very end, to avoid leakage of HW-defs here */
|
||||
#define PVR_BUILD_ARCH_ROGUE
|
||||
#include "pvr_csb.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue