diff options
Diffstat (limited to 'runtime/shims/dxgi_com.cpp')
| -rw-r--r-- | runtime/shims/dxgi_com.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/runtime/shims/dxgi_com.cpp b/runtime/shims/dxgi_com.cpp index ccf578a9d..86be935a4 100644 --- a/runtime/shims/dxgi_com.cpp +++ b/runtime/shims/dxgi_com.cpp | |||
| @@ -548,16 +548,11 @@ public: | |||
| 548 | return nullptr; | 548 | return nullptr; |
| 549 | return dup; | 549 | return dup; |
| 550 | } | 550 | } |
| 551 | HRESULT STDMETHODCALLTYPE SetMatrixTransform(const DXGI_MATRIX_3X2_F* matrix) override { | 551 | // A matrix transform belongs to composition swapchains only (CreateSwapChainForComposition, E_NOTIMPL here). |
| 552 | if (!matrix) return E_INVALIDARG; | 552 | // Host DXGI answers DXGI_ERROR_INVALID_CALL to both methods on an HWND swapchain, with a matrix or with null |
| 553 | matrix_transform_ = *matrix; | 553 | // (Windows 11, RTX 5060 Ti, driver 621.14); every swapchain the layer creates gets that answer. |
| 554 | return S_OK; | 554 | HRESULT STDMETHODCALLTYPE SetMatrixTransform(const DXGI_MATRIX_3X2_F*) override { return DXGI_ERROR_INVALID_CALL; } |
| 555 | } | 555 | HRESULT STDMETHODCALLTYPE GetMatrixTransform(DXGI_MATRIX_3X2_F*) override { return DXGI_ERROR_INVALID_CALL; } |
| 556 | HRESULT STDMETHODCALLTYPE GetMatrixTransform(DXGI_MATRIX_3X2_F* matrix) override { | ||
| 557 | if (!matrix) return E_INVALIDARG; | ||
| 558 | *matrix = matrix_transform_; | ||
| 559 | return S_OK; | ||
| 560 | } | ||
| 561 | 556 | ||
| 562 | // IDXGISwapChain3 | 557 | // IDXGISwapChain3 |
| 563 | UINT STDMETHODCALLTYPE GetCurrentBackBufferIndex() override { return swapchain_.current_back_buffer_index(); } | 558 | UINT STDMETHODCALLTYPE GetCurrentBackBufferIndex() override { return swapchain_.current_back_buffer_index(); } |
| @@ -627,7 +622,6 @@ private: | |||
| 627 | std::atomic<LONGLONG> last_present_qpc_{0}; | 622 | std::atomic<LONGLONG> last_present_qpc_{0}; |
| 628 | std::atomic<UINT> max_frame_latency_{2}; | 623 | std::atomic<UINT> max_frame_latency_{2}; |
| 629 | DXGI_RGBA background_color_{0, 0, 0, 0}; | 624 | DXGI_RGBA background_color_{0, 0, 0, 0}; |
| 630 | DXGI_MATRIX_3X2_F matrix_transform_{1, 0, 0, 1, 0, 0}; | ||
| 631 | DXGI_MODE_ROTATION rotation_ = DXGI_MODE_ROTATION_IDENTITY; | 625 | DXGI_MODE_ROTATION rotation_ = DXGI_MODE_ROTATION_IDENTITY; |
| 632 | VkExtent2D source_size_{0, 0}; | 626 | VkExtent2D source_size_{0, 0}; |
| 633 | }; | 627 | }; |