当前位置: 首页>>代码示例>>C++>>正文


C++ DX12Interceptor类代码示例

本文整理汇总了C++中DX12Interceptor的典型用法代码示例。如果您正苦于以下问题:C++ DX12Interceptor类的具体用法?C++ DX12Interceptor怎么用?C++ DX12Interceptor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DX12Interceptor类的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;
}
开发者ID:StephenThomasUWTSD,项目名称:CodeXL,代码行数:34,代码来源:Wrapped_ID3D12Pageable.cpp

示例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;
}
开发者ID:PlusChie,项目名称:CodeXL,代码行数:37,代码来源:Wrapped_ID3D12QueryHeap.cpp

示例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);
    }
}
开发者ID:StephenThomasUWTSD,项目名称:CodeXL,代码行数:38,代码来源:Wrapped_ID3D12CommandQueue.cpp

示例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;
}
开发者ID:StephenThomasUWTSD,项目名称:CodeXL,代码行数:26,代码来源:Wrapped_ID3D12DescriptorHeap.cpp

示例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;
}
开发者ID:PlusChie,项目名称:CodeXL,代码行数:26,代码来源:Wrapped_ID3D12CommandAllocator.cpp

示例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;
}
开发者ID:StephenThomasUWTSD,项目名称:CodeXL,代码行数:26,代码来源:Wrapped_ID3D12CommandList.cpp


注:本文中的DX12Interceptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。