aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorStephane Marchesin <[email protected]>2006-03-06 12:23:24 +0000
committerStephane Marchesin <[email protected]>2006-03-06 12:23:24 +0000
commit98e1b13802fb83b504353c14df1d90646eabe111 (patch)
tree0a9c2ce57e9ae86ffa856519511b6be36ea43607 /src/mesa/drivers/dri
parentb9c4b7fc896f7ff3188065526b27707ff6e43c77 (diff)
Added some NV20 support - nv_30_tris.c should probably be renamed again.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_tris.c40
1 files changed, 30 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv30_tris.c b/src/mesa/drivers/dri/nouveau/nv30_tris.c
index 275536c8e44..6b949bd3b76 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_tris.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_tris.c
@@ -673,18 +673,38 @@ static inline void nv30OutputVertexFormat(struct nouveau_context* nmesa, GLuint
/*
* Tell the hardware about the vertex format
*/
- BEGIN_RING_SIZE(channel,0x1740,slots);
- for(i=0;i<slots;i++)
+ switch(nmesa->screen->card_type)
{
- int size=attr_size[i];
- OUT_RING(0x00000002|(size*0x10));
+ case NV_20:
+ {
+ for(i=0;i<16;i++)
+ {
+ int size=attr_size[i];
+ BEGIN_RING_SIZE(channel,0x1760+i*4,1);
+ OUT_RING(0x00000002|(size*0x10));
+ }
+ }
+ break;
+ case NV_30:
+ case NV_40:
+ case G_70:
+ {
+ BEGIN_RING_SIZE(channel,0x1740,slots);
+ for(i=0;i<slots;i++)
+ {
+ int size=attr_size[i];
+ OUT_RING(0x00000002|(size*0x10));
+ }
+ BEGIN_RING_SIZE(channel,0x1718,1);
+ OUT_RING(0);
+ BEGIN_RING_SIZE(channel,0x1718,1);
+ OUT_RING(0);
+ BEGIN_RING_SIZE(channel,0x1718,1);
+ OUT_RING(0);
+ }
+ break;
+
}
- BEGIN_RING_SIZE(channel,0x1718,1);
- OUT_RING(0);
- BEGIN_RING_SIZE(channel,0x1718,1);
- OUT_RING(0);
- BEGIN_RING_SIZE(channel,0x1718,1);
- OUT_RING(0);
}