summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-24 16:33:46 -0600
committerBrian Paul <brianp@vmware.com>2009-04-24 16:33:46 -0600
commitb58b3a786aa38dcc9d72144c2cc691151e46e3d5 (patch)
treed328be09724ef0d95a0aa408f68a3ddcc16bbe05 /src/mesa/drivers/dri/i965/brw_wm.h
parent7da3f9403b235394a5c7e9456e34a0c9dad7dd15 (diff)
i965: rework GLSL/WM register allocation
Use a bitvector of used/free flags. If we run out of temps, examine the live intervals of the temp regs in the program and free those which are no longer alive. Also, enable the new WM const buffer code.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index d0ab3bdc65..75205fddb7 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -240,15 +240,18 @@ struct brw_wm_compile {
GLuint max_wm_grf;
GLuint last_scratch;
+ GLuint cur_inst; /**< index of current instruction */
+
/** Mapping from Mesa registers to hardware registers */
struct {
GLboolean inited;
struct brw_reg reg;
} wm_regs[PROGRAM_PAYLOAD+1][256][4];
+ GLboolean used_grf[BRW_WM_MAX_GRF];
+ GLuint first_free_grf;
struct brw_reg stack;
struct brw_reg emit_mask_reg;
- GLuint reg_index; /**< Index of next free GRF register */
GLuint tmp_regs[BRW_WM_MAX_GRF];
GLuint tmp_index;
GLuint tmp_max;