From 9469b90b019f331109300658a17d1614bf4dabee Mon Sep 17 00:00:00 2001 From: Lucas Perlind Date: Tue, 13 Feb 2024 17:13:17 +1100 Subject: [PATCH] Add ID3DUserDefinedAnnotation --- vendor/directx/d3d11/d3d11.odin | 16 ++++++++++++++++ vendor/directx/dxgi/dxgidebug.odin | 1 + 2 files changed, 17 insertions(+) diff --git a/vendor/directx/d3d11/d3d11.odin b/vendor/directx/d3d11/d3d11.odin index 53d45c47c..a1e3cf039 100644 --- a/vendor/directx/d3d11/d3d11.odin +++ b/vendor/directx/d3d11/d3d11.odin @@ -4,6 +4,7 @@ foreign import "system:d3d11.lib" import "../dxgi" import "../d3d_compiler" +import "core:sys/windows" IUnknown :: dxgi.IUnknown IUnknown_VTable :: dxgi.IUnknown_VTable @@ -16,6 +17,7 @@ IID :: dxgi.IID SIZE_T :: dxgi.SIZE_T BOOL :: dxgi.BOOL UINT :: dxgi.UINT +INT :: dxgi.INT RECT :: dxgi.RECT SIZE :: dxgi.SIZE @@ -5151,3 +5153,17 @@ MESSAGE_ID :: enum u32 { CalcSubresource :: #force_inline proc "contextless" (MipSlice: UINT, ArraySlice: UINT, MipLevels: UINT) -> UINT { return MipSlice + ArraySlice * MipLevels } + +ID3DUserDefinedAnnotation_UUID_STRING :: "B2DAAD8B-03D4-4DBF-95EB-32AB4B63D0AB" +ID3DUserDefinedAnnotation_UUID := &IID{0xB2DAAD8B, 0x03D4, 0x4DBF, {0x95, 0xEB, 0x32, 0xAB, 0x4B, 0x63, 0xD0, 0xAB}} +ID3DUserDefinedAnnotation :: struct #raw_union { + #subtype iunknown: IUnknown, + using vtable: ^ID3DUserDefinedAnnotation_VTable, +} +ID3DUserDefinedAnnotation_VTable :: struct { + using iunknown_vtable: IUnknown_VTable, + BeginEvent: proc "system" (this: ^ID3DUserDefinedAnnotation, Name: windows.LPCWSTR) -> INT, + EndEvent: proc "system" (this: ^ID3DUserDefinedAnnotation) -> INT, + SetMarker: proc "system" (this: ^ID3DUserDefinedAnnotation, Name: windows.LPCWSTR), + GetStatus: proc "system" (this: ^ID3DUserDefinedAnnotation) -> BOOL, +} diff --git a/vendor/directx/dxgi/dxgidebug.odin b/vendor/directx/dxgi/dxgidebug.odin index f5d4904eb..98a92d953 100644 --- a/vendor/directx/dxgi/dxgidebug.odin +++ b/vendor/directx/dxgi/dxgidebug.odin @@ -11,6 +11,7 @@ DEBUG_RLO_FLAGS :: enum u32 { // TODO: convert to bit_set } UINT :: win32.UINT +INT :: win32.INT UINT64 :: win32.UINT64 LPCSTR :: win32.LPCSTR DEBUG_ID :: win32.GUID