Skip to content

Comments

[Metal] Add support for -Fre for Metal#8159

Open
llvm-beanz wants to merge 1 commit intomicrosoft:mainfrom
llvm-beanz:cbieneman/metal-reflection
Open

[Metal] Add support for -Fre for Metal#8159
llvm-beanz wants to merge 1 commit intomicrosoft:mainfrom
llvm-beanz:cbieneman/metal-reflection

Conversation

@llvm-beanz
Copy link
Collaborator

@llvm-beanz llvm-beanz commented Feb 12, 2026

This updates the Metal support to enable generating the Metal Shader Converter's reflection JSON file.

Required to fix llvm/offload-test-suite#452.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

✅ With the latest revision this PR passed the C/C++ code formatter.

This updates the Metal support to enable generating the Metal Shader
Converter's reflection JSON file.

This is required to fix
llvm/offload-test-suite#452
@llvm-beanz llvm-beanz force-pushed the cbieneman/metal-reflection branch from e189319 to 83b8391 Compare February 12, 2026 22:33
Copy link
Collaborator

@Keenuts Keenuts left a comment

Choose a reason for hiding this comment

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

Patching this PR and checking Metal codegen, I have an assert because the reflection output seems to be written before.

Seems like the fix is to do:

--- a/tools/clang/tools/dxcompiler/dxcompilerobj.cpp
+++ b/tools/clang/tools/dxcompiler/dxcompilerobj.cpp
@@ -1085,7 +1085,12 @@ public:
               }
             }
 
-            if (pReflectionStream && pReflectionStream->GetPtrSize()) {
+#ifdef ENABLE_METAL_CODEGEN
+            const bool GenMetal = opts.GenMetal;
+#else
+            const bool GenMetal = false;
+#endif
+            if (!GenMetal && pReflectionStream && pReflectionStream->GetPtrSize()) {
               CComPtr<IDxcBlob> pReflection;
               IFT(pReflectionStream->QueryInterface(&pReflection));
               IFT(pResult->SetOutputObject(DXC_OUT_REFLECTION, pReflection));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

[Metal][DXC] Concurrent writing of uint4 components test failure

4 participants