[llvm] [SPIRV] Change how to detect OpenCL/Vulkan Env and update tests accordingly. (PR #129689)
Marcos Maronas via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 11:58:19 PDT 2025
================
@@ -767,10 +767,10 @@ Register SPIRVGlobalRegistry::buildGlobalVariable(
// TODO: maybe move to GenerateDecorations pass.
const SPIRVSubtarget &ST =
cast<SPIRVSubtarget>(MIRBuilder.getMF().getSubtarget());
- if (IsConst && ST.isOpenCLEnv())
+ if (IsConst && !ST.isShaderEnv())
----------------
maarquitos14 wrote:
I'll try and change as many as possible, but I think I tried some in the past and a few tests failed. I'll do some testing, but I think what would happen in the scenario you described is that an assertion/fatal error would happen when checking if capabilities are allowed.
https://github.com/llvm/llvm-project/pull/129689
More information about the llvm-commits
mailing list