- add an internal DirectWrite/Direct2D OSD core for YUY2 and Y210 with configurable position, font size, RGB color, and up to 32 printable ASCII characters - expose per-channel OSD set/clear APIs and blend only the visible overlay rectangle on the GPU while preserving the frame read/release contract and tracking native versus processed buffer ownership - convert native YUY2/Y210 directly to BGRA8, RGB10A2, or NV12 with reusable output resources, avoiding unnecessary FP16 intermediates and scene copies - draw native-size and reduced previews directly to the swapchain and allocate an FP16 intermediate only for enlarged previews while retaining the existing upload queue and format support - bump the SDK version to 1.0.2, fix the installed customer API reference path, update conversion and OSD documentation, and remove the old 0922 SDK archive Validation: git diff --cached --check passed before commit. No SDK rebuild or hardware runtime validation was performed in this commit pass.
90 lines
2.2 KiB
CMake
90 lines
2.2 KiB
CMake
# GVFG_SDK_VERSION in the root CMakeLists.txt is the single version source.
|
|
project(gvfg LANGUAGES CXX)
|
|
|
|
set(GVFG_EXPORTS_FILE gvfg.def)
|
|
|
|
add_library(gvfg SHARED
|
|
${GVFG_EXPORTS_FILE}
|
|
include/gvfg_capture.h
|
|
include/gvfg_debug.h
|
|
src/gigabyte/gigabyte_capture_session.cpp
|
|
src/gigabyte/gigabyte_capture_session.h
|
|
src/gigabyte/gigabyte_driver_extensions.cpp
|
|
src/gigabyte/gigabyte_driver_extensions.h
|
|
src/gigabyte/gigabyte_device.cpp
|
|
src/gigabyte/gigabyte_device.h
|
|
src/gpu/d3d_conversion_pipeline.cpp
|
|
src/gpu/d3d_conversion_pipeline.h
|
|
src/gpu/gvfg_gpu_convert.cpp
|
|
src/gpu/gvfg_gpu_osd.cpp
|
|
src/gpu/gvfg_gpu_osd.h
|
|
src/gvfg_error_state.h
|
|
src/gvfg_capture.cpp
|
|
)
|
|
|
|
set_target_properties(gvfg PROPERTIES
|
|
AUTOMOC OFF
|
|
AUTOUIC OFF
|
|
AUTORCC OFF
|
|
)
|
|
|
|
target_include_directories(gvfg
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/gigabyte
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/gpu
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/GigabyteLib
|
|
)
|
|
|
|
target_compile_definitions(gvfg PRIVATE
|
|
GVFG_BUILD
|
|
GVFG_VERSION_STRING="${GVFG_SDK_VERSION}"
|
|
)
|
|
|
|
target_compile_definitions(gvfg PRIVATE
|
|
GVFG_INTERNAL_DIAGNOSTICS=$<IF:$<CONFIG:Debug>,1,0>
|
|
)
|
|
|
|
target_link_libraries(gvfg PRIVATE
|
|
gvfg_osd_core
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/GigabyteLib/GvfgSdk.lib"
|
|
setupapi
|
|
user32
|
|
dxgi
|
|
d3d11
|
|
D3DCompiler
|
|
)
|
|
|
|
if (MSVC)
|
|
target_compile_options(gvfg PRIVATE /utf-8 /EHsc)
|
|
endif()
|
|
|
|
if (MSVC AND GVFG_MINGW_DLLTOOL)
|
|
add_custom_command(TARGET gvfg POST_BUILD
|
|
COMMAND "${GVFG_MINGW_DLLTOOL}"
|
|
-d "${CMAKE_CURRENT_SOURCE_DIR}/${GVFG_EXPORTS_FILE}"
|
|
-D gvfg.dll
|
|
-l libgvfg.dll.a
|
|
WORKING_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
|
|
COMMENT "Generating MinGW import library for gvfg.dll"
|
|
VERBATIM
|
|
)
|
|
endif()
|
|
|
|
install(TARGETS gvfg
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
)
|
|
|
|
install(FILES include/gvfg_capture.h
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
)
|
|
|
|
if (MSVC AND GVFG_MINGW_DLLTOOL)
|
|
install(FILES "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libgvfg.dll.a"
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
)
|
|
endif()
|