Commit graph

13 commits

Author SHA1 Message Date
Kenneth Graunke
09cad1339d ir_reader: Perform a preliminary pass to scan for function prototypes. 2010-04-28 18:14:54 -07:00
Kenneth Graunke
ddf5a011e2 ir_reader: Don't initialize globals, builtins, or constructors.
All of these are currently emitted as part of the IR, so by initializing
them, we actually end up with two copies.  For constructors, we may
eventually wish to avoid emitting them as part of the IR output.
2010-04-28 18:14:54 -07:00
Kenneth Graunke
4ec982fb86 Make ir_read_error set state->error. 2010-04-28 18:14:54 -07:00
Kenneth Graunke
396fa9eba6 ir_reader: Add support for "break" and "continue" in loops.
Includes threading the ir_loop * context through various functions.
2010-04-28 18:14:54 -07:00
Kenneth Graunke
32b305207c ir_reader: Add initial loop support; doesn't yet support break/continue. 2010-04-28 18:14:54 -07:00
Kenneth Graunke
451381c220 ir_reader: Add support for reading (var_ref ...) and (array_ref ...) 2010-04-28 18:14:54 -07:00
Kenneth Graunke
46ef8f19d7 ir_reader: rvalues are instructions too! 2010-04-28 18:14:54 -07:00
Kenneth Graunke
3ea0582803 ir_reader: Add support for reading conditionals: (if ...) 2010-04-28 18:14:54 -07:00
Kenneth Graunke
5794497542 ir_reader: Add support for reading array types.
Also, constify glsl_type pointers; this was necessary to use
glsl_type::get_array_instance.
2010-04-28 18:14:54 -07:00
Kenneth Graunke
9d2ff7617a ir_reader: Add support for reading (return ...) 2010-04-28 18:14:54 -07:00
Kenneth Graunke
d1d2ada3c6 ir_reader: Add support for reading variable declarations.
It also now reads a list of instructions, as it should, rather than a
single rvalue.
2010-04-28 18:14:54 -07:00
Kenneth Graunke
f955649af3 Partial IR reader.
Currently reads assignments, constants, expressions, and swizzles.
2010-04-28 18:14:53 -07:00
Kenneth Graunke
34350be2cd Add stub ir_reader and new 'i' mode for reading IR rather than GLSL. 2010-04-28 18:14:53 -07:00