9 Commits
Author SHA1 Message Date
thuanquangandClaude cc69016858 fix(shader): follow long branches in the hoisted descriptor search
reachingWriter followed only fall-through and direct branches, so a V#
load on a path that reaches the loop through an s_setpc_b64 jump the
control flow analysis resolves was not seen, and another load could be
taken as the only writer. The walk now follows those jumps. It also
fails at s_call_b64 targets, whose callers it does not follow, instead
of walking from a function entry into the code above it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-19 02:18:43 +07:00
thuanquangandClaude Opus 5.5 499e2db905 fix(shader): link a table call whose descriptor load sits before its loop
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 00:53:38 +07:00
fma-rc 8f37cddff0 feat(agc): link calls through the AGC FS table 2026-10-17 16:47:09 +02:00
TripyFoxandClaude Opus 5.5 3c1f43948b fix(shader): fault only where a table call misses its linked callees
An s_swappc_b64 whose target is not resolved compiles to a faulting call
only at the fallback the table-call linker emits; the linker lists those
calls in the request (GuestContext::linkedCallFallbacks), and every other
computed call is refused at compile time again, as on main. The new
agc_driver_compute_table_calls test runs a linked two-record table on
Vulkan in wave32 and wave64, with SCC 0 and 1 reaching the callee, and a
record past the table reporting the UnlinkedCall fault.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 06:44:25 +13:00
TripyFoxandClaude Opus 5.5 9c8fb780e8 feat(shader): link callees of calls whose target is loaded from a table
An s_swappc_b64 whose target pair comes from an s_buffer_load of a buffer
whose descriptor is loaded from user data now calls the targets that buffer
holds: at dispatch the driver reads the buffer, links one copy of each
distinct callee after the caller and rewrites the call into a compare chain
that s_call_b64s the matching copy. A target that matches no copy, and any
other computed call, records an UnlinkedCall fault that the driver reports,
instead of failing the shader at compile time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 06:44:07 +13:00
krishnarayaandClaude Opus 5.5 6d9321fc57 feat(shader): link compute shaders' user-data callees at dispatch
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 09:59:27 +02:00
Sanjaysrinivas 4d2917e632 fix(shader): guard scalar call link lifetimes
Reject tuple and descriptor overlap, wrong-pair returns, relative SGPR reads, reversed regions and ordinary or conditional fall-through into a callee. Preserve the existing scalar write analysis and require exact return-pair matching.

Seven targeted regressions fail before these guards and pass afterward. Seven focused CMake tests and 15 SPIR-V validations pass; the execution matrix passes 3,200 comparisons and detects a one-bit expected-output mutation.
2026-10-08 20:23:47 +02:00
Sanjaysrinivas ee0b1109f4 feat(shader): execute bounded S_CALL_B64
Reuse the prerequisite call-region analysis for signed relative calls, including callees after s_endpgm. Lower the saved link as shader base plus PC+4 and reject unsupported targets and call shapes.

Add decoder, IR, CFG and Vulkan execution regressions. Seven focused CMake tests pass; five layouts cover 15 dispatches and 3,200 output comparisons on lavapipe. Record ISA sources and native RDNA2/PS5 limits in TechnicalDebt.
2026-10-08 20:22:51 +02:00
Kikoarl f5619c4dcc feat(shader): implement S_CALL_B64 2026-10-07 15:02:33 +02:00