| Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
The X and Y coordinates should be in gpr8 and gpr8+1, respectively.
This fixes the cutscene rendering in Sonic Mania.
|
|
|
|
Previously we could end up with a TEXS that didn't write any outputs, this was wrong.
|
|
It is unknown how TLD4S determines the sampler type, more research is needed.
|
|
Different sampler types have their parameters in different registers.
|
|
|
|
|
|
The mode can be used to set the predicate to true depending on the result of the logic operation. In some cases, this means discarding the result (writing it to register 0xFF (Zero)).
This is used by Super Mario Odyssey.
|
|
The SSY instruction pushes an address into the stack, and the SYNC instruction pops it. The current stack depth is 20, we should figure out if this is enough or not.
|
|
We should definitely audit our shader generator for more errors like this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We keep track of the current instance and update an uniform in the shaders to let them know which instance they are.
Instanced vertex arrays are not yet implemented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SSY sets the target label to jump to when the SYNC instruction is executed.
|
|
Avoids potentially perfoming multiple reallocations when we know the
total amount of memory we need beforehand.
|
|
- Used by Super Mario Odyssey (when going in game).
|
|
|
|
- Accuracy is lost in translation to string, e.g. with NaN.
- Needed for Super Mario Odyssey.
|
|
|
|
This variable was being incremented, but we were never actually using
it.
|
|
This should be returning void, not a std::string
|
|
|
|
|
|
|
|
|
|
We don't need to toss away the Subroutine instance after the find() call
and reconstruct another instance with the same data right after it.
Particularly give Subroutine contains a std::set.
|
|
|
|
|
|
Compresses a few namespace specifiers to be more compact.
|
|
Ensures that no identifiers are being hidden, which also reduces
compiler warnings.
|
|
This adds nothing from a behavioral point of view, and can inhibit the
move constructor/RVO
|
|
- When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage.
|
|
|
|
|
|
|
|
It's similar to the FMNMX instruction but it works on integers.
|
|
It's implemented via the GLSL 'roundEven()' function.
|
|
It is unknown at this moment if we actually need to do something with these instructions or if the GLSL compiler takes care of that for us.
|
|
It's similar to the isetp and fsetp instructions but it works on predicates instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Like the MOV32I and FMUL32I instructions.
This fixes a potential crash when using these instructions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This corrects the invalid position values in some games when doing attribute-less rendering.
|
|
This should help a bit with GPU performance once we're GPU-bound.
|
|
|
|
|
|
This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All tested games that use a single texture show no regression.
Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can specify a predicate in the fset instruction:
Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0;
|
|
You can specify three predicates in an fsetp instruction:
P1 = (Value1 Comp Value2) OP P0;
P2 = !(Value1 Comp Value2) OP P0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This instruction is similar to the FSETP instruction, but it doesn't set a predicate, it sets the destination register to 1.0 if the condition holds, and 0 otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
Each predicated instruction will be wrapped in an `if (predicate) { instruction_body; }` in the GLSL, where `predicate` is one of the predicate boolean variables previously set by fsetp.
|
|
Predicate variables are now added to the generated shader code in the form of 'pX' where X is the predicate id.
These predicate variables are initialized to false on shader startup and are set via the fsetp instructions.
TODO:
* Not all the comparison types are implemented.
* Only the single-predicate version is implemented.
|
|
|
|
The 'sched' instruction has a very convoluted encoding, but fortunately it seems to only appear on a fixed interval (once every 4 instructions).
|
|
This function doesn't need to take ownership of the string data being
given to it, considering all we do is append the characters to the
internal string instance.
Instead, use a string view to simply reference the string data without
any potential heap allocation.
Now anything that is a raw const char* won't need to be converted to a
std::string before appending.
|
|
Avoids constructing a std::string just to append a newline character
|
|
Avoids constructing a std::string just to append a character.
|
|
The interface of std::string already lets us append N copies of a
character to an existing string.
|
|
|
|
It will now save the coords before writing the outputs in a subscope.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Tested with Puyo Puyo Tetris and Cave Story+
|
|
|
|
|
|
|