[clang] [llvm] [HLSL][SPIR-V] Implement vk::push_constant (PR #166793)
Steven Perron via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 10 10:20:59 PST 2025
================
@@ -6098,7 +6100,9 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D,
// HLSL variables in the input address space maps like memory-mapped
// variables. Even if they are 'static', they are externally initialized and
// read/write by the hardware/driver/pipeline.
- if (LangOpts.HLSL && GetGlobalVarAddressSpace(D) == LangAS::hlsl_input)
+ if (LangOpts.HLSL &&
+ (GetGlobalVarAddressSpace(D) == LangAS::hlsl_input ||
+ GetGlobalVarAddressSpace(D) == LangAS::hlsl_push_constant))
----------------
s-perron wrote:
Same code in two places. Is it worth replacing this with a function call in HLSLSema?
https://github.com/llvm/llvm-project/pull/166793
More information about the cfe-commits
mailing list