summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-spirv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-spirv.cpp')
-rw-r--r--source/slang/slang-emit-spirv.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp
index e8bcad1c1..f82bf24c1 100644
--- a/source/slang/slang-emit-spirv.cpp
+++ b/source/slang/slang-emit-spirv.cpp
@@ -3020,7 +3020,7 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex
bool anyModifiers = (var->findDecoration<IRInterpolationModeDecoration>() != nullptr);
// If the user didn't explicitly qualify a varying
- // with integer type, then we need to explicitly
+ // with integer or pointer type, then we need to explicitly
// add the `flat` modifier for GLSL.
if (!anyModifiers)
{
@@ -3030,7 +3030,8 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex
layout->usesResourceKind(LayoutResourceKind::VaryingInput))
{
const auto ptrType = as<IRPtrTypeBase>(var->getDataType());
- if (ptrType && isIntegralScalarOrCompositeType(ptrType->getValueType()))
+ if (ptrType && (isIntegralScalarOrCompositeType(ptrType->getValueType()) ||
+ as<IRPtrTypeBase>(ptrType->getValueType())))
emitOpDecorate(
getSection(SpvLogicalSectionID::Annotations),
nullptr,