Commit Graph

19 Commits

Author SHA1 Message Date
Kenneth Graunke
b51557fbe2 ir_reader: Read function calls. 2010-04-28 18:14:54 -07:00
Kenneth Graunke
b142aeeb20 ir_reader: Replace function prototypes with the definition.
Previously, we just created a new one, which was wrong.
2010-04-28 18:14:54 -07:00
Kenneth Graunke
21128c23c6 ir_reader: Fix incorrect error message for expressions. 2010-04-28 18:14:54 -07:00
Kenneth Graunke
46a223224c Make ir_read_error print out the given S-Expression, for context. 2010-04-28 18:14:54 -07:00
Kenneth Graunke
951632253f ir_reader: Fix for swizzles. 2010-04-28 18:14:54 -07:00
Kenneth Graunke
8df335d7f9 ir_reader: Preliminary work toward reading functions. 2010-04-28 18:14:54 -07:00
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