Repository navigation
Conversation
CLIP/CLIPw/CLIPLw read only the W component of their second operand. VCLSML, SCEA's standard macro library for VCL, uses the bare form `clipw.xyz a, b` in its PerformClipCheck macro, and 9 of the Tyra engine's 15 VU1 programs use that macro: https://github.com/h4570/tyra/blob/c59f406af134713b62656114846ac8d588c6247c/engine/src/renderer/3d/pipeline/shared/vcl_sml.i#L1393-L1398 Testing with SCE's vcl 1.4beta7 (the binary Tyra builds with) confirms that it compiles the bare form to the same instruction as `clipw.xyz a, b[w]` (`clipw.xyz VF01xyz,VF01w`), and that it also accepts `clipw a, b` as `.xyz`. openvcl required the explicit [w] and failed with "Invalid argument", so those 9 programs did not compile. The 'wcomp' template modifier now defaults a missing field to W, so the bare form emits exactly what [w] emits. Any other field is still rejected, as vcl 1.4beta7 ("instruction and operand have mismatching field select") and dvp-as ("bad instruction") both reject it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
glampert
force-pushed
the
fix/clipw-implicit-w
branch
from
October 16, 2026 06:50
67d3496 to
e184e74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLIP/CLIPw/CLIPLw read only the W component of their second operand. Tyra's VU programs use the VCLSML macro library, SCEA's standard macro library for VCL, which uses the bare form
clipw.xyz a, b. Testing with SCE's vcl 1.4beta7 (the binary Tyra builds with) confirms that it compiles to the same instruction asclipw.xyz a, b[w](clipw.xyz VF01xyz,VF01w), and that it also acceptsclipw a, bas.xyz. openvcl required the explicit[w]and failed with "Invalid argument", so 9 of Tyra's 15 VU1 programs did not compile. I've confirmed this with vcl 1.4beta7, from Tyra's repo (CI run).With this change, the
wcompoperand modifier now treats a missing field as W, so the bare form emits exactly the same instruction as[w]. Any other field is still rejected; dvp-as refuses those too (with "bad instruction").test/integration/test_clip_implicit_w.cpp: the bare and[w]forms produce identical output,clipw a, balso works, and[x]is rejected.