diff options
author | Eric Anholt <eric@anholt.net> | 2019-11-08 12:30:02 -0800 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-02-04 19:02:59 +0000 |
commit | c574cda3c6a3f880f99e4e22967fc82e34609942 (patch) | |
tree | 4624753a3a745e978b1942c532982ded0e189603 /src/gallium/drivers/nouveau/nv50/nv50_surface.c | |
parent | 333c9d5bb054d5ac5518e830b535e8a4f3f80187 (diff) |
util: Make helper functions for pack/unpacking pixel rows.
Almost all users of the unpack functions don't have strides to plug in
(and many are only doing one pixel!), and this will help simplify
them.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_surface.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_surface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c index 7a2402d72ed..34c2633916b 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c @@ -475,11 +475,11 @@ nv50_clear_texture(struct pipe_context *pipe, if (util_format_has_depth(desc)) { clear |= PIPE_CLEAR_DEPTH; - desc->unpack_z_float(&depth, 0, data, 0, 1, 1); + util_format_unpack_z_float(res->format, &depth, data, 1); } if (util_format_has_stencil(desc)) { clear |= PIPE_CLEAR_STENCIL; - desc->unpack_s_8uint(&stencil, 0, data, 0, 1, 1); + util_format_unpack_s_8uint(res->format, &stencil, data, 1); } pipe->clear_depth_stencil(pipe, sf, clear, depth, stencil, box->x, box->y, box->width, box->height, false); |