move more code to vksym.h

This commit is contained in:
twinaphex 2016-03-01 01:53:48 +01:00
parent a6048b4218
commit 937230564d
4 changed files with 29 additions and 50 deletions

View File

@ -23,7 +23,9 @@
#include "../../config.h"
#endif
#include <vulkan/vulkan.h>
#ifndef VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL
#define VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL 1024
#endif
#define VKFUNC(sym) (vkcfp->sym)
@ -51,6 +53,27 @@
#include <vulkan/vulkan.h>
typedef struct VkDmaBufImageCreateInfo_
{
VkStructureType sType; /* Must be VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL */
const void* pNext; /* Pointer to next structure. */
int fd;
VkFormat format;
VkExtent3D extent; /* Depth must be 1 */
uint32_t strideInBytes;
} VkDmaBufImageCreateInfo;
typedef VkResult (VKAPI_PTR *PFN_vkCreateDmaBufImageINTEL)(VkDevice device,
const VkDmaBufImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMem, VkImage* pImage);
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDmaBufImageINTEL(
VkDevice _device,
const VkDmaBufImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDeviceMemory* pMem,
VkImage* pImage);
typedef struct vulkan_context_fp
{
/* Instance */

View File

@ -28,54 +28,7 @@
#define VULKAN_DIRTY_DYNAMIC_BIT 0x0001
#define VK_PROTOTYPES
#ifdef HAVE_WAYLAND
#define VK_USE_PLATFORM_WAYLAND_KHR
#endif
#ifdef HAVE_MIR
#define VK_USE_PLATFORM_MIR_KHR
#endif
#ifdef _WIN32
#define VK_USE_PLATFORM_WIN32_KHR
#endif
#ifdef HAVE_XCB
#define VK_USE_PLATFORM_XCB_KHR
#endif
#ifdef HAVE_XLIB
#define VK_USE_PLATFORM_XLIB_KHR
#endif
#include <vulkan/vulkan.h>
#ifndef VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL
#define VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL 1024
#endif
typedef struct VkDmaBufImageCreateInfo_
{
VkStructureType sType; /* Must be VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL */
const void* pNext; /* Pointer to next structure. */
int fd;
VkFormat format;
VkExtent3D extent; /* Depth must be 1 */
uint32_t strideInBytes;
} VkDmaBufImageCreateInfo;
typedef VkResult (VKAPI_PTR *PFN_vkCreateDmaBufImageINTEL)(VkDevice device,
const VkDmaBufImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMem, VkImage* pImage);
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDmaBufImageINTEL(
VkDevice _device,
const VkDmaBufImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDeviceMemory* pMem,
VkImage* pImage);
#include "vksym.h"
#include <boolean.h>
#include <retro_inline.h>
@ -127,7 +80,6 @@ enum vulkan_wsi_type
VULKAN_WSI_XLIB
};
#include "vksym.h"
typedef struct vulkan_context
{

View File

@ -593,6 +593,8 @@ static bool vulkan_init_default_filter_chain(vk_t *vk)
struct vulkan_filter_chain_create_info info;
memset(&info, 0, sizeof(info));
info.fp = (void*)&vk->context->fp;
info.device = vk->context->device;
info.memory_properties = &vk->context->memory_properties;
info.pipeline_cache = vk->pipelines.cache;
@ -624,6 +626,7 @@ static bool vulkan_init_filter_chain_preset(vk_t *vk, const char *shader_path)
memset(&info, 0, sizeof(info));
info.fp = (void*)&vk->context->fp;
info.device = vk->context->device;
info.memory_properties = &vk->context->memory_properties;
info.pipeline_cache = vk->pipelines.cache;

View File

@ -76,6 +76,7 @@ struct vulkan_filter_chain_swapchain_info
struct vulkan_filter_chain_create_info
{
void *fp;
VkDevice device;
const VkPhysicalDeviceMemoryProperties *memory_properties;
VkPipelineCache pipeline_cache;