From d5d5c1a8bceb41ef83227c1ced1b068ab8c70622 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 30 Apr 2021 08:59:44 +0100 Subject: [PATCH] [dxvk] Define IDXVKUserDefinedAnnotation Something common to share for perf markers between D3D9 and D3D11. Inherits from the public D3D11 interface. --- src/dxvk/dxvk_annotation.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/dxvk/dxvk_annotation.h diff --git a/src/dxvk/dxvk_annotation.h b/src/dxvk/dxvk_annotation.h new file mode 100644 index 00000000..e5d1cbc7 --- /dev/null +++ b/src/dxvk/dxvk_annotation.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include + +MIDL_INTERFACE("7f2c2f72-1cc8-4979-8d9c-7e3faeddecde") +IDXVKUserDefinedAnnotation : public ID3DUserDefinedAnnotation { + +public: + + INT STDMETHODCALLTYPE BeginEvent( + LPCWSTR Name) final { + return this->BeginEvent(0, Name); + } + + void STDMETHODCALLTYPE SetMarker( + LPCWSTR Name) final { + this->SetMarker(0, Name); + } + + virtual INT STDMETHODCALLTYPE BeginEvent( + D3DCOLOR Color, + LPCWSTR Name) = 0; + + virtual void STDMETHODCALLTYPE SetMarker( + D3DCOLOR Color, + LPCWSTR Name) = 0; + +}; + +#ifdef _MSC_VER +struct __declspec(uuid("7f2c2f72-1cc8-4979-8d9c-7e3faeddecde")) IDXVKUserDefinedAnnotation; +#else +__CRT_UUID_DECL(IDXVKUserDefinedAnnotation, 0x7f2c2f72,0x1cc8,0x4979,0x8d,0x9c,0x7e,0x3f,0xae,0xdd,0xec,0xde); +#endif