mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 20:00:20 +01:00
[guest] Fuchsia: include missing Vulkan entry points
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
bb2e9be160
commit
2daad5f609
2 changed files with 30 additions and 2 deletions
|
|
@ -38,7 +38,7 @@
|
|||
namespace {
|
||||
|
||||
static bool instance_extension_table_initialized = false;
|
||||
static struct vk_instance_extension_table gfxstream_vk_instance_extensions_supported = {0};
|
||||
static struct vk_instance_extension_table gfxstream_vk_instance_extensions_supported = {};
|
||||
|
||||
// Provided by Mesa components only; never encoded/decoded through gfxstream
|
||||
static const char* const kMesaOnlyInstanceExtension[] = {
|
||||
|
|
@ -172,15 +172,17 @@ static void get_device_extensions(VkPhysicalDevice physDevInternal,
|
|||
static VkResult gfxstream_vk_physical_device_init(
|
||||
struct gfxstream_vk_physical_device* physical_device, struct gfxstream_vk_instance* instance,
|
||||
VkPhysicalDevice internal_object) {
|
||||
struct vk_device_extension_table supported_extensions = {0};
|
||||
struct vk_device_extension_table supported_extensions = {};
|
||||
get_device_extensions(internal_object, &supported_extensions);
|
||||
|
||||
struct vk_physical_device_dispatch_table dispatch_table;
|
||||
memset(&dispatch_table, 0, sizeof(struct vk_physical_device_dispatch_table));
|
||||
vk_physical_device_dispatch_table_from_entrypoints(
|
||||
&dispatch_table, &gfxstream_vk_physical_device_entrypoints, false);
|
||||
#if !defined(__Fuchsia__)
|
||||
vk_physical_device_dispatch_table_from_entrypoints(&dispatch_table,
|
||||
&wsi_physical_device_entrypoints, false);
|
||||
#endif
|
||||
|
||||
// Initialize the mesa object
|
||||
VkResult result = vk_physical_device_init(&physical_device->vk, &instance->vk,
|
||||
|
|
@ -340,7 +342,9 @@ VkResult gfxstream_vk_CreateInstance(const VkInstanceCreateInfo* pCreateInfo,
|
|||
memset(&dispatch_table, 0, sizeof(struct vk_instance_dispatch_table));
|
||||
vk_instance_dispatch_table_from_entrypoints(&dispatch_table, &gfxstream_vk_instance_entrypoints,
|
||||
false);
|
||||
#if !defined(__Fuchsia__)
|
||||
vk_instance_dispatch_table_from_entrypoints(&dispatch_table, &wsi_instance_entrypoints, false);
|
||||
#endif
|
||||
|
||||
result = vk_instance_init(&instance->vk, get_instance_extensions(), &dispatch_table,
|
||||
pCreateInfo, pAllocator);
|
||||
|
|
@ -466,7 +470,9 @@ VkResult gfxstream_vk_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||
memset(&dispatch_table, 0, sizeof(struct vk_device_dispatch_table));
|
||||
vk_device_dispatch_table_from_entrypoints(&dispatch_table, &gfxstream_vk_device_entrypoints,
|
||||
false);
|
||||
#if !defined(__Fuchsia__)
|
||||
vk_device_dispatch_table_from_entrypoints(&dispatch_table, &wsi_device_entrypoints, false);
|
||||
#endif
|
||||
|
||||
result = vk_device_init(&gfxstream_device->vk, &gfxstream_physicalDevice->vk,
|
||||
&dispatch_table, pCreateInfo, pMesaAllocator);
|
||||
|
|
|
|||
22
src/gfxstream/guest/vulkan/gfxstream_vk_wsi_stub.cpp
Normal file
22
src/gfxstream/guest/vulkan/gfxstream_vk_wsi_stub.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (C) 2024 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "gfxstream_vk_entrypoints.h"
|
||||
#include "gfxstream_vk_private.h"
|
||||
|
||||
VkResult gfxstream_vk_wsi_init(struct gfxstream_vk_physical_device* physical_device) {
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
void gfxstream_vk_wsi_finish(struct gfxstream_vk_physical_device* physical_device) {}
|
||||
Loading…
Add table
Reference in a new issue