diff options
author | Eric Anholt <eric@anholt.net> | 2009-08-05 20:12:15 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-08-05 20:20:02 -0700 |
commit | f44916414ecd2b888c8a680d56b7467ccdff6886 (patch) | |
tree | 28a8ec25cf29eb06b7b259878c5aac5cbdc587dd /src/mesa/drivers/dri/i965/brw_wm_iz.c | |
parent | b6c65516865aa331b066a6516d553c9fca314670 (diff) |
i965: Fix source depth reg setting for FSes reading and writing to depth.
For some IZ setups, we'd forget to account for the source depth register
being present, so we'd both read the wrong reg, and write output depth to
the wrong reg.
Bug #22603.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_iz.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_iz.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_iz.c b/src/mesa/drivers/dri/i965/brw_wm_iz.c index 8fd067abe7..5e399ac62a 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_iz.c +++ b/src/mesa/drivers/dri/i965/brw_wm_iz.c @@ -122,6 +122,7 @@ const struct { */ void brw_wm_lookup_iz( GLuint line_aa, GLuint lookup, + GLboolean ps_uses_depth, struct brw_wm_prog_key *key ) { GLuint reg = 2; @@ -131,7 +132,7 @@ void brw_wm_lookup_iz( GLuint line_aa, if (lookup & IZ_PS_COMPUTES_DEPTH_BIT) key->computes_depth = 1; - if (wm_iz_table[lookup].sd_present) { + if (wm_iz_table[lookup].sd_present || ps_uses_depth) { key->source_depth_reg = reg; reg += 2; } |