diff options
Diffstat (limited to 'runtime/shims/xbox_present.cpp')
| -rw-r--r-- | runtime/shims/xbox_present.cpp | 9 |
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 | ||
| 120 | HRESULT XboxPresentation::PresentX(UINT plane_count, const XboxPresentPlaneParameters* planes, | 122 | HRESULT 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 | |||
| 129 | HRESULT 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); |