util: Make helper functions for pack/unpacking pixel rows.
[mesa.git] / src / gallium / drivers / nouveau / nv30 / nv30_vbo.c
index bb0a8a0b1d504b76755ad48af934454b87269d42..99ceef774036a0cb9f8f9fd0480b35f7ea0f5f4e 100644 (file)
@@ -23,7 +23,7 @@
  *
  */
 
-#include "util/u_format.h"
+#include "util/format/u_format.h"
 #include "util/u_inlines.h"
 #include "util/u_prim.h"
 #include "translate/translate.h"
@@ -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:
@@ -192,7 +190,7 @@ nv30_vbo_validate(struct nv30_context *nv30)
    if (!nv30->vertex || nv30->draw_flags)
       return;
 
-#ifdef PIPE_ARCH_BIG_ENDIAN
+#if UTIL_ARCH_BIG_ENDIAN
    if (1) { /* Figure out where the buffers are getting messed up */
 #else
    if (unlikely(vertex->need_conversion)) {