GE Debugger: Add fields to register expressions #16007
Merged
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.
Follow up from #15974. This makes GE conditions easier to use, by providing a few more values, some constants, and fields. It also evaluates the expression as if the op had already run (at least for registers, not for matrix data or vtype, etc.)
For example, this allows you to add conditions like:
vtype.through == 1
alphatest.func == GREATER
transfersrc == 0x08804000
prim.type == TRIANGLE_FAN
fogcolor.red == 0xFF
texsize0.h == 512
texfunc.func == GE_TEXFUNC_REPLACE
Which means you need to memorize less about the bits to evaluate expressions. It'd be nice to make this more friendly, but I already think this is better (and more usable from a debugger API, which doesn't exist yet but I plan for it to.) Of course, they're also useful for actual conditions.
Note: you can also use these when using "goto address" in a displaylist. You can't (yet?) use them in the memory viewer.
There's no way to discover these constants or field names aside from reading the code, but it'll error out at you if they're wrong.
This also gives metadata structure that might allow for "assembling" displaylist commands too.
-[Unknown]