diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2008-02-14 13:24:27 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2008-02-14 13:24:27 +0800 |
commit | 4813946d366a0d61e0be1dacec6d3077bc939b48 (patch) | |
tree | 2a883f1ab3c9388b1b4bcad553d7675067e4c637 | |
parent | 1202c434d91c56bccc4c918f8284f0602ef4ca0b (diff) | |
download | external_mesa3d-4813946d366a0d61e0be1dacec6d3077bc939b48.zip external_mesa3d-4813946d366a0d61e0be1dacec6d3077bc939b48.tar.gz external_mesa3d-4813946d366a0d61e0be1dacec6d3077bc939b48.tar.bz2 |
i965: use setup attributes as inputs when allocating registers
for WM payload. fix #10767
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_sf.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_pass2.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 6bdb834..a6c60aa 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -688,5 +688,7 @@ brw_context( GLcontext *ctx ) return (struct brw_context *)ctx; } +#define DO_SETUP_BITS ((1<<(FRAG_ATTRIB_MAX)) - 1) + #endif diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index 9250dc3..18285be 100644 --- a/src/mesa/drivers/dri/i965/brw_sf.c +++ b/src/mesa/drivers/dri/i965/brw_sf.c @@ -43,8 +43,6 @@ #include "brw_sf.h" #include "brw_state.h" -#define DO_SETUP_BITS ((1<<(FRAG_ATTRIB_MAX)) - 1) - static void compile_sf_prog( struct brw_context *brw, struct brw_sf_prog_key *key ) { diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass2.c b/src/mesa/drivers/dri/i965/brw_wm_pass2.c index c1ce6a9..8541cbc 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_pass2.c +++ b/src/mesa/drivers/dri/i965/brw_wm_pass2.c @@ -69,7 +69,8 @@ static void prealloc_reg(struct brw_wm_compile *c, */ static void init_registers( struct brw_wm_compile *c ) { - GLuint inputs = FRAG_BIT_WPOS | c->fp_interp_emitted; + struct brw_context *brw = c->func.brw; + GLuint inputs = (brw->vs.prog_data->outputs_written & DO_SETUP_BITS); GLuint nr_interp_regs = 0; GLuint i = 0; GLuint j; |