77using Types ;
88using Unmanaged ;
99using Vortice . ShaderCompiler ;
10+ using Vortice . SPIRV ;
1011using Vortice . SpirvCross ;
1112using static Vortice . SpirvCross . SpirvCrossApi ;
1213using Result = Vortice . SpirvCross . Result ;
@@ -199,20 +200,20 @@ public readonly void ReadStorageBuffers(List<ShaderStorageBuffer> list)
199200 for ( int i = 0 ; i < resourcesSpan . Length ; i ++ )
200201 {
201202 spvc_reflected_resource resource = resourcesSpan [ i ] ;
202- uint set = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . DescriptorSet ) ;
203- uint binding = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . Binding ) ;
203+ uint set = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . DescriptorSet ) ;
204+ uint binding = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . Binding ) ;
204205 string name = spvc_compiler_get_name ( compiler , resource . id ) ?? string . Empty ;
205206 spvc_type typeHandle = spvc_compiler_get_type_handle ( compiler , resource . type_id ) ;
206207 Basetype baseType = spvc_type_get_basetype ( typeHandle ) ;
207208 if ( baseType == Basetype . Struct )
208209 {
209210 ShaderStorageBuffer . Flags flags = default ;
210- if ( spvc_compiler_has_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . NonWritable ) )
211+ if ( spvc_compiler_has_decoration ( compiler , resource . id , SpvDecoration . NonWritable ) )
211212 {
212213 flags |= ShaderStorageBuffer . Flags . ReadOnly ;
213214 }
214215
215- if ( spvc_compiler_has_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . NonReadable ) )
216+ if ( spvc_compiler_has_decoration ( compiler , resource . id , SpvDecoration . NonReadable ) )
216217 {
217218 flags |= ShaderStorageBuffer . Flags . WriteOnly ;
218219 }
@@ -248,8 +249,8 @@ public readonly void ReadUniformProperties(List<ShaderUniformProperty> list, Lis
248249 int startIndex = list . Count ;
249250 foreach ( spvc_reflected_resource resource in resourcesSpan )
250251 {
251- uint set = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . DescriptorSet ) ;
252- uint binding = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . Binding ) ;
252+ uint set = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . DescriptorSet ) ;
253+ uint binding = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . Binding ) ;
253254 //uint location = spvc_compiler_get_decoration(compiler, resource.id, Vortice.SPIRV.SpvDecoration.Location);
254255 //uint offset = spvc_compiler_get_decoration(compiler, resource.id, Vortice.SPIRV.SpvDecoration.Offset);
255256 ASCIIText256 nameText = spvc_compiler_get_name ( compiler , resource . id ) ?? string . Empty ;
@@ -322,9 +323,9 @@ public readonly void ReadVertexInputAttributes(List<ShaderVertexInputAttribute>
322323 uint offset = 0 ;
323324 foreach ( spvc_reflected_resource resource in resourcesSpan )
324325 {
325- uint location = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . Location ) ;
326+ uint location = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . Location ) ;
326327 //uint offset = spvc_compiler_get_decoration(compiler, resource.id, Vortice.SPIRV.SpvDecoration.Offset); //gives 0
327- uint binding = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . Binding ) ;
328+ uint binding = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . Binding ) ;
328329 spvc_type type = spvc_compiler_get_type_handle ( compiler , resource . type_id ) ;
329330 uint vectorSize = spvc_type_get_vector_size ( type ) ;
330331 string name = new ( spvc_compiler_get_name ( compiler , resource . id ) ) ;
@@ -342,8 +343,8 @@ public readonly void ReadTextureProperties(List<ShaderSamplerProperty> list)
342343 for ( int i = 0 ; i < resourcesSpan . Length ; i ++ )
343344 {
344345 spvc_reflected_resource resource = resourcesSpan [ i ] ;
345- uint set = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . DescriptorSet ) ;
346- uint binding = spvc_compiler_get_decoration ( compiler , resource . id , Vortice . SPIRV . SpvDecoration . Binding ) ;
346+ uint set = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . DescriptorSet ) ;
347+ uint binding = spvc_compiler_get_decoration ( compiler , resource . id , SpvDecoration . Binding ) ;
347348 string name = spvc_compiler_get_name ( compiler , resource . id ) ?? string . Empty ;
348349 spvc_type type = spvc_compiler_get_type_handle ( compiler , resource . type_id ) ;
349350 Basetype baseType = spvc_type_get_basetype ( type ) ;
0 commit comments