diff options
author | Christoph Bumiller <[email protected]> | 2010-07-24 12:49:15 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2010-07-24 14:48:15 +0200 |
commit | f3af1201c578443dd0f72e73470dd1763888a41d (patch) | |
tree | 493447913d238317d327a20fd5e23129292c7f17 /src/gallium/drivers/nv50/nv50_vbo.c | |
parent | 633f5ac6124b1b57152c09becba92d176e905ae9 (diff) |
nouveau: update nouveau_class.h
Adds nvc0, new vertex formats, and dual source blending values.
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_vbo.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_vbo.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c index 6bd52884b57..996844b18f1 100644 --- a/src/gallium/drivers/nv50/nv50_vbo.c +++ b/src/gallium/drivers/nv50/nv50_vbo.c @@ -29,6 +29,9 @@ #include "nv50_context.h" #include "nv50_resource.h" +/* VERTEX_ARRAY_ATTRIB_TYPE is duplicated for unknown reason */ +#define NV50_VAT(x) ((x) | ((x) << 3)) + static INLINE uint32_t nv50_vbo_type_to_hw(enum pipe_format format) { @@ -39,22 +42,22 @@ nv50_vbo_type_to_hw(enum pipe_format format) switch (desc->channel[0].type) { case UTIL_FORMAT_TYPE_FLOAT: - return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT; + return NV50_VAT(NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT); case UTIL_FORMAT_TYPE_UNSIGNED: if (desc->channel[0].normalized) { - return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_UNORM; + return NV50_VAT(NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_UNORM); } - return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_USCALED; + return NV50_VAT(NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_USCALED); case UTIL_FORMAT_TYPE_SIGNED: if (desc->channel[0].normalized) { - return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SNORM; + return NV50_VAT(NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SNORM); } - return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SSCALED; + return NV50_VAT(NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SSCALED); /* case PIPE_FORMAT_TYPE_UINT: - return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_UINT; + return NV50_VAT(NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_UINT); case PIPE_FORMAT_TYPE_SINT: - return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SINT; */ + return NV50_VAT(NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_SINT); */ default: return 0; } |