diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-08-07 01:59:31 +0200 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-08-07 02:00:21 +0200 |
commit | ab0a3f30b8070a0204c023f8ea5375f1d3f710fd (patch) | |
tree | 961d382dee6ac71b81654eb75f659001ca276b0a | |
parent | a838cee6bc3a2e144c00f0a5f0a7791cd97037ab (diff) |
r300g: fix cbzb clears when hyperz is off
-rw-r--r-- | src/gallium/drivers/r300/r300_flush.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_hyperz.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_derived.c | 3 |
5 files changed, 11 insertions, 10 deletions
diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c index 7fed9b5d07..fe182b6615 100644 --- a/src/gallium/drivers/r300/r300_flush.c +++ b/src/gallium/drivers/r300/r300_flush.c @@ -44,8 +44,7 @@ static void r300_flush(struct pipe_context* pipe, u_upload_flush(r300->upload_ib); if (r300->dirty_hw) { - if (r300->rws->get_value(r300->rws, R300_CAN_HYPERZ)) - r300_emit_hyperz_end(r300); + r300_emit_hyperz_end(r300); r300_emit_query_end(r300); r300->flush_counter++; diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c index 10e440ce30..523d547ea9 100644 --- a/src/gallium/drivers/r300/r300_hyperz.c +++ b/src/gallium/drivers/r300/r300_hyperz.c @@ -21,12 +21,14 @@ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "util/u_format.h" -#include "util/u_mm.h" #include "r300_context.h" #include "r300_hyperz.h" #include "r300_reg.h" #include "r300_fs.h" +#include "r300_winsys.h" + +#include "util/u_format.h" +#include "util/u_mm.h" /* HiZ rules - taken from various docs @@ -138,6 +140,9 @@ static void r300_update_hyperz(struct r300_context* r300) return; } + if (!r300->rws->get_value(r300->rws, R300_CAN_HYPERZ)) + return; + /* Zbuffer compression. */ if (r300->z_compression) { z->zb_bw_cntl |= R300_RD_COMP_ENABLE; diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 910f5f7113..f2ff65b261 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -223,8 +223,7 @@ static void r300_prepare_for_rendering(struct r300_context *r300, /* Emitted in flush. */ end_dwords += 26; /* emit_query_end */ - if (r300->rws->get_value(r300->rws, R300_CAN_HYPERZ)) - end_dwords += r300->hyperz_state.size + 2; /* emit_hyperz_end + zcache flush */ + end_dwords += r300->hyperz_state.size + 2; /* emit_hyperz_end + zcache flush */ cs_dwords += end_dwords; diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 1e6b81d798..9db5e9e054 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -689,8 +689,7 @@ void r300_mark_fb_state_dirty(struct r300_context *r300, /* What is marked as dirty depends on the enum r300_fb_state_change. */ r300->gpu_flush.dirty = TRUE; r300->fb_state.dirty = TRUE; - if (r300->rws->get_value(r300->rws, R300_CAN_HYPERZ)) - r300->hyperz_state.dirty = TRUE; + r300->hyperz_state.dirty = TRUE; if (change == R300_CHANGED_FB_STATE) { r300->aa_state.dirty = TRUE; diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index f3dad4c292..a85b46f5c7 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -694,6 +694,5 @@ void r300_update_derived_state(struct r300_context* r300) } } - if (r300->rws->get_value(r300->rws, R300_CAN_HYPERZ)) - r300_update_hyperz_state(r300); + r300_update_hyperz_state(r300); } |