From 5a0224a0773f6d7f5eae8515424af5fa8faa9c14 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 26 Sep 2024 09:44:08 -0700 Subject: Move texture format inference to frontend and add reflection api for it. (#5155) --- source/slang/slang-ast-type.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/slang/slang-ast-type.cpp') diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index 616c2a67a..9f848ddc4 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -1216,6 +1216,11 @@ Val* TextureTypeBase::getSampleCount() return as(_getGenericTypeArg(this, 4)); } +Val* TextureTypeBase::getFormat() +{ + return as(_getGenericTypeArg(this, 8)); +} + Type* removeParamDirType(Type* type) { for (auto paramDirType = as(type); paramDirType;) -- cgit v1.2.3