2018-06-11 14:29:47 +02:00
|
|
|
#pragma once
|
|
|
|
|
2022-08-03 17:13:32 +02:00
|
|
|
#include <type_traits>
|
|
|
|
|
2018-06-11 14:29:47 +02:00
|
|
|
#include "d3d11_include.h"
|
2022-08-03 17:04:33 +02:00
|
|
|
|
2021-04-30 10:04:30 +02:00
|
|
|
#include "../dxvk/dxvk_annotation.h"
|
2022-08-03 17:04:33 +02:00
|
|
|
#include "../dxvk/dxvk_device.h"
|
2018-06-11 14:29:47 +02:00
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
2022-08-03 17:13:32 +02:00
|
|
|
class D3D11DeferredContext;
|
|
|
|
class D3D11ImmediateContext;
|
2021-04-01 21:16:44 +02:00
|
|
|
|
2022-08-03 17:13:32 +02:00
|
|
|
template<typename ContextType>
|
2021-04-30 10:04:30 +02:00
|
|
|
class D3D11UserDefinedAnnotation final : public IDXVKUserDefinedAnnotation {
|
2022-08-03 17:13:32 +02:00
|
|
|
constexpr static bool IsDeferred = std::is_same_v<ContextType, D3D11DeferredContext>;
|
2018-06-11 14:29:47 +02:00
|
|
|
public:
|
|
|
|
|
2022-08-03 17:04:33 +02:00
|
|
|
D3D11UserDefinedAnnotation(
|
2022-08-03 17:13:32 +02:00
|
|
|
ContextType* container,
|
2022-08-03 17:04:33 +02:00
|
|
|
const Rc<DxvkDevice>& dxvkDevice);
|
|
|
|
|
2018-06-11 14:29:47 +02:00
|
|
|
~D3D11UserDefinedAnnotation();
|
|
|
|
|
2022-08-03 17:04:33 +02:00
|
|
|
D3D11UserDefinedAnnotation (const D3D11UserDefinedAnnotation&) = delete;
|
|
|
|
D3D11UserDefinedAnnotation& operator = (const D3D11UserDefinedAnnotation&) = delete;
|
|
|
|
|
2018-06-11 14:29:47 +02:00
|
|
|
ULONG STDMETHODCALLTYPE AddRef();
|
|
|
|
|
|
|
|
ULONG STDMETHODCALLTYPE Release();
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject);
|
|
|
|
|
|
|
|
INT STDMETHODCALLTYPE BeginEvent(
|
2021-04-30 10:04:30 +02:00
|
|
|
D3DCOLOR Color,
|
2018-06-11 14:29:47 +02:00
|
|
|
LPCWSTR Name);
|
|
|
|
|
|
|
|
INT STDMETHODCALLTYPE EndEvent();
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE SetMarker(
|
2021-04-30 10:04:30 +02:00
|
|
|
D3DCOLOR Color,
|
2018-06-11 14:29:47 +02:00
|
|
|
LPCWSTR Name);
|
|
|
|
|
|
|
|
BOOL STDMETHODCALLTYPE GetStatus();
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2022-08-03 17:13:32 +02:00
|
|
|
ContextType* m_container;
|
|
|
|
int32_t m_eventDepth;
|
|
|
|
bool m_annotationsEnabled;
|
2018-06-11 14:29:47 +02:00
|
|
|
};
|
|
|
|
|
2021-04-01 21:16:44 +02:00
|
|
|
}
|