mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
gfxstream: guest: nuke aemu/base/Optional.h
Only seems to be used in the Fuchsia builds. 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
109a7b8d54
commit
84941bcbc5
2 changed files with 9 additions and 9 deletions
|
|
@ -2633,7 +2633,8 @@ VkResult ResourceTracker::setBufferCollectionImageConstraintsFUCHSIA(
|
|||
if (info_VkBufferCollectionFUCHSIA.find(buffer_collection) !=
|
||||
info_VkBufferCollectionFUCHSIA.end()) {
|
||||
info_VkBufferCollectionFUCHSIA[buffer_collection].constraints =
|
||||
gfxstream::guest::makeOptional(std::move(setConstraintsResult.constraints));
|
||||
std::make_optional<fuchsia_sysmem::wire::BufferCollectionConstraints>(
|
||||
std::move(setConstraintsResult.constraints));
|
||||
info_VkBufferCollectionFUCHSIA[buffer_collection].createInfoIndex =
|
||||
std::move(setConstraintsResult.createInfoIndex);
|
||||
}
|
||||
|
|
@ -2658,7 +2659,8 @@ VkResult ResourceTracker::setBufferCollectionBufferConstraintsFUCHSIA(
|
|||
if (info_VkBufferCollectionFUCHSIA.find(buffer_collection) !=
|
||||
info_VkBufferCollectionFUCHSIA.end()) {
|
||||
info_VkBufferCollectionFUCHSIA[buffer_collection].constraints =
|
||||
gfxstream::guest::makeOptional(setConstraintsResult.constraints);
|
||||
std::make_optional<fuchsia_sysmem::wire::BufferCollectionConstraints>(
|
||||
setConstraintsResult.constraints);
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
@ -2805,7 +2807,7 @@ VkResult ResourceTracker::on_vkGetBufferCollectionPropertiesFUCHSIA(
|
|||
}
|
||||
|
||||
info_VkBufferCollectionFUCHSIA[collection].properties =
|
||||
gfxstream::guest::makeOptional(*pProperties);
|
||||
std::make_optional<VkBufferCollectionPropertiesFUCHSIA>(*pProperties);
|
||||
|
||||
// We only do a shallow copy so we should remove all pNext pointers.
|
||||
info_VkBufferCollectionFUCHSIA[collection].properties->pNext = nullptr;
|
||||
|
|
@ -5395,7 +5397,7 @@ VkResult ResourceTracker::on_vkCreateBuffer(void* context, VkResult, VkDevice de
|
|||
}
|
||||
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
Optional<zx::vmo> vmo;
|
||||
std::optional<zx::vmo> vmo;
|
||||
bool isSysmemBackedMemory = false;
|
||||
|
||||
if (extBufCiPtr &&
|
||||
|
|
@ -5416,7 +5418,7 @@ VkResult ResourceTracker::on_vkCreateBuffer(void* context, VkResult, VkDevice de
|
|||
if (result.ok() && result->status == ZX_OK) {
|
||||
auto& info = result->buffer_collection_info;
|
||||
if (index < info.buffer_count) {
|
||||
vmo = gfxstream::guest::makeOptional(std::move(info.buffers[index].vmo));
|
||||
vmo = std::make_optional<zx::vmo>(std::move(info.buffers[index].vmo));
|
||||
}
|
||||
} else {
|
||||
mesa_loge("WaitForBuffersAllocated failed: %d %d", result.status(),
|
||||
|
|
|
|||
|
|
@ -29,12 +29,10 @@
|
|||
#include "VirtGpu.h"
|
||||
#include "VulkanHandleMapping.h"
|
||||
#include "VulkanHandles.h"
|
||||
#include "aemu/base/Optional.h"
|
||||
#include "aemu/base/Tracing.h"
|
||||
#include "aemu/base/threads/AndroidWorkPool.h"
|
||||
#include "goldfish_vk_transform_guest.h"
|
||||
|
||||
using gfxstream::guest::Optional;
|
||||
using gfxstream::guest::WorkPool;
|
||||
|
||||
/// Use installed headers or locally defined Fuchsia-specific bits
|
||||
|
|
@ -858,8 +856,8 @@ class ResourceTracker {
|
|||
|
||||
struct VkBufferCollectionFUCHSIA_Info {
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
gfxstream::guest::Optional<fuchsia_sysmem::wire::BufferCollectionConstraints> constraints;
|
||||
gfxstream::guest::Optional<VkBufferCollectionPropertiesFUCHSIA> properties;
|
||||
std::optional<fuchsia_sysmem::wire::BufferCollectionConstraints> constraints;
|
||||
std::optional<VkBufferCollectionPropertiesFUCHSIA> properties;
|
||||
|
||||
// the index of corresponding createInfo for each image format
|
||||
// constraints in |constraints|.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue