summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-02-13 17:17:52 -0700
committerBrian Paul <brianp@vmware.com>2009-02-13 17:18:36 -0700
commitc51c822ee02cb47ddba46da668577d51b7c02831 (patch)
tree905cafdc5a02f07aa67fc04e66a7fb1734abec20 /src/mesa/drivers/dri/i965/brw_wm.h
parent74b6d55864b9264323a09856781f655e453b182b (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 'src/mesa/drivers/dri/i965/brw_wm.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 0f46a25b1a..582031f5f6 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -281,4 +281,6 @@ void brw_wm_lookup_iz( GLuint line_aa,
GLboolean brw_wm_is_glsl(const struct gl_fragment_program *fp);
void brw_wm_glsl_emit(struct brw_context *brw, struct brw_wm_compile *c);
+
+
#endif