diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/slang.h | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/include/slang.h b/include/slang.h index 24db0a6ff..05fb78775 100644 --- a/include/slang.h +++ b/include/slang.h @@ -800,6 +800,8 @@ typedef uint32_t SlangSizeT; SLANG_STAGE_CALLABLE, SLANG_STAGE_MESH, SLANG_STAGE_AMPLIFICATION, + // + SLANG_STAGE_COUNT, // alias: SLANG_STAGE_PIXEL = SLANG_STAGE_FRAGMENT, @@ -2428,21 +2430,43 @@ struct TypeLayoutReflection (SlangReflectionTypeLayout*)this); } - size_t getSize(SlangParameterCategory category = SLANG_PARAMETER_CATEGORY_UNIFORM) + size_t getSize(SlangParameterCategory category) { return spReflectionTypeLayout_GetSize((SlangReflectionTypeLayout*)this, category); } - size_t getStride(SlangParameterCategory category = SLANG_PARAMETER_CATEGORY_UNIFORM) + size_t getStride(SlangParameterCategory category) { return spReflectionTypeLayout_GetStride((SlangReflectionTypeLayout*)this, category); } - int32_t getAlignment(SlangParameterCategory category = SLANG_PARAMETER_CATEGORY_UNIFORM) + int32_t getAlignment(SlangParameterCategory category) { return spReflectionTypeLayout_getAlignment((SlangReflectionTypeLayout*)this, category); } + size_t getSize(slang::ParameterCategory category = slang::ParameterCategory::Uniform) + { + return spReflectionTypeLayout_GetSize( + (SlangReflectionTypeLayout*)this, + (SlangParameterCategory)category); + } + + size_t getStride(slang::ParameterCategory category = slang::ParameterCategory::Uniform) + { + return spReflectionTypeLayout_GetStride( + (SlangReflectionTypeLayout*)this, + (SlangParameterCategory)category); + } + + int32_t getAlignment(slang::ParameterCategory category = slang::ParameterCategory::Uniform) + { + return spReflectionTypeLayout_getAlignment( + (SlangReflectionTypeLayout*)this, + (SlangParameterCategory)category); + } + + unsigned int getFieldCount() { return spReflectionTypeLayout_GetFieldCount((SlangReflectionTypeLayout*)this); @@ -2848,10 +2872,17 @@ struct VariableLayoutReflection } - size_t getOffset(SlangParameterCategory category = SLANG_PARAMETER_CATEGORY_UNIFORM) + size_t getOffset(SlangParameterCategory category) { return spReflectionVariableLayout_GetOffset((SlangReflectionVariableLayout*)this, category); } + size_t getOffset(slang::ParameterCategory category = slang::ParameterCategory::Uniform) + { + return spReflectionVariableLayout_GetOffset( + (SlangReflectionVariableLayout*)this, + (SlangParameterCategory)category); + } + TypeReflection* getType() { return getVariable()->getType(); } @@ -2869,6 +2900,12 @@ struct VariableLayoutReflection { return spReflectionVariableLayout_GetSpace((SlangReflectionVariableLayout*)this, category); } + size_t getBindingSpace(slang::ParameterCategory category) + { + return spReflectionVariableLayout_GetSpace( + (SlangReflectionVariableLayout*)this, + (SlangParameterCategory)category); + } char const* getSemanticName() { |
