diff options
author | Emil Velikov <[email protected]> | 2013-06-21 18:04:55 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-08-06 22:25:26 +0200 |
commit | 07c8f7a6f8dfe724c1ae92ec45dd04532b6fd453 (patch) | |
tree | 34248cf8c030f8cf7de6e65018f9256ded60a21f /src/gallium/drivers/nv30 | |
parent | 31caddb8d95348502f3bdfe8b619515b801b3bf4 (diff) |
nv50: handle pure integer vertex attributes
And as a side effect fix a crash in the following piglit test:
general/attribs GL3
Signed-off-by: Emil Velikov <[email protected]>
Cc: "9.2 and 9.1" [email protected]
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r-- | src/gallium/drivers/nv30/nv30_vbo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv30/nv30_vbo.c b/src/gallium/drivers/nv30/nv30_vbo.c index 9033fa5a87f..9f00c0285e2 100644 --- a/src/gallium/drivers/nv30/nv30_vbo.c +++ b/src/gallium/drivers/nv30/nv30_vbo.c @@ -40,13 +40,15 @@ 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); + 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); - util_format_read_4f(ve->src_format, v, 0, data, 0, 0, 0, 1, 1); + desc->unpack_rgba_float(v, 0, data, 0, 1, 1); switch (nc) { case 4: |