| Age | Commit message (Collapse) | Author |
|
Merges main at 1154976d4 into the integration branch at 273b3bdf9 (merge base ece4ba5b3). 42 files conflicted;
this commit is the resolution only. Build and test repairs follow in their own commits.
Rule of resolution: where both sides added different things, both stay; where both made the same change in two
forms, main's reviewed form stays and whatever #984's form did in addition is carried into it; where the two
changed the same code for different purposes, both purposes are kept.
Xbox proxy code (runtime/shims/d3d12_xs_device.cpp, d3d12_xs_device.h, d3d12_xs.cpp, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, registry.cpp):
- d3d12_xs_device.cpp is #984's file with main's differing pieces ported in: env_slot and the configurable device
routes, XboxQueueSlotRoutes, PresentationHandler / set_presentation_handler, the console caller rule for device
slots 61 and 74 (#383, #385), route_xbox_device_slot, slot 81 as GetFrameStatisticsX, create_host_device, the
console-form rule for slots 25 and 56, the console list IID of #359, and the forms of queue slot 18 (#403) and
list slot 139 (#396).
- Kept from #984: the list proxy with handle translation, queue slots 16/17 as Signal/Wait, the fence's
completed-value mirror, the shared FrameTokenSource, PresentX through queue_present_x when no handler is
attached (slot 30, or 32 on a queue detected as the newer layout), slots 27/53/55/57/70/71/133, the wider
pc_resource_desc, S_OK for queue slots past the PC table.
- Dropped: #984's GetFrameEventsX and LEONIDA_XS_FRAME_EVENTS_SLOT, its second-word rule for slot 61, its
undetected-layout rule for queue slot 18, its list IID mapping to GraphicsCommandList6; main's copy of the base
list proxy, its null-view slot 70 and its refusing slot 133.
Proxy tests (runtime/test/xs_proxy_mock_test.cpp, device_proxy_test.cpp, queue_proxy_test.cpp):
- Checks of both sides, each run once; main's forms of the render-target size and layout checks with #984's extra
cases added; main's --env-slots-74 and #984's --env-slots-70.
- Adapted to the merged code: the queue tail answers S_OK, slot 73 answers an unknown IID with the list proxy,
the queue slot 18 case installs a console caller. Dropped: #984's slot 81 GetFrameEventsX cases.
D3D12/Vulkan layer (runtime/shims/d3d12_com.cpp, d3d12_vulkan_device.cpp, runtime/src/command_list.h,
frame_pacer.h, shader_library.h, vulkan_backend.h, vulkan_replay.h, runtime/test/command_list_test.cpp,
d3d12_close_parity_test.cpp, d3d12_execute_indirect_validation_test.cpp, replay_texture_barrier_test.cpp,
vk_pipeline_check.cpp, vk_test_device.h):
- Resource::create_texture: #984's title images (deferred placed, pending streamed, title pool) and main's
ordinary textures (#1413 shared blocks, #1364 staging fallback) are exclusive branches chosen by the texture's
origin, so both pools run on disjoint sets of textures.
- frame_pacer.h is main's pacer (#402) with #984's FrameTokenSource as the token counter.
- main's forms kept for ExecuteIndirect (#1066, #377), the barrier into LAYOUT_UNDEFINED (#1055), the B4G4R4A4
stand-in, per-face stencil masks, the unaligned tile staging (#528) and the device-lost flag (#980).
- shader_library.h: main's block inflate; #984's `bulk` parameter now defaults to true so main's callers keep it.
- Dropped: #984's B8G8R8A8 stand-in for B4G4R4A4 targets, its refusal of separate stencil masks, its zero-count
refusal in ExecuteIndirect, its wider UNDEFINED -> UNDEFINED release and the test case for it.
Other shims (runtime/shims/dstorage.cpp, file_system.cpp, gameinput.cpp, xgameruntime_offline.cpp,
runtime/test/xgameruntime_offline_test.cpp, xmem_test.cpp):
- ReadFile and DirectStorage reads: #984's pinned kernel_writes read, then main's touch_pages retry on
ERROR_NOACCESS. main's rt::fs::read_file is folded into #984's read_file.
- gameinput: main's strict LEONIDA_INPUT_SCRIPT parser with #984's rsup/rsdown entries.
- Speech synthesis: main's one silent voice and handle checks; #984's accept-anything form dropped.
Build, tools, docs (runtime/CMakeLists.txt, runtime/cmake/translator_deps.cmake, scripts/build_runtime.ps1,
make_game.py, tools/rdna2spirv.py, shader_disasm.py, shader_ir.py, shader_library.py,
runtime/test/shaders/cs_imgload_tfe.asm, cs_imgload_d16_tfe.asm, docs/README.md, boot.md, d3d12_vulkan.md,
runtime/README.md):
- Unions of the test, target and source lists; spirv_loop_guard.py added to translator_deps.cmake.
- rdna2spirv.py: main's DPP compare rule (#957), SMEM vcc base (#647) and widen_wave64_masks (#1021); #984's
restore_skipped_instructions and restore_dot4_inline_sel. #984's duplicate widen_wave64_valu_masks dropped.
- shader_disasm.py and shader_ir.py: main's structure with #984's one-line-per-dword llvm-mc input and wave flags.
- shader_library.py: main's structure with #984's --compute-hashes and per-state compute variants.
One file that did not conflict is changed here: tools/rdna2_decode.py. Git kept both sides' decoders for a VOPC
compare with a DPP operand, and #984's narrower one shadowed main's; it is main's file again.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
|
(RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.
Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.
Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.
Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.
No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.
Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
|
the comparison treats DXGI_STATUS_OCCLUDED as S_OK
Review by @KarolKurzyna in the original repository:
- The host answers DXGI_STATUS_OCCLUDED from Present for a window that isn't on screen, which depends on the
desktop, so compare_failed_resize now counts it as S_OK. The failures stay strict.
- After a failed ResizeBuffers the host checks SetSourceSize against the size that was asked for (RTX 3060 Ti:
after 16x16385, 100x10 is DXGI_ERROR_INVALID_CALL; after 16385x16 it is S_OK), so the layer does too. The
comparison gains those two steps (17 now).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
next one succeeds, as on the host
Measured against the host runtime (RTX 3060 Ti, NVIDIA 610.88, and WARP): once ResizeBuffers accepts its arguments
the old buffers are gone. If the new ones can't be made it fails, and the swap chain stays without buffers. GetDesc1
already reports the requested size and count, GetBuffer and Present are DXGI_ERROR_INVALID_CALL, and the next
successful ResizeBuffers restores everything. A side above 16384 is E_INVALIDARG on the hardware device. A call
refused for its arguments (a back buffer still held) changes nothing.
The layer answered E_FAIL and kept describing the old buffers. It now answers E_INVALIDARG for a side above 16384
before calling Vulkan (it used to pass the extent to vkCreateImage, past the device's limits) and E_OUTOFMEMORY when
Vulkan fails. It reports the requested description, refuses Present, and recovers on the next ResizeBuffers.
dxgi_swapchain_test compares 15 steps of that with the host's default adapter. dxgi_swapchain_count_test gets
failure injection on its fake Vulkan table: whether the offscreen ring or vkCreateSwapchainKHR fails (the latter
retires the old swapchain anyway), on the offscreen and on the direct path, the next resize builds a working
swapchain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
# Conflicts:
# runtime/CMakeLists.txt
|
|
|
|
|
|
flags and null out-pointers answer as the host does
Measured against the host runtime's DXGI on an RTX 5070 Ti and on WARP (Windows 11), both agreeing:
- The adapter answers IDXGIAdapter4. GetDesc3 gives what GetDesc1 gives, plus the
preemption granularities; a null description is E_INVALIDARG.
- GetRestrictToOutput on a swap chain created without an output is S_OK with a null
output, not DXGI_ERROR_NOT_FOUND.
- ResizeBuffers refuses NONPREROTATED, FULLSCREEN_VIDEO and every bit from 0x4000 up
with DXGI_ERROR_INVALID_CALL, and FOREGROUND_LAYER, YUV_VIDEO and 0x2000 on a chain
created without them with E_INVALIDARG (a sweep of all 32 bits on the host).
- A null out-pointer on GetBuffer, GetHwnd, GetLastPresentCount and GetRestrictToOutput
is DXGI_ERROR_INVALID_CALL, not E_POINTER or E_INVALIDARG.
dxgi_host_parity_test compares the layer with the host for each of these (PROBE_WARP=1
for WARP): 18 of 26 rows differ before, 0 after, on both. dxgi_device_test and
dxgi_swapchain_test now expect the host's answers.
AI-assisted: yes
|
|
created with
Both were hardcoded (FLIP_DISCARD, RENDER_TARGET_OUTPUT). The host and WARP report the creation values:
FLIP_SEQUENTIAL, RENDER_TARGET_OUTPUT | SHADER_INPUT, or 0. dxgi_host_answers: 6 of 7 rows differ on main against
the NVIDIA host and against WARP, 0 with both commits.
AI-assisted: yes
|
|
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Both returned E_NOTIMPL, which Microsoft documents only for the Windows 7 Platform Update. They now return S_OK with a unique cookie for UnregisterStereoStatus; stereo is never enabled so nothing is notified. Test: dxgi_swapchain.
|
|
IDXGIAdapter::CheckInterfaceSupport(IDXGIDevice) reported a user-mode
driver version of 0. Host DXGI reports the adapter's, which titles read
as the driver version. The layer now reads it the way DXGI does,
D3DKMTOpenAdapterFromLuid + D3DKMTQueryAdapterInfo(
KMTQAITYPE_UMD_DRIVER_VERSION) on the adapter's Vulkan deviceLUID,
looked up from gdi32 at run time (0 kept when missing or failing, e.g.
under Wine); the host dxgi.dll isn't used. Measured equal to host DXGI
on an RTX 5060 Ti (0x0020000000100842, driver 621.14) and on WARP.
dxgi_swapchain_test compares it with the host adapter of the same LUID
(host dxgi.dll loaded at run time); fails on main with 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
IDXGISwapChain2::SetMatrixTransform/GetMatrixTransform stored and
returned a matrix on every swapchain. A matrix transform belongs to
composition swapchains (CreateSwapChainForComposition, E_NOTIMPL in the
layer); host DXGI answers DXGI_ERROR_INVALID_CALL to both on an HWND
swapchain, with a matrix and with null (Windows 11, RTX 5060 Ti, driver
621.14). Both now give that answer, and the stored matrix goes.
dxgi_swapchain_test asserted the round-trip; it now checks the host's
answer for the four calls (fails on main).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
SetSourceSize answered S_OK and ignored its arguments, and GetSourceSize always
reported the back-buffer size, so a game that scales its source region could not
read back what it set.
Host-measured on Windows 11 with the system DXGI (RX 7900 XTX): a fresh
swapchain reports the back-buffer extent; SetSourceSize(64,32) round-trips while
GetDesc1 keeps the buffer size; a region larger than either buffer dimension is
DXGI_ERROR_INVALID_CALL and keeps the stored value; zero is accepted and stored;
GetSourceSize needs both pointers; and ResizeBuffers resets the source size to
the new back-buffer extent.
Present still does not scale by the source region; that stays a documented
difference and is not part of this change.
|
|
- Upgrade dxgi_com.h to dxgi1_6.h for IDXGIOutput6 / DXGI_OUTPUT_DESC1.
- Enumerate Win32 monitors via EnumDisplayMonitors / EnumDisplaySettingsW with headless 1920x1080@60 fallback.
- Implement Output (IDXGIOutput..IDXGIOutput6) and wire Adapter::EnumOutputs and SwapChain::GetContainingOutput against host dxgi.dll behavior.
- Add D3D-313 unit and host-comparison coverage in dxgi_swapchain_test.cpp (synthetic, no game data).
AI-assisted.
|
|
|
|
|
|
size, like the host
A description with width 16385 and MSAA 4, one buffer or a bad format is
DXGI_ERROR_INVALID_CALL on the host runtime's DXGI, not E_INVALIDARG
(found by Kam471 in the review of #3531). Five multi-fault cases added
to the side-by-side comparison.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Measured on RTX 5070 / 621.14: bitblt effects, window-incompatible
scaling and alpha modes, flags outside 0x2/0x20/0x40/0x800/0x1000/0x2000,
shared/read-only/discard-on-present/UAV usage, a null or non-queue
device, null window/description/output are DXGI_ERROR_INVALID_CALL; a
side above 16384 is E_INVALIDARG. dxgi_swapchain_test compares 40
descriptions with the host. The CoreWindow path keeps its old checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetPrivateData, SetPrivateDataInterface and GetPrivateData accepted the data and discarded it, so GetPrivateData always returned DXGI_ERROR_NOT_FOUND. They now store a copy of the bytes, hold a reference for an interface until it is replaced or removed, and answer DXGI_ERROR_MORE_DATA for a buffer that is too small. Test: dxgi_swapchain.
|
|
The method returned E_NOTIMPL and a zero cookie. It now returns S_OK with a unique cookie for UnregisterVideoMemoryBudgetChangeNotification; the budget is recomputed on every QueryVideoMemoryInfo, so the event is never signalled. Test: dxgi_swapchain.
|
|
|
|
CreateDXGIFactory2(IID_IDXGIFactory7) and QueryInterface for
IDXGIFactory6/7 failed on the layer's factory, which stopped at
IDXGIFactory5.
- EnumAdapterByGpuPreference returns the one Vulkan adapter at index 0
for every preference.
- RegisterAdaptersChangedEvent / UnregisterAdaptersChangedEvent keep a
cookie registry. The adapter list never changes, so the event is
never signalled.
Every return code follows the host dxgi.dll, measured on Windows 11
with an RTX 3070:
- a preference outside the enum is accepted;
- a null out is DXGI_ERROR_INVALID_CALL;
- past the end is DXGI_ERROR_NOT_FOUND with *out cleared;
- a non-adapter riid is E_NOINTERFACE;
- a null event or cookie, and an event registered twice, are
DXGI_ERROR_INVALID_CALL;
- cookies start at 1 and are separate from the occlusion cookies;
- an unknown cookie is DXGI_ERROR_NOT_FOUND.
dxgi_swapchain_test checks each answer. With main's factory it fails
at QueryInterface(IDXGIFactory6/7).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The factory answered S_OK for every flags value, while the host rejects anything
outside DXGI_MWA_NO_WINDOW_CHANGES, DXGI_MWA_NO_ALT_ENTER and
DXGI_MWA_NO_PRINT_SCREEN with DXGI_ERROR_INVALID_CALL (measured on Windows 11
with the system DXGI), so an invalid call looked accepted. Reject unknown bits
before recording the window, and cover the accepted combinations and two unknown
bits in the swapchain test.
|
|
ResizeTarget answered S_OK and ignored its argument, so a windowed game that
switches resolution through the DXGI 1.0 path kept the old window: the host
moves the target's client area to the mode's Width x Height and leaves the back
buffers alone until ResizeBuffers (where 0 means the new client area).
Measured on Windows 11 with the system DXGI (RX 7900 XTX): ResizeTarget(nullptr)
is DXGI_ERROR_INVALID_CALL, ResizeTarget(0x0) is accepted and the window's
minimum tracking size decides the result, ResizeTarget(234x156) gives a 234x156
client area with the buffers at 128x128, and ResizeBuffers(0, 0, 0) then takes
234x156. The swapchain test now covers the same sequence on the shim.
|
|
|
|
|
|
|
|
add test
|
|
E_NOINTERFACE on Factory::GetParent
|
|
GetCoreWindow/GetRestrictToOutput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implements CreateSwapChainForCoreWindow on Factory for UWP / Game Core Scarlett titles by querying ICoreWindowInterop for the underlying Win32 HWND, and implements RegisterOcclusionStatusWindow / RegisterOcclusionStatusEvent returning sequential cookies.
Adds mock ICoreWindow unit tests in dxgi_swapchain_test covering argument validation, null HWND failure, functional swapchain presentation, and occlusion status registration.
|
|
|
|
|
|
|
|
SetRotation returned S_OK without storing the mode and GetRotation always reported identity. Store it and return E_INVALIDARG for a null output, matching the other getters. Cover the default, a 90-degree round-trip and the null argument in dxgi_swapchain.
Verified on Windows 11 with an RX 7900 XTX: dxgi_swapchain_test passes. No game files.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
|
|
IDXGISwapChain1::SetBackgroundColor and IDXGISwapChain2::SetMatrixTransform returned S_OK without storing anything, and their getters returned E_NOTIMPL. Store both values and return the DXGI defaults, transparent black and the identity matrix. Null pointers return E_INVALIDARG.
Cover the defaults, round-trips and null arguments in dxgi_swapchain. Verified on Windows 11 with an RX 7900 XTX: dxgi_swapchain_test passes. No game files.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
|
|
|
|
GetFrameStatistics returned E_NOTIMPL even though the swapchain already tracks successful presents. Record the QPC at each successful present and fill PresentCount, PresentRefreshCount, SyncRefreshCount and SyncQPCTime; failed and test presents still change nothing. The test checks the values and the null-argument error.
Verified on Windows 11 with an RX 7900 XTX: dxgi_swapchain passed with and without LEONIDA_VK_VALIDATION=1. No game files.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
|
|
The swapchain kept the factory but discarded the device passed to CreateSwapChainForHwnd, so both IDXGIDeviceSubObject::GetDevice and IDXGISwapChain1::GetFullscreenDesc returned E_NOTIMPL. Hold that device (as native DXGI does), return it through QueryInterface, and describe the windowed swapchain with a zeroed fullscreen description and Windowed = TRUE. The swapchain test now checks both.
Verified on Windows 11 with an RX 7900 XTX: dxgi_swapchain passed with and without LEONIDA_VK_VALIDATION=1. No game files.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
|
|
DXGI_FEATURE_PRESENT_ALLOW_TEARING
|
|
DXGI_ERROR_INVALID_CALL
|
|
waitable swapchains
|
|
|
|
|
|
state queries
|
|
buffers, 0 means the client area
Measured on the host DXGI (RTX 5070 and WARP): Present(n > 4) is
DXGI_ERROR_INVALID_CALL and DXGI_PRESENT_TEST doesn't present;
ResizeBuffers while the app holds a back buffer is DXGI_ERROR_INVALID_CALL
and keeps the size; a zero width or height at creation or in ResizeBuffers
takes the window's client area. The shim presented on TEST, destroyed held
buffers, and used 256x256 / the old size.
|
|
unsupported formats in ResizeBuffers
|
|
with HWND GPU test
|