summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-lower-buffer-element-type.cpp
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2025-08-26 10:48:49 -0700
committerGitHub <noreply@github.com>2025-08-26 17:48:49 +0000
commitb36659eca38be716bee43c01c6584bda5f91166a (patch)
treea7e309179242dd9976b50f6ca6d198eb687f138f /source/slang/slang-ir-lower-buffer-element-type.cpp
parent70d70c1d315a91ed414892fb70974026082bcc99 (diff)
Fix `shouldEmitSPIRVDirectly` (#8019)
Fixes: #8018 Changes: * Do not emit true for `shouldEmitSPIRVDirectly` with a GLSL target
Diffstat (limited to 'source/slang/slang-ir-lower-buffer-element-type.cpp')
-rw-r--r--source/slang/slang-ir-lower-buffer-element-type.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/slang-ir-lower-buffer-element-type.cpp b/source/slang/slang-ir-lower-buffer-element-type.cpp
index 2f40c6cf9..056ee6244 100644
--- a/source/slang/slang-ir-lower-buffer-element-type.cpp
+++ b/source/slang/slang-ir-lower-buffer-element-type.cpp
@@ -666,7 +666,10 @@ struct LoweredElementTypeContext
// For spirv backend, we always want to lower all array types, even if the element type
// comes out the same. This is because different layout rules may have different array
// stride requirements.
- if (!target->shouldEmitSPIRVDirectly())
+ //
+ // Additionally, `buffer` blocks do not work correctly unless lowered when targeting
+ // GLSL.
+ if (!isKhronosTarget(target->getTargetReq()))
{
// For non-spirv target, we skip lowering this type if all field types are
// unchanged.