Commit Graph

1361 Commits

Author SHA1 Message Date
ffd477e9ad Merge pull request #1803 from Vonsek 2026-11-22 09:48:19 -05:00
2d32cd2576 Merge pull request #1801 from Ryderadzeee 2026-11-22 09:48:19 -05:00
381f169cae Merge pull request #1798 from SHAURYASANYAL3 2026-11-22 09:48:18 -05:00
3b7cd5e4bf Merge pull request #1791 from AlxcBTW 2026-11-22 09:48:16 -05:00
cd6d8ac35a Merge pull request #1787 from CowDeV 2026-11-22 09:48:15 -05:00
c56532da45 Merge pull request #1772 from Alex Arenas 2026-11-22 09:48:13 -05:00
26a0ca32da Merge pull request #1753 from Serrambi 2026-11-22 09:48:10 -05:00
5e532730c2 Merge pull request #1744 from Emirhan Karaca 2026-11-22 09:48:09 -05:00
23444e0b07 Merge pull request #1714 from SWAYAM 2026-11-22 09:48:07 -05:00
8ec3ab82ae Merge pull request #1707 from Ash Hopkins 2026-11-22 09:48:07 -05:00
bf0ce0d062 Merge pull request #1706 from Ash Hopkins 2026-11-22 09:48:06 -05:00
c034e448c3 Merge pull request #1696 from SHAURYASANYAL3 2026-11-22 09:48:06 -05:00
f8ef313033 Merge pull request #1627 from nonverifiedperson 2026-11-22 09:48:05 -05:00
f38e203e7c Merge pull request #1622 from Ryx 2026-11-22 09:48:04 -05:00
00452cfaa3 Merge pull request #1615 from Ewann 2026-11-22 09:48:04 -05:00
b83f74f6d2 Merge pull request #1612 from mokkymiah 2026-11-22 09:48:03 -05:00
b9e91c2af8 Merge pull request #1398 from ezwinxdlmao 2026-11-22 09:48:00 -05:00
350328732a xgameruntime: conform XSystemAnalyticsInfo and XPackage APIs to GDK ABI specification 2026-11-22 20:11:42 +05:30
Ryx
b9447f31fd Merge upstream/main into runtime/d3d189-occlusion-tdr; drop the occlusion pause
main took db421e6f (the bisect mode) and D3D-162's statistics segments, which
conflicted with this branch in vulkan_replay.h, d3d12_vulkan.md and the test.

The 8060S retest on driver 26.11.2 (#1540) failed 7690b647 3/3: the earlier
c8ea00e4 passes were not reproducible, and a TDR also breaks unrelated tests
until the GPU recovers. With no evidence that the pause helps, vulkan_replay.h
and d3d12_vulkan.md are main's, and the branch keeps only the diagnostics:
--no-draw, --no-resolve, the active phase, the single-query resolve case, and
a lost-device check that now reads is_device_lost() and the gate semaphore
(main removed VulkanContext::retire_timeline). The draw schedule follows main's
statistics lists, then replace and the single case.
2026-11-22 15:37:50 +01:00
cd6e21be84 Translator: tbuffer_store_format_* with the instruction's format
tbuffer_store_format_* and its d16 forms were Unsupported, though every
tbuffer_load_format_* form translates. They now go through buffer_store
with the instruction's format, as the loads go through
buffer_load_format:
- only that format is encoded, with no branch on the V#'s FORMAT;
- the bounds check uses its element size;
- a V# whose FORMAT is 0 (INVALID) still disables the store, as measured.
  (@Vonsek covers the MTBUF loads and @opit80 the raw MUBUF accesses
  through such a V#.)

The format parsing the loads did inline becomes mtbuf_format(), shared by
both: no modifier is GFX10's default BUF_FMT_8_UNORM, and a format
FORMATS has no encoder for stays Unsupported. read_before_write_vgprs
now counts a tbuffer store's data VGPRs as reads, as for buffer_store.

cs_tbuffer_store.asm stores into 13 sentinel-filled regions through V#s
whose format differs from the instruction's or is 0, and reads them
back. Every
expected word was measured by running the same body natively on a
Radeon 680M (gfx1035, RDNA2); wave32 and wave64 gave the same 52 words:
- the instruction's format decides the encoding, the element and the
  bounds;
- components the format has but the store doesn't give are 0, and extra
  ones are dropped;
- the default format is one byte, and its neighbours are kept;
- a FORMAT-0 V# leaves the region untouched.

check.py and run_gpu_tests.py compare the dump. The semantic fixture
runs through the interpreter in tests/semantic/test_tbuffer_store.py,
which fails on the old translator (Unsupported). It also fails on
versions that take the bounds from the V#'s element (5 words differ),
take the format from the V#, fill missing components with anything
but 0 (1 word), or drop the FORMAT-0 guard (2 words).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:33:18 +02:00
6933e0c99e Tests: synchronize vk_presenter_sync_test reader with condition_variable and join before EXPECT 2026-11-22 17:33:13 +03:00
e550c82375 d3d12_vulkan_device_test: #1674's tiled-texture wait uses a new fence value
The standalone-device block signals its fence 5, 6, 7, 8. #1674's tiled placed-texture readback signalled 7 again,
so SetEventOnCompletion returned at once and the block read the readback buffer before the copy (line 4995). It
now waits on 8 and the next block on 9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:32:25 -05:00
c5edaf72f7 Add ps_mandelbrot: a divergent backward loop with EXEC masking
A pixel shader that iterates z = z^2 + c per lane until it escapes or 64
rounds pass. Escaped lanes drop out of EXEC, s_cbranch_execz leaves the loop
once all lanes are out, and EXEC is restored before the export. check.py and
run_gpu_tests.py compare every pixel's iteration count with a pure-Python
float32 model (mul/add/sub only, no FMA, so the model is exact).

Tested on main 003e7812: run_gpu_tests.py 131/171 on RTX 5070 Ti (40
skipped) and 162/171 on AMD Radeon integrated graphics (9 skipped, run by
the d3d12 draw tests). AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:30:42 +01:00
d38daa4e9b runtime: implement ID3D12Device1::CreatePipelineLibrary and ID3D12PipelineLibrary1 2026-11-22 15:26:27 +01:00
499c608c0f test(d3d12): reset slot 67 PSOs before device refcount check in d3d12_compute_test 2026-11-22 19:56:14 +05:30
0a43f80940 Runtime: drop the Intel minimum-LOD rounding from D3D-219
Rounding the view's minLod to the nearest level fixed point-filtered
samples on drivers that use minLodInteger, but integer texel fetches
and gathers use floor(minLod) on every driver, as D3D11.3 5.8 also
requires for ld and gather4. With a 0.75 clamp the rounded view gave
1.0, so a Load of mip 0 would read zero. No single view value is right
for both, so the sampling fix belongs in the translator (a MinLod image
operand on sample ops only). This keeps the bindless capacity fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:25:47 +01:00
ab55405c2c Tests: GPU coverage for ds_cmpst_b32 and the b64 LDS 2-address forms 2026-11-22 14:24:28 +00:00
Ryx
7690b647a2 Runtime: restore the occlusion pause around a resolve (D3D-189)
After upgrading the Radeon 8060S from AMD driver 26.10.1 to 26.11.2 (#1540),
vk_overlapping_occlusion still times out on main, and c8ea00e4 with the pause
passes every run (--bisect, --gated, the full test, and under validation) in
about 0.1 s. The earlier "every phase hangs" retest was a broader occlusion
bug in 26.10.1 that 26.11.2 fixed, so the revert in 3784aacc is undone.

The comment and docs now cite the 26.11.2 measurement. --no-draw and
--no-resolve stay; the crossing and single schedules match the split again.
2026-11-22 15:21:49 +01:00
7f38b0755b Revert "Merge pull request #1779 from cobalt-pebble-804"
#1779 (the #895 rebase) writes placeholder ShaderView records (kind, resource id, offset) into CBV/SRV/UAV slots
and adds a second CreateConstantBufferView next to #1729's, so the runtime no longer compiled. main's descriptor
slots hold GFX10 V#/T# words that translated shaders read; #1729's CBV already writes the raw buffer V#.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:21:42 -05:00
eebf85b60f Merge remote-tracking branch 'origin/main' into runtime-vulkan12-khr
# Conflicts:
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/test/vk_test_device.h
2026-11-22 14:21:37 +00:00
2d2eec9a75 M4 review: storage-image init only on shader-running non-copy submissions, ordered for other queues
- The zero-fill/GENERAL init of images with a UAV view no longer drains on a copy
  queue or in a submission that runs no dispatch or draw; every other queue's next
  submission waits on the initializing one's progress semaphore.
- storage_pending_ is a set (UAV descriptors are rewritten every frame).
- write_buffer_uav: FirstElement and element count are checked against
  Width / unit, so the byte range cannot overflow.
- docs: M4 row names the remaining limitation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:21:28 +01:00
ec9b6cf22b tools: text reports are written with LF line ends on every platform (BUILD-468)
open(path, "w") without newline= turns each \n into \r\n on Windows, so the same JSON report, manifest or assembly
listing was CRLF there and LF elsewhere. 91 text-mode writes (open, os.fdopen, Path.write_text) under tools/, scripts/,
make_game.py and runtime/test/shaders/ now pass newline="\n". tests/test_text_write_line_endings.py reads the source
with ast and fails for a writer that forgets it; CONTRIBUTING.md names the convention.

AI-assisted (Claude), on behalf of dev-ewann.
2026-11-22 14:20:30 +00:00
835b43fe9b d3d12_xs: name slot 67 descriptor fields as FSPX kinds 0, 1, 6, 7
Name all four pointer and size pairs in the XboxNativeComputePipelineStateDesc
struct as kinds 0, 1, 6, 7 per docs/fspx.md and name the slot
DeserializeComputePipelineStateX in slot_name, matching the DLL's messages.
This prepares the description struct for the runtime FSPX resolver follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:50:13 +05:30
3d533d6c3f d3d12_xs: route slot 67 compute pipeline from native code to CreateComputePipelineState (RT-99)
Xbox device slot 67 takes (desc, riid, out) with IID_ID3D12PipelineState and a console-only
descriptor with the root signature at +0x00 and code blob pointer/size at +0x28/+0x30.
Previously it logged and returned E_NOTIMPL.

Route it to CreateComputePipelineState on the PC device (slot 11) like slot 62, mapping the
console descriptor to D3D12_COMPUTE_PIPELINE_STATE_DESC. On the Vulkan device this resolves
through the translator via fssm_program and ShaderLibrary.

- Implement proxy_create_compute_pipeline_from_native_code in d3d12_xs_device.cpp
- Update device_proxy_test to verify slot 67 thunk, compute PSO creation over WARP, and argument checks
- Update d3d12_compute_test to verify slot 67 compute PSO creation on the Vulkan device
- Update documentation in d3d12_command_objects.md and d3d12_vulkan.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:50:12 +05:30
a24d8cc6ba runtime: fallback and clamp swapchain extent when surface reports undefined extent (D3D-165) 2026-11-22 19:48:05 +05:30
Ryx
3784aacc3a Revert the occlusion pause; add --no-draw and --no-resolve to --bisect (D3D-189)
The 8060S retest of c8ea00e4 (#1540) loses the device in every phase that runs
a hardware occlusion query, including nested and binary, which never resolve
inside an active query, and active with the pause applied. Only unwritten, with
no hardware query, passes. So the resolve-while-active rule did not fix it;
vulkan_replay.h and docs/d3d12_vulkan.md go back to main.

Every hanging phase both draws inside a query (an attachmentless rendering
scope inside a query begun outside rendering) and resolves through the copy
and compute helpers. --no-draw leaves every query empty and --no-resolve never
copies or sums results, so the four combinations tell the two apart. The
bisect run prints which switches are on.

The resolve inside one active query stays in the default run and as the
"active" phase; the crossing schedule is back to three segment ends.
2026-11-22 15:17:03 +01:00
db60a73aff fix(test): forward the texture readback emulator
The synchronization check launches the test executable itself, so pass the configured Wine or Proton command through its environment wrapper.
2026-11-22 15:16:14 +01:00
74205e9d78 d3d12: enforce DENY_* heap flags for all placed resources (D3D-222) 2026-11-22 15:16:07 +01:00
9bc4674296 Merge pull request #1796 from Vonsek 2026-11-22 09:15:24 -05:00
f61946cfe1 Merge pull request #1795 from AimLogin 2026-11-22 09:15:24 -05:00
8ba7c8d552 Merge pull request #1793 from WHOISJARDAS 2026-11-22 09:15:23 -05:00
ef15a21ba0 Merge pull request #1789 from romainveurrier 2026-11-22 09:15:22 -05:00
959505bae1 Merge pull request #1787 from CowDeV 2026-11-22 09:15:21 -05:00
625a4f72f4 Merge pull request #1786 from dracbat 2026-11-22 09:15:20 -05:00
6ea194097f Merge pull request #1785 from Vonsek 2026-11-22 09:15:20 -05:00
8d27bec8d6 Merge pull request #1780 from Ryderadzeee 2026-11-22 09:15:18 -05:00
542586de8a Merge pull request #1779 from cobalt-pebble-804 2026-11-22 09:15:17 -05:00
201af97f5d Merge pull request #1778 from Egora 2026-11-22 09:15:17 -05:00
ea2f274a27 xgameruntime: implement XPackageGetCurrentProcessPackagePath, XPackageIsPackagedProcess, XSystemGetAnalyticsInfo 2026-11-22 19:45:12 +05:30
1c80759bca Merge pull request #1768 from AlxcBTW 2026-11-22 09:15:12 -05:00