forked from GPUOpen-Tools/gpu_performance_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdx11_utils.h
47 lines (41 loc) · 1.92 KB
/
dx11_utils.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
//==============================================================================
// Copyright (c) 2015-2021 Advanced Micro Devices, Inc. All rights reserved.
/// @author AMD Developer Tools Team
/// @file
/// @brief DX11 utility function declaration
//==============================================================================
#ifndef GPU_PERF_API_DX11_DX11_UTILS_H_
#define GPU_PERF_API_DX11_DX11_UTILS_H_
#include "gpu_perf_api_dx11/dx11_include.h"
namespace dx11_utils
{
/// @brief Checks whether the interface pointer is DirectX 11 device or not.
//
/// Function increments the reference of the ID3D11Device pointer
///
/// @param [in] interface_pointer DirectX 11 interface pointer.
/// @param [out] d3d11_device DirectX 11 device pointer.
///
/// @return Boolean value indicating if the pointer is a DX11 device.
/// @retval True if interface pointer is a DX11 device.
/// @retval False otherwise.
bool GetD3D11Device(IUnknown* interface_pointer, ID3D11Device** d3d11_device);
/// @brief Checks whether or not the device supports the minimum DirectX 11 feature level.
///
/// @param [in] d3d11_device Device pointer.
///
/// @return Boolean value indicating if the device supports DX11.
/// @retval True if device is supports minimal level of DirectX 11.
/// @retval False otherwise.
bool IsFeatureLevelSupported(ID3D11Device* d3d11_device);
/// @brief Get the time stamp frequency of DirectX 11 device.
///
/// @param [in] d3d11_device device pointer
/// @param [out] timestamp_frequency The time-stamp frequency
///
/// @return Boolean value indicating the time-stamp frequency access success.
/// @retval True if time-stamp frequency access succeeded.
/// @retval False otherwise.
bool GetTimestampFrequency(ID3D11Device* d3d11_device, UINT64& timestamp_frequency);
} // namespace dx11_utils
#endif // GPU_PERF_API_DX11_DX11_UTILS_H_