Age | Commit message (Collapse) | Author | |
---|---|---|---|
2009-08-19 | tgsi: add missing functionality to support instructions with labels | Keith Whitwell | |
Could previously emit opcodes with label arguments, but was no way to patch them with the actual destinations of those labels. Adds two functions: ureg_get_instruction_number - to get the id of the next instruction to be emitted ureg_fixup_label - to patch an emitted label to point to a given instruction number. Need some more complex examples than u_simple_shader, so far this has only been compile-tested. | |||
2009-08-13 | tgsi: add simple facility for releasing and reusing temporaries | Keith Whitwell | |
2009-08-13 | tgsi: turn off debugging | Keith Whitwell | |
2009-08-13 | tgsi: use REALLOC for growing token pool | Keith Whitwell | |
2009-08-13 | tgsi: add tgsi_ureg, a simplified tgsi shader builder | Keith Whitwell | |
This is modelled on the nice & easy-to-use facilities we had for building shaders in mesa, eg. in texenvprogram.c and friends. Key points include pass-by-value register structs that can be manipulated in a functional style, eg: negate(swizzle(reg, X,X,X,X)) and per-opcode instruction functions, eg: emit_MOV( p, writemask(dst, 0x1), negate(src)); and similar. Additionally, the interface allows mixed emit of instructions and decls, which are sorted out internally to obey TGSI ordering. Immediates may be emitted at any time and are scanned against existing immediates to try and reduce redundancy. Not all TGSI functionality is accessible through this interface, but most or all of what mesa uses should be. |