mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-23 15:20:12 +00:00
tests: Distinguish between cross and non-cross Win32 builds.
Now the tests compile correctly on non-cross Win32 builds.
This commit is contained in:
parent
9c817e5e6d
commit
44d9e2d728
Notes:
Alexandre Julliard
2023-01-24 22:27:46 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/57
@ -414,7 +414,7 @@ dummy-vkd3d-version:
|
||||
## Cross-compile tests
|
||||
cross_implibs = crosslibs/d3d12
|
||||
CROSS_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include
|
||||
CROSS_CFLAGS = -g -O2 -Wall -municode ${CROSS_CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=0
|
||||
CROSS_CFLAGS = -g -O2 -Wall -municode ${CROSS_CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=0 -DVKD3D_CROSSTEST=1
|
||||
EXTRA_DIST += $(cross_implibs:=.cross32.def) $(cross_implibs:=.cross64.def)
|
||||
EXTRA_DIST += tests/shader_runner_d3d11.c tests/shader_runner_d3d9.c
|
||||
|
||||
|
@ -56,7 +56,7 @@ typedef int HRESULT;
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef VKD3D_CROSSTEST
|
||||
# include "vkd3d_dxgi1_4.h"
|
||||
#else
|
||||
# define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_2
|
||||
@ -261,7 +261,7 @@ static void wait_queue_idle_(unsigned int line, ID3D12Device *device, ID3D12Comm
|
||||
static bool use_warp_device;
|
||||
static unsigned int use_adapter_idx;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef VKD3D_CROSSTEST
|
||||
static IUnknown *create_warp_adapter(IDXGIFactory4 *factory)
|
||||
{
|
||||
IUnknown *adapter;
|
||||
|
@ -1060,7 +1060,7 @@ out:
|
||||
|
||||
START_TEST(shader_runner)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef VKD3D_CROSSTEST
|
||||
run_shader_tests_d3d9(argc, argv);
|
||||
run_shader_tests_d3d11(argc, argv);
|
||||
#else
|
||||
|
@ -16,6 +16,23 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/* Hack for MinGW-w64 headers.
|
||||
*
|
||||
* We want to use WIDL C inline wrappers because some methods
|
||||
* in D3D12 interfaces return aggregate objects. Unfortunately,
|
||||
* WIDL C inline wrappers are broken when used with MinGW-w64
|
||||
* headers because FORCEINLINE expands to extern inline
|
||||
* which leads to the "multiple storage classes in declaration
|
||||
* specifiers" compiler error.
|
||||
*/
|
||||
#ifdef __MINGW32__
|
||||
# include <_mingw.h>
|
||||
# ifdef __MINGW64_VERSION_MAJOR
|
||||
# undef __forceinline
|
||||
# define __forceinline __inline__ __attribute__((__always_inline__,__gnu_inline__))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define VK_NO_PROTOTYPES
|
||||
#define COBJMACROS
|
||||
#define INITGUID
|
||||
|
Loading…
Reference in New Issue
Block a user