upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/dxgi_com.cpp
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:40 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:40 -0500
commite66a9c71c55f46cca9a85b24c61bfb711f5707ea (patch)
treecc95136f5e735783f781ad8ef9d48d0cad284256 /runtime/shims/dxgi_com.cpp
parent4389de85e0250fec869090a634164ee9505a459b (diff)
parentb62a30c37cdea7a15d47654beacadd8453f3f569 (diff)
Merge pull request #3284 from kapitche
Diffstat (limited to 'runtime/shims/dxgi_com.cpp')
-rw-r--r--runtime/shims/dxgi_com.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/shims/dxgi_com.cpp b/runtime/shims/dxgi_com.cpp
index 2f6d310fe..734824e07 100644
--- a/runtime/shims/dxgi_com.cpp
+++ b/runtime/shims/dxgi_com.cpp
@@ -690,9 +690,13 @@ public:
690 } 690 }
691 return E_INVALIDARG; 691 return E_INVALIDARG;
692 } 692 }
693 HRESULT STDMETHODCALLTYPE RegisterVideoMemoryBudgetChangeNotificationEvent(HANDLE, DWORD* cookie) override { 693 // Microsoft documents only "an HRESULT success or error code" and a cookie for
694 if (cookie) *cookie = 0; 694 // UnregisterVideoMemoryBudgetChangeNotification. The budget here is recomputed on every QueryVideoMemoryInfo and
695 return E_NOTIMPL; 695 // never changes by itself, so the event is registered and never signalled.
696 HRESULT STDMETHODCALLTYPE RegisterVideoMemoryBudgetChangeNotificationEvent(HANDLE event, DWORD* cookie) override {
697 if (!event || !cookie) return E_INVALIDARG;
698 *cookie = next_budget_cookie_.fetch_add(1, std::memory_order_relaxed);
699 return S_OK;
696 } 700 }
697 void STDMETHODCALLTYPE UnregisterVideoMemoryBudgetChangeNotification(DWORD) override {} 701 void STDMETHODCALLTYPE UnregisterVideoMemoryBudgetChangeNotification(DWORD) override {}
698 702
@@ -761,6 +765,7 @@ private:
761 } 765 }
762 } 766 }
763 767
768 std::atomic<DWORD> next_budget_cookie_{1};
764 std::atomic<ULONG> refs_{1}; 769 std::atomic<ULONG> refs_{1};
765 IDXGIFactory4* parent_ = nullptr; 770 IDXGIFactory4* parent_ = nullptr;
766 PFN_vkGetInstanceProcAddr gipa_ = nullptr; 771 PFN_vkGetInstanceProcAddr gipa_ = nullptr;