M2: DX10 mock-game render backend

Add render_dx10.cpp (selectable as `dx10`): composes the animated pattern
(background + moving bar + top-left frame-counter block) on the CPU each frame
and CopyResource's it into a real D3D10 DXGI swap-chain back buffer (DX10 has no
rect-clear; no shaders). Smoke-verified: `coop_mock_game dx10 2` presents frames
and exits cleanly. The frame-accurate decode-through-the-hook assertion lands
with the DX10 capture commit next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 11:19:38 +02:00
parent cf7e0c783a
commit a8de75b2f6
5 changed files with 139 additions and 4 deletions

View File

@@ -1,15 +1,16 @@
# CoopMockGame -- a tiny test "game" with an animated, frame-numbered render (DX11/DX12)
# CoopMockGame -- a tiny test "game" with an animated, frame-numbered render (DX10/DX11/DX12)
# and a configurable WASAPI tone, used by the capture/audio/hook stress tests. Not shipped.
add_executable(coop_mock_game
main.cpp
render_backend.cpp
render_dx11.cpp
render_dx12.cpp)
render_dx12.cpp
render_dx10.cpp)
# Reuses the shared ToneSource (also used by coop_tone + the audio hook self-test).
target_include_directories(coop_mock_game PRIVATE ${CMAKE_SOURCE_DIR}/tools/audio_tone)
target_link_libraries(coop_mock_game PRIVATE d3d11 d3d12 dxgi ole32)
target_link_libraries(coop_mock_game PRIVATE d3d11 d3d12 d3d10 dxgi ole32)
set_target_properties(coop_mock_game PROPERTIES OUTPUT_NAME "coop_mock_game")
# Test fixture -> stage next to the tests (alongside coop_tone), not in the deployable root.