CreatePlacedResource answered E_NOTIMPL for every non-tiled texture that
was not 2D, while the host places 1D and 3D textures. A placed texture
already gets its own image from create_texture, which handles 1D and 3D
for committed textures, so the 2D-only branch goes. The checks before it
(size and room in the heap, an invalid dimension, no output pointer)
stay as they are and now cover 1D and 3D too.
d3d12_placed_dimensions_test compares the answers and GetDesc with the
host (default adapter and WARP) for 1D, 1D arrays, 3D, BC1 3D, UAV and
render-target 1D/3D textures, and round-trips a pattern through every
subresource of a placed 3D texture and a placed 1D array.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D3D12 committed resources start zeroed unless the heap has
CREATE_NOT_ZEROED. Arena buffers are zeroed through its mapping, but
device-local buffers outside it were not ("default-heap buffers are not
zero-filled yet"). They are now queued on the context and filled with
vkCmdFillBuffer by the next submission on any queue, ahead of its lists.
That submission publishes the same initialisation semaphore as the
storage-image setup, so a list on another queue that uses the buffer first
waits for the fill. A buffer destroyed before any submission leaves the
queue, and a failed submission puts its fills back.
A queue being destroyed now clears that shared semaphore if it published
it: the queue is idle, so the work is done, and a later submission on
another queue would otherwise wait on a destroyed semaphore. With buffer
fills publishing it often, d3d12_vulkan_device_test hit exactly that
(vkQueueSubmit: invalid pWaitSemaphores, then a crash).
d3d12_vulkan_device_test (a device without the arena) reads a fresh
default buffer back as zeros after dirtying recycled memory, and checks
that a CREATE_NOT_ZEROED buffer written in the same list keeps the copy.
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 churn test gives the two D3D12 queues distinct VkQueues where the family has two and runs the async-compute case with and without the old idle wait; with the cross-queue wait removed it fails on the RTX 5070 (reported by duudiis). vk_bindless_test flushes with ticket 1 so release_retired(0) keeps the generation (reported by duudiis and ricarmandoagent), and is registered with ctest as vk_bindless_ps_tex and vk_bindless_ps_imgatomic (it only ran from run_gpu_tests.py and check.py before). Docs: the one-VkQueue caveat is corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The oracle serializes synthetic versioned root signatures with Microsoft's
D3D12SerializeVersionedRootSignature and requires rt::rootsig::parse_rts0 to recover
the same model. It covered 27 of 53 features: every fixture used FLAG_NONE, only SRV
and UAV ranges existed, dtype 4 (root UAV) never reached the parser, and 1.0 root
views were only tested as SRV.
That matters because a mis-read flags word silently switches the binding model, and
bindless signatures (NumDescriptors == UINT_MAX, sampler tables) are exactly what a
modern title uses. A first root UAV in a compute signature would have failed to parse
with no test to catch the regression.
Adds 32 assertions across 1.0/1.1/1.2: every root-signature flag, CBV and SAMPLER
ranges including unbounded counts and DESCRIPTORS_VOLATILE, root UAVs, the 1.0 root
view form, static samplers in a second table, and checkerboard parameter orders.
Each case is named, so a failure reads 'flags: allow IA layout survives' rather than
'false'. parse_checked() stops a failed parse from being indexed, which is what
segfaulted the earlier attempt.
Verified on Windows with MSVC 19.44 / SDK 10.0.26100 at /W4: 62 PASS, 0 FAIL.
Mutation-checked: reading flags at +16, dropping dtype 4, and mapping MESH to PIXEL
each fail new cases only, and the untouched suite passes none of them.
VulkanPresenter::submit() skips the present and returns VK_SUCCESS when the
surface is 0x0 (a minimised window, VK_KHR_win32_surface), but it left
captured_ set, so read_back() handed out the frame before it. PresentX then
succeeded and the read-back showed the previous colour: the real-time 60 Hz
loop in xbox_present_test failed its centre-pixel check whenever the window
was minimised mid-loop (Win+D during a CTest run, say). Reproduced on an
RTX 4080 by minimising at frame 10: "got 0,255,0 want 0,0,255", presented
count frozen.
Both skip paths (no swapchain at the start, and an out-of-date acquire whose
recreation finds a 0x0 surface) now clear captured_, so read_back() is false
until a frame is shown again.
The real-time loop accepts a skipped frame only while the window is iconic,
restores the window and checks the rest; a new case minimises the window on
purpose and requires PresentX S_OK, a skipped present that is not read back,
and the right colour after restoring. It fails without the runtime change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Addresses @Kam471's review on #2806:
- Fix uint32 wraparound in VKH_TSHARP_VA bounds check (tsharp_va > heap_bytes - 32) so 0xFFFFFFE0 is rejected with exit 2 instead of writing OOB; add regression test in tests/test_first_light.py.
- Clarify exact test counts in docs/first_light.md (14 tests: 11 pass, 3 skip without LEONIDA_FIRST_LIGHT_DIR; 14/14 pass with LEONIDA_FIRST_LIGHT_DIR).
- Require --obj when --dds is passed so textured probes are always populated, include all texture env vars in the non---run preview command, and pass VKH_SUBGROUP_SIZE from manifest['ps']['subgroup_size'].
Implements TEST-524:
- runtime/test/vk_harness.cpp: adds optional VKH_TEX_RGBA, VKH_TSHARP_VA, and VKH_SSHARP (inert when unset) to upload an RGBA8 texture to set 0 image index 1 (with 1x1 magenta fallback at index 0), write the 8-dword T# at VKH_TSHARP_VA in the 64 KiB heap, decode S# via gfx10_descriptors.h into sampler index 1, and bind DescriptorTable at binding 2.
- tools/first_light.py: adds --dds <path.dds> (decoding via tools/dds_png.py to texture.rgba), defaults --ps to PS_Copy_3ea4b38a_Wrapped (wave32, single image_sample_lz, compatible with DEFAULT_VS), reads ptr32_lo SGPR and literal_samplers from index.json, and adds a bilinear clamp-to-edge CPU texture oracle (centre_rgba + rgba_probes) in check_image.
- tests/test_first_light.py: shares fl.harness_env() so package-gated tests cover both untextured and textured runs, and adds 6 synthetic TexturedOracleTests (no GPU or game files).
- docs/first_light.md: documents the textured path and RTX 3060 verification (counts and hashes only; no game data).
Keep RT-160's force-feedback interface and tests next to the raw HID ones.
The raw HID test fakes are renamed (FakeRawHid, raw_*) so they no longer clash
with the haptic fakes. The API table gets one IGameInputDevice row with both
feature sets; the stale duplicate IGameInputDevice and IGameInputDispatcher
rows are dropped.
A shader that builds its S# from immediates (literal_samplers in the
translator index) names no heap slot, so nothing gave that S# a sampler
and a hash-table key: register_samplers (#1169) had no caller outside its
test. The shader's lookup found the fallback sampler and sampled with
the wrong filter and address modes.
ShaderLibrary now keeps each entry's literal_samplers, and
CreateGraphicsPipelineState / CreateComputePipelineState register those
of every stage that uses the bindless set.
Test: ps_m2_literal.asm (ps_m2 with the S# from s_mov literals) in
d3d12_m2_textured_test: no key for the words before its PSO, a sampler
index after it. Fails on main, passes here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #2886: the probe needs subgroup operations in compute (supportedStages) with basic and ballot
(supportedOperations), or the size stays "not available". LocalSize is the one of the GLCompute entry point "main"
the pipeline is made from, not the last in the module. The width is checked from each subgroup's own lane numbers
and ballot (a wrong width fails the test); 32-lane subgroups that aren't in invocation order, which Vulkan doesn't
promise and the translator assumes, print "not available" and the runners skip.