mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
gfxstream: don't define hasDedicatedImage + hasDedicatedBuffer multiple times
Every guest OS uses it (Linux, Android, Fuchsia). Probably we should clean up/merge logic further. Reviewed-by: Aaron Ruby <aruby@blackberry.com> Acked-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
parent
7b9c9a1b3c
commit
05371b2451
1 changed files with 9 additions and 6 deletions
|
|
@ -3236,6 +3236,9 @@ VkResult ResourceTracker::on_vkAllocateMemory(void* context, VkResult input_resu
|
|||
|
||||
VkEncoder* enc = (VkEncoder*)context;
|
||||
|
||||
bool hasDedicatedImage = false;
|
||||
bool hasDedicatedBuffer = false;
|
||||
|
||||
VkMemoryAllocateInfo finalAllocInfo = vk_make_orphan_copy(*pAllocateInfo);
|
||||
vk_struct_chain_iterator structChainIter = vk_make_chain_iterator(&finalAllocInfo);
|
||||
|
||||
|
|
@ -3382,9 +3385,9 @@ VkResult ResourceTracker::on_vkAllocateMemory(void* context, VkResult input_resu
|
|||
|
||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
if (exportAhb) {
|
||||
bool hasDedicatedImage =
|
||||
hasDedicatedImage =
|
||||
dedicatedAllocInfoPtr && (dedicatedAllocInfoPtr->image != VK_NULL_HANDLE);
|
||||
bool hasDedicatedBuffer =
|
||||
hasDedicatedBuffer =
|
||||
dedicatedAllocInfoPtr && (dedicatedAllocInfoPtr->buffer != VK_NULL_HANDLE);
|
||||
VkExtent3D imageExtent = {0, 0, 0};
|
||||
uint32_t imageLayers = 0;
|
||||
|
|
@ -3482,9 +3485,9 @@ VkResult ResourceTracker::on_vkAllocateMemory(void* context, VkResult input_resu
|
|||
}
|
||||
|
||||
if (exportVmo) {
|
||||
bool hasDedicatedImage =
|
||||
hasDedicatedImage =
|
||||
dedicatedAllocInfoPtr && (dedicatedAllocInfoPtr->image != VK_NULL_HANDLE);
|
||||
bool hasDedicatedBuffer =
|
||||
hasDedicatedBuffer =
|
||||
dedicatedAllocInfoPtr && (dedicatedAllocInfoPtr->buffer != VK_NULL_HANDLE);
|
||||
|
||||
if (hasDedicatedImage && hasDedicatedBuffer) {
|
||||
|
|
@ -3757,9 +3760,9 @@ VkResult ResourceTracker::on_vkAllocateMemory(void* context, VkResult input_resu
|
|||
#if defined(LINUX_GUEST_BUILD)
|
||||
if (exportDmabuf) {
|
||||
VirtGpuDevice* instance = VirtGpuDevice::getInstance();
|
||||
bool hasDedicatedImage =
|
||||
hasDedicatedImage =
|
||||
dedicatedAllocInfoPtr && (dedicatedAllocInfoPtr->image != VK_NULL_HANDLE);
|
||||
bool hasDedicatedBuffer =
|
||||
hasDedicatedBuffer =
|
||||
dedicatedAllocInfoPtr && (dedicatedAllocInfoPtr->buffer != VK_NULL_HANDLE);
|
||||
|
||||
if (hasDedicatedImage) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue