diff options
author | Roland Scheidegger <[email protected]> | 2010-05-17 21:15:20 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-17 21:15:20 +0200 |
commit | 815b75705f5e3f0f7db025368da37bb14395de9a (patch) | |
tree | a8898e0e0883e55603ac44f8f60fb0372ac01f0c /src/gallium/auxiliary/util/u_clear.h | |
parent | 379db6a36b32912be8fd8808ceb95ca5cffa7850 (diff) |
gallium/util: adapt util code to interface changes
The util blit functions change their interface (apart from some rename) too
(in particular util_blit_pixels now also takes a pipe_resource as the src blit
argument instead of a surface, as it might just call resource_copy_region).
Maybe the blit util code might need a bit more cleanup, it still doesn't feel
very clean. In particular it seems that util_blit_pixels_tex should probably
disappear, and I think it would be great if the code called by drivers for
blitting (u_blitter.c, which isn't really touched by this change) could somehow
be merged with the u_blit code.
Diffstat (limited to 'src/gallium/auxiliary/util/u_clear.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_clear.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/util/u_clear.h b/src/gallium/auxiliary/util/u_clear.h index 40da2d75a72..31f7fb2169a 100644 --- a/src/gallium/auxiliary/util/u_clear.h +++ b/src/gallium/auxiliary/util/u_clear.h @@ -47,25 +47,24 @@ util_clear(struct pipe_context *pipe, { 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); - if (pipe->surface_fill) { - pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, uc.ui); - } else { - util_surface_fill(pipe, ps, 0, 0, ps->width, ps->height, uc.ui); - } + pipe->resource_fill_region(pipe, ps->texture, subdst, 0, 0, ps->zslice, + ps->width, ps->height, uc.ui); } if (buffers & PIPE_CLEAR_DEPTHSTENCIL) { struct pipe_surface *ps = framebuffer->zsbuf; + struct pipe_subresource subdst; - if (pipe->surface_fill) { - pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, - util_pack_z_stencil(ps->format, depth, stencil)); - } else { - util_surface_fill(pipe, ps, 0, 0, ps->width, ps->height, - util_pack_z_stencil(ps->format, depth, stencil)); - } + 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)); } } |