diff options
author | Chia-I Wu <[email protected]> | 2014-01-16 15:29:03 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-02-22 22:45:13 +0800 |
commit | d5cbd73d210d73b39c1b94f58c203053be2e4128 (patch) | |
tree | 75821c19d684f5d81ee10e88251fc837a9356556 /src/gallium/drivers/ilo/ilo_blit.c | |
parent | f57bddc7e431e553e946563d1030e5f239911c8b (diff) |
ilo: fix and enable fast depth clear
Use tex->bo_format instead of zs->format in ilo_blitter_rectlist_clear_zs()
because the latter may be combined depth/stencil format. hiz_can_clear_zs()
is no-op for GEN7+, but move the GEN check so that the assertions are tested.
Finally, call the fast depth clear function from ilo_clear().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_blit.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_blit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_blit.c b/src/gallium/drivers/ilo/ilo_blit.c index ad304c7109a..f0e9412b794 100644 --- a/src/gallium/drivers/ilo/ilo_blit.c +++ b/src/gallium/drivers/ilo/ilo_blit.c @@ -65,6 +65,15 @@ ilo_clear(struct pipe_context *pipe, { struct ilo_context *ilo = ilo_context(pipe); + if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && ilo->fb.state.zsbuf) { + if (ilo_blitter_rectlist_clear_zs(ilo->blitter, ilo->fb.state.zsbuf, + buffers & PIPE_CLEAR_DEPTHSTENCIL, depth, stencil)) + buffers &= ~PIPE_CLEAR_DEPTHSTENCIL; + + if (!buffers) + return; + } + ilo_blitter_pipe_clear_fb(ilo->blitter, buffers, color, depth, stencil); } |