diff options
author | Dave Airlie <airlied@redhat.com> | 2020-06-19 16:56:36 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-07-27 13:48:11 +1000 |
commit | a99c5a17906e8d8448496a0b8bcc47245e0afb0a (patch) | |
tree | 268a0b5800f098585e60e155b81dc059b632c0ee | |
parent | 7fea178c26727c1569e73f6efb566a85f858205f (diff) |
llvmpipe: add array/3d clearing suppor
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_surface.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c index 2a60d86c996..af8ada4d39b 100644 --- a/src/gallium/drivers/llvmpipe/lp_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_surface.c @@ -313,6 +313,10 @@ llvmpipe_clear_render_target(struct pipe_context *pipe, if (dst->texture->nr_samples > 1) { struct pipe_box box; u_box_2d(dstx, dsty, width, height, &box); + if (dst->texture->target != PIPE_BUFFER) { + box.z = dst->u.tex.first_layer; + box.depth = dst->u.tex.last_layer - dst->u.tex.first_layer + 1; + } for (unsigned s = 0; s < util_res_sample_count(dst->texture); s++) { lp_clear_color_texture_msaa(pipe, dst->texture, dst->format, color, s, &box); @@ -378,6 +382,10 @@ llvmpipe_clear_depth_stencil(struct pipe_context *pipe, uint64_t zstencil = util_pack64_z_stencil(dst->format, depth, stencil); struct pipe_box box; u_box_2d(dstx, dsty, width, height, &box); + if (dst->texture->target != PIPE_BUFFER) { + box.z = dst->u.tex.first_layer; + box.depth = dst->u.tex.last_layer - dst->u.tex.first_layer + 1; + } for (unsigned s = 0; s < util_res_sample_count(dst->texture); s++) lp_clear_depth_stencil_texture_msaa(pipe, dst->texture, dst->format, clear_flags, |