diff options
author | Roland Scheidegger <[email protected]> | 2010-05-29 00:02:05 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-29 00:02:05 +0200 |
commit | a1d5131d2eaa5f5ccc8b38f9379f9c6bc989bc1a (patch) | |
tree | 2b64ab56a6c9cad911029b0835f90dee6aac2733 /src/gallium/auxiliary/util/u_clear.h | |
parent | 0cd70b554cb0bb9280f83fddf4f1451fddd37230 (diff) |
util: adapt to clear interface changes
Diffstat (limited to 'src/gallium/auxiliary/util/u_clear.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_clear.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/src/gallium/auxiliary/util/u_clear.h b/src/gallium/auxiliary/util/u_clear.h index 31f7fb2169a..07088a7a727 100644 --- a/src/gallium/auxiliary/util/u_clear.h +++ b/src/gallium/auxiliary/util/u_clear.h @@ -31,9 +31,6 @@ #include "pipe/p_context.h" #include "pipe/p_state.h" -#include "util/u_pack_color.h" -#include "util/u_rect.h" -#include "util/u_surface.h" /** @@ -46,25 +43,17 @@ util_clear(struct pipe_context *pipe, const float *rgba, double depth, unsigned stencil) { if (buffers & PIPE_CLEAR_COLOR) { - struct pipe_surface *ps = framebuffer->cbufs[0]; - struct pipe_subresource subdst; - union util_color uc; - - subdst.face = ps->face; - subdst.level = ps->level; - util_pack_color(rgba, ps->format, &uc); - pipe->resource_fill_region(pipe, ps->texture, subdst, 0, 0, ps->zslice, - ps->width, ps->height, uc.ui); + unsigned i; + for (i = 0; i < framebuffer->nr_cbufs; i++) { + struct pipe_surface *ps = framebuffer->cbufs[i]; + pipe->clearRT(pipe, ps, rgba, 0, 0, ps->width, ps->height); + } } if (buffers & PIPE_CLEAR_DEPTHSTENCIL) { struct pipe_surface *ps = framebuffer->zsbuf; - struct pipe_subresource subdst; - - subdst.face = ps->face; - subdst.level = ps->level; - pipe->resource_fill_region(pipe, ps->texture, subdst, 0, 0, ps->zslice, - ps->width, ps->height, - util_pack_z_stencil(ps->format, depth, stencil)); + pipe->clearDS(pipe, ps, buffers & PIPE_CLEAR_DEPTHSTENCIL, + depth, stencil, + 0, 0, ps->width, ps->height); } } |