- rebase most patches - enable d3d11 compositor - enable swiftshader on mingw64 and ucrt64
79 lines
2.2 KiB
Diff
79 lines
2.2 KiB
Diff
diff --git a/BUILD.gn b/BUILD.gn
|
|
index 5a73707d4..847d5710b 100644
|
|
--- a/BUILD.gn
|
|
+++ b/BUILD.gn
|
|
@@ -37,8 +37,8 @@ if (is_win) {
|
|
|
|
config("vulkan_internal_config") {
|
|
defines = [ "VK_ENABLE_BETA_EXTENSIONS" ]
|
|
- if (is_clang || !is_win) {
|
|
- cflags = [
|
|
+ if (is_clang || !is_msvc) {
|
|
+ cflags_cc = [
|
|
"-Wno-conversion",
|
|
"-Wno-extra-semi",
|
|
"-Wno-sign-compare",
|
|
@@ -78,7 +78,7 @@ config("vulkan_loader_config") {
|
|
]
|
|
|
|
cflags = []
|
|
- if (is_win) {
|
|
+ if (is_msvc) {
|
|
cflags += [ "/wd4201" ]
|
|
}
|
|
if (is_linux || is_chromeos) {
|
|
@@ -222,7 +222,7 @@ if (!is_android) {
|
|
if (custom_vulkan_loader_library_name != "") {
|
|
output_name = custom_vulkan_loader_library_name
|
|
} else {
|
|
- if (is_win) {
|
|
+ if (is_msvc) {
|
|
output_name = "vulkan-1"
|
|
} else {
|
|
output_name = "vulkan"
|
|
@@ -244,7 +244,14 @@ if (!is_android) {
|
|
"$target_gen_dir/loader.rc",
|
|
"loader/vulkan-1.def",
|
|
]
|
|
- if (!is_clang) {
|
|
+ if (is_mingw) {
|
|
+ sources -= [
|
|
+ "$target_gen_dir/loader.rc",
|
|
+ "loader/vulkan-1.def",
|
|
+ ]
|
|
+ defines = [ "BUILD_STATIC_LOADER" ]
|
|
+ }
|
|
+ if (is_msvc && !is_clang) {
|
|
cflags = [
|
|
"/wd4054", # Type cast from function pointer
|
|
"/wd4055", # Type cast from data pointer
|
|
@@ -263,7 +270,7 @@ if (!is_android) {
|
|
if (is_clang) {
|
|
cflags = [ "-Wno-incompatible-pointer-types" ]
|
|
}
|
|
- libs = [ "Cfgmgr32.lib" ]
|
|
+ libs = [ "cfgmgr32" ]
|
|
deps += [ ":gen_loader_rc" ]
|
|
}
|
|
if (is_linux || is_chromeos) {
|
|
diff --git a/loader/loader_windows.c b/loader/loader_windows.c
|
|
index f73659c09..b8f701f15 100644
|
|
--- a/loader/loader_windows.c
|
|
+++ b/loader/loader_windows.c
|
|
@@ -95,6 +95,7 @@ void windows_initialization(void) {
|
|
#endif
|
|
}
|
|
|
|
+#ifndef BUILD_STATIC_LOADER
|
|
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
|
|
(void)hinst;
|
|
switch (reason) {
|
|
@@ -116,6 +117,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
|
|
}
|
|
return TRUE;
|
|
}
|
|
+#endif
|
|
|
|
bool windows_add_json_entry(const struct loader_instance *inst,
|
|
char **reg_data, // list of JSON files
|