BEGIN_NV04(push, NV50_3D(EDGEFLAG), 1);
PUSH_DATA (push, 1);
+ BEGIN_NV04(push, NV50_3D(VB_ELEMENT_BASE), 1);
+ PUSH_DATA (push, 0);
+ if (screen->base.class_3d >= NV84_3D_CLASS) {
+ BEGIN_NV04(push, SUBC_3D(NV84_3D_VERTEX_ID_BASE), 1);
+ PUSH_DATA (push, 0);
+ }
+
PUSH_KICK (push);
}
if (nv50->state.index_bias) {
BEGIN_NV04(push, NV50_3D(VB_ELEMENT_BASE), 1);
PUSH_DATA (push, 0);
+ if (nv50->screen->base.class_3d >= NV84_3D_CLASS) {
+ BEGIN_NV04(push, SUBC_3D(NV84_3D_VERTEX_ID_BASE), 1);
+ PUSH_DATA (push, 0);
+ }
nv50->state.index_bias = 0;
}
if (index_bias != nv50->state.index_bias) {
BEGIN_NV04(push, NV50_3D(VB_ELEMENT_BASE), 1);
PUSH_DATA (push, index_bias);
+ if (nv50->screen->base.class_3d >= NV84_3D_CLASS) {
+ BEGIN_NV04(push, SUBC_3D(NV84_3D_VERTEX_ID_BASE), 1);
+ PUSH_DATA (push, index_bias);
+ }
nv50->state.index_bias = index_bias;
}
/* 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
maddr 0x150d /* VB_ELEMENT,INSTANCE_BASE */
send $r4
send $r5
+ maddr 0x446
+ send $r4
mov $r4 0x1
dei_again:
maddr 0x586 /* VERTEX_BEGIN_GL */
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
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,
0xfffe9017,
0xd0410912,
0x05434021,
- 0x000030c1,
+ 0x00003041,
0x00003841,
+ 0x011180a1,
+ 0x00003041,
0x00000091,
0x00000011,
};
if (nvc0->state.index_bias) {
/* index_bias is implied 0 if !info->indexed (really ?) */
/* TODO: can we deactivate it for the VERTEX_BUFFER_FIRST command ? */
- PUSH_SPACE(push, 1);
+ PUSH_SPACE(push, 2);
IMMED_NVC0(push, NVC0_3D(VB_ELEMENT_BASE), 0);
+ IMMED_NVC0(push, NVC0_3D(VERTEX_ID), 0);
nvc0->state.index_bias = 0;
}
prim = nvc0_prim_gl(mode);
if (index_bias != nvc0->state.index_bias) {
- PUSH_SPACE(push, 2);
+ PUSH_SPACE(push, 4);
BEGIN_NVC0(push, NVC0_3D(VB_ELEMENT_BASE), 1);
PUSH_DATA (push, index_bias);
+ BEGIN_NVC0(push, NVC0_3D(VERTEX_ID), 1);
+ PUSH_DATA (push, index_bias);
nvc0->state.index_bias = index_bias;
}
if (nvc0->state.index_bias) {
/* index_bias is implied 0 if !info->indexed (really ?) */
IMMED_NVC0(push, NVC0_3D(VB_ELEMENT_BASE), 0);
+ IMMED_NVC0(push, NVC0_3D(VERTEX_ID), 0);
nvc0->state.index_bias = 0;
}
size = 4 * 4;