diff options
| author | Yong He <yonghe@outlook.com> | 2024-09-26 09:44:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-26 09:44:08 -0700 |
| commit | 5a0224a0773f6d7f5eae8515424af5fa8faa9c14 (patch) | |
| tree | ac14b54ad253d4ac5413a3c86254929f332b9e1a /include/slang.h | |
| parent | 7398e1e09312ed4e19195e060de9a2c9a073fcc1 (diff) | |
Move texture format inference to frontend and add reflection api for it. (#5155)
Diffstat (limited to 'include/slang.h')
| -rw-r--r-- | include/slang.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/slang.h b/include/slang.h index 1c05b4c08..8e42632ff 100644 --- a/include/slang.h +++ b/include/slang.h @@ -2433,6 +2433,14 @@ extern "C" SLANG_MODIFIER_INOUT }; + typedef SlangUInt32 SlangImageFormatIntegral; + enum SlangImageFormat : SlangImageFormatIntegral + { +#define SLANG_FORMAT(NAME, DESC) SLANG_IMAGE_FORMAT_##NAME, +#include "slang-image-format-defs.h" +#undef SLANG_FORMAT + }; + // User Attribute SLANG_API char const* spReflectionUserAttribute_GetName(SlangReflectionUserAttribute* attrib); SLANG_API unsigned int spReflectionUserAttribute_GetArgumentCount(SlangReflectionUserAttribute* attrib); @@ -2526,6 +2534,7 @@ extern "C" SLANG_API SlangInt spReflectionTypeLayout_getBindingRangeBindingCount(SlangReflectionTypeLayout* typeLayout, SlangInt index); SLANG_API SlangReflectionTypeLayout* spReflectionTypeLayout_getBindingRangeLeafTypeLayout(SlangReflectionTypeLayout* typeLayout, SlangInt index); SLANG_API SlangReflectionVariable* spReflectionTypeLayout_getBindingRangeLeafVariable(SlangReflectionTypeLayout* typeLayout, SlangInt index); + SLANG_API SlangImageFormat spReflectionTypeLayout_getBindingRangeImageFormat(SlangReflectionTypeLayout* typeLayout, SlangInt index); SLANG_API SlangInt spReflectionTypeLayout_getFieldBindingRangeOffset(SlangReflectionTypeLayout* typeLayout, SlangInt fieldIndex); SLANG_API SlangInt spReflectionTypeLayout_getExplicitCounterBindingRangeOffset(SlangReflectionTypeLayout* inTypeLayout); @@ -3299,6 +3308,12 @@ namespace slang (SlangReflectionTypeLayout*)this, index); } + SlangImageFormat getBindingRangeImageFormat(SlangInt index) + { + return spReflectionTypeLayout_getBindingRangeImageFormat( + (SlangReflectionTypeLayout*)this, index); + } + SlangInt getBindingRangeDescriptorSetIndex(SlangInt index) { return spReflectionTypeLayout_getBindingRangeDescriptorSetIndex( |
