From b915ae662b2e4bcaaeb6da62eb964356d0a978b4 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 5 May 2022 15:53:29 -0400 Subject: Support for HLSL `export` (#2223) * #include an absolute path didn't work - because paths were taken to always be relative. * Add support for HLSL `export`. * Test for using `export` keyword. --- source/slang/slang-ir.cpp | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 782f259ee..b3c19d419 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -30,23 +30,27 @@ namespace Slang { switch (op) { - case kIROp_EarlyDepthStencilDecoration: return true; - case kIROp_GloballyCoherentDecoration: return true; - case kIROp_KeepAliveDecoration: return true; - case kIROp_LineAdjInputPrimitiveTypeDecoration: return true; - case kIROp_LineInputPrimitiveTypeDecoration: return true; - case kIROp_NoInlineDecoration: return true; - case kIROp_PointInputPrimitiveTypeDecoration: return true; - case kIROp_PreciseDecoration: return true; - case kIROp_PublicDecoration: return true; - case kIROp_ReadNoneDecoration: return true; - case kIROp_RequiresNVAPIDecoration: return true; - case kIROp_TriangleAdjInputPrimitiveTypeDecoration: return true; - case kIROp_TriangleInputPrimitiveTypeDecoration: return true; - case kIROp_UnsafeForceInlineEarlyDecoration: return true; - case kIROp_VulkanCallablePayloadDecoration: return true; - case kIROp_VulkanHitAttributesDecoration: return true; - case kIROp_VulkanRayPayloadDecoration: return true; + case kIROp_EarlyDepthStencilDecoration: + case kIROp_GloballyCoherentDecoration: + case kIROp_KeepAliveDecoration: + case kIROp_LineAdjInputPrimitiveTypeDecoration: + case kIROp_LineInputPrimitiveTypeDecoration: + case kIROp_NoInlineDecoration: + case kIROp_PointInputPrimitiveTypeDecoration: + case kIROp_PreciseDecoration: + case kIROp_PublicDecoration: + case kIROp_HLSLExportDecoration: + case kIROp_ReadNoneDecoration: + case kIROp_RequiresNVAPIDecoration: + case kIROp_TriangleAdjInputPrimitiveTypeDecoration: + case kIROp_TriangleInputPrimitiveTypeDecoration: + case kIROp_UnsafeForceInlineEarlyDecoration: + case kIROp_VulkanCallablePayloadDecoration: + case kIROp_VulkanHitAttributesDecoration: + case kIROp_VulkanRayPayloadDecoration: + { + return true; + } default: break; } return false; -- cgit v1.2.3