[clang] [llvm] [SPIR-V] DRAFT: Shader built-ins - no spec change (PR #116393)

Steven Perron via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 15 12:34:13 PST 2024


================
@@ -59,6 +59,9 @@ enum class LangAS : unsigned {
   // HLSL specific address spaces.
   hlsl_groupshared,
 
+  // Vulkan specific address spaces.
+  vulkan_private,
+
----------------
s-perron wrote:

Do we need a new address space? This is not an issue specific to these input and output variable. We need to figure out how to handle general static variables. There are some tests that already consider this, but they are DXIL only.

https://github.com/llvm/llvm-project/blob/94eebf721a2f8630412730f51d5071816a686ea0/clang/test/CodeGenHLSL/GlobalDestructors.hlsl#L45

We might need to figure that out first, and than have this PR build on top of that. For DXIL, the static variables are marked as "internal global", and does not use a different address space. Can we do the same? Is the DXIL codegen their real solution or just a temporary implementation?

https://github.com/llvm/llvm-project/pull/116393


More information about the cfe-commits mailing list