mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 14:00:16 +02:00
Thunks/vulkan: Disable support for debug extensions as they require callback support
This commit is contained in:
1 parent
b93b713179
commit
c04d2409da
2 files changed
+14
-1
No files matched your search
@@ -12,6 +12,7 @@ $end_info$
|
||||
|
||||
#include "common/Host.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
@@ -73,6 +74,18 @@ static void FEXFN_IMPL(vkFreeMemory)(VkDevice a_0, VkDeviceMemory a_1, const VkA
|
||||
LDR_PTR(vkFreeMemory)(a_0, a_1, nullptr);
|
||||
}
|
||||
|
||||
static VkResult FEXFN_IMPL(vkEnumerateInstanceExtensionProperties)(const char* a_0, uint32_t* a_1, VkExtensionProperties* a_2) {
|
||||
auto ret = LDR_PTR(vkEnumerateInstanceExtensionProperties)(a_0, a_1, a_2);
|
||||
if (a_2) {
|
||||
const auto end = a_2 + *a_1;
|
||||
auto it = std::remove_if(a_2, end, [](const VkExtensionProperties& prop) { return strcmp(prop.extensionName, "VK_EXT_debug_report") == 0 || strcmp(prop.extensionName, "VK_EXT_debug_utils") == 0; });
|
||||
// Replace by dummy entry and reduce extension count
|
||||
std::fill(it, end, VkExtensionProperties {});
|
||||
*a_1 -= (end - it);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static PFN_vkVoidFunction FEXFN_IMPL(vkGetDeviceProcAddr)(VkDevice a_0, const char* a_1) {
|
||||
// Just return the host facing function pointer
|
||||
// The guest will handle mapping if this exists
|
||||
|
||||
@@ -11,6 +11,7 @@ struct fex_gen_config;
|
||||
|
||||
template<> struct fex_gen_config<vkGetDeviceProcAddr> : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint, fexgen::returns_guest_pointer {};
|
||||
template<> struct fex_gen_config<vkGetInstanceProcAddr> : fexgen::custom_host_impl, fexgen::custom_guest_entrypoint, fexgen::returns_guest_pointer {};
|
||||
template<> struct fex_gen_config<vkEnumerateInstanceExtensionProperties> : fexgen::custom_host_impl {};
|
||||
|
||||
namespace internal {
|
||||
|
||||
@@ -255,7 +256,6 @@ template<> struct fex_gen_config<vkDisplayPowerControlEXT> {};
|
||||
template<> struct fex_gen_config<vkEndCommandBuffer> {};
|
||||
template<> struct fex_gen_config<vkEnumerateDeviceExtensionProperties> {};
|
||||
template<> struct fex_gen_config<vkEnumerateDeviceLayerProperties> {};
|
||||
template<> struct fex_gen_config<vkEnumerateInstanceExtensionProperties> {};
|
||||
template<> struct fex_gen_config<vkEnumerateInstanceLayerProperties> {};
|
||||
template<> struct fex_gen_config<vkEnumerateInstanceVersion> {};
|
||||
template<> struct fex_gen_config<vkEnumeratePhysicalDeviceGroups> {};
|
||||
|
||||
Reference in new issue
Block a user