@@ -13,21 +13,23 @@ namespace axslc
1313
1414#pragma pack(push, 1)
1515
16- #define SC_CHUNK sc_makefourcc (' A' , ' X' , ' S' , ' C' )
17- #define SC_CHUNK_STAG sc_makefourcc (' S' , ' T' , ' A' , ' G' )
18- #define SC_CHUNK_REFL sc_makefourcc (' R' , ' E' , ' F' , ' L' )
19- #define SC_CHUNK_CODE sc_makefourcc (' C' , ' O' , ' D' , ' E' )
20- #define SC_CHUNK_DATA sc_makefourcc (' D' , ' A' , ' T' , ' A' )
21-
22- #define SC_LANG_GLES sc_makefourcc (' G' , ' L' , ' E' , ' S' )
23- #define SC_LANG_HLSL sc_makefourcc (' H' , ' L' , ' S' , ' L' )
24- #define SC_LANG_GLSL sc_makefourcc (' G' , ' L' , ' S' , ' L' )
25- #define SC_LANG_MSL sc_makefourcc (' M' , ' S' , ' L' , ' ' )
26- #define SC_LANG_SPIRV sc_makefourcc (' S' , ' P' , ' I' , ' R' )
27-
28- #define SC_STAGE_VERTEX sc_makefourcc (' V' , ' E' , ' R' , ' T' )
29- #define SC_STAGE_FRAGMENT sc_makefourcc (' F' , ' R' , ' A' , ' G' )
30- #define SC_STAGE_COMPUTE sc_makefourcc (' C' , ' O' , ' M' , ' P' )
16+ #define SC_CHUNK sc_makefourcc (' A' , ' X' , ' S' , ' C' )
17+ #define SC_CHUNK_STAG sc_makefourcc (' S' , ' T' , ' A' , ' G' )
18+ #define SC_CHUNK_REFL sc_makefourcc (' R' , ' E' , ' F' , ' L' )
19+ #define SC_CHUNK_CODE sc_makefourcc (' C' , ' O' , ' D' , ' E' )
20+ #define SC_CHUNK_DATA sc_makefourcc (' D' , ' A' , ' T' , ' A' )
21+
22+ #define SC_LANG_GLES sc_makefourcc (' G' , ' L' , ' E' , ' S' )
23+ #define SC_LANG_HLSL sc_makefourcc (' H' , ' L' , ' S' , ' L' )
24+ #define SC_LANG_GLSL sc_makefourcc (' G' , ' L' , ' S' , ' L' )
25+ #define SC_LANG_MSL sc_makefourcc (' M' , ' S' , ' L' , ' ' )
26+ #define SC_LANG_SPIRV sc_makefourcc (' S' , ' P' , ' I' , ' R' )
27+
28+ #define SC_STAGE_VERTEX sc_makefourcc (' V' , ' E' , ' R' , ' T' )
29+ #define SC_STAGE_FRAGMENT sc_makefourcc (' F' , ' R' , ' A' , ' G' )
30+ #define SC_STAGE_COMPUTE sc_makefourcc (' C' , ' O' , ' M' , ' P' )
31+
32+ #define SC_NAME_LEN 32
3133
3234enum Dim : uint16_t
3335{
@@ -78,7 +80,7 @@ struct sc_chunk
7880// REFL
7981struct sc_chunk_refl
8082{
81- char name[32 ];
83+ char name[SC_NAME_LEN ];
8284 uint32_t num_inputs;
8385 uint32_t num_textures;
8486 uint32_t num_uniform_buffers;
@@ -96,8 +98,8 @@ struct sc_chunk_refl
9698
9799struct sc_refl_input
98100{
99- char name[32 ];
100- char semantic[32 ];
101+ char name[SC_NAME_LEN ];
102+ char semantic[SC_NAME_LEN ];
101103 int32_t location;
102104 uint16_t semantic_index;
103105 uint16_t var_type;
@@ -106,7 +108,7 @@ struct sc_refl_input
106108// @since 3.0.0, modified
107109struct sc_refl_texture
108110{
109- char name[32 ];
111+ char name[SC_NAME_LEN ];
110112 int32_t binding;
111113 uint8_t image_dim; // @see enum Dim: Dim1D, Dim2D, Dim3D, DimCube ...
112114 uint8_t multisample : 1 ; // whether sampler2DMS
@@ -126,7 +128,7 @@ struct sc_refl_buffer
126128
127129typedef struct sc_refl_uniformbuffer
128130{
129- char name[32 ];
131+ char name[SC_NAME_LEN ];
130132 int32_t binding;
131133 uint32_t size_bytes;
132134 uint16_t array_size;
@@ -135,7 +137,7 @@ typedef struct sc_refl_uniformbuffer
135137
136138typedef struct sc_refl_uniformbuffer_member
137139{
138- char name[32 ];
140+ char name[SC_NAME_LEN ];
139141 int32_t offset;
140142 uint32_t size_bytes;
141143 uint16_t array_size;
0 commit comments