From 731b9c902f4ae1f66cf3a4b167fa394fe8ae7dec Mon Sep 17 00:00:00 2001 From: Marko <54064471+markodevv@users.noreply.github.com> Date: Sat, 11 Mar 2023 05:25:17 +0100 Subject: [PATCH 1/2] Add RegisterMessageCallback for d3d12 --- vendor/directx/d3d12/d3d12.odin | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/vendor/directx/d3d12/d3d12.odin b/vendor/directx/d3d12/d3d12.odin index 1e1d8de84..244b107e1 100644 --- a/vendor/directx/d3d12/d3d12.odin +++ b/vendor/directx/d3d12/d3d12.odin @@ -4870,6 +4870,26 @@ IInfoQueue_VTable :: struct { GetMuteDebugOutput: proc "stdcall" (this: ^IInfoQueue) -> BOOL, } +MESSAGE_CALLBACK_FLAGS :: distinct bit_set[MESSAGE_CALLBACK_FLAG; u32] +MESSAGE_CALLBACK_FLAG :: enum +{ + IGNORE_FILTERS = 0, +} + +PFN_MESSAGE_CALLBACK :: #type proc "c" (Category: MESSAGE_CATEGORY, Severity: MESSAGE_SEVERITY, ID: MESSAGE_ID, pDescription: cstring, pContext: rawptr) + +IInfoQueue1_UUID_STRING :: "2852dd88-b484-4c0c-b6b1-67168500e600" +IInfoQueue1_UUID := &IID{0x2852dd88, 0xb484, 0x4c0c, {0xb6, 0xb1, 0x67, 0x16, 0x85, 0x00, 0xe6, 0x00}} +IInfoQueue1 :: struct #raw_union { + #subtype iinfo_queue: IInfoQueue, + using idxgiinfoqueue1_vtable: ^IInfoQueue1_VTable, +} +IInfoQueue1_VTable :: struct { + using idxgiinfoqueue_vtable: IInfoQueue_VTable, + RegisterMessageCallback: proc "stdcall" (this: ^IInfoQueue1, CallbackFunc: PFN_MESSAGE_CALLBACK, CallbackFilterFlags: MESSAGE_CALLBACK_FLAGS, pContext: rawptr, pCallbackCookie: ^u32) -> HRESULT, + UnregisterMessageCallback: proc "stdcall" (this: ^IInfoQueue1, pCallbackCookie: u32) -> HRESULT, +} + PFN_CREATE_DEVICE :: #type proc "c" (a0: ^IUnknown, a1: FEATURE_LEVEL, a2: ^IID, a3: ^rawptr) -> HRESULT PFN_GET_DEBUG_INTERFACE :: #type proc "c" (a0: ^IID, a1: ^rawptr) -> HRESULT From ede57720fd90724c4f684fab3794575215b467ea Mon Sep 17 00:00:00 2001 From: Marko <54064471+markodevv@users.noreply.github.com> Date: Mon, 13 Mar 2023 23:08:15 +0100 Subject: [PATCH 2/2] Fix brace style and indentation --- vendor/directx/d3d12/d3d12.odin | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vendor/directx/d3d12/d3d12.odin b/vendor/directx/d3d12/d3d12.odin index 244b107e1..e84474aac 100644 --- a/vendor/directx/d3d12/d3d12.odin +++ b/vendor/directx/d3d12/d3d12.odin @@ -4871,9 +4871,8 @@ IInfoQueue_VTable :: struct { } MESSAGE_CALLBACK_FLAGS :: distinct bit_set[MESSAGE_CALLBACK_FLAG; u32] -MESSAGE_CALLBACK_FLAG :: enum -{ - IGNORE_FILTERS = 0, +MESSAGE_CALLBACK_FLAG :: enum { + IGNORE_FILTERS = 0, } PFN_MESSAGE_CALLBACK :: #type proc "c" (Category: MESSAGE_CATEGORY, Severity: MESSAGE_SEVERITY, ID: MESSAGE_ID, pDescription: cstring, pContext: rawptr)