|
41 | 41 | #define __REQUIRED_RPCNDR_H_VERSION__ 475 |
42 | 42 | #endif |
43 | 43 |
|
44 | | -#if defined(__GNUC__) && !defined(__clang__) |
45 | | -#pragma GCC diagnostic push |
46 | | -#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" |
47 | | -#pragma GCC diagnostic ignored "-Wshadow" |
48 | | -#pragma GCC diagnostic ignored "-Wswitch" |
49 | | -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" |
50 | | -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" |
51 | | -#elif defined(__clang__) |
52 | | -#pragma clang diagnostic push |
53 | | -#pragma clang diagnostic ignored "-Wnon-virtual-dtor" |
54 | | -#pragma clang diagnostic ignored "-Wstring-plus-int" |
55 | | -#pragma clang diagnostic ignored "-Wswitch" |
56 | | -#pragma clang diagnostic ignored "-Wmissing-field-initializers" |
57 | | -#pragma clang diagnostic ignored "-Wimplicit-fallthrough" |
58 | | -#endif |
59 | | - |
60 | | -#include "d3dx12.h" |
| 44 | +#include <d3dx12.h> |
61 | 45 | #include <dxgi1_6.h> |
62 | 46 | #define D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED |
63 | | -#include "D3D12MemAlloc.h" |
| 47 | +#include <D3D12MemAlloc.h> |
64 | 48 |
|
65 | 49 | #include <wrl/client.h> |
66 | 50 |
|
|
69 | 53 | #undef MemoryBarrier |
70 | 54 | #endif |
71 | 55 |
|
72 | | -// No point in fighting warnings in Mesa. |
73 | | -#if defined(_MSC_VER) |
74 | | -#pragma warning(push) |
75 | | -#pragma warning(disable : 4200) // "nonstandard extension used: zero-sized array in struct/union". |
76 | | -#pragma warning(disable : 4806) // "'&': unsafe operation: no value of type 'bool' promoted to type 'uint32_t' can equal the given constant". |
77 | | -#endif |
78 | | - |
79 | | -#include "nir_spirv.h" |
80 | | -#include "nir_to_dxil.h" |
81 | | -#include "spirv_to_dxil.h" |
| 56 | +GODOT_GCC_WARNING_PUSH |
| 57 | +GODOT_GCC_WARNING_IGNORE("-Wimplicit-fallthrough") |
| 58 | +GODOT_GCC_WARNING_IGNORE("-Wlogical-not-parentheses") |
| 59 | +GODOT_GCC_WARNING_IGNORE("-Wmissing-field-initializers") |
| 60 | +GODOT_GCC_WARNING_IGNORE("-Wnon-virtual-dtor") |
| 61 | +GODOT_GCC_WARNING_IGNORE("-Wshadow") |
| 62 | +GODOT_GCC_WARNING_IGNORE("-Wswitch") |
| 63 | +GODOT_CLANG_WARNING_PUSH |
| 64 | +GODOT_CLANG_WARNING_IGNORE("-Wimplicit-fallthrough") |
| 65 | +GODOT_CLANG_WARNING_IGNORE("-Wlogical-not-parentheses") |
| 66 | +GODOT_CLANG_WARNING_IGNORE("-Wmissing-field-initializers") |
| 67 | +GODOT_CLANG_WARNING_IGNORE("-Wnon-virtual-dtor") |
| 68 | +GODOT_CLANG_WARNING_IGNORE("-Wstring-plus-int") |
| 69 | +GODOT_CLANG_WARNING_IGNORE("-Wswitch") |
| 70 | +GODOT_MSVC_WARNING_PUSH |
| 71 | +GODOT_MSVC_WARNING_IGNORE(4200) // "nonstandard extension used: zero-sized array in struct/union". |
| 72 | +GODOT_MSVC_WARNING_IGNORE(4806) // "'&': unsafe operation: no value of type 'bool' promoted to type 'uint32_t' can equal the given constant". |
| 73 | + |
| 74 | +#include <nir_spirv.h> |
| 75 | +#include <nir_to_dxil.h> |
| 76 | +#include <spirv_to_dxil.h> |
82 | 77 | extern "C" { |
83 | | -#include "dxil_spirv_nir.h" |
| 78 | +#include <dxil_spirv_nir.h> |
84 | 79 | } |
85 | 80 |
|
86 | | -#if defined(__GNUC__) && !defined(__clang__) |
87 | | -#pragma GCC diagnostic pop |
88 | | -#elif defined(__clang__) |
89 | | -#pragma clang diagnostic pop |
90 | | -#endif |
91 | | - |
92 | | -#if defined(_MSC_VER) |
93 | | -#pragma warning(pop) |
94 | | -#endif |
| 81 | +GODOT_GCC_WARNING_POP |
| 82 | +GODOT_CLANG_WARNING_POP |
| 83 | +GODOT_MSVC_WARNING_POP |
95 | 84 |
|
96 | 85 | static D3D12_SHADER_VISIBILITY stages_to_d3d12_visibility(uint32_t p_stages_mask) { |
97 | 86 | switch (p_stages_mask) { |
|
0 commit comments