From 79ba9279becf480c9d92bb2faaede0e241f0b029 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 3 Aug 2020 15:46:16 -0400 Subject: First pass support for Sampler Feedback (#1470) * Add the Feedback texture types. Depreciate SLANG_RESOURCE_EXT_SHAPE_MASK. * Starting point to test sampler feedback. * WIP on FeedbackSampler. * Use __target_intrinsic to override the output of sampler feedback types. * Use newer generic syntax for FeedbackTexture. * Reflects Feedback type. * SLANG_TYPE_KIND_TEXTURE_FEEDBACK -> SLANG_TYPE_KIND_FEEDBACK * Added reflection test. * Reneable issue with generics in sampler-feedback-basic.slang * Add methods to FeedbackTexture2D/Array. Make test cover test cases. * Sampler feedback produces DXC code. * Disabled Sampler feedback test - as requires newer version of DXC. * Fix bug in reflection tool output. * Fix problem with direct-spirv-emit.slang.expected due to update to glslang. * Fix direct-spirv-emit.slang * Use SLANG_RESOURCE_EXT_SHAPE_MASK again * Make Feedback be emitted as a textue type prefix. Co-authored-by: Tim Foley --- source/slang/slang-syntax.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/slang-syntax.cpp') diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp index d207b45bf..aa11b1b0f 100644 --- a/source/slang/slang-syntax.cpp +++ b/source/slang/slang-syntax.cpp @@ -491,6 +491,14 @@ Index getFilterCountImpl(const ReflectClassInfo& clsInfo, MemberFilterStyle filt textureType->declRef = declRef; return textureType; } + else if (magicMod->name == "FeedbackType") + { + SLANG_ASSERT(subst == nullptr); + auto type = astBuilder->create(); + type->declRef = declRef; + type->kind = FeedbackType::Kind(magicMod->tag); + return type; + } // TODO: eventually everything should follow this pattern, // and we can drive the dispatch with a table instead -- cgit v1.2.3