Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,11 @@ target_sources(startup_stream_consumer PRIVATE tests/startup_root_reset.cpp)
add_executable(startup_stream_depth tests/startup_stream_depth.cpp $<TARGET_OBJECTS:startup_stream_setup_obj>)
target_compile_features(startup_stream_depth PRIVATE cxx_std_17)
target_link_libraries(startup_stream_depth PRIVATE d3d12_xs_shim d3d12 dxgi)
# Depth target binding for translated draws (list slot 50, #1999 item D): depth values and debug-layer
# messages after the fence, and an unresolved depth handle.
add_executable(startup_draw_depth_target tests/startup_draw_depth_target.cpp $<TARGET_OBJECTS:startup_stream_setup_obj>)
target_compile_features(startup_draw_depth_target PRIVATE cxx_std_17)
target_link_libraries(startup_draw_depth_target PRIVATE d3d12_xs_shim d3d12 dxgi)

# Console queue Wait (slot 17) waits on the GPU instead of signalling the fence.
add_executable(startup_queue_wait tests/startup_queue_wait.cpp)
Expand Down Expand Up @@ -2588,6 +2593,15 @@ if(EXISTS "${INTAKE_PYTHON}")
"${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_stream_depth_check.py"
"$<TARGET_FILE:startup_stream_depth>" "${backend}")
set_tests_properties(startup_stream_depth_${backend} PROPERTIES TIMEOUT 90 SKIP_RETURN_CODE 77)
# The drop control draws the bound case with an unresolved depth handle and must fail only its picture.
add_test(NAME startup_draw_depth_target_${backend} COMMAND "${CMAKE_COMMAND}" -E env "X2W_FXC=${STARTUP_FXC}"
"${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_draw_depth_target_check.py"
"$<TARGET_FILE:startup_draw_depth_target>" "${backend}" check)
add_test(NAME startup_draw_depth_target_drop_control_${backend} COMMAND "${CMAKE_COMMAND}" -E env "X2W_FXC=${STARTUP_FXC}"
"${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_draw_depth_target_check.py"
"$<TARGET_FILE:startup_draw_depth_target>" "${backend}" drop)
set_tests_properties(startup_draw_depth_target_${backend} startup_draw_depth_target_drop_control_${backend}
PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
foreach(compiler IN ITEMS fxc dxc)
add_test(NAME startup_mrt_${compiler}_${backend} COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_mrt_check.py"
Expand Down
18 changes: 18 additions & 0 deletions docs/startup-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ error, and it leaves one query open at Close. `startup_list_queries_default_{war
without the switch: the slots stay no-ops and it must report the untouched sentinel in the first word.
`command_list_slot_names.h` still names 56 to 58 as the query methods by the plus-four rule.

## Depth target on translated draws

List slot 50 (`OMSetRenderTargets`) passes a bound depth-stencil view to the desktop list in the same call
as the colour targets, and the translated pipeline takes its `DSVFormat` from that view. A depth handle that
holds 0 maps to no descriptor: the colour targets are bound without depth, and the stand-in logs it and
counts it in `x2w_d3d12_render_target_stats`. A depth handle in no descriptor heap, or one that is not a
depth-stencil view, refuses the whole bind (also logged and counted), so nothing is drawn onto targets the
title did not ask for. `ctest --preset release --no-tests=error -R "^startup_draw_depth_target_" -V` draws a
near and a far triangle with a depth-tested stream pipeline and reads back the colour and the D32 depth
values after the fence. With the view bound, the near triangle wins, depth is 0.25 where drawn, and the
debug layer reports no message. With a zero handle, the far triangle overwrites and depth keeps its clear
value. With an unknown handle, nothing is drawn. Each unresolved handle is counted once. The `_drop_control`
draws the bound case with a zero handle and passes only when the intended colour and depth mismatch appears.

Mesh pipelines reach the stand-in only as native desktop-bytecode streams, which must have a pixel stage
and no depth format. A depth-only mesh pass (no colour target, no pixel stage) is therefore refused when
the pipeline is created, and no fixture binds a depth target for one.

## Default viewport and scissor

A desktop command list that never sets a viewport or scissor rectangle draws no pixel. A translated
Expand Down
Loading
Loading