From 6909d65c77bb4e7c9cfb281bd1684a58d5f8b94d Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 11 Jun 2024 12:31:37 -0700 Subject: SPIRV backend: add support for tessellation stages, (#4336) --- source/slang/slang-parameter-binding.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/slang/slang-parameter-binding.cpp') diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp index 56c85e9cb..cfbd7f2c5 100644 --- a/source/slang/slang-parameter-binding.cpp +++ b/source/slang/slang-parameter-binding.cpp @@ -2092,6 +2092,23 @@ static RefPtr processEntryPointVaryingParameter( return arrayTypeLayout; } + else if (auto patchType = as(type)) + { + // Similar to the MeshOutput case, a `InputPatch` or `OutputPatch` type is just like an array. + // + auto elementTypeLayout = processEntryPointVaryingParameter(context, patchType->getElementType(), state, varLayout); + + RefPtr arrayTypeLayout = new ArrayTypeLayout(); + arrayTypeLayout->elementTypeLayout = elementTypeLayout; + arrayTypeLayout->type = arrayType; + + for (auto rr : elementTypeLayout->resourceInfos) + { + arrayTypeLayout->findOrAddResourceInfo(rr.kind)->count = rr.count; + } + + return arrayTypeLayout; + } // Ignore a bunch of types that don't make sense here... else if (const auto subpassType = as(type)) { return nullptr; } else if (const auto textureType = as(type)) { return nullptr; } -- cgit v1.2.3