From 6dffd412f99e1b6f51c5cd448b14e3920b3936f8 Mon Sep 17 00:00:00 2001 From: mfalk Date: Thu, 9 Nov 2023 16:46:07 +0100 Subject: [PATCH 1/2] Adding IUserDefinedAnnotation to D3D11 for better debugging. --- vendor/directx/d3d11/d3d11.odin | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/vendor/directx/d3d11/d3d11.odin b/vendor/directx/d3d11/d3d11.odin index d94c05d066a..c6be7bce5d4 100644 --- a/vendor/directx/d3d11/d3d11.odin +++ b/vendor/directx/d3d11/d3d11.odin @@ -24,6 +24,8 @@ IModuleInstance :: d3d_compiler.ID3D11ModuleInstance IBlob :: d3d_compiler.ID3DBlob IModule :: d3d_compiler.ID3D11Module +LPCWSTR :: ^u16 + @(default_calling_convention="stdcall", link_prefix="D3D11") foreign d3d11 { CreateDevice :: proc( @@ -3280,7 +3282,19 @@ IVideoContext_VTable :: struct { VideoProcessorGetStreamRotation: proc "stdcall" (this: ^IVideoContext, pVideoProcessor: ^IVideoProcessor, StreamIndex: u32, pEnable: ^BOOL, pRotation: ^VIDEO_PROCESSOR_ROTATION), } - +IUserDefinedAnnotation_UUID_STRING :: "B2DAAD8B-03D4-4DBF-95EB-32AB4B63D0AB" +IUserDefinedAnnotation_UUID := &IID{0xB2DAAD8B, 0x03D4, 0x4DBF, {0x95, 0xEB, 0x32, 0xAB, 0x4B, 0x63, 0xD0, 0xAB}} +IUserDefinedAnnotation :: struct #raw_union{ +#subtype iunknown : IUnknown, +using id3d11userdefinedannotation_vtable : ^IUserDefinedAnnotation_VTable, +} +IUserDefinedAnnotation_VTable :: struct { + using iunknown_vtable : IUnknown_VTable, + BeginEvent: proc "stdcall" (this: ^IUserDefinedAnnotation, Name: LPCWSTR) -> i32, + EndEvent: proc "stdcall" (this: ^IUserDefinedAnnotation) -> i32, + GetStatus: proc "stdcall" (this: ^IUserDefinedAnnotation) -> i32, + SetMarker: proc "stdcall" (this: ^IUserDefinedAnnotation, Name: LPCWSTR), +} IVideoDevice_UUID_STRING :: "10EC4D5B-975A-4689-B9E4-D0AAC30FE333" IVideoDevice_UUID := &IID{0x10EC4D5B, 0x975A, 0x4689, {0xB9, 0xE4, 0xD0, 0xAA, 0xC3, 0x0F, 0xE3, 0x33}} From bd96cd0af761994210018ca647eb843dfeb71494 Mon Sep 17 00:00:00 2001 From: mfalk Date: Mon, 4 Dec 2023 05:49:42 +0100 Subject: [PATCH 2/2] Fixed indentation and : binding --- vendor/directx/d3d11/d3d11.odin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/directx/d3d11/d3d11.odin b/vendor/directx/d3d11/d3d11.odin index c6be7bce5d4..5e52fa4b42b 100644 --- a/vendor/directx/d3d11/d3d11.odin +++ b/vendor/directx/d3d11/d3d11.odin @@ -3284,9 +3284,9 @@ IVideoContext_VTable :: struct { IUserDefinedAnnotation_UUID_STRING :: "B2DAAD8B-03D4-4DBF-95EB-32AB4B63D0AB" IUserDefinedAnnotation_UUID := &IID{0xB2DAAD8B, 0x03D4, 0x4DBF, {0x95, 0xEB, 0x32, 0xAB, 0x4B, 0x63, 0xD0, 0xAB}} -IUserDefinedAnnotation :: struct #raw_union{ -#subtype iunknown : IUnknown, -using id3d11userdefinedannotation_vtable : ^IUserDefinedAnnotation_VTable, +IUserDefinedAnnotation :: struct #raw_union { + #subtype iunknown: IUnknown, + using id3d11userdefinedannotation_vtable: ^IUserDefinedAnnotation_VTable, } IUserDefinedAnnotation_VTable :: struct { using iunknown_vtable : IUnknown_VTable,