summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevon <devonrutledge03@gmail.com>2025-03-20 00:38:52 -0600
committerGitHub <noreply@github.com>2025-03-20 06:38:52 +0000
commit30068d75fb97fecc163253fb331daddbb09234e6 (patch)
tree6e1a5b757db538a58c2397de4980618d280783d4 /include
parent404e95cdd02830ba0fb215081e826025609c4d14 (diff)
Make image format reflection easier (#6550)
* image format json reflection * format code * use direct include --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'include')
-rw-r--r--include/slang-deprecated.h2
-rw-r--r--include/slang.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/include/slang-deprecated.h b/include/slang-deprecated.h
index df6e41488..2ae91c6d8 100644
--- a/include/slang-deprecated.h
+++ b/include/slang-deprecated.h
@@ -681,6 +681,8 @@ extern "C"
SLANG_API size_t spReflectionVariableLayout_GetSpace(
SlangReflectionVariableLayout* var,
SlangParameterCategory category);
+ SLANG_API SlangImageFormat
+ spReflectionVariableLayout_GetImageFormat(SlangReflectionVariableLayout* var);
SLANG_API char const* spReflectionVariableLayout_GetSemanticName(
SlangReflectionVariableLayout* var);
diff --git a/include/slang.h b/include/slang.h
index aab6fc47c..0507d8099 100644
--- a/include/slang.h
+++ b/include/slang.h
@@ -2921,6 +2921,11 @@ struct VariableLayoutReflection
(SlangParameterCategory)category);
}
+ SlangImageFormat getImageFormat()
+ {
+ return spReflectionVariableLayout_GetImageFormat((SlangReflectionVariableLayout*)this);
+ }
+
char const* getSemanticName()
{
return spReflectionVariableLayout_GetSemanticName((SlangReflectionVariableLayout*)this);