diff options
author | Brian Paul <[email protected]> | 2016-08-11 09:30:51 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-08-16 08:28:32 -0600 |
commit | 22b8288b336d506997d69e3b026fcf16c996a973 (patch) | |
tree | 0adbe88308640ebf67743aca3cceb2ea5749ee5f /src/gallium/drivers/i915 | |
parent | 66debeae9d225ab2026c0b7454532ed3ca960a87 (diff) |
gallium/i915: inline the util_clear() code into i915_clear_blitter()
This is the only place the util_clear() function was used.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_clear.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915/i915_clear.c b/src/gallium/drivers/i915/i915_clear.c index 57244a65bb5..a1af7891043 100644 --- a/src/gallium/drivers/i915/i915_clear.c +++ b/src/gallium/drivers/i915/i915_clear.c @@ -30,7 +30,6 @@ */ -#include "util/u_clear.h" #include "util/u_format.h" #include "util/u_pack_color.h" #include "i915_context.h" @@ -221,8 +220,27 @@ i915_clear_blitter(struct pipe_context *pipe, unsigned buffers, const union pipe_color_union *color, double depth, unsigned stencil) { - util_clear(pipe, &i915_context(pipe)->framebuffer, buffers, color, depth, - stencil); + struct pipe_framebuffer_state *framebuffer = + &i915_context(pipe)->framebuffer; + unsigned i; + + for (i = 0; i < framebuffer->nr_cbufs; i++) { + if (buffers & (PIPE_CLEAR_COLOR0 << i)) { + struct pipe_surface *ps = framebuffer->cbufs[i]; + + if (ps) { + pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width, + ps->height, true); + } + } + } + + if (buffers & PIPE_CLEAR_DEPTHSTENCIL) { + struct pipe_surface *ps = framebuffer->zsbuf; + pipe->clear_depth_stencil(pipe, ps, buffers & PIPE_CLEAR_DEPTHSTENCIL, + depth, stencil, + 0, 0, ps->width, ps->height, true); + } } void |