本文整理汇总了C++中DX12Interceptor::PostCall方法的典型用法代码示例。如果您正苦于以下问题:C++ DX12Interceptor::PostCall方法的具体用法?C++ DX12Interceptor::PostCall怎么用?C++ DX12Interceptor::PostCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DX12Interceptor
的用法示例。
在下文中一共展示了DX12Interceptor::PostCall方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lock
//-----------------------------------------------------------------------------
/// Wrapped_ID3D12Pageable::SetPrivateData
//-----------------------------------------------------------------------------
HRESULT STDMETHODCALLTYPE Wrapped_ID3D12Pageable::SetPrivateData(REFGUID guid, UINT DataSize, const void* pData)
{
#if SERIALIZE_DX12_ENTRY_POINTS
ScopeLock lock(&s_mutex);
#endif
HRESULT result = {};
DX12Interceptor* interceptor = GetDX12LayerManager()->GetInterceptor();
if (interceptor && interceptor->ShouldCollectTrace())
{
ParameterEntry parameters[] =
{
{ PARAMETER_GUID, &guid },
{ PARAMETER_UNSIGNED_INT, &DataSize },
{ PARAMETER_POINTER, pData },
};
int numParameters = (sizeof(parameters) / sizeof(parameters[0]));
DX12APIEntry* pNewEntry = interceptor->PreCall(this, FuncId_ID3D12Object_SetPrivateData, numParameters, parameters);
result = mRealPageable->SetPrivateData(guid, DataSize, pData);
interceptor->PostCall(pNewEntry, result);
}
else
{
result = mRealPageable->SetPrivateData(guid, DataSize, pData);
}
return result;
}
示例2: lock
//-----------------------------------------------------------------------------
/// Wrapped_ID3D12QueryHeap::Release
//-----------------------------------------------------------------------------
ULONG STDMETHODCALLTYPE Wrapped_ID3D12QueryHeap::Release()
{
#if SERIALIZE_DX12_ENTRY_POINTS
ScopeLock lock(&s_mutex);
#endif
ULONG result = {};
DX12Interceptor* interceptor = GetDX12LayerManager()->GetInterceptor();
if (interceptor->ShouldCollectTrace())
{
DX12APIEntry* pNewEntry = interceptor->PreCall(this, FuncId_IUnknown_Release, 0, nullptr);
result = mRealQueryHeap->Release();
interceptor->PostCall(pNewEntry, result);
}
else
{
result = mRealQueryHeap->Release();
}
if (result == 0)
{
DX12WrappedObjectDatabase* objectDatabase = (DX12WrappedObjectDatabase*)DX12ObjectDatabaseProcessor::Instance()->GetObjectDatabase();
IDX12InstanceBase* objectMetadata = objectDatabase->GetMetadataObject(this);
if (objectMetadata != nullptr)
{
objectMetadata->FlagAsDestroyed();
}
}
return result;
}
示例3: lock
//-----------------------------------------------------------------------------
/// Wrapped_ID3D12CommandQueue::CopyTileMappings
//-----------------------------------------------------------------------------
void STDMETHODCALLTYPE Wrapped_ID3D12CommandQueue::CopyTileMappings(ID3D12Resource* pDstResource, const D3D12_TILED_RESOURCE_COORDINATE* pDstRegionStartCoordinate, ID3D12Resource* pSrcResource, const D3D12_TILED_RESOURCE_COORDINATE* pSrcRegionStartCoordinate, const D3D12_TILE_REGION_SIZE* pRegionSize, D3D12_TILE_MAPPING_FLAGS Flags)
{
#if SERIALIZE_DX12_ENTRY_POINTS
ScopeLock lock(&s_mutex);
#endif
ID3D12Resource* pDstResourceUnwrapped;
DX12CoreDeepCopy::UnwrapInterface(pDstResource, &(pDstResourceUnwrapped));
ID3D12Resource* pSrcResourceUnwrapped;
DX12CoreDeepCopy::UnwrapInterface(pSrcResource, &(pSrcResourceUnwrapped));
DX12Interceptor* interceptor = GetDX12LayerManager()->GetInterceptor();
if (interceptor && interceptor->ShouldCollectTrace())
{
ParameterEntry parameters[] =
{
{ PARAMETER_POINTER_SPECIAL, pDstResource },
{ PARAMETER_POINTER, pDstRegionStartCoordinate },
{ PARAMETER_POINTER_SPECIAL, pSrcResource },
{ PARAMETER_POINTER, pSrcRegionStartCoordinate },
{ PARAMETER_POINTER, pRegionSize },
{ PARAMETER_UNSIGNED_INT, &Flags },
};
int numParameters = (sizeof(parameters) / sizeof(parameters[0]));
DX12APIEntry* pNewEntry = interceptor->PreCall(this, FuncId_ID3D12CommandQueue_CopyTileMappings, numParameters, parameters);
mRealCommandQueue->CopyTileMappings(pDstResourceUnwrapped, pDstRegionStartCoordinate, pSrcResourceUnwrapped, pSrcRegionStartCoordinate, pRegionSize, Flags);
interceptor->PostCall(pNewEntry);
}
else
{
mRealCommandQueue->CopyTileMappings(pDstResourceUnwrapped, pDstRegionStartCoordinate, pSrcResourceUnwrapped, pSrcRegionStartCoordinate, pRegionSize, Flags);
}
}
示例4: lock
//-----------------------------------------------------------------------------
/// Wrapped_ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart
//-----------------------------------------------------------------------------
D3D12_GPU_DESCRIPTOR_HANDLE STDMETHODCALLTYPE Wrapped_ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart()
{
#if SERIALIZE_DX12_ENTRY_POINTS
ScopeLock lock(&s_mutex);
#endif
D3D12_GPU_DESCRIPTOR_HANDLE result = {};
DX12Interceptor* interceptor = GetDX12LayerManager()->GetInterceptor();
if (interceptor && interceptor->ShouldCollectTrace())
{
DX12APIEntry* pNewEntry = interceptor->PreCall(this, FuncId_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart, 0, nullptr);
result = mRealDescriptorHeap->GetGPUDescriptorHandleForHeapStart();
interceptor->PostCall(pNewEntry, static_cast<INT64>(result.ptr), RETURN_VALUE_HEX);
}
else
{
result = mRealDescriptorHeap->GetGPUDescriptorHandleForHeapStart();
}
return result;
}
示例5: lock
//-----------------------------------------------------------------------------
/// Wrapped_ID3D12CommandAllocator::Reset
//-----------------------------------------------------------------------------
HRESULT STDMETHODCALLTYPE Wrapped_ID3D12CommandAllocator::Reset()
{
#if SERIALIZE_DX12_ENTRY_POINTS
ScopeLock lock(&s_mutex);
#endif
HRESULT result = {};
DX12Interceptor* interceptor = GetDX12LayerManager()->GetInterceptor();
if (interceptor->ShouldCollectTrace())
{
DX12APIEntry* pNewEntry = interceptor->PreCall(this, FuncId_ID3D12CommandAllocator_Reset, 0, nullptr);
result = mRealCommandAllocator->Reset();
interceptor->PostCall(pNewEntry, result);
}
else
{
result = mRealCommandAllocator->Reset();
}
return result;
}
示例6: lock
//-----------------------------------------------------------------------------
/// Wrapped_ID3D12CommandList::GetType
//-----------------------------------------------------------------------------
D3D12_COMMAND_LIST_TYPE STDMETHODCALLTYPE Wrapped_ID3D12CommandList::GetType()
{
#if SERIALIZE_DX12_ENTRY_POINTS
ScopeLock lock(&s_mutex);
#endif
D3D12_COMMAND_LIST_TYPE result = {};
DX12Interceptor* interceptor = GetDX12LayerManager()->GetInterceptor();
if (interceptor && interceptor->ShouldCollectTrace())
{
DX12APIEntry* pNewEntry = interceptor->PreCall(this, FuncId_ID3D12CommandList_GetType, 0, nullptr);
result = mRealCommandList->GetType();
interceptor->PostCall(pNewEntry, result);
}
else
{
result = mRealCommandList->GetType();
}
return result;
}