@@ -3113,7 +3113,7 @@ struct VariableReflection
31133113 return findAttributeByName (globalSession, name);
31143114 }
31153115
3116- // / Deprecated: use getDefaultValueBlob instead.
3116+ // / Deprecated: call getDefaultValueBlob and check for a null blob instead.
31173117 SLANG_DEPRECATED bool hasDefaultValue ()
31183118 {
31193119 return spReflectionVariable_HasDefaultValue ((SlangReflectionVariable*)this );
@@ -3137,10 +3137,19 @@ struct VariableReflection
31373137 return spReflectionVariable_GetDefaultValueFloat ((SlangReflectionVariable*)this , value);
31383138 }
31393139
3140- // / Gets default value bytes for scalar and aggregate variables with explicit initializers.
3141- // / If the variable has no explicit initializer, this succeeds with a null blob.
3142- // / The returned blob stores values in natural scalar/field order, without constant-buffer
3143- // / padding.
3140+ // / Gets default initializer bytes for variables with representable initializers.
3141+ // /
3142+ // / If the variable has no explicit initializer, this succeeds with a null blob. On success with
3143+ // / an initializer, `outBlob` receives an `ISlangBlob*` with an added reference.
3144+ // /
3145+ // / Supported types include scalar values, vectors, matrices, fixed-size arrays,
3146+ // / structs/aggregates, and enums. The returned blob stores scalar-layout bytes in natural
3147+ // / scalar/field order without aggregate padding; bool values are emitted as 4-byte values to
3148+ // / match Slang's GPU scalar layout. Matrices are emitted row-by-row, struct base fields are
3149+ // / emitted before derived fields, and enum values use the enum's underlying tag type.
3150+ // /
3151+ // / Returns SLANG_E_INVALID_ARG for invalid arguments and SLANG_E_NOT_AVAILABLE when an
3152+ // / initializer cannot be represented as a default-value blob.
31443153 SlangResult getDefaultValueBlob (ISlangBlob** outBlob)
31453154 {
31463155 return spReflectionVariable_GetDefaultValueBlob ((SlangReflectionVariable*)this , outBlob);
0 commit comments