summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-23 05:49:33 -0700
committerGitHub <noreply@github.com>2023-08-23 20:49:33 +0800
commit6437c38e0a3c2c1daf36cb5e543dc0b467fa4b15 (patch)
treec117b964ada397d9cac01ff4759bcd16d35c7e20 /source/slang/slang-emit.cpp
parentcdd5e6666f98903d61118ada5cba51424fd1577c (diff)
Lower all ByteAddressBuffer uses for SPIRV. (#3143)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index 03d62b540..8ee641acc 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -650,6 +650,8 @@ Result linkAndOptimizeIR(
break;
case CodeGenTarget::GLSL:
+ case CodeGenTarget::SPIRV:
+ case CodeGenTarget::SPIRVAssembly:
// For GLSL targets, we want to translate the vector load/store
// operations into scalar ops. This is in part as a simplification,
// but it also ensures that our generated code respects the lax
@@ -793,6 +795,7 @@ Result linkAndOptimizeIR(
switch (target)
{
case CodeGenTarget::GLSL:
+ case CodeGenTarget::SPIRV:
{
legalizeImageSubscriptForGLSL(irModule);
legalizeConstantBufferLoadForGLSL(irModule);