diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 4ac2589a9a7..0179753acef 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -272,6 +272,11 @@ static void r300_clear(struct pipe_context* pipe, } else { zmask_clear = r300_fast_zclear_allowed(r300, buffers); hiz_clear = r300_hiz_clear_allowed(r300); + /* FIXME: only for testing! */ + /*zmask_clear = FALSE;*/ + /*zmask_clear = TRUE; // - this alone looks bad, bothfalse look good, zmaks_clear only false hiz_clear untouched is good */ + /*hiz_clear = FALSE;*/ + /*hiz_clear = TRUE; // enabling this and falsing zmask_clear shows picture but FPS is lower in glxgears...*/ } /* If we need Hyper-Z. */ @@ -295,9 +300,14 @@ static void r300_clear(struct pipe_context* pipe, hyperz_dcv = hyperz->zb_depthclearvalue = r300_depth_clear_value(fb->zsbuf->format, depth, stencil); +/* +*/ r300_mark_atom_dirty(r300, &r300->zmask_clear); r300_mark_atom_dirty(r300, &r300->gpu_flush); buffers &= ~PIPE_CLEAR_DEPTHSTENCIL; +/* FIXME: REMOVE LOG: +*/ + fprintf(stderr, "KUL-A\n"); } if (hiz_clear) { @@ -349,6 +359,7 @@ static void r300_clear(struct pipe_context* pipe, } /* Enable CBZB clear. */ else if (r300_cbzb_clear_allowed(r300, buffers)) { + fprintf(stderr, "KUL-B\n"); struct r300_surface *surf = r300_surface(fb->cbufs[0]); hyperz->zb_depthclearvalue = @@ -363,14 +374,17 @@ static void r300_clear(struct pipe_context* pipe, /* Clear. */ if (buffers) { + fprintf(stderr, "KUL-C\n"); /* Clear using the blitter. */ r300_blitter_begin(r300, R300_CLEAR); util_blitter_clear(r300->blitter, width, height, 1, buffers, color, depth, stencil); r300_blitter_end(r300); +/* TIPP: here maybe not else if, just an if should be present??? */ } else if (r300->zmask_clear.dirty || r300->hiz_clear.dirty || r300->cmask_clear.dirty) { + fprintf(stderr, "KUL-D\n"); /* Just clear zmask and hiz now, this does not use the standard draw * procedure. */ /* Calculate zmask_clear and hiz_clear atom sizes. */ @@ -391,11 +405,13 @@ static void r300_clear(struct pipe_context* pipe, r300->gpu_flush.dirty = FALSE; if (r300->zmask_clear.dirty) { + fprintf(stderr, "KUL-AKVA\n"); r300_emit_zmask_clear(r300, r300->zmask_clear.size, r300->zmask_clear.state); r300->zmask_clear.dirty = FALSE; } if (r300->hiz_clear.dirty) { + fprintf(stderr, "KUL-AKVA2\n"); r300_emit_hiz_clear(r300, r300->hiz_clear.size, r300->hiz_clear.state); r300->hiz_clear.dirty = FALSE; diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c index d86819afa7c..f1c75dac40b 100644 --- a/src/gallium/drivers/r300/r300_hyperz.c +++ b/src/gallium/drivers/r300/r300_hyperz.c @@ -134,6 +134,7 @@ static void r300_update_hyperz(struct r300_context* r300) struct pipe_framebuffer_state *fb = (struct pipe_framebuffer_state*)r300->fb_state.state; struct r300_dsa_state *dsa = r300->dsa_state.state; + /* Z and/or stencil buffer texture */ struct r300_resource *zstex = fb->zsbuf ? r300_resource(fb->zsbuf->texture) : NULL;