mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
LibraryForwarding/vulkan: Add 32-bit support
This commit is contained in:
1 parent
659538ef4b
commit
809b2c6115
2 files changed
+888
-9
No files matched your search
@@ -16,7 +16,10 @@ $end_info$
|
||||
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
#include <span>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "thunkgen_host_libvulkan.inl"
|
||||
|
||||
@@ -141,9 +144,7 @@ static VkResult FEXFN_IMPL(vkCreateInstance)(const VkInstanceCreateInfo* a_0, co
|
||||
|
||||
VkInstance out;
|
||||
auto ret = LDR_PTR(vkCreateInstance)(vk_struct_base, nullptr, &out);
|
||||
if (ret == VK_SUCCESS) {
|
||||
*a_2.get_pointer() = to_guest(to_host_layout(out));
|
||||
}
|
||||
*a_2.get_pointer() = to_guest(to_host_layout(out));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -151,9 +152,7 @@ static VkResult FEXFN_IMPL(vkCreateDevice)(VkPhysicalDevice a_0, const VkDeviceC
|
||||
guest_layout<VkDevice*> a_3) {
|
||||
VkDevice out;
|
||||
auto ret = LDR_PTR(vkCreateDevice)(a_0, a_1, nullptr, &out);
|
||||
if (ret == VK_SUCCESS) {
|
||||
*a_3.get_pointer() = to_guest(to_host_layout(out));
|
||||
}
|
||||
*a_3.get_pointer() = to_guest(to_host_layout(out));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -193,6 +192,115 @@ static VkResult FEXFN_IMPL(vkCreateDebugUtilsMessengerEXT)(VkInstance_T* a_0, gu
|
||||
return LDR_PTR(vkCreateDebugUtilsMessengerEXT)(a_0, &overridden_callback, nullptr, a_3);
|
||||
}
|
||||
|
||||
#ifdef IS_32BIT_THUNK
|
||||
VkResult fexfn_impl_libvulkan_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t* count, guest_layout<VkPhysicalDevice*> devices) {
|
||||
if (!devices.get_pointer()) {
|
||||
return fexldr_ptr_libvulkan_vkEnumeratePhysicalDevices(instance, count, nullptr);
|
||||
}
|
||||
|
||||
auto input_count = *count;
|
||||
std::vector<VkPhysicalDevice> out(input_count);
|
||||
auto ret = fexldr_ptr_libvulkan_vkEnumeratePhysicalDevices(instance, count, out.data());
|
||||
for (size_t i = 0; i < std::min(input_count, *count); ++i) {
|
||||
devices.get_pointer()[i] = to_guest(to_host_layout(out[i]));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fexfn_impl_libvulkan_vkGetDeviceQueue(VkDevice device, uint32_t family_index, uint32_t queue_index, guest_layout<VkQueue*> queue) {
|
||||
VkQueue out;
|
||||
(void*&)fexldr_ptr_libvulkan_vkGetDeviceQueue = (void*)LDR_PTR(vkGetDeviceProcAddr)(device, "vkGetDeviceQueue");
|
||||
fexldr_ptr_libvulkan_vkGetDeviceQueue(device, family_index, queue_index, &out);
|
||||
*queue.get_pointer() = to_guest(to_host_layout(out));
|
||||
}
|
||||
|
||||
VkResult fexfn_impl_libvulkan_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* info,
|
||||
guest_layout<VkCommandBuffer*> buffers) {
|
||||
std::vector<VkCommandBuffer> out(info->commandBufferCount);
|
||||
(void*&)fexldr_ptr_libvulkan_vkAllocateCommandBuffers = (void*)LDR_PTR(vkGetDeviceProcAddr)(device, "vkAllocateCommandBuffers");
|
||||
auto ret = fexldr_ptr_libvulkan_vkAllocateCommandBuffers(device, info, out.data());
|
||||
if (ret == VK_SUCCESS) {
|
||||
for (size_t i = 0; i < info->commandBufferCount; ++i) {
|
||||
buffers.get_pointer()[i] = to_guest(to_host_layout(out[i]));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
VkResult fexfn_impl_libvulkan_vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size,
|
||||
VkMemoryMapFlags flags, guest_layout<void**> data) {
|
||||
host_layout<void*> host_data {};
|
||||
void* mapped;
|
||||
(void*&)fexldr_ptr_libvulkan_vkMapMemory = (void*)LDR_PTR(vkGetDeviceProcAddr)(device, "vkMapMemory");
|
||||
auto ret = fexldr_ptr_libvulkan_vkMapMemory(device, memory, offset, size, flags, &mapped);
|
||||
if (ret == VK_SUCCESS) {
|
||||
host_data.data = mapped;
|
||||
*data.get_pointer() = to_guest(host_data);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Allocates storage on the heap that must be de-allocated using delete[]
|
||||
template<bool NeedsRepack = true, typename T>
|
||||
std::span<std::remove_cv_t<T>> RepackStructArray(uint32_t Count, const guest_layout<T*> GuestData) {
|
||||
if (!GuestData.get_pointer() || Count == 0) {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto HostData = new std::remove_cv_t<T>[Count];
|
||||
for (size_t i = 0; i < Count; ++i) {
|
||||
auto& GuestElement = (const guest_layout<std::remove_cv_t<T>>&)GuestData.get_pointer()[i];
|
||||
auto Element = host_layout<std::remove_cv_t<T>> {GuestElement};
|
||||
if constexpr (NeedsRepack) {
|
||||
fex_apply_custom_repacking_entry(Element, GuestElement);
|
||||
}
|
||||
HostData[i] = Element.data;
|
||||
}
|
||||
return {HostData, Count};
|
||||
}
|
||||
|
||||
void fexfn_impl_libvulkan_vkUpdateDescriptorSets(VkDevice device, unsigned int descriptorWriteCount,
|
||||
guest_layout<const VkWriteDescriptorSet*> pDescriptorWrites, unsigned int descriptorCopyCount,
|
||||
guest_layout<const VkCopyDescriptorSet*> pDescriptorCopies) {
|
||||
|
||||
auto HostDescriptorWrites = RepackStructArray(descriptorWriteCount, pDescriptorWrites);
|
||||
auto HostDescriptorCopies = RepackStructArray(descriptorCopyCount, pDescriptorCopies);
|
||||
|
||||
(void*&)fexldr_ptr_libvulkan_vkUpdateDescriptorSets = (void*)LDR_PTR(vkGetDeviceProcAddr)(device, "vkUpdateDescriptorSets");
|
||||
fexldr_ptr_libvulkan_vkUpdateDescriptorSets(device, descriptorWriteCount, HostDescriptorWrites.data(), descriptorCopyCount,
|
||||
HostDescriptorCopies.data());
|
||||
|
||||
delete[] HostDescriptorCopies.data();
|
||||
delete[] HostDescriptorWrites.data();
|
||||
}
|
||||
|
||||
VkResult fexfn_impl_libvulkan_vkQueueSubmit(VkQueue queue, uint32_t submit_count, guest_layout<const VkSubmitInfo*> submit_infos, VkFence fence) {
|
||||
|
||||
auto HostSubmitInfos = RepackStructArray(submit_count, submit_infos);
|
||||
auto ret = fexldr_ptr_libvulkan_vkQueueSubmit(queue, submit_count, HostSubmitInfos.data(), fence);
|
||||
delete[] HostSubmitInfos.data();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fexfn_impl_libvulkan_vkFreeCommandBuffers(VkDevice device, VkCommandPool pool, uint32_t num_buffers,
|
||||
guest_layout<const VkCommandBuffer*> buffers) {
|
||||
|
||||
auto HostBuffers = RepackStructArray<false>(num_buffers, buffers);
|
||||
(void*&)fexldr_ptr_libvulkan_vkFreeCommandBuffers = (void*)LDR_PTR(vkGetDeviceProcAddr)(device, "vkFreeCommandBuffers");
|
||||
fexldr_ptr_libvulkan_vkFreeCommandBuffers(device, pool, num_buffers, HostBuffers.data());
|
||||
delete[] HostBuffers.data();
|
||||
}
|
||||
|
||||
VkResult fexfn_impl_libvulkan_vkGetPipelineCacheData(VkDevice device, VkPipelineCache cache, guest_layout<uint32_t*> guest_data_size, void* data) {
|
||||
size_t data_size = guest_data_size.get_pointer()->data;
|
||||
(void*&)fexldr_ptr_libvulkan_vkGetPipelineCacheData = (void*)LDR_PTR(vkGetDeviceProcAddr)(device, "vkGetPipelineCacheData");
|
||||
auto ret = fexldr_ptr_libvulkan_vkGetPipelineCacheData(device, cache, &data_size, data);
|
||||
*guest_data_size.get_pointer() = data_size;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static PFN_vkVoidFunction LookupCustomVulkanFunction(const char* a_1) {
|
||||
using namespace std::string_view_literals;
|
||||
|
||||
@@ -206,6 +314,7 @@ static PFN_vkVoidFunction LookupCustomVulkanFunction(const char* a_1) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkAllocateMemory;
|
||||
} else if (a_1 == "vkFreeMemory"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkFreeMemory;
|
||||
// TODO: Review if 32-bit changes are needed
|
||||
} else if (a_1 == "vkAcquireXlibDisplayEXT"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkAcquireXlibDisplayEXT;
|
||||
} else if (a_1 == "vkGetRandROutputDisplayEXT"sv) {
|
||||
@@ -214,6 +323,24 @@ static PFN_vkVoidFunction LookupCustomVulkanFunction(const char* a_1) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkGetPhysicalDeviceXcbPresentationSupportKHR;
|
||||
} else if (a_1 == "vkGetPhysicalDeviceXlibPresentationSupportKHR"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkGetPhysicalDeviceXlibPresentationSupportKHR;
|
||||
#ifdef IS_32BIT_THUNK
|
||||
} else if (a_1 == "vkAllocateCommandBuffers"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkAllocateCommandBuffers;
|
||||
} else if (a_1 == "vkEnumeratePhysicalDevices"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkEnumeratePhysicalDevices;
|
||||
} else if (a_1 == "vkFreeCommandBuffers"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkFreeCommandBuffers;
|
||||
} else if (a_1 == "vkGetDeviceQueue"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkGetDeviceQueue;
|
||||
} else if (a_1 == "vkGetPipelineCacheData"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkGetPipelineCacheData;
|
||||
} else if (a_1 == "vkMapMemory"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkMapMemory;
|
||||
} else if (a_1 == "vkQueueSubmit"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkQueueSubmit;
|
||||
} else if (a_1 == "vkUpdateDescriptorSets"sv) {
|
||||
return (PFN_vkVoidFunction)fexfn_impl_libvulkan_vkUpdateDescriptorSets;
|
||||
#endif
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -265,4 +392,450 @@ static PFN_vkVoidFunction FEXFN_IMPL(vkGetInstanceProcAddr)(VkInstance a_0, cons
|
||||
return LDR_PTR(vkGetInstanceProcAddr)(a_0, a_1);
|
||||
}
|
||||
|
||||
#ifdef IS_32BIT_THUNK
|
||||
template<VkStructureType TypeIndex, typename Type>
|
||||
static VkBaseOutStructure* convert(const guest_layout<VkBaseOutStructure>* source) {
|
||||
// Using malloc here since no easily available type information is available at the time of destruction.
|
||||
auto typed_source = reinterpret_cast<const guest_layout<Type>*>(source);
|
||||
auto child_mem = (char*)aligned_alloc(alignof(host_layout<Type>), sizeof(host_layout<Type>));
|
||||
auto child = new (child_mem) host_layout<Type> {*typed_source};
|
||||
|
||||
fex_custom_repack_entry(*child, *typed_source);
|
||||
|
||||
return reinterpret_cast<VkBaseOutStructure*>(&child->data);
|
||||
}
|
||||
|
||||
template<VkStructureType TypeIndex, typename Type>
|
||||
static void convert_to_guest(void* into, const VkBaseOutStructure* from) {
|
||||
auto typed_into = reinterpret_cast<guest_layout<Type>*>(into);
|
||||
auto oldNext = typed_into->data.pNext; // TODO: This assumes Vulkan never modifies pNext internally
|
||||
*typed_into = to_guest(to_host_layout(*(Type*)from));
|
||||
typed_into->data.pNext = oldNext;
|
||||
|
||||
fex_custom_repack_exit(*typed_into, to_host_layout(*(Type*)from));
|
||||
}
|
||||
|
||||
template<VkStructureType TypeIndex, typename Type>
|
||||
inline constexpr std::pair<VkStructureType, std::pair<VkBaseOutStructure* (*)(const guest_layout<VkBaseOutStructure>*), void (*)(void*, const VkBaseOutStructure*)>>
|
||||
converters = {TypeIndex, {convert<TypeIndex, Type>, convert_to_guest<TypeIndex, Type>}};
|
||||
|
||||
// NOTE: Not all Vulkan structures with pNext members are listed here. This is because excluding structs exclusively used as top-level entries is useful to detect repacking bugs.
|
||||
static std::unordered_map<VkStructureType, std::pair<VkBaseOutStructure* (*)(const guest_layout<VkBaseOutStructure>*), void (*)(void*, const VkBaseOutStructure*)>> next_handlers {
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, VkSemaphoreTypeCreateInfo>,
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, VkMemoryDedicatedRequirements>,
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, VkMemoryDedicatedAllocateInfo>,
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO, VkImageFormatListCreateInfo>,
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO, VkRenderPassAttachmentBeginInfo>,
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, VkTimelineSemaphoreSubmitInfo>,
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO, VkPipelineRenderingCreateInfo>,
|
||||
converters<VkStructureType::VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, VkMemoryAllocateFlagsInfo>,
|
||||
};
|
||||
|
||||
static void default_fex_custom_repack_entry(VkBaseOutStructure& into, const guest_layout<VkBaseOutStructure>* from) {
|
||||
if (!from->data.pNext.get_pointer()) {
|
||||
into.pNext = nullptr;
|
||||
return;
|
||||
}
|
||||
auto typed_source = reinterpret_cast<const guest_layout<VkBaseOutStructure>*>(from->data.pNext.get_pointer());
|
||||
|
||||
auto next_handler = next_handlers.find(static_cast<VkStructureType>(typed_source->data.sType.data));
|
||||
if (next_handler == next_handlers.end()) {
|
||||
fprintf(stderr, "ERROR: Unrecognized VkStructureType %u referenced by pNext\n", typed_source->data.sType.data);
|
||||
std::abort();
|
||||
}
|
||||
|
||||
into.pNext = next_handler->second.first(typed_source);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void default_fex_custom_repack_entry(host_layout<T>& into, const guest_layout<T>& from) {
|
||||
default_fex_custom_repack_entry(*(VkBaseOutStructure*)&into.data, reinterpret_cast<const guest_layout<VkBaseOutStructure>*>(&from));
|
||||
}
|
||||
|
||||
static void default_fex_custom_repack_reverse(guest_layout<VkBaseOutStructure>& into, const VkBaseOutStructure* from) {
|
||||
auto pNextHost = from->pNext;
|
||||
if (!pNextHost) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto next_handler = next_handlers.find(static_cast<VkStructureType>(into.data.pNext.get_pointer()->data.sType.data));
|
||||
if (next_handler == next_handlers.end()) {
|
||||
fprintf(stderr, "ERROR: Unrecognized VkStructureType %u referenced by pNext when converting to guest\n", from->sType);
|
||||
std::abort();
|
||||
}
|
||||
next_handler->second.second((void*)into.data.pNext.get_pointer(), from->pNext);
|
||||
|
||||
free(pNextHost);
|
||||
}
|
||||
|
||||
// Default repacking functions that only traverses and repacks the pNext chain.
|
||||
// If other members need to be repacked, use VULKAN_NONDEFAULT_CUSTOM_REPACK instead
|
||||
#define VULKAN_DEFAULT_CUSTOM_REPACK(name) \
|
||||
void fex_custom_repack_entry(host_layout<name>& into, const guest_layout<name>& from) { \
|
||||
default_fex_custom_repack_entry(reinterpret_cast<VkBaseOutStructure&>(into.data), \
|
||||
&reinterpret_cast<const guest_layout<VkBaseOutStructure>&>(from)); \
|
||||
} \
|
||||
\
|
||||
bool fex_custom_repack_exit(guest_layout<name>& into, const host_layout<name>& from) { \
|
||||
auto prev_next = into.data.pNext; \
|
||||
default_fex_custom_repack_reverse(*reinterpret_cast<guest_layout<VkBaseOutStructure>*>(&into), \
|
||||
&reinterpret_cast<const VkBaseOutStructure&>(from.data)); \
|
||||
into = to_guest(from); \
|
||||
into.data.pNext = prev_next; \
|
||||
return true; \
|
||||
}
|
||||
|
||||
// Intentionally left empty. This macro doesn't automate anything, but it
|
||||
// helps ensure we don't forget any Vulkan types in the list. The actual
|
||||
// repacking functions are defined manually later
|
||||
#define VULKAN_NONDEFAULT_CUSTOM_REPACK(name)
|
||||
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkApplicationInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkAttachmentDescription2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkAttachmentReference2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkBufferMemoryBarrier2)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkDependencyInfo)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkDescriptorUpdateTemplateCreateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkDeviceQueueCreateInfo)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkGraphicsPipelineCreateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkImageFormatListCreateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkImageMemoryBarrier2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkImageMemoryRequirementsInfo2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkImageViewCreateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkMemoryAllocateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkMemoryAllocateFlagsInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkMemoryBarrier2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkMemoryDedicatedAllocateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkMemoryDedicatedRequirements)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkMemoryRequirements2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkPipelineRenderingCreateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkRenderPassAttachmentBeginInfo)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkRenderPassBeginInfo)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkRenderPassCreateInfo)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkRenderPassCreateInfo2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkSemaphoreCreateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkSemaphoreTypeCreateInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkSemaphoreWaitInfo)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkSubmitInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkSubpassBeginInfo)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkSubpassDependency2)
|
||||
VULKAN_NONDEFAULT_CUSTOM_REPACK(VkSubpassDescription2)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkSwapchainCreateInfoKHR)
|
||||
VULKAN_DEFAULT_CUSTOM_REPACK(VkTimelineSemaphoreSubmitInfo)
|
||||
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkInstanceCreateInfo>& into, const guest_layout<VkInstanceCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
|
||||
auto HostApplicationInfo = new host_layout<VkApplicationInfo> {*from.data.pApplicationInfo.get_pointer()};
|
||||
fex_apply_custom_repacking_entry(*HostApplicationInfo, *from.data.pApplicationInfo.get_pointer());
|
||||
|
||||
into.data.pApplicationInfo = &HostApplicationInfo->data;
|
||||
|
||||
auto extension_count = from.data.enabledExtensionCount.data;
|
||||
into.data.ppEnabledExtensionNames = RepackStructArray<false>(extension_count, from.data.ppEnabledExtensionNames).data();
|
||||
|
||||
auto layer_count = from.data.enabledLayerCount.data;
|
||||
into.data.ppEnabledLayerNames = RepackStructArray<false>(layer_count, from.data.ppEnabledLayerNames).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkInstanceCreateInfo>& into, const host_layout<VkInstanceCreateInfo>& from) {
|
||||
delete from.data.pApplicationInfo;
|
||||
delete[] from.data.ppEnabledExtensionNames;
|
||||
delete[] from.data.ppEnabledLayerNames;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkDeviceCreateInfo>& into, const guest_layout<VkDeviceCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
|
||||
auto HostQueueCreateInfo = new host_layout<VkDeviceQueueCreateInfo> {*from.data.pQueueCreateInfos.get_pointer()};
|
||||
fex_apply_custom_repacking_entry(*HostQueueCreateInfo, *from.data.pQueueCreateInfos.get_pointer());
|
||||
into.data.pQueueCreateInfos = &HostQueueCreateInfo->data;
|
||||
|
||||
auto layer_count = from.data.enabledExtensionCount.data;
|
||||
fprintf(stderr, " Repacking %d ppEnabledLayerNames\n", layer_count);
|
||||
into.data.ppEnabledLayerNames = RepackStructArray<false>(layer_count, from.data.ppEnabledLayerNames).data();
|
||||
|
||||
auto extension_count = from.data.enabledExtensionCount.data;
|
||||
fprintf(stderr, " Repacking %d ppEnabledExtensionNames\n", extension_count);
|
||||
into.data.ppEnabledExtensionNames = RepackStructArray<false>(extension_count, from.data.ppEnabledExtensionNames).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkDeviceCreateInfo>& into, const host_layout<VkDeviceCreateInfo>& from) {
|
||||
delete from.data.pQueueCreateInfos;
|
||||
delete[] from.data.ppEnabledExtensionNames;
|
||||
delete[] from.data.ppEnabledLayerNames;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkDescriptorSetLayoutCreateInfo>& into, const guest_layout<VkDescriptorSetLayoutCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pBindings = RepackStructArray(from.data.bindingCount.data, from.data.pBindings).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkDescriptorSetLayoutCreateInfo>& into, const host_layout<VkDescriptorSetLayoutCreateInfo>& from) {
|
||||
delete[] from.data.pBindings;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkRenderPassCreateInfo>& into, const guest_layout<VkRenderPassCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pSubpasses = RepackStructArray(from.data.subpassCount.data, from.data.pSubpasses).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkRenderPassCreateInfo>& into, const host_layout<VkRenderPassCreateInfo>& from) {
|
||||
delete[] from.data.pSubpasses;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkRenderPassCreateInfo2>& into, const guest_layout<VkRenderPassCreateInfo2>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pAttachments = RepackStructArray(from.data.attachmentCount.data, from.data.pAttachments).data();
|
||||
into.data.pSubpasses = RepackStructArray(from.data.subpassCount.data, from.data.pSubpasses).data();
|
||||
into.data.pDependencies = RepackStructArray(from.data.dependencyCount.data, from.data.pDependencies).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkRenderPassCreateInfo2>& into, const host_layout<VkRenderPassCreateInfo2>& from) {
|
||||
delete[] from.data.pAttachments;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete[] from.data.pSubpasses;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete[] from.data.pDependencies;
|
||||
// TODO: Run custom exit-repacking
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkSubpassDescription2>& into, const guest_layout<VkSubpassDescription2>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pInputAttachments = RepackStructArray(from.data.inputAttachmentCount.data, from.data.pInputAttachments).data();
|
||||
into.data.pColorAttachments = RepackStructArray(from.data.colorAttachmentCount.data, from.data.pColorAttachments).data();
|
||||
into.data.pResolveAttachments = RepackStructArray(from.data.colorAttachmentCount.data, from.data.pResolveAttachments).data();
|
||||
|
||||
if (from.data.pDepthStencilAttachment.data == 0) {
|
||||
into.data.pDepthStencilAttachment = nullptr;
|
||||
} else {
|
||||
into.data.pDepthStencilAttachment = new VkAttachmentReference2;
|
||||
auto in_data = host_layout<VkAttachmentReference2> {*from.data.pDepthStencilAttachment.get_pointer()};
|
||||
fex_apply_custom_repacking_entry(in_data, *from.data.pDepthStencilAttachment.get_pointer());
|
||||
memcpy((void*)into.data.pDepthStencilAttachment, &in_data.data, sizeof(VkAttachmentReference2));
|
||||
}
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkSubpassDescription2>& into, const host_layout<VkSubpassDescription2>& from) {
|
||||
delete[] from.data.pInputAttachments;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete[] from.data.pColorAttachments;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete[] from.data.pResolveAttachments;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete /*[]*/ from.data.pDepthStencilAttachment;
|
||||
// TODO: Run custom exit-repacking
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkRenderingInfo>& into, const guest_layout<VkRenderingInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
|
||||
into.data.pColorAttachments = RepackStructArray(from.data.colorAttachmentCount.data, from.data.pColorAttachments).data();
|
||||
|
||||
if (from.data.pDepthAttachment.get_pointer() == nullptr) {
|
||||
into.data.pDepthAttachment = nullptr;
|
||||
} else {
|
||||
into.data.pDepthAttachment = new VkRenderingAttachmentInfo;
|
||||
auto in_data = host_layout<VkRenderingAttachmentInfo> {*from.data.pDepthAttachment.get_pointer()};
|
||||
fex_apply_custom_repacking_entry(in_data, *from.data.pDepthAttachment.get_pointer());
|
||||
memcpy((void*)into.data.pDepthAttachment, &in_data.data, sizeof(VkRenderingAttachmentInfo));
|
||||
}
|
||||
|
||||
if (from.data.pStencilAttachment.get_pointer() == nullptr) {
|
||||
into.data.pStencilAttachment = nullptr;
|
||||
} else {
|
||||
into.data.pStencilAttachment = new VkRenderingAttachmentInfo;
|
||||
auto in_data = host_layout<VkRenderingAttachmentInfo> {*from.data.pStencilAttachment.get_pointer()};
|
||||
fex_apply_custom_repacking_entry(in_data, *from.data.pStencilAttachment.get_pointer());
|
||||
memcpy((void*)into.data.pStencilAttachment, &in_data.data, sizeof(VkRenderingAttachmentInfo));
|
||||
}
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkRenderingInfo>& into, const host_layout<VkRenderingInfo>& from) {
|
||||
delete[] from.data.pColorAttachments;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete from.data.pDepthAttachment;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete from.data.pStencilAttachment;
|
||||
// TODO: Run custom exit-repacking
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkDependencyInfo>& into, const guest_layout<VkDependencyInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pMemoryBarriers = RepackStructArray(from.data.memoryBarrierCount.data, from.data.pMemoryBarriers).data();
|
||||
into.data.pImageMemoryBarriers = RepackStructArray(from.data.imageMemoryBarrierCount.data, from.data.pImageMemoryBarriers).data();
|
||||
into.data.pBufferMemoryBarriers = RepackStructArray(from.data.bufferMemoryBarrierCount.data, from.data.pBufferMemoryBarriers).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkDependencyInfo>& into, const host_layout<VkDependencyInfo>& from) {
|
||||
delete[] from.data.pMemoryBarriers;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete[] from.data.pBufferMemoryBarriers;
|
||||
// TODO: Run custom exit-repacking
|
||||
delete[] from.data.pImageMemoryBarriers;
|
||||
// TODO: Run custom exit-repacking
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkDescriptorUpdateTemplateCreateInfo>& into,
|
||||
const guest_layout<VkDescriptorUpdateTemplateCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pDescriptorUpdateEntries = RepackStructArray(from.data.descriptorUpdateEntryCount.data, from.data.pDescriptorUpdateEntries).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkDescriptorUpdateTemplateCreateInfo>& into, const host_layout<VkDescriptorUpdateTemplateCreateInfo>& from) {
|
||||
delete[] from.data.pDescriptorUpdateEntries;
|
||||
// TODO: Run custom exit-repacking
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkPipelineShaderStageCreateInfo>& into, const guest_layout<VkPipelineShaderStageCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
if (from.data.pSpecializationInfo.get_pointer()) {
|
||||
fprintf(stderr, "ERROR: Cannot repack non-null VkPipelineShaderStageCreateInfo::pSpecializationInfo yet");
|
||||
std::abort();
|
||||
}
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkPipelineShaderStageCreateInfo>& into, const host_layout<VkPipelineShaderStageCreateInfo>& from) {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkGraphicsPipelineCreateInfo>& into, const guest_layout<VkGraphicsPipelineCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pStages = RepackStructArray(from.data.stageCount.data, from.data.pStages).data();
|
||||
|
||||
if (!from.data.pVertexInputState.get_pointer()) {
|
||||
into.data.pVertexInputState = nullptr;
|
||||
} else {
|
||||
into.data.pVertexInputState = &(new host_layout<VkPipelineVertexInputStateCreateInfo> {*from.data.pVertexInputState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pInputAssemblyState.get_pointer()) {
|
||||
into.data.pInputAssemblyState = nullptr;
|
||||
} else {
|
||||
into.data.pInputAssemblyState =
|
||||
&(new host_layout<VkPipelineInputAssemblyStateCreateInfo> {*from.data.pInputAssemblyState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pTessellationState.get_pointer()) {
|
||||
into.data.pTessellationState = nullptr;
|
||||
} else {
|
||||
into.data.pTessellationState = &(new host_layout<VkPipelineTessellationStateCreateInfo> {*from.data.pTessellationState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pViewportState.get_pointer()) {
|
||||
into.data.pViewportState = nullptr;
|
||||
} else {
|
||||
into.data.pViewportState = &(new host_layout<VkPipelineViewportStateCreateInfo> {*from.data.pViewportState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pRasterizationState.get_pointer()) {
|
||||
into.data.pRasterizationState = nullptr;
|
||||
} else {
|
||||
into.data.pRasterizationState =
|
||||
&(new host_layout<VkPipelineRasterizationStateCreateInfo> {*from.data.pRasterizationState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pMultisampleState.get_pointer()) {
|
||||
into.data.pMultisampleState = nullptr;
|
||||
} else {
|
||||
into.data.pMultisampleState = &(new host_layout<VkPipelineMultisampleStateCreateInfo> {*from.data.pMultisampleState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pDepthStencilState.get_pointer()) {
|
||||
into.data.pDepthStencilState = nullptr;
|
||||
} else {
|
||||
into.data.pDepthStencilState = &(new host_layout<VkPipelineDepthStencilStateCreateInfo> {*from.data.pDepthStencilState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pColorBlendState.get_pointer()) {
|
||||
into.data.pColorBlendState = nullptr;
|
||||
} else {
|
||||
into.data.pColorBlendState = &(new host_layout<VkPipelineColorBlendStateCreateInfo> {*from.data.pColorBlendState.get_pointer()})->data;
|
||||
}
|
||||
|
||||
if (!from.data.pDynamicState.get_pointer()) {
|
||||
into.data.pDynamicState = nullptr;
|
||||
} else {
|
||||
into.data.pDynamicState = &(new host_layout<VkPipelineDynamicStateCreateInfo> {*from.data.pDynamicState.get_pointer()})->data;
|
||||
}
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkGraphicsPipelineCreateInfo>& into, const host_layout<VkGraphicsPipelineCreateInfo>& from) {
|
||||
delete[] from.data.pStages;
|
||||
delete from.data.pVertexInputState;
|
||||
delete from.data.pInputAssemblyState;
|
||||
delete from.data.pTessellationState;
|
||||
delete from.data.pViewportState;
|
||||
delete from.data.pRasterizationState;
|
||||
delete from.data.pMultisampleState;
|
||||
delete from.data.pDepthStencilState;
|
||||
delete from.data.pColorBlendState;
|
||||
delete from.data.pDynamicState;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkSubmitInfo>& into, const guest_layout<VkSubmitInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
into.data.pCommandBuffers = RepackStructArray<false>(from.data.commandBufferCount.data, from.data.pCommandBuffers).data();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkSubmitInfo>& into, const host_layout<VkSubmitInfo>& from) {
|
||||
delete[] from.data.pCommandBuffers;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkCommandBufferBeginInfo>& into, const guest_layout<VkCommandBufferBeginInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
|
||||
if (!from.data.pInheritanceInfo.get_pointer() || !from.data.pInheritanceInfo.data) {
|
||||
into.data.pInheritanceInfo = nullptr;
|
||||
return;
|
||||
}
|
||||
into.data.pInheritanceInfo = new VkCommandBufferInheritanceInfo;
|
||||
auto src = host_layout<VkCommandBufferInheritanceInfo> {*from.data.pInheritanceInfo.get_pointer()}.data;
|
||||
static_assert(sizeof(src) == sizeof(*into.data.pInheritanceInfo));
|
||||
memcpy((void*)into.data.pInheritanceInfo, &src, sizeof(src));
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkCommandBufferBeginInfo>& into, const host_layout<VkCommandBufferBeginInfo>& from) {
|
||||
delete from.data.pInheritanceInfo;
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkPipelineCacheCreateInfo>& into, const guest_layout<VkPipelineCacheCreateInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
|
||||
// Same underlying layout, so there's nothing to do
|
||||
into.data.pInitialData = from.data.pInitialData.get_pointer();
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkPipelineCacheCreateInfo>& into, const host_layout<VkPipelineCacheCreateInfo>& from) {
|
||||
// Nothing to do
|
||||
return false;
|
||||
}
|
||||
|
||||
void fex_custom_repack_entry(host_layout<VkRenderPassBeginInfo>& into, const guest_layout<VkRenderPassBeginInfo>& from) {
|
||||
default_fex_custom_repack_entry(into, from);
|
||||
|
||||
// Same underlying layout, so there's nothing to do
|
||||
into.data.pClearValues = reinterpret_cast<const VkClearValue*>(from.data.pClearValues.get_pointer());
|
||||
}
|
||||
|
||||
bool fex_custom_repack_exit(guest_layout<VkRenderPassBeginInfo>& into, const host_layout<VkRenderPassBeginInfo>& from) {
|
||||
// Nothing to do
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
EXPORTS(libvulkan)
|
||||
@@ -95,7 +95,171 @@ struct fex_gen_type<VkDebugReportCallbackCreateInfoEXT> : fexgen::emit_layout_wr
|
||||
template<>
|
||||
struct fex_gen_type<VkDebugUtilsMessengerCreateInfoEXT> : fexgen::emit_layout_wrappers {};
|
||||
|
||||
#ifndef IS_32BIT_THUNK
|
||||
#ifdef IS_32BIT_THUNK
|
||||
// Register structs with an extension point (pNext). Any other members that need customization are listed below.
|
||||
template<>
|
||||
struct fex_gen_config<&VkApplicationInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkAttachmentDescription2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkAttachmentReference2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_type<VkBaseOutStructure> : fexgen::emit_layout_wrappers {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkBufferMemoryBarrier2::pNext> : fexgen::custom_repack {};
|
||||
// template<> struct fex_gen_config<&VkCommandBufferBeginInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDependencyInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDescriptorUpdateTemplateCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDeviceCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDeviceQueueCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkImageFormatListCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkImageMemoryBarrier2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkImageMemoryRequirementsInfo2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkImageViewCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkInstanceCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkMemoryAllocateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkMemoryAllocateFlagsInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkMemoryBarrier2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkMemoryDedicatedAllocateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkMemoryDedicatedRequirements::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkMemoryRequirements2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkPipelineRenderingCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassAttachmentBeginInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassBeginInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassCreateInfo2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSemaphoreCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSemaphoreTypeCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSemaphoreWaitInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubmitInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubpassBeginInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubpassDependency2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubpassDescription2::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSwapchainCreateInfoKHR::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkTimelineSemaphoreSubmitInfo::pNext> : fexgen::custom_repack {};
|
||||
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkDeviceCreateInfo::pQueueCreateInfos> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDeviceCreateInfo::ppEnabledLayerNames> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDeviceCreateInfo::ppEnabledExtensionNames> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkDescriptorSetLayoutCreateInfo::pNext> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDescriptorSetLayoutCreateInfo::pBindings> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkInstanceCreateInfo::pApplicationInfo> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkInstanceCreateInfo::ppEnabledLayerNames> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkInstanceCreateInfo::ppEnabledExtensionNames> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassCreateInfo::pSubpasses> : fexgen::custom_repack {};
|
||||
// NOTE: pDependencies and pAttachments point to ABI-compatible data
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassCreateInfo2::pAttachments> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassCreateInfo2::pSubpasses> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassCreateInfo2::pDependencies> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkPipelineShaderStageCreateInfo::pSpecializationInfo> : fexgen::custom_repack {};
|
||||
// template<> struct fex_gen_config<&VkSpecializationInfo::pMapEntries> : fexgen::custom_repack {};
|
||||
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pStages> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pVertexInputState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pInputAssemblyState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pTessellationState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pViewportState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pRasterizationState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pMultisampleState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pDepthStencilState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pColorBlendState> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkGraphicsPipelineCreateInfo::pDynamicState> : fexgen::custom_repack {};
|
||||
|
||||
// Command buffers are dispatchable handles, so on 32-bit they need to be repacked
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubmitInfo::pCommandBuffers> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderingInfo::pColorAttachments> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderingInfo::pDepthAttachment> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderingInfo::pStencilAttachment> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubpassDescription2::pInputAttachments> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubpassDescription2::pColorAttachments> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubpassDescription2::pResolveAttachments> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkSubpassDescription2::pDepthStencilAttachment> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkDependencyInfo::pMemoryBarriers> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDependencyInfo::pBufferMemoryBarriers> : fexgen::custom_repack {};
|
||||
template<>
|
||||
struct fex_gen_config<&VkDependencyInfo::pImageMemoryBarriers> : fexgen::custom_repack {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<&VkDescriptorUpdateTemplateCreateInfo::pDescriptorUpdateEntries> : fexgen::custom_repack {};
|
||||
|
||||
// These types have incompatible data layout but we use their layout wrappers elsewhere
|
||||
template<>
|
||||
struct fex_gen_type<VkWriteDescriptorSet> : fexgen::emit_layout_wrappers {};
|
||||
#else
|
||||
// The pNext member of this is a pointer to another VkBaseOutStructure, so data layout compatibility can't be inferred automatically
|
||||
template<>
|
||||
struct fex_gen_type<VkBaseOutStructure> : fexgen::assume_compatible_data_layout {};
|
||||
@@ -127,14 +291,36 @@ struct fex_gen_param {};
|
||||
template<auto>
|
||||
struct fex_gen_config : fexgen::generate_guest_symtable, fexgen::indirect_guest_calls {};
|
||||
|
||||
#ifdef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<&VkCommandBufferBeginInfo::pInheritanceInfo> : fexgen::custom_repack {};
|
||||
|
||||
// TODO: Should have per-member compatibility annotation
|
||||
template<>
|
||||
struct fex_gen_config<&VkPipelineCacheCreateInfo::pInitialData> : fexgen::custom_repack {};
|
||||
|
||||
// TODO: Should have per-member compatibility annotation
|
||||
template<>
|
||||
struct fex_gen_config<&VkRenderPassBeginInfo::pClearValues> : fexgen::custom_repack {};
|
||||
#endif
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateInstance> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkCreateInstance, 2, VkInstance*> : fexgen::ptr_passthrough {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroyInstance> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkEnumeratePhysicalDevices> {};
|
||||
#else
|
||||
template<>
|
||||
struct fex_gen_config<vkEnumeratePhysicalDevices> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkEnumeratePhysicalDevices, 2, VkPhysicalDevice*> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
|
||||
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceFeatures> {};
|
||||
template<>
|
||||
@@ -162,10 +348,25 @@ template<>
|
||||
struct fex_gen_config<vkEnumerateInstanceLayerProperties> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkEnumerateDeviceLayerProperties> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetDeviceQueue> {};
|
||||
#else
|
||||
template<>
|
||||
struct fex_gen_config<vkGetDeviceQueue> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkGetDeviceQueue, 3, VkQueue*> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkQueueSubmit> {};
|
||||
#else
|
||||
// Needs array repacking for multiple submit infos
|
||||
template<>
|
||||
struct fex_gen_config<vkQueueSubmit> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkQueueSubmit, 2, const VkSubmitInfo*> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkQueueWaitIdle> {};
|
||||
template<>
|
||||
@@ -174,16 +375,25 @@ template<>
|
||||
struct fex_gen_config<vkAllocateMemory> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_config<vkFreeMemory> : fexgen::custom_host_impl {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkMapMemory> {};
|
||||
#else
|
||||
template<>
|
||||
struct fex_gen_config<vkMapMemory> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkMapMemory, 5, void**> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkUnmapMemory> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkFlushMappedMemoryRanges> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkInvalidateMappedMemoryRanges> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetDeviceMemoryCommitment> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkBindBufferMemory> {};
|
||||
template<>
|
||||
@@ -192,26 +402,31 @@ template<>
|
||||
struct fex_gen_config<vkGetBufferMemoryRequirements> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetImageMemoryRequirements> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetImageSparseMemoryRequirements> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceSparseImageFormatProperties> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkQueueBindSparse> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateFence> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroyFence> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkResetFences> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetFenceStatus> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkWaitForFences> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateSemaphore> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroySemaphore> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateEvent> {};
|
||||
template<>
|
||||
@@ -230,6 +445,7 @@ template<>
|
||||
struct fex_gen_config<vkGetQueryPoolResults> {};
|
||||
template<>
|
||||
struct fex_gen_param<vkGetQueryPoolResults, 5, void*> : fexgen::assume_compatible_data_layout {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateBuffer> {};
|
||||
template<>
|
||||
@@ -256,14 +472,28 @@ template<>
|
||||
struct fex_gen_config<vkCreatePipelineCache> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroyPipelineCache> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPipelineCacheData> {};
|
||||
#else
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPipelineCacheData> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkGetPipelineCacheData, 2, size_t*> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_param<vkGetPipelineCacheData, 3, void*> : fexgen::assume_compatible_data_layout {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkMergePipelineCaches> {};
|
||||
#endif
|
||||
// TODO: Should be custom_host_impl since there may be more than one VkGraphicsPipelineCreateInfo and more than one output pipeline
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateGraphicsPipelines> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateComputePipelines> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroyPipeline> {};
|
||||
template<>
|
||||
@@ -288,8 +518,17 @@ template<>
|
||||
struct fex_gen_config<vkAllocateDescriptorSets> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkFreeDescriptorSets> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkUpdateDescriptorSets> {};
|
||||
#else
|
||||
template<>
|
||||
struct fex_gen_config<vkUpdateDescriptorSets> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkUpdateDescriptorSets, 2, const VkWriteDescriptorSet*> : fexgen::ptr_passthrough {};
|
||||
template<>
|
||||
struct fex_gen_param<vkUpdateDescriptorSets, 4, const VkCopyDescriptorSet*> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateFramebuffer> {};
|
||||
template<>
|
||||
@@ -306,10 +545,25 @@ template<>
|
||||
struct fex_gen_config<vkDestroyCommandPool> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkResetCommandPool> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkAllocateCommandBuffers> {};
|
||||
#else
|
||||
template<>
|
||||
struct fex_gen_config<vkAllocateCommandBuffers> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkAllocateCommandBuffers, 2, VkCommandBuffer*> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkFreeCommandBuffers> {};
|
||||
#else
|
||||
template<>
|
||||
struct fex_gen_config<vkFreeCommandBuffers> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkFreeCommandBuffers, 3, const VkCommandBuffer*> : fexgen::ptr_passthrough {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkBeginCommandBuffer> {};
|
||||
template<>
|
||||
@@ -344,6 +598,7 @@ template<>
|
||||
struct fex_gen_config<vkCmdBindVertexBuffers> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdDraw> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdDrawIndexed> {};
|
||||
template<>
|
||||
@@ -360,20 +615,26 @@ template<>
|
||||
struct fex_gen_config<vkCmdCopyImage> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBlitImage> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdCopyBufferToImage> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdCopyImageToBuffer> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdUpdateBuffer> {};
|
||||
template<>
|
||||
struct fex_gen_param<vkCmdUpdateBuffer, 4, const void*> : fexgen::assume_compatible_data_layout {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdFillBuffer> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdClearColorImage> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdClearDepthStencilImage> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdClearAttachments> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdResolveImage> {};
|
||||
template<>
|
||||
@@ -382,8 +643,10 @@ template<>
|
||||
struct fex_gen_config<vkCmdResetEvent> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdWaitEvents> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdPipelineBarrier> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBeginQuery> {};
|
||||
template<>
|
||||
@@ -397,15 +660,23 @@ struct fex_gen_config<vkCmdCopyQueryPoolResults> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdPushConstants> {};
|
||||
template<>
|
||||
struct fex_gen_param<vkCmdPushConstants, 5, const void*> : fexgen::assume_compatible_data_layout {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBeginRenderPass> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdNextSubpass> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdEndRenderPass> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdExecuteCommands> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkEnumerateInstanceVersion> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkBindBufferMemory2> {};
|
||||
template<>
|
||||
@@ -418,12 +689,15 @@ template<>
|
||||
struct fex_gen_config<vkCmdDispatchBase> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkEnumeratePhysicalDeviceGroups> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkGetImageMemoryRequirements2> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetBufferMemoryRequirements2> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetImageSparseMemoryRequirements2> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceFeatures2> {};
|
||||
template<>
|
||||
@@ -432,6 +706,7 @@ template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceFormatProperties2> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceImageFormatProperties2> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceQueueFamilyProperties2> {};
|
||||
template<>
|
||||
@@ -446,6 +721,7 @@ template<>
|
||||
struct fex_gen_config<vkCreateSamplerYcbcrConversion> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroySamplerYcbcrConversion> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateDescriptorUpdateTemplate> {};
|
||||
template<>
|
||||
@@ -454,20 +730,25 @@ template<>
|
||||
struct fex_gen_config<vkUpdateDescriptorSetWithTemplate> {};
|
||||
template<>
|
||||
struct fex_gen_param<vkUpdateDescriptorSetWithTemplate, 3, const void*> : fexgen::assume_compatible_data_layout {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceExternalBufferProperties> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceExternalFenceProperties> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceExternalSemaphoreProperties> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkGetDescriptorSetLayoutSupport> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdDrawIndirectCount> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdDrawIndexedIndirectCount> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateRenderPass2> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBeginRenderPass2> {};
|
||||
template<>
|
||||
@@ -478,8 +759,10 @@ template<>
|
||||
struct fex_gen_config<vkResetQueryPool> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetSemaphoreCounterValue> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkWaitSemaphores> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkSignalSemaphore> {};
|
||||
template<>
|
||||
@@ -504,8 +787,10 @@ template<>
|
||||
struct fex_gen_config<vkCmdResetEvent2> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdWaitEvents2> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdPipelineBarrier2> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdWriteTimestamp2> {};
|
||||
template<>
|
||||
@@ -522,10 +807,12 @@ template<>
|
||||
struct fex_gen_config<vkCmdBlitImage2> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdResolveImage2> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBeginRendering> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdEndRendering> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdSetCullMode> {};
|
||||
template<>
|
||||
@@ -562,6 +849,7 @@ template<>
|
||||
struct fex_gen_config<vkGetDeviceImageMemoryRequirements> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetDeviceImageSparseMemoryRequirements> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdSetLineStipple> {};
|
||||
template<>
|
||||
@@ -609,7 +897,7 @@ struct fex_gen_config<vkGetPhysicalDeviceSurfaceSupportKHR> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceSurfaceCapabilitiesKHR> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceSurfaceFormatsKHR> {};
|
||||
struct fex_gen_config<vkGetPhysicalDeviceSurfaceFormatsKHR> {}; // TODO: Need to figure out how *not* to repack the last parameter on input...
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceSurfacePresentModesKHR> {};
|
||||
template<>
|
||||
@@ -622,6 +910,7 @@ template<>
|
||||
struct fex_gen_config<vkAcquireNextImageKHR> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkQueuePresentKHR> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetDeviceGroupPresentCapabilitiesKHR> {};
|
||||
template<>
|
||||
@@ -714,20 +1003,24 @@ template<>
|
||||
struct fex_gen_config<vkGetSemaphoreFdKHR> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdPushDescriptorSetKHR> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdPushDescriptorSetWithTemplateKHR> {};
|
||||
template<>
|
||||
struct fex_gen_param<vkCmdPushDescriptorSetWithTemplateKHR, 4, const void*> : fexgen::assume_compatible_data_layout {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateDescriptorUpdateTemplateKHR> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroyDescriptorUpdateTemplateKHR> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkUpdateDescriptorSetWithTemplateKHR> {};
|
||||
template<>
|
||||
struct fex_gen_param<vkUpdateDescriptorSetWithTemplateKHR, 3, const void*> : fexgen::assume_compatible_data_layout {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateRenderPass2KHR> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBeginRenderPass2KHR> {};
|
||||
template<>
|
||||
@@ -900,12 +1193,14 @@ template<>
|
||||
struct fex_gen_config<vkCmdSetDescriptorBufferOffsets2EXT> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBindDescriptorBufferEmbeddedSamplers2EXT> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateDebugReportCallbackEXT> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkCreateDebugReportCallbackEXT, 1, const VkDebugReportCallbackCreateInfoEXT*> : fexgen::ptr_passthrough {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroyDebugReportCallbackEXT> : fexgen::custom_host_impl {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkDebugReportMessageEXT> {};
|
||||
template<>
|
||||
@@ -1002,12 +1297,14 @@ template<>
|
||||
struct fex_gen_config<vkCmdEndDebugUtilsLabelEXT> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdInsertDebugUtilsLabelEXT> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateDebugUtilsMessengerEXT> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkCreateDebugUtilsMessengerEXT, 1, const VkDebugUtilsMessengerCreateInfoEXT*> : fexgen::ptr_passthrough {};
|
||||
template<>
|
||||
struct fex_gen_config<vkDestroyDebugUtilsMessengerEXT> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkSubmitDebugUtilsMessageEXT> {};
|
||||
template<>
|
||||
@@ -1070,10 +1367,12 @@ template<>
|
||||
struct fex_gen_param<vkGetMemoryHostPointerPropertiesEXT, 2, const void*> : fexgen::assume_compatible_data_layout {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdWriteBufferMarkerAMD> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdWriteBufferMarker2AMD> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceCalibrateableTimeDomainsEXT> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetCalibratedTimestampsEXT> {};
|
||||
template<>
|
||||
@@ -1236,8 +1535,11 @@ template<>
|
||||
struct fex_gen_config<vkCmdSubpassShadingHUAWEI> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdBindInvocationMaskHUAWEI> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
// VkRemoteAddressNV* expands to void**, so it needs custom repacking on on 32-bit
|
||||
template<>
|
||||
struct fex_gen_config<vkGetMemoryRemoteAddressNV> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPipelinePropertiesEXT> {};
|
||||
template<>
|
||||
@@ -1250,8 +1552,10 @@ template<>
|
||||
struct fex_gen_config<vkCmdSetLogicOpEXT> {};
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdSetPrimitiveRestartEnableEXT> {};
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdSetColorWriteEnableEXT> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkCmdDrawMultiEXT> {};
|
||||
template<>
|
||||
@@ -1514,8 +1818,10 @@ template<>
|
||||
struct fex_gen_param<vkGetRandROutputDisplayEXT, 1, Display*> : fexgen::ptr_passthrough {};
|
||||
|
||||
// vulkan_wayland.h
|
||||
#endif
|
||||
template<>
|
||||
struct fex_gen_config<vkCreateWaylandSurfaceKHR> {};
|
||||
#ifndef IS_32BIT_THUNK
|
||||
template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceWaylandPresentationSupportKHR> {};
|
||||
|
||||
@@ -1534,5 +1840,5 @@ template<>
|
||||
struct fex_gen_config<vkGetPhysicalDeviceXlibPresentationSupportKHR> : fexgen::custom_host_impl {};
|
||||
template<>
|
||||
struct fex_gen_param<vkGetPhysicalDeviceXlibPresentationSupportKHR, 2, Display*> : fexgen::ptr_passthrough {};
|
||||
|
||||
#endif
|
||||
} // namespace internal
|
||||
Reference in new issue
Block a user