Files
vatrog-vm-vgpu-streamer/CMakeLists.txt
T
lirent bcf708d3cc feat: add graphics-context sensors to producer contract
Append three host-readable sensor groups to the producer block, ABI
frozen by offset asserts (producer still fits page 0):

- cursor Tier-1 (hotspot, glyph dims, shape identity), published under
  the existing cursor_seq gate
- content_change_ns: monotonic stamp of the last scene-content change
- display geometry on its own cache line under a geom_seq seqlock:
  virtual-desktop bbox, captured-output origin, DPI, refresh

Source the cursor from each backend's existing grab metadata instead of
polling GetCursorInfo in the present pump: DDA from the duplication frame
info pointer position (no extra calls), NvFBC visibility from the grab
info plus one GetCursorInfo per frame for position, GDI from
GetCursorInfo. Position sampling now rides the frame rate, not the pump
tick.

Sample display geometry once at startup and re-sample only on backend
session recreate or a captured-mode change. Drop per-tick cursor
sampling (cursor_sample_pos) from the present loop.

Add src/stream/win32/geometry.{c,h}.
2026-06-19 01:32:28 +03:00

30 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(vgpu-streamer C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF) # strict c11; shim uses __asm__/__atomic_* — ok
add_executable(vgpu-streamer
src/stream/win32/main.c
src/stream/publish.c
src/stream/win32/region.c
src/stream/win32/present.c
src/stream/win32/cursor.c
src/stream/win32/geometry.c
src/stream/win32/capture.c
src/stream/win32/capture_nvfbc.c
src/stream/win32/capture_dda.c
src/stream/win32/capture_gdi.c)
target_include_directories(vgpu-streamer PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/src/stream/include
${CMAKE_CURRENT_SOURCE_DIR}/src/stream/win32
${CMAKE_CURRENT_SOURCE_DIR}/third_party) # vendor NvFBC + Windows.h shim
target_compile_definitions(vgpu-streamer PRIVATE CINTERFACE WIN32_LEAN_AND_MEAN=)
target_compile_options(vgpu-streamer PRIVATE
$<$<C_COMPILER_ID:GNU>:-O2;-Wall;-Wextra>
$<$<C_COMPILER_ID:MSVC>:/O2;/W3>)
target_link_libraries(vgpu-streamer PRIVATE d3d11 dxgi dxguid uuid user32 gdi32)
target_link_options(vgpu-streamer PRIVATE $<$<C_COMPILER_ID:GNU>:-static;-s>)