Age | Commit message (Collapse) | Author |
|
|
|
|
|
This eliminates the NOP instructions that had been used as placeholders for
branch targets.
Also, fix "return" statement bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also, start moving high vs. low-level instruction selection into slang_emit.c
|
|
IR_LOOP's BranchNode ptr is the head of a linked list of CONT and BRK nodes.
After emitting loop, walk over the linked list, filling in the CONT/BRK
instruction's BranchTarget field (location of the ENDLOOP instruction, or
one past).
|
|
|
|
|
|
of loops.
BRK's BranchTarget field actually points to the top of the loop, not the
bottom, since we don't know the later's location yet. In the interpreter,
basically do an indirect jump to update the PC.
|
|
This allows us to back-patch the IF/ELSE instruction's BranchTarget field
to point to the location of the ELSE/ENDIF instructions. No longer have to
search for ELSE/ENDIF in the interpreter. Also makes it trivial to translate
IF/ELSE instructions into conditional/unconditional BRA instructions.
|
|
IF/ELSE/ENDIF and BEGIN_LOOP/END_LOOP/BREAK instructions seem to work.
Disabled by default though until better tested.
Implemented IR_NOT, but needs optimization.
|
|
New high-level flow-control instructions, both at IR level and GPU instructions
for looping and subroutines.
|
|
|
|
vec2 v; v.x = v.y = 1.0; // chained assignment
vec4 v; v.zx = vec2(a,b); // swizzled writemask
|
|
instruction saturate-write option. Not finished yet.
|
|
|
|
|
|
|
|
of registers, rather than crash.
|
|
|
|
|
|
share a single register. Clean-up needed.
|
|
|
|
|
|
|
|
|
|
|
|
Improved shader error handling.
|
|
we can either jump on zero, or non-zero predicate.
|
|
|
|
float[4] register slot.
|
|
p and q works correctly.
|
|
|
|
|
|
|
|
|
|
emit time, not codegen time.
|