Age | Commit message (Collapse) | Author |
|
cherry-picked from master
|
|
Also, found/fixed a code generation regression: the emit_swizzle() function
was always returning NULL. This caused emit_move() to miss its chance at peephole
optimization.
|
|
|
|
GLSL matrices are stored in column-major order while GL_ARB_vertex/fragment_program
use row-major. So, need to use STATE_MATRIX_TRANSPOSE for built-in matrices.
Unfortunately, this means that the expression M * V isn't very efficient since we
need to extract the rows out of M. And that's the typical expression for vertex
transformation: gl_ModelViewProjectionMatrix * gl_Position.
Solve this inefficiency by looking for M*V expressions and replacing them
with V*Transpose(M).
Also, add support for GLSL 1.20's MatrixTranspose, Inverse and InverseTranspose
matrices.
|
|
|
|
This eliminates the NOP instructions that had been used as placeholders for
branch targets.
Also, fix "return" statement bug.
|
|
|
|
Used to track the number of components in a float/int/bool literal.
Helps with some typechecking things.
Fixes problems with calls such as "distance(v2, vec2(1.0, 2.0))"
|
|
|
|
|
|
Implement assignment/move for types larger than 4 floats.
Fix codegen bug for "return expr" in inlined functions.
More clean-up of storage allocation code (slang_resolve_storage).
|
|
instructions.
|
|
|
|
|
|
|
|
|
|
|
|
Add experimental print functions to builtin library.
Some functionality missing:
- automatic arrays;
- general constructors;
- local variable initialization;
- texture sampling and noise;
- semantic error checking;
- function prototypes.
|
|
Minor fixes and cosmetic changes.
|