Merge pull request #116225 from bruvzg/rtests

[Metal] Remove glslang memory decorations.
This commit is contained in:
Thaddeus Crews 2026-02-13 07:40:24 -06:00
commit d41677587c
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
3 changed files with 22 additions and 0 deletions

View file

@ -434,6 +434,7 @@ Files extracted from upstream source:
Patches:
- `0001-apple-disable-absolute-paths.patch` ([GH-92010](https://github.com/godotengine/godot/pull/92010))
- `0002-apple-m1-msaa-fix.patch` ([GH-115893](https://github.com/godotengine/godot/issues/115893))
## graphite

View file

@ -5181,6 +5181,11 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
glslang::TQualifier typeQualifier = node->getType().getQualifier();
TranslateMemoryDecoration(typeQualifier, topLevelDecorations, glslangIntermediate->usingVulkanMemoryModel());
for (auto deco : topLevelDecorations) {
#ifdef __APPLE__
if (deco != spv::Decoration::Restrict &&
deco != spv::Decoration::RestrictPointer &&
deco != spv::Decoration::RestrictPointerEXT)
#endif
builder.addDecoration(var, deco);
}
return var;

View file

@ -0,0 +1,16 @@
diff --git a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
index 1a5c40c53a..d4af42f70b 100644
--- a/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
+++ b/thirdparty/glslang/SPIRV/GlslangToSpv.cpp
@@ -5181,6 +5181,11 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
glslang::TQualifier typeQualifier = node->getType().getQualifier();
TranslateMemoryDecoration(typeQualifier, topLevelDecorations, glslangIntermediate->usingVulkanMemoryModel());
for (auto deco : topLevelDecorations) {
+#ifdef __APPLE__
+ if (deco != spv::Decoration::Restrict &&
+ deco != spv::Decoration::RestrictPointer &&
+ deco != spv::Decoration::RestrictPointerEXT)
+#endif
builder.addDecoration(var, deco);
}
return var;