From 30068d75fb97fecc163253fb331daddbb09234e6 Mon Sep 17 00:00:00 2001 From: Devon Date: Thu, 20 Mar 2025 00:38:52 -0600 Subject: 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> --- include/slang-deprecated.h | 2 ++ include/slang.h | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'include') 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); -- cgit v1.2.3