diff options
author | Brian Paul <brianp@vmware.com> | 2009-02-13 17:17:52 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-13 17:18:36 -0700 |
commit | c51c822ee02cb47ddba46da668577d51b7c02831 (patch) | |
tree | 905cafdc5a02f07aa67fc04e66a7fb1734abec20 /progs/tests/stencil_wrap.c | |
parent | 74b6d55864b9264323a09856781f655e453b182b (diff) |
i965: rewrite the code for handling shader subroutine calls
Previously, the prog_instruction::Data field was used to map original Mesa
instructions to brw instructions in order to resolve subroutine calls. This
was a rather tangled mess. Plus it's an obstacle to implementing dynamic
allocation/growing of the instruction buffer (it's still a fixed size).
Mesa's GLSL compiler emits a label for each subroutine and CAL instruction.
Now we use those labels to patch the subroutine calls after code generation
has been done. We just keep a list of all CAL instructions that needs patching
and a list of all subroutine labels. It's a simple matter to resolve them.
This also consolidates some redundant post-emit code between brw_vs_emit.c and
brw_wm_glsl.c and removes some loops that cleared the prog_instruction::Data
fields at the end.
Plus, a bunch of new comments.
Diffstat (limited to 'progs/tests/stencil_wrap.c')
0 files changed, 0 insertions, 0 deletions