forked from GPUOpen-Tools/gpu_performance_api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DX12GPASession.h
65 lines (50 loc) · 2.2 KB
/
DX12GPASession.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//==============================================================================
// Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
/// \author AMD Developer Tools Team
/// \file
/// \brief DX12 GPA Session declaration
//==============================================================================
#ifndef _DX12_GPA_SESSION_H_
#define _DX12_GPA_SESSION_H_
// AMD DX12 Extension
#pragma warning (push)
#pragma warning (disable: 4201)
#include <AmdExtGpaInterfaceApi.h>
#pragma warning (pop)
// GPA Common
#include "GPASession.h"
class DX12GPAContext; // forward declaration
/// Class for DX12 GPA Session
class DX12GPASession : public GPASession
{
public:
/// Constructor
/// \param[in] pDX12GpaContext DX12 GPA Context
/// \param[in] sampleType The sample type that will be created on this session
/// \param[in] pAmdExtGpaSession AMD Extension GpaSession
DX12GPASession(DX12GPAContext* pDX12GpaContext,
GPA_Session_Sample_Type sampleType,
IAmdExtGpaInterface* pAmdExtGpaSession);
/// Delete default constructor
DX12GPASession() = delete;
/// Destructor
virtual ~DX12GPASession();
/// \copydoc IGPASession::ContinueSampleOnCommandList()
GPA_Status ContinueSampleOnCommandList(gpa_uint32 srcSampleId,
GPA_CommandListId primaryCommandListId) override;
/// \copydoc IGPASession::CopySecondarySamples()
GPA_Status CopySecondarySamples(GPA_CommandListId secondaryCmdListId,
GPA_CommandListId primaryCmdListId,
gpa_uint32 numSamples,
gpa_uint32* pNewSampleIds) override;
/// \copydoc IGPAInterfaceTrait::GetAPIType()
GPA_API_Type GetAPIType() const override;
/// Returns the Amd GPA extension interface
/// \return amd gpa extension interface
IAmdExtGpaInterface* GetAmdExtInterface() const;
private:
/// \copydoc GPASession::CreateAPIPass()
GPAPass* CreateAPIPass(PassIndex passIndex) override;
IAmdExtGpaInterface* m_pAmdExtGpaInterface; ///< AMD Extension Interface
};
#endif // _DX12_GPA_SESSION_H_