diff options
author | Ilia Mirkin <[email protected]> | 2014-12-30 23:19:47 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-12-30 23:30:23 -0500 |
commit | be0311c9626eef841f6d245359759cf1e082aebf (patch) | |
tree | 35180d95102abd447bd5efc2264108a713745443 /src/gallium/drivers/nouveau/nvc0/mme | |
parent | 609c3e51f5ca8abb15867537997369e7e8a678e3 (diff) |
nv50,nvc0: set vertex id base to index_bias
Fixes the piglits which check that gl_VertexID includes the base vertex
offset:
arb_draw_indirect-vertexid elements
gl-3.2-basevertex-vertexid
Note that this leaves out the original G80, for which this will continue
to fail. It could be fixed by passing a driver constbuf value in, but
that's beyond the scope of this change.
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.3 10.4" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/mme')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/mme/com9097.mme | 7 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme b/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme index 07e4519d794..b2060d1fa53 100644 --- a/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme +++ b/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme @@ -227,6 +227,7 @@ locn_0f_ts: /* NVC0_3D_MACRO_DRAW_ELEMENTS_INDIRECT * * NOTE: Saves and restores VB_ELEMENT,INSTANCE_BASE. + * Forcefully sets VERTEX_ID_BASE to the value of VB_ELEMENT_BASE. * * arg = mode * parm[0] = count @@ -247,6 +248,8 @@ locn_0f_ts: maddr 0x150d /* VB_ELEMENT,INSTANCE_BASE */ send $r4 send $r5 + maddr 0x446 + send $r4 mov $r4 0x1 dei_again: maddr 0x586 /* VERTEX_BEGIN_GL */ @@ -258,8 +261,10 @@ dei_again: branz $r2 #dei_again mov $r1 (extrinsrt $r1 $r4 0 1 26) /* set INSTANCE_NEXT */ maddr 0x150d /* VB_ELEMENT,INSTANCE_BASE */ - exit send $r6 + send $r6 send $r7 + exit maddr 0x446 + send $r6 dei_end: exit nop diff --git a/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h b/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h index 654bf931563..bac9042c2df 100644 --- a/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h +++ b/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h @@ -128,16 +128,18 @@ uint32_t mme9097_draw_elts_indirect[] = { 0x00000301, 0x00000201, 0x017dc451, -/* 0x000c: dei_again */ +/* 0x000e: dei_again */ 0x00002431, - 0x0004d007, -/* 0x0017: dei_end */ + 0x0005d007, 0x00000501, +/* 0x001b: dei_end */ 0x01434615, 0x01438715, 0x05434021, 0x00002041, 0x00002841, + 0x01118021, + 0x00002041, 0x00004411, 0x01618021, 0x00000841, @@ -148,8 +150,10 @@ uint32_t mme9097_draw_elts_indirect[] = { 0xfffe9017, 0xd0410912, 0x05434021, - 0x000030c1, + 0x00003041, 0x00003841, + 0x011180a1, + 0x00003041, 0x00000091, 0x00000011, }; |