@ -251,7 +251,13 @@ static void * STDMETHODCALLTYPE d3d12_state_object_properties_GetShaderIdentifie
const WCHAR * subtype = NULL ;
uint32_t index ;
TRACE ( " iface %p, export_name %p. \n " , iface , export_name ) ;
RT_TRACE ( " iface %p, export_name %s. \n " , iface , debugstr_w ( export_name ) ) ;
if ( object - > type = = D3D12_STATE_OBJECT_TYPE_COLLECTION )
{
FIXME ( " Cannot query identifiers from COLLECTIONs. \n " ) ;
return NULL ;
}
index = d3d12_state_object_get_export_index ( object , export_name , & subtype ) ;
@ -262,9 +268,13 @@ static void * STDMETHODCALLTYPE d3d12_state_object_properties_GetShaderIdentifie
/* Need to return the parent SBT pointer if it exists */
while ( export - > inherited_collection_index > = 0 )
{
RT_TRACE ( " chaining into collection %d. \n " , export - > inherited_collection_index ) ;
object = object - > collections [ export - > inherited_collection_index ] ;
export = & object - > exports [ export - > inherited_collection_export_index ] ;
}
RT_TRACE ( " identifier { %016 " PRIx64 " , %016 " PRIx64 " , %016 " PRIx64 " , %016 " PRIx64 " } \n " ,
* ( const uint64_t * ) ( export - > identifier + 0 ) , * ( const uint64_t * ) ( export - > identifier + 8 ) ,
* ( const uint64_t * ) ( export - > identifier + 16 ) , * ( const uint64_t * ) ( export - > identifier + 24 ) ) ;
return export - > identifier ;
}
else
@ -1351,6 +1361,13 @@ static HRESULT d3d12_state_object_get_group_handles(struct d3d12_state_object *o
if ( vr )
return hresult_from_vk_result ( vr ) ;
RT_TRACE ( " Queried export %zu, group handle %u -> { %016 " PRIx64 " , %016 " PRIx64 " , %016 " PRIx64 " , %016 " PRIx64 " } \n " ,
i , group_index ,
* ( const uint64_t * ) ( data - > exports [ i ] . identifier + 0 ) ,
* ( const uint64_t * ) ( data - > exports [ i ] . identifier + 8 ) ,
* ( const uint64_t * ) ( data - > exports [ i ] . identifier + 16 ) ,
* ( const uint64_t * ) ( data - > exports [ i ] . identifier + 24 ) ) ;
collection_export = data - > exports [ i ] . inherited_collection_export_index ;
collection_index = data - > exports [ i ] . inherited_collection_index ;
@ -2126,6 +2143,20 @@ static HRESULT d3d12_state_object_init(struct d3d12_state_object *object,
object - > internal_refcount = 1 ;
object - > device = device ;
object - > type = desc - > Type ;
if ( object - > type = = D3D12_STATE_OBJECT_TYPE_COLLECTION & &
( vkd3d_config_flags & VKD3D_CONFIG_FLAG_ALLOW_SBT_COLLECTION ) )
{
/* It seems to be valid to query shader identifiers from a COLLECTION which is pure insanity.
* We can fake this behavior if we pretend we have ALLOW_STATE_OBJECT_ADDITIONS and RTPSO .
* We will validate that the " COLLECTION " matches the consuming RTPSO .
* If the collection does not contain an RGEN shader , we ' re technically out of spec here ,
* but there is nothing we can do for now without further spec improvements . */
INFO ( " Promoting COLLECTION to RAYTRACING_PIPELINE as workaround. \n " ) ;
object - > type = D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE ;
object - > flags | = D3D12_STATE_OBJECT_FLAG_ALLOW_STATE_OBJECT_ADDITIONS ;
}
memset ( & data , 0 , sizeof ( data ) ) ;
if ( FAILED ( hr = d3d12_state_object_parse_subobjects ( object , desc , parent , & data ) ) )