Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vulkan: Update all components to Vulkan SDK 1.3.261.1 #81219

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Sep 1, 2023

Updates to volk, vulkan headers, vk_enum_string_helper.h, VMA, glslang, spirv-reflect.

VMA doesn't tag SDK releases specifically, and still hasn't had a tagged release since 3.0.1, but the Vulkan SDK now seems to ship a recent master commit, so we do the same.

@bruvzg Could you make me a build of MoltenVK https://github.com/KhronosGroup/MoltenVK/releases/tag/v1.2.5 with the usual workaround for #68512 ?

@Faless I noticed that glslang provides some platform specific files for the Web platform since a few releases, which we're not building currently:

$ ll thirdparty/glslang/glslang/OSDependent/Web/
total 20
-rw-r--r-- 1 akien akien   730 Sep  1 10:50 glslang.after.js
-rw-r--r-- 1 akien akien 10973 Sep  1 10:50 glslang.js.cpp
-rw-r--r-- 1 akien akien  2168 Sep  1 10:50 glslang.pre.js

I'm not sure what we'd use glslang for on Web without Vulkan, but it seems we're compiling it currently. So we might want to check whether those files should be compiled instead of the OSDependent/Unix one for the Web platform.

Updates to volk, vulkan headers, `vk_enum_string_helper.h`, VMA,
glslang, spirv-reflect.

VMA doesn't tag SDK releases specifically, and still hasn't had a tagged
release since 3.0.1, but the Vulkan SDK now seems to ship a recent master
commit, so we do the same.
@bruvzg
Copy link
Member

bruvzg commented Sep 1, 2023

Could you make me a build of MoltenVK

Will do in a few hours.

@bruvzg
Copy link
Member

bruvzg commented Sep 1, 2023

Could you make me a build of MoltenVK

Here's a custom build (macOS, iOS, iOS Simulator) https://mega.nz/file/s54XkYiZ#Qg-2GEikmS8zzFG7IpEk90_7tiooJyjwzt5N8PL2diM

Built from commit 02a8c011a8ca077dfaa09f3b7ebf68be869dc26f, with the following changes:

Patch
diff --git a/Makefile b/Makefile
index 89523db1..2bc2f850 100644
--- a/Makefile
+++ b/Makefile
@@ -47,67 +47,67 @@ all-debug:
 
 .PHONY: macos
 macos:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (macOS only)" -destination "generic/platform=macOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (macOS only)" -destination "generic/platform=macOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: macos-debug
 macos-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (macOS only)" -destination "generic/platform=macOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (macOS only)" -destination "generic/platform=macOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: ios
 ios:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: ios-debug
 ios-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: iossim
 iossim:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS Simulator" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS Simulator" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: iossim-debug
 iossim-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS Simulator" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=iOS Simulator" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: maccat
 maccat:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=macOS,variant=Mac Catalyst" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=macOS,variant=Mac Catalyst" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: maccat-debug
 maccat-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (iOS only)" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: tvos
 tvos:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: tvos-debug
 tvos-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: tvossim
 tvossim:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS Simulator" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS Simulator" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: tvossim-debug
 tvossim-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS Simulator" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (tvOS only)" -destination "generic/platform=tvOS Simulator" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: visionos
 visionos:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: visionos-debug
 visionos-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: visionossim
 visionossim:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS Simulator" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS Simulator" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: visionossim-debug
 visionossim-debug:
-	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS Simulator" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' $(OUTPUT_FMT_CMD)
+	$(XCODEBUILD) build -project "$(XC_PROJ)" -scheme "$(XC_SCHEME) (visionOS only)" -destination "generic/platform=xrOS Simulator" -configuration "Debug" GCC_PREPROCESSOR_DEFINITIONS='$${inherited} $(MAKEARGS)' OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument" $(OUTPUT_FMT_CMD)
 
 .PHONY: clean
 clean:
diff --git a/fetchDependencies b/fetchDependencies
index f03f36c8..9e0fde22 100755
--- a/fetchDependencies
+++ b/fetchDependencies
@@ -433,6 +433,7 @@ function build_impl() {
 		-enableThreadSanitizer "${XC_USE_TSAN}"					\
 		-enableUndefinedBehaviorSanitizer "${XC_USE_UBSAN}"		\
 		-derivedDataPath "${XC_LCL_DD_PATH}"					\
+		OTHER_CFLAGS="-fno-objc-msgsend-selector-stubs -Wno-unused-command-line-argument"\
 		${XC_BUILD_VERBOSITY}									\
 		build
 

@bruvzg
Copy link
Member

bruvzg commented Sep 5, 2023

Could you make me a build of MoltenVK https://github.com/KhronosGroup/MoltenVK/releases/tag/v1.2.5

I have done more testing with a new version and seems like it has broken live resizing (Godot will hang if window is resized), so it's unsable. Previous version (v1.2.4) is fine.

@akien-mga
Copy link
Member Author

Do you foresee any issue staying on MoltenVK 1.2.4 while using Vulkan 1.3.261.1? I'm not sure how much the versions are tied together, beside 1.2.5 being earmarked as the version for SDK 1.3.261.1.

For the record, currently official builds are still using MoltenVK 1.2.0 (matching Vulkan 1.3.231) despite all other components being on Vulkan 1.3.250.1. I had just omitted to update it.

@bruvzg
Copy link
Member

bruvzg commented Sep 5, 2023

Do you foresee any issue staying on MoltenVK 1.2.4 while using Vulkan 1.3.261.1? I'm not sure how much the versions are tied together, beside 1.2.5 being earmarked as the version for SDK 1.3.261.1.

Probably not.

I have done more testing with a new version and seems like it has broken live resizing (Godot will hang if window is resized), so it's unsable.

Bisected it to KhronosGroup/MoltenVK#1972
In particular [_mtlLayer setNeedsDisplay]; line, since during live resize we are calling redraw from the displayLayer: it got stuck in infinite displayLayer call chain. No idea why it was added, but it should be easy to workaround.

@bruvzg
Copy link
Member

bruvzg commented Sep 5, 2023

#81339 should fix the issue (and might decrease a number of unnecessary iteration calls during resize as well).

@bruvzg bruvzg reopened this Sep 6, 2023
@YuriSizov
Copy link
Contributor

YuriSizov commented Sep 6, 2023

Did it trigger on "Fixes issue comment link"? Huh.

Comment on lines -36 to -37
// Synchronized with upstream glslang/StandAlone/ResourceLimits.cpp which is not
// part of the public API.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, this file was removed as it's now part of the public API in glslang, so we can use <glslang/Public/ResourceLimits.h> instead.

badlogic added a commit to EsotericSoftware/spine-runtimes that referenced this pull request Sep 20, 2023
This is due to a Godot 4.1.1 bug in combination with the latest MoltenVK release. See godotengine/godot#81219 (comment). We are hardcoding the SDK version for now, until the fix has been merged and released in Godot 4.1.x.
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good at a glance. I built and ran the 3D platformer demo locally with this branch and I can't notice any visual issues or errors in the console.

@akien-mga akien-mga merged commit b459339 into godotengine:master Sep 26, 2023
31 checks passed
@akien-mga akien-mga deleted the vulkan-sdk-1.3.261.1 branch September 26, 2023 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants