diff options
author | Eric Anholt <[email protected]> | 2019-11-08 12:30:02 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-04 19:02:59 +0000 |
commit | c574cda3c6a3f880f99e4e22967fc82e34609942 (patch) | |
tree | 4624753a3a745e978b1942c532982ded0e189603 /src/gallium/drivers/nouveau/nv30 | |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_vbo.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c index b083acfac3e..99ceef77403 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_vbo.c @@ -41,15 +41,13 @@ nv30_emit_vtxattr(struct nv30_context *nv30, struct pipe_vertex_buffer *vb, const unsigned nc = util_format_get_nr_components(ve->src_format); struct nouveau_pushbuf *push = nv30->base.pushbuf; struct nv04_resource *res = nv04_resource(vb->buffer.resource); - const struct util_format_description *desc = - util_format_description(ve->src_format); const void *data; float v[4]; data = nouveau_resource_map_offset(&nv30->base, res, vb->buffer_offset + ve->src_offset, NOUVEAU_BO_RD); - desc->unpack_rgba_float(v, 0, data, 0, 1, 1); + util_format_unpack_rgba_float(ve->src_format, v, data, 1); switch (nc) { case 4: |