summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-03-21 23:09:01 +1100
committerBen Skeggs <[email protected]>2008-03-21 23:09:01 +1100
commit3be8785e08128bc2821c0cdff97f7adbb46c745b (patch)
tree98d4a68f351ca69b61e554e5007696fbe56f8056
parent3a0dd2e6d162fad6f98f337ee4f6b5dada1e37f3 (diff)
nv40: add 16-bit SSCALED vb formats
-rw-r--r--src/gallium/drivers/nv40/nv40_vbo.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv40/nv40_vbo.c b/src/gallium/drivers/nv40/nv40_vbo.c
index 4a5b8119390..4fae10f74b4 100644
--- a/src/gallium/drivers/nv40/nv40_vbo.c
+++ b/src/gallium/drivers/nv40/nv40_vbo.c
@@ -28,6 +28,12 @@ nv40_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
case PIPE_FORMAT_R8G8B8A8_UNORM:
*fmt = NV40TCL_VTXFMT_TYPE_UBYTE;
break;
+ case PIPE_FORMAT_R16_SSCALED:
+ case PIPE_FORMAT_R16G16_SSCALED:
+ case PIPE_FORMAT_R16G16B16_SSCALED:
+ case PIPE_FORMAT_R16G16B16A16_SSCALED:
+ *fmt = 5;
+ break;
default:
pf_sprint_name(fs, pipe);
NOUVEAU_ERR("Unknown format %s\n", fs);
@@ -37,18 +43,22 @@ nv40_vbo_format_to_hw(enum pipe_format pipe, unsigned *fmt, unsigned *ncomp)
switch (pipe) {
case PIPE_FORMAT_R8_UNORM:
case PIPE_FORMAT_R32_FLOAT:
+ case PIPE_FORMAT_R16_SSCALED:
*ncomp = 1;
break;
case PIPE_FORMAT_R8G8_UNORM:
case PIPE_FORMAT_R32G32_FLOAT:
+ case PIPE_FORMAT_R16G16_SSCALED:
*ncomp = 2;
break;
case PIPE_FORMAT_R8G8B8_UNORM:
case PIPE_FORMAT_R32G32B32_FLOAT:
+ case PIPE_FORMAT_R16G16B16_SSCALED:
*ncomp = 3;
break;
case PIPE_FORMAT_R8G8B8A8_UNORM:
case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ case PIPE_FORMAT_R16G16B16A16_SSCALED:
*ncomp = 4;
break;
default: