@@ -416,6 +416,7 @@ core::smart_refctd_ptr<const CSPIRVIntrospector::CIntrospectionData> CSPIRVIntro
416
416
introData->descriptorSetBindings [descSet].emplace_back ();
417
417
418
418
SShaderResourceVariant& res = introData->descriptorSetBindings [descSet].back ();
419
+ res.name = r.name ;
419
420
res.type = restype;
420
421
res.binding = _comp.get_decoration (r.id , spv::DecorationBinding);
421
422
@@ -504,14 +505,12 @@ core::smart_refctd_ptr<const CSPIRVIntrospector::CIntrospectionData> CSPIRVIntro
504
505
for (const spirv_cross::Resource& r : resources.uniform_buffers )
505
506
{
506
507
SShaderResourceVariant& res = addResource_common (r, ESRT_UNIFORM_BUFFER, mapId2SpecConst);
507
- static_cast <impl::SShaderMemoryBlock&>(res.get <ESRT_UNIFORM_BUFFER>()).name = r.name ;
508
- shaderMemBlockIntrospection (_comp, static_cast <impl::SShaderMemoryBlock&>(res.get <ESRT_UNIFORM_BUFFER>()), r.base_type_id , r.id , mapId2SpecConst);
508
+ shaderMemBlockIntrospection (_comp, res.get <ESRT_UNIFORM_BUFFER>(), r.base_type_id , r.id , mapId2SpecConst);
509
509
}
510
510
for (const spirv_cross::Resource& r : resources.storage_buffers )
511
511
{
512
512
SShaderResourceVariant& res = addResource_common (r, ESRT_STORAGE_BUFFER, mapId2SpecConst);
513
- static_cast <impl::SShaderMemoryBlock&>(res.get <ESRT_STORAGE_BUFFER>()).name = r.name ;
514
- shaderMemBlockIntrospection (_comp, static_cast <impl::SShaderMemoryBlock&>(res.get <ESRT_STORAGE_BUFFER>()), r.base_type_id , r.id , mapId2SpecConst);
513
+ shaderMemBlockIntrospection (_comp, res.get <ESRT_STORAGE_BUFFER>(), r.base_type_id , r.id , mapId2SpecConst);
515
514
}
516
515
for (const spirv_cross::Resource& r : resources.subpass_inputs )
517
516
{
@@ -584,8 +583,8 @@ core::smart_refctd_ptr<const CSPIRVIntrospector::CIntrospectionData> CSPIRVIntro
584
583
{
585
584
const spirv_cross::Resource& r = resources.push_constant_buffers .front ();
586
585
introData->pushConstant .present = true ;
587
- static_cast <impl::SShaderMemoryBlock&>( introData->pushConstant . info ) .name = r.name ;
588
- shaderMemBlockIntrospection (_comp, static_cast <impl::SShaderMemoryBlock&>( introData->pushConstant .info ) , r.base_type_id , r.id , mapId2SpecConst);
586
+ introData->pushConstant .name = r.name ;
587
+ shaderMemBlockIntrospection (_comp, introData->pushConstant .info , r.base_type_id , r.id , mapId2SpecConst);
589
588
}
590
589
591
590
return introData;
@@ -765,16 +764,16 @@ static void deinitIntrospectionData(CSPIRVIntrospector::CIntrospectionData* _dat
765
764
switch (res.type )
766
765
{
767
766
case ESRT_STORAGE_BUFFER:
768
- deinitShdrMemBlock (static_cast <impl::SShaderMemoryBlock&>( res.get <ESRT_STORAGE_BUFFER>() ));
767
+ deinitShdrMemBlock (res.get <ESRT_STORAGE_BUFFER>());
769
768
break ;
770
769
case ESRT_UNIFORM_BUFFER:
771
- deinitShdrMemBlock (static_cast <impl::SShaderMemoryBlock&>( res.get <ESRT_UNIFORM_BUFFER>() ));
770
+ deinitShdrMemBlock (res.get <ESRT_UNIFORM_BUFFER>());
772
771
break ;
773
772
default : break ;
774
773
}
775
774
}
776
775
if (_data->pushConstant .present )
777
- deinitShdrMemBlock (static_cast <impl::SShaderMemoryBlock&>( _data->pushConstant .info ) );
776
+ deinitShdrMemBlock (_data->pushConstant .info );
778
777
}
779
778
780
779
CSPIRVIntrospector::CIntrospectionData::~CIntrospectionData ()
0 commit comments