Commit Graph

10 Commits

Author SHA1 Message Date
Digote e2c426f528 feat(shader): support 64-bit scalar bit compare 2026-09-29 13:37:38 -03:00
boykopovar d998717588
Merge pull request #83 from OverkillLabs/feat/agc-shader-improvements
feat(agc,shader): remaining PM4 command-buffer opcodes and shader recompiler hardening
2026-09-29 10:35:36 +03:00
SamG-Coder 86401fe5ab feat(shader): support scalar 64-bit reverse and arithmetic shift 2026-09-29 05:09:29 +10:00
OverkillLabs cf202b352d Shader recompiler: SRT handle-invariance guard, BVH ray-query stub, rect-list interpolant truncation
- Optimization/SrtWalker/SrtPlanBuilder.cpp: PlanBuilder::Collect now requires
  RuntimeValidator(...).Run(inst) before folding an offset built from a Phi merging a
  constant on one path with a per-invocation value on another. Confirmed upstream's
  Collect is unchanged since the fork (still just offset->HasImmediate()), so a Phi
  that reports HasImmediate() on its constant edge alone could still be folded into
  the wrong, divergent SRT slot.
- RdnaDecoder + Translation: adds an IMAGE_BVH_INTERSECT_RAY (opcode 0xE6) decode path
  and a TranslationContext::imageBvhIntersectRay stub that reports a clean hardware
  miss (all result dwords 0xFFFFFFFF) instead of faulting on an undefined MIMG opcode.
  No BVH/ray-tracing support exists upstream at all, so this is an honest "not
  supported yet" stub, not a silent wrong answer.
- SpirvBackend/RectListShaders.cpp: raises the accepted spirvVersion ceiling to
  0x10500 and truncates excess fragment interpolants to the tightest per-vertex
  tessellation component limit instead of hard-refusing the whole rect-list draw.
  A rect-list draw is a tile clear, so a pixel shader's result comes from its
  constants and render target; truncated interpolants are simply left unwritten,
  which upstream's own "missing" (unexported) parameter handling already tolerates.

Dropped after checking against current upstream (both would be redundant or
out of scope):
- ResourcePlanKnownToFail / SpirvWords (Recompiler.cpp/hpp): upstream already has an
  equivalent mechanism for both. SourceEntry::planFailure (std::exception_ptr) already
  memoizes and rethrows a failed IrResourcePlan build, and RecompileResult::spirv is
  already the refcounted/hashed SharedSpirv class (see Recompiler.hpp), not a plain
  vector. Porting either would have added a second, competing mechanism.
- ScalarInstructions.cpp SAVEEXEC changes: skipped. The audit could only confirm 3 of
  6 64-bit SAVEEXEC cases were converted in the prior patch, which is a half-finished
  edit rather than a complete correctness fix; not safe to port without re-deriving
  sSaveexec()'s full semantics from scratch.
- ControlFlowInstructions.cpp vMovrelsB32/vMovreldB32 hardening (offset & 0xFF mask +
  kMaxM0RelativeWindow cap): skipped as optional per review; upstream's core fix for
  this file is otherwise already in place.
- All diagnostic-only stderr tracing (IrBuilderCore.cpp, ResourceTracker.cpp,
  ShaderInfoCollector.cpp, SrtDescriptorEvaluation.cpp, SrtEvaluator.cpp,
  SpirvMemoryInstructions.cpp) and the superseded Optimization/ResourceProgram.hpp
  API (replaced upstream by CaptureResources/SourceHandle/ResourceCapture): not
  ported, no functional change or already gone upstream.
2026-09-28 13:25:47 +03:00
SamG-Coder 730de17774 fix(shader): support V_PERM_B32 byte selection 2026-09-28 19:35:18 +10:00
SamG-Coder 198b43c985 fix(shader): support additional 64-bit saveexec operations 2026-09-28 18:37:51 +10:00
SamG-Coder 2e398be5a0 fix(shader): support scalar conditional move and zero-bit operations 2026-09-28 18:21:34 +10:00
SamG-Coder f7f60b4ec5 fix(shader): translate scalar byte and short sign extension 2026-09-28 17:49:09 +10:00
boykopovar 382384c5b7 feat(shader): rdna opcodes categorizing impl 2026-09-15 07:53:30 +03:00
boykopovar d084eed394 feat(shader): rdna memory op decoder impl 2026-09-15 07:07:50 +03:00
Renamed from core/shader/recompilier/RdnaDecoder/src/RdnaOpcode.cpp (Browse further)