tgsi: add missing functionality to support instructions with labels
authorKeith Whitwell <keithw@vmware.com>
Wed, 19 Aug 2009 10:54:06 +0000 (11:54 +0100)
committerKeith Whitwell <keithw@vmware.com>
Wed, 19 Aug 2009 10:54:26 +0000 (11:54 +0100)
commit265e210edb2fdf0f6ae777635676f05613b38eb7
treea55f2bb1afc89e546b7d32cf3513c1167a1a3e8d
parente327845e2b72936c60a143d46a52dbbe81afdd72
tgsi: add missing functionality to support instructions with labels

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.
src/gallium/auxiliary/tgsi/tgsi_ureg.c
src/gallium/auxiliary/tgsi/tgsi_ureg.h