From f114433debfba67cbe1db239b6e92278d41ed438 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 19 Jul 2024 11:49:42 -0700 Subject: Support parameter block in metal shader objects. (#4671) * Support parameter block in metal shader objects. * Ingore parameter block tests on devices without tier2 argument buffer. * Fix warning. * Fix texture subscript test. --------- Co-authored-by: Yong He --- source/slang/slang-reflection-api.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-reflection-api.cpp') diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp index 9e08330e4..8dc889c97 100644 --- a/source/slang/slang-reflection-api.cpp +++ b/source/slang/slang-reflection-api.cpp @@ -810,13 +810,13 @@ SLANG_API SlangReflectionType * spReflection_FindTypeByName(SlangReflection * re SLANG_API SlangReflectionTypeLayout* spReflection_GetTypeLayout( SlangReflection* reflection, SlangReflectionType* inType, - SlangLayoutRules /*rules*/) + SlangLayoutRules rules) { auto context = convert(reflection); auto type = convert(inType); auto targetReq = context->getTargetReq(); - auto typeLayout = targetReq->getTypeLayout(type); + auto typeLayout = targetReq->getTypeLayout(type, (slang::LayoutRules)rules); return convert(typeLayout); } @@ -1875,6 +1875,7 @@ namespace Slang case LayoutResourceKind::DescriptorTableSlot: case LayoutResourceKind::Uniform: case LayoutResourceKind::ConstantBuffer: // for metal + case LayoutResourceKind::MetalArgumentBufferElement: resInfo = info; break; } -- cgit v1.2.3