Skip to content

Commit aa1db8a

Browse files
committed
format code
1 parent 00576f4 commit aa1db8a

File tree

2 files changed

+61
-35
lines changed

2 files changed

+61
-35
lines changed

include/slang-deprecated.h

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -521,16 +521,18 @@ extern "C"
521521
/** Get the size of a type layout in the specified parameter category.
522522
*
523523
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources (e.g., unsized arrays).
524-
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or link-time constants.
524+
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or
525+
* link-time constants.
525526
*/
526527
SLANG_API size_t spReflectionTypeLayout_GetSize(
527528
SlangReflectionTypeLayout* type,
528529
SlangParameterCategory category);
529-
530+
530531
/** Get the stride of a type layout in the specified parameter category.
531532
*
532533
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
533-
* Returns `SLANG_UNKNOWN_SIZE` when stride depends on unresolved generic parameters or link-time constants.
534+
* Returns `SLANG_UNKNOWN_SIZE` when stride depends on unresolved generic parameters or
535+
* link-time constants.
534536
*/
535537
SLANG_API size_t spReflectionTypeLayout_GetStride(
536538
SlangReflectionTypeLayout* type,
@@ -555,7 +557,8 @@ extern "C"
555557
/** Get the stride between elements of an array type layout.
556558
*
557559
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
558-
* Returns `SLANG_UNKNOWN_SIZE` when element stride depends on unresolved generic parameters or link-time constants.
560+
* Returns `SLANG_UNKNOWN_SIZE` when element stride depends on unresolved generic parameters or
561+
* link-time constants.
559562
*/
560563
SLANG_API size_t spReflectionTypeLayout_GetElementStride(
561564
SlangReflectionTypeLayout* type,
@@ -600,7 +603,8 @@ extern "C"
600603
/** Get the binding count for a binding range at the specified index.
601604
*
602605
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
603-
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or link-time constants.
606+
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or
607+
* link-time constants.
604608
*/
605609
SLANG_API SlangInt spReflectionTypeLayout_getBindingRangeBindingCount(
606610
SlangReflectionTypeLayout* typeLayout,
@@ -640,17 +644,19 @@ extern "C"
640644
SlangInt setIndex);
641645
/** Get the index offset for a descriptor range within a descriptor set.
642646
*
643-
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or link-time constants.
647+
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or
648+
* link-time constants.
644649
*/
645650
SLANG_API SlangInt spReflectionTypeLayout_getDescriptorSetDescriptorRangeIndexOffset(
646651
SlangReflectionTypeLayout* typeLayout,
647652
SlangInt setIndex,
648653
SlangInt rangeIndex);
649-
654+
650655
/** Get the descriptor count for a descriptor range within a descriptor set.
651656
*
652657
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
653-
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or link-time constants.
658+
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or
659+
* link-time constants.
654660
*/
655661
SLANG_API SlangInt spReflectionTypeLayout_getDescriptorSetDescriptorRangeDescriptorCount(
656662
SlangReflectionTypeLayout* typeLayout,
@@ -672,7 +678,8 @@ extern "C"
672678
SlangInt subObjectRangeIndex);
673679
/** Get the space offset for a sub-object range.
674680
*
675-
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or link-time constants.
681+
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or
682+
* link-time constants.
676683
*/
677684
SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeSpaceOffset(
678685
SlangReflectionTypeLayout* typeLayout,
@@ -728,15 +735,17 @@ extern "C"
728735

729736
/** Get the offset of a variable in the specified parameter category.
730737
*
731-
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or link-time constants.
738+
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or
739+
* link-time constants.
732740
*/
733741
SLANG_API size_t spReflectionVariableLayout_GetOffset(
734742
SlangReflectionVariableLayout* var,
735743
SlangParameterCategory category);
736-
744+
737745
/** Get the register space/set of a variable in the specified parameter category.
738746
*
739-
* Returns `SLANG_UNKNOWN_SIZE` when the space depends on unresolved generic parameters or link-time constants.
747+
* Returns `SLANG_UNKNOWN_SIZE` when the space depends on unresolved generic parameters or
748+
* link-time constants.
740749
*/
741750
SLANG_API size_t spReflectionVariableLayout_GetSpace(
742751
SlangReflectionVariableLayout* var,
@@ -972,14 +981,16 @@ extern "C"
972981

973982
/** Get the binding index for the global constant buffer.
974983
*
975-
* Returns `SLANG_UNKNOWN_SIZE` when the binding depends on unresolved generic parameters or link-time constants.
984+
* Returns `SLANG_UNKNOWN_SIZE` when the binding depends on unresolved generic parameters or
985+
* link-time constants.
976986
*/
977987
SLANG_API SlangUInt spReflection_getGlobalConstantBufferBinding(SlangReflection* reflection);
978-
988+
979989
/** Get the size of the global constant buffer.
980990
*
981991
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
982-
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or link-time constants.
992+
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or
993+
* link-time constants.
983994
*/
984995
SLANG_API size_t spReflection_getGlobalConstantBufferSize(SlangReflection* reflection);
985996

include/slang.h

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,10 +2322,10 @@ struct TypeReflection
23222322
/** Get the number of elements in an array or vector type.
23232323
*
23242324
* Only useful if `getKind() == Kind::Array` or `Kind::Vector`.
2325-
*
2325+
*
23262326
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded-size arrays.
2327-
* Returns `SLANG_UNKNOWN_SIZE` when size depends on unresolved generic parameters or link-time constants.
2328-
* The `reflection` parameter can help resolve link-time constants if available.
2327+
* Returns `SLANG_UNKNOWN_SIZE` when size depends on unresolved generic parameters or link-time
2328+
* constants. The `reflection` parameter can help resolve link-time constants if available.
23292329
*/
23302330
size_t getElementCount(SlangReflection* reflection = nullptr)
23312331
{
@@ -2508,7 +2508,8 @@ struct TypeLayoutReflection
25082508
/** Get the size of this type layout in the specified parameter category.
25092509
*
25102510
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources (e.g., unsized arrays).
2511-
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or link-time constants.
2511+
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or
2512+
* link-time constants.
25122513
*/
25132514
size_t getSize(SlangParameterCategory category)
25142515
{
@@ -2518,7 +2519,8 @@ struct TypeLayoutReflection
25182519
/** Get the stride of this type layout in the specified parameter category.
25192520
*
25202521
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
2521-
* Returns `SLANG_UNKNOWN_SIZE` when stride depends on unresolved generic parameters or link-time constants.
2522+
* Returns `SLANG_UNKNOWN_SIZE` when stride depends on unresolved generic parameters or
2523+
* link-time constants.
25222524
*/
25232525
size_t getStride(SlangParameterCategory category)
25242526
{
@@ -2533,7 +2535,8 @@ struct TypeLayoutReflection
25332535
/** Get the size of this type layout in the specified parameter category.
25342536
*
25352537
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources (e.g., unsized arrays).
2536-
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or link-time constants.
2538+
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or
2539+
* link-time constants.
25372540
*/
25382541
size_t getSize(slang::ParameterCategory category = slang::ParameterCategory::Uniform)
25392542
{
@@ -2545,7 +2548,8 @@ struct TypeLayoutReflection
25452548
/** Get the stride of this type layout in the specified parameter category.
25462549
*
25472550
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
2548-
* Returns `SLANG_UNKNOWN_SIZE` when stride depends on unresolved generic parameters or link-time constants.
2551+
* Returns `SLANG_UNKNOWN_SIZE` when stride depends on unresolved generic parameters or
2552+
* link-time constants.
25492553
*/
25502554
size_t getStride(slang::ParameterCategory category = slang::ParameterCategory::Uniform)
25512555
{
@@ -2611,7 +2615,8 @@ struct TypeLayoutReflection
26112615
/** Get the stride between elements of an array type layout.
26122616
*
26132617
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
2614-
* Returns `SLANG_UNKNOWN_SIZE` when element stride depends on unresolved generic parameters or link-time constants.
2618+
* Returns `SLANG_UNKNOWN_SIZE` when element stride depends on unresolved generic parameters or
2619+
* link-time constants.
26152620
*/
26162621
size_t getElementStride(SlangParameterCategory category)
26172622
{
@@ -2710,7 +2715,8 @@ struct TypeLayoutReflection
27102715
/** Get the binding count for a binding range at the specified index.
27112716
*
27122717
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
2713-
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or link-time constants.
2718+
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or
2719+
* link-time constants.
27142720
*/
27152721
SlangInt getBindingRangeBindingCount(SlangInt index)
27162722
{
@@ -2811,7 +2817,8 @@ struct TypeLayoutReflection
28112817

28122818
/** Get the index offset for a descriptor range within a descriptor set.
28132819
*
2814-
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or link-time constants.
2820+
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or
2821+
* link-time constants.
28152822
*/
28162823
SlangInt getDescriptorSetDescriptorRangeIndexOffset(SlangInt setIndex, SlangInt rangeIndex)
28172824
{
@@ -2824,7 +2831,8 @@ struct TypeLayoutReflection
28242831
/** Get the descriptor count for a descriptor range within a descriptor set.
28252832
*
28262833
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
2827-
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or link-time constants.
2834+
* Returns `SLANG_UNKNOWN_SIZE` when the count depends on unresolved generic parameters or
2835+
* link-time constants.
28282836
*/
28292837
SlangInt getDescriptorSetDescriptorRangeDescriptorCount(SlangInt setIndex, SlangInt rangeIndex)
28302838
{
@@ -2866,7 +2874,8 @@ struct TypeLayoutReflection
28662874

28672875
/** Get the space offset for a sub-object range.
28682876
*
2869-
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or link-time constants.
2877+
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or
2878+
* link-time constants.
28702879
*/
28712880
SlangInt getSubObjectRangeSpaceOffset(SlangInt subObjectRangeIndex)
28722881
{
@@ -2996,16 +3005,18 @@ struct VariableLayoutReflection
29963005

29973006
/** Get the offset of this variable in the specified parameter category.
29983007
*
2999-
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or link-time constants.
3008+
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or
3009+
* link-time constants.
30003010
*/
30013011
size_t getOffset(SlangParameterCategory category)
30023012
{
30033013
return spReflectionVariableLayout_GetOffset((SlangReflectionVariableLayout*)this, category);
30043014
}
3005-
3015+
30063016
/** Get the offset of this variable in the specified parameter category.
30073017
*
3008-
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or link-time constants.
3018+
* Returns `SLANG_UNKNOWN_SIZE` when the offset depends on unresolved generic parameters or
3019+
* link-time constants.
30093020
*/
30103021
size_t getOffset(slang::ParameterCategory category = slang::ParameterCategory::Uniform)
30113022
{
@@ -3029,16 +3040,18 @@ struct VariableLayoutReflection
30293040

30303041
/** Get the register space/set of this variable in the specified parameter category.
30313042
*
3032-
* Returns `SLANG_UNKNOWN_SIZE` when the space depends on unresolved generic parameters or link-time constants.
3043+
* Returns `SLANG_UNKNOWN_SIZE` when the space depends on unresolved generic parameters or
3044+
* link-time constants.
30333045
*/
30343046
size_t getBindingSpace(SlangParameterCategory category)
30353047
{
30363048
return spReflectionVariableLayout_GetSpace((SlangReflectionVariableLayout*)this, category);
30373049
}
3038-
3050+
30393051
/** Get the register space/set of this variable in the specified parameter category.
30403052
*
3041-
* Returns `SLANG_UNKNOWN_SIZE` when the space depends on unresolved generic parameters or link-time constants.
3053+
* Returns `SLANG_UNKNOWN_SIZE` when the space depends on unresolved generic parameters or
3054+
* link-time constants.
30423055
*/
30433056
size_t getBindingSpace(slang::ParameterCategory category)
30443057
{
@@ -3403,7 +3416,8 @@ struct ShaderReflection
34033416

34043417
/** Get the binding index for the global constant buffer.
34053418
*
3406-
* Returns `SLANG_UNKNOWN_SIZE` when the binding depends on unresolved generic parameters or link-time constants.
3419+
* Returns `SLANG_UNKNOWN_SIZE` when the binding depends on unresolved generic parameters or
3420+
* link-time constants.
34073421
*/
34083422
SlangUInt getGlobalConstantBufferBinding()
34093423
{
@@ -3413,7 +3427,8 @@ struct ShaderReflection
34133427
/** Get the size of the global constant buffer.
34143428
*
34153429
* Returns `SLANG_UNBOUNDED_SIZE` for unbounded resources.
3416-
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or link-time constants.
3430+
* Returns `SLANG_UNKNOWN_SIZE` when the size depends on unresolved generic parameters or
3431+
* link-time constants.
34173432
*/
34183433
size_t getGlobalConstantBufferSize()
34193434
{

0 commit comments

Comments
 (0)