radeonsi: Handle position input parameter for pixel shaders v2
[mesa.git] / src / gallium / drivers / nvc0 / nvc0_graph_macros.h
index 8da963a4c5ba2cd97d258907ac02d4c02b9e1323..f009980c629630453e7163ea4acc741068a32787 100644 (file)
@@ -8,6 +8,20 @@
  * bra(n)z annul: no delay slot
  */
 
+/* Bitfield version of NVC0_3D_VERTEX_ARRAY_PER_INSTANCE[].
+ * Args: size, bitfield
+ */
+static const uint32_t nvc0_9097_per_instance_bf[] =
+{
+   0x00000301, /* parm $r3 (the bitfield) */
+   0x00000211, /* mov $r2 0 */
+   0x05880021, /* maddr [NVC0_3D_VERTEX_ARRAY_PER_INSTANCE(0), increment = 4] */
+   0xffffc911, /* mov $r1 (add $r1 -0x1) */
+   0x0040d043, /* send (extrshl $r3 $r2 0x1 0) */
+   0xffff8897, /* exit branz $r1 0x3 */
+   0x00005211  /* mov $r2 (add $r2 0x1) */
+};
+
 /* The comments above the macros describe what they *should* be doing,
  * but we use less functionality for now.
  */
@@ -68,19 +82,6 @@ static const uint32_t nvc0_9097_vertex_array_select[] =
    0x00001841, /* 0x0b: send $r3 */
 };
 
-static const uint32_t nvc0_9097_color_mask_brdc[] =
-{
-   0x05a00021, /* maddr [NVC0_3D_COLOR_MASK(0), increment = 4] */
-   0x00000841, /* send $r1 */
-   0x00000841, /* send $r1 */
-   0x00000841, /* send $r1 */
-   0x00000841, /* send $r1 */
-   0x00000841, /* send $r1 */
-   0x00000841, /* send $r1 */
-   0x000008c1, /* exit send $r1 */
-   0x00000841, /* send $r1 */
-};
-
 /*
  * [GL_POLYGON_MODE_FRONT] = arg;
  *
@@ -144,7 +145,7 @@ static const uint32_t nvc0_9097_poly_mode_back[] =
    0x00180611, /* 0x05: mov $r6 0x60 */
    0x0014bf10, /* 0x06: mov $r7 and $r7 $r2 */
    0x0000f807, /* 0x07: braz $r7 0xa */
-   0x00dac021, /* 0x08: maddr 0x36b */
+   0x00db0021, /* 0x08: maddr 0x36c */
    0x00800611, /* 0x09: mov $r6 0x200 */
    0x00131f10, /* 0x0a: mov $r7 or $r3 $r4 */
    0x0014bf10, /* 0x0b: mov $r7 and $r7 $r2 */