Commit e6e7976d authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

winevulkan: Introduce WINE_VK_HOST to explicitly request 'host' Vulkan headers.

parent a77b93c4
......@@ -23,7 +23,7 @@
#define VK_NO_PROTOTYPES
#define VKD3D_NO_VULKAN_H
#define VKD3D_NO_WIN32_TYPES
#define WINE_VK_ALIGN(x)
#define WINE_VK_HOST
#include "wine/debug.h"
#include "wine/heap.h"
......
......@@ -24,11 +24,10 @@
#ifdef SONAME_LIBVKD3D
#define VK_NO_PROTOTYPES
#define VKAPI_CALL
#define VKD3D_NO_PROTOTYPES
#define VKD3D_NO_VULKAN_H
#define VKD3D_NO_WIN32_TYPES
#define WINE_VK_ALIGN(x)
#define WINE_VK_HOST
#include "wine/library.h"
#include "wine/vulkan.h"
#include "wine/vulkan_driver.h"
......
......@@ -2009,6 +2009,12 @@ class VkGenerator(object):
f.write("#include <windef.h>\n")
f.write("#include <stdint.h>\n\n")
f.write("/* Define WINE_VK_HOST to get 'host' headers. */\n")
f.write("#ifdef WINE_VK_HOST\n")
f.write("#define VKAPI_CALL\n")
f.write('#define WINE_VK_ALIGN(x)\n')
f.write("#endif\n\n")
f.write("#ifndef VKAPI_CALL\n")
f.write("#define VKAPI_CALL __stdcall\n")
f.write("#endif\n\n")
......@@ -2017,7 +2023,6 @@ class VkGenerator(object):
f.write("#define VKAPI_PTR VKAPI_CALL\n")
f.write("#endif\n\n")
f.write("/* Callers can override WINE_VK_ALIGN if they want 'host' headers. */\n")
f.write("#ifndef WINE_VK_ALIGN\n")
f.write("#define WINE_VK_ALIGN DECLSPEC_ALIGN\n")
f.write("#endif\n\n")
......
......@@ -31,9 +31,8 @@
#include "wine/library.h"
#include "x11drv.h"
/* We only want host compatible structures and don't need alignment. */
#define WINE_VK_ALIGN(x)
#define VK_NO_PROTOTYPES
#define WINE_VK_HOST
#include "wine/vulkan.h"
#include "wine/vulkan_driver.h"
......
......@@ -6,6 +6,12 @@
#include <windef.h>
#include <stdint.h>
/* Define WINE_VK_HOST to get 'host' headers. */
#ifdef WINE_VK_HOST
#define VKAPI_CALL
#define WINE_VK_ALIGN(x)
#endif
#ifndef VKAPI_CALL
#define VKAPI_CALL __stdcall
#endif
......@@ -14,7 +20,6 @@
#define VKAPI_PTR VKAPI_CALL
#endif
/* Callers can override WINE_VK_ALIGN if they want 'host' headers. */
#ifndef WINE_VK_ALIGN
#define WINE_VK_ALIGN DECLSPEC_ALIGN
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment