mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d: Merge vkd3d_vulkan.h into vkd3d_private.h.
This commit is contained in:
parent
8d668205a4
commit
fcc9f9b294
@ -41,7 +41,6 @@ libvkd3d_la_SOURCES = \
|
|||||||
libs/vkd3d/utils.c \
|
libs/vkd3d/utils.c \
|
||||||
libs/vkd3d/vkd3d_main.c \
|
libs/vkd3d/vkd3d_main.c \
|
||||||
libs/vkd3d/vkd3d_private.h \
|
libs/vkd3d/vkd3d_private.h \
|
||||||
libs/vkd3d/vkd3d_vulkan.h \
|
|
||||||
libs/vkd3d/vulkan_procs.h
|
libs/vkd3d/vulkan_procs.h
|
||||||
libvkd3d_la_LIBADD = libvkd3d-common.la @PTHREAD_LIBS@
|
libvkd3d_la_LIBADD = libvkd3d-common.la @PTHREAD_LIBS@
|
||||||
|
|
||||||
|
@ -23,17 +23,21 @@
|
|||||||
#ifndef __VKD3D_PRIVATE_H
|
#ifndef __VKD3D_PRIVATE_H
|
||||||
#define __VKD3D_PRIVATE_H
|
#define __VKD3D_PRIVATE_H
|
||||||
|
|
||||||
|
#define VK_NO_PROTOTYPES
|
||||||
|
#include <vulkan/vulkan.h>
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#define NONAMELESSUNION
|
#define NONAMELESSUNION
|
||||||
#include "vkd3d.h"
|
#include "vkd3d.h"
|
||||||
#include "vkd3d_memory.h"
|
#include "vkd3d_memory.h"
|
||||||
#include "vkd3d_vulkan.h"
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#define VK_CALL(f) (vk_procs->f)
|
||||||
|
|
||||||
#define VKD3D_DESCRIPTOR_MAGIC_FREE 0x00000000u
|
#define VKD3D_DESCRIPTOR_MAGIC_FREE 0x00000000u
|
||||||
#define VKD3D_DESCRIPTOR_MAGIC_RTV 0x00565452u
|
#define VKD3D_DESCRIPTOR_MAGIC_RTV 0x00565452u
|
||||||
|
|
||||||
@ -42,6 +46,21 @@
|
|||||||
struct d3d12_command_list;
|
struct d3d12_command_list;
|
||||||
struct d3d12_device;
|
struct d3d12_device;
|
||||||
|
|
||||||
|
#define DECLARE_VK_PFN(name) PFN_##name name;
|
||||||
|
struct vkd3d_vk_instance_procs
|
||||||
|
{
|
||||||
|
#define VK_INSTANCE_PFN DECLARE_VK_PFN
|
||||||
|
#include "vulkan_procs.h"
|
||||||
|
};
|
||||||
|
|
||||||
|
struct vkd3d_vk_device_procs
|
||||||
|
{
|
||||||
|
#define VK_INSTANCE_PFN DECLARE_VK_PFN
|
||||||
|
#define VK_DEVICE_PFN DECLARE_VK_PFN
|
||||||
|
#include "vulkan_procs.h"
|
||||||
|
};
|
||||||
|
#undef DECLARE_VK_PFN
|
||||||
|
|
||||||
struct vkd3d_instance
|
struct vkd3d_instance
|
||||||
{
|
{
|
||||||
VkInstance vk_instance;
|
VkInstance vk_instance;
|
||||||
@ -358,4 +377,16 @@ HRESULT vkd3d_load_vk_instance_procs(struct vkd3d_vk_instance_procs *procs,
|
|||||||
HRESULT vkd3d_load_vk_device_procs(struct vkd3d_vk_device_procs *procs,
|
HRESULT vkd3d_load_vk_device_procs(struct vkd3d_vk_device_procs *procs,
|
||||||
const struct vkd3d_vk_instance_procs *parent_procs, VkDevice device) DECLSPEC_HIDDEN;
|
const struct vkd3d_vk_instance_procs *parent_procs, VkDevice device) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
/* We link directly to the loader library and use the following exported functions. */
|
||||||
|
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
|
||||||
|
const char *name);
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *create_info,
|
||||||
|
const VkAllocationCallbacks *allocator, VkInstance *instance);
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *layer_name,
|
||||||
|
uint32_t *property_count, VkExtensionProperties *properties);
|
||||||
|
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *property_count,
|
||||||
|
VkLayerProperties *properties);
|
||||||
|
VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *allocator);
|
||||||
|
VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *allocator);
|
||||||
|
|
||||||
#endif /* __VKD3D_PRIVATE_H */
|
#endif /* __VKD3D_PRIVATE_H */
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2016 Józef Kucia for CodeWeavers
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
|
||||||
* to deal in the Software without restriction, including without limitation
|
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
* and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
* Software is furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
* DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __VKD3D_VULKAN_H
|
|
||||||
#define __VKD3D_VULKAN_H
|
|
||||||
|
|
||||||
#define VK_NO_PROTOTYPES
|
|
||||||
#include "vulkan/vulkan.h"
|
|
||||||
|
|
||||||
#define DECLARE_VK_PFN(name) PFN_##name name;
|
|
||||||
|
|
||||||
/* We link directly to the loader library and use the following exported functions. */
|
|
||||||
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
|
|
||||||
const char *name);
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *create_info,
|
|
||||||
const VkAllocationCallbacks *allocator, VkInstance *instance);
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *layer_name,
|
|
||||||
uint32_t *property_count, VkExtensionProperties *properties);
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *property_count,
|
|
||||||
VkLayerProperties *properties);
|
|
||||||
VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *allocator);
|
|
||||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks *allocator);
|
|
||||||
|
|
||||||
struct vkd3d_vk_instance_procs
|
|
||||||
{
|
|
||||||
#define VK_INSTANCE_PFN DECLARE_VK_PFN
|
|
||||||
#include "vulkan_procs.h"
|
|
||||||
};
|
|
||||||
|
|
||||||
struct vkd3d_vk_device_procs
|
|
||||||
{
|
|
||||||
#define VK_INSTANCE_PFN DECLARE_VK_PFN
|
|
||||||
#define VK_DEVICE_PFN DECLARE_VK_PFN
|
|
||||||
#include "vulkan_procs.h"
|
|
||||||
};
|
|
||||||
|
|
||||||
#define VK_CALL(f) (vk_procs->f)
|
|
||||||
|
|
||||||
#endif /* __VKD3D_VULKAN_H */
|
|
Loading…
Reference in New Issue
Block a user