diff options
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/mme')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/mme/com9097.mme | 75 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h | 56 |
2 files changed, 131 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme b/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme index da9975b5eb1..07e4519d794 100644 --- a/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme +++ b/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme @@ -223,3 +223,78 @@ locn_0a_ts: locn_0f_ts: exit maddr 0xbb send $r6 + +/* NVC0_3D_MACRO_DRAW_ELEMENTS_INDIRECT + * + * NOTE: Saves and restores VB_ELEMENT,INSTANCE_BASE. + * + * arg = mode + * parm[0] = count + * parm[1] = instance_count + * parm[2] = start + * parm[3] = index_bias + * parm[4] = start_instance + */ +.section #mme9097_draw_elts_indirect + parm $r3 /* count */ + parm $r2 /* instance_count */ + parm $r4 maddr 0x5f7 /* INDEX_BATCH_FIRST, start */ + parm $r4 send $r4 /* index_bias, send start */ + braz $r2 #dei_end + parm $r5 /* start_instance */ + read $r6 0x50d /* VB_ELEMENT_BASE */ + read $r7 0x50e /* VB_INSTANCE_BASE */ + maddr 0x150d /* VB_ELEMENT,INSTANCE_BASE */ + send $r4 + send $r5 + mov $r4 0x1 +dei_again: + maddr 0x586 /* VERTEX_BEGIN_GL */ + send $r1 /* mode */ + maddr 0x5f8 /* INDEX_BATCH_COUNT */ + send $r3 /* count */ + mov $r2 (sub $r2 $r4) + maddrsend 0x585 /* VERTEX_END_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 $r7 +dei_end: + exit + nop + +/* NVC0_3D_MACRO_DRAW_ARRAYS_INDIRECT: + * + * NOTE: Saves and restores VB_INSTANCE_BASE. + * + * arg = mode + * parm[0] = count + * parm[1] = instance_count + * parm[2] = start + * parm[3] = start_instance + */ +.section #mme9097_draw_arrays_indirect + parm $r2 /* count */ + parm $r3 /* instance_count */ + parm $r4 maddr 0x35d /* VERTEX_BUFFER_FIRST, start */ + parm $r4 send $r4 /* start_instance */ + braz $r3 #dai_end + read $r6 0x50e /* VB_INSTANCE_BASE */ + maddr 0x50e /* VB_INSTANCE_BASE */ + mov $r5 0x1 + send $r4 +dai_again: + maddr 0x586 /* VERTEX_BEGIN_GL */ + send $r1 /* mode */ + maddr 0x35e /* VERTEX_BUFFER_COUNT */ + send $r2 + mov $r3 (sub $r3 $r5) + maddrsend 0x585 /* VERTEX_END_GL */ + branz $r3 #dai_again + mov $r1 (extrinsrt $r1 $r5 0 1 26) /* set INSTANCE_NEXT */ + exit maddr 0x50e /* VB_INSTANCE_BASE to restore */ + send $r6 +dai_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 fd81a2f130e..654bf931563 100644 --- a/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h +++ b/src/gallium/drivers/nouveau/nvc0/mme/com9097.mme.h @@ -123,3 +123,59 @@ uint32_t mme9097_tep_select[] = { 0x002ec0a1, 0x00003041, }; + +uint32_t mme9097_draw_elts_indirect[] = { + 0x00000301, + 0x00000201, + 0x017dc451, +/* 0x000c: dei_again */ + 0x00002431, + 0x0004d007, +/* 0x0017: dei_end */ + 0x00000501, + 0x01434615, + 0x01438715, + 0x05434021, + 0x00002041, + 0x00002841, + 0x00004411, + 0x01618021, + 0x00000841, + 0x017e0021, + 0x00001841, + 0x00051210, + 0x01614071, + 0xfffe9017, + 0xd0410912, + 0x05434021, + 0x000030c1, + 0x00003841, + 0x00000091, + 0x00000011, +}; + +uint32_t mme9097_draw_arrays_indirect[] = { + 0x00000201, + 0x00000301, +/* 0x0009: dai_again */ + 0x00d74451, + 0x00002431, +/* 0x0013: dai_end */ + 0x0003d807, + 0x01438615, + 0x01438021, + 0x00004511, + 0x00002041, + 0x01618021, + 0x00000841, + 0x00d78021, + 0x00001041, + 0x00055b10, + 0x01614071, + 0xfffe9817, + 0xd0414912, + 0x014380a1, + 0x00003041, + 0x00000091, + 0x00000011, +}; |