upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/shims/xbox_present.cpp
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-23 17:07:14 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-23 17:07:14 -0500
commit2be1e08271de77edcab38785c177714a0600a25b (patch)
treed5dfb55e97bbe6d153f0cce54a0a288cb048a051 /runtime/shims/xbox_present.cpp
parente688f7df1cd9d8d79a48e5a5feaacc8ea5c08879 (diff)
parent0438ee44fdc03b65765e2ef3285e05326691afbd (diff)
Merge PR #9549
Diffstat (limited to 'runtime/shims/xbox_present.cpp')
-rw-r--r--runtime/shims/xbox_present.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/shims/xbox_present.cpp b/runtime/shims/xbox_present.cpp
index f9ed6191a..dd5f810cf 100644
--- a/runtime/shims/xbox_present.cpp
+++ b/runtime/shims/xbox_present.cpp
@@ -1,5 +1,7 @@
1#include "xbox_present.h" 1#include "xbox_present.h"
2 2
3#include "d3d12_trace.h"
4
3#include "../src/vulkan_present.h" 5#include "../src/vulkan_present.h"
4 6
5#include <cerrno> 7#include <cerrno>
@@ -119,6 +121,13 @@ HRESULT XboxPresentation::GetFrameStatisticsX(std::uint64_t token, UINT type_mas
119 121
120HRESULT XboxPresentation::PresentX(UINT plane_count, const XboxPresentPlaneParameters* planes, 122HRESULT XboxPresentation::PresentX(UINT plane_count, const XboxPresentPlaneParameters* planes,
121 const XboxPresentParameters* params) { 123 const XboxPresentParameters* params) {
124 // One trace line per present, whatever path the call takes out of present_x: the queue proxy's PresentX slot is
125 // past the PC chain, so nothing else records it, and a frame loop's presents could not be counted from a trace.
126 return d3d12_trace::result("XboxPresentation::PresentX", present_x(plane_count, planes, params));
127}
128
129HRESULT XboxPresentation::present_x(UINT plane_count, const XboxPresentPlaneParameters* planes,
130 const XboxPresentParameters* params) {
122 std::lock_guard serialise(present_mutex_); 131 std::lock_guard serialise(present_mutex_);
123 if (plane_count > 2 || (plane_count && !planes)) return E_INVALIDARG; 132 if (plane_count > 2 || (plane_count && !planes)) return E_INVALIDARG;
124 if (pacer_.suspended()) return from_pacer(hr::invalid_state); 133 if (pacer_.suspended()) return from_pacer(hr::invalid_state);