nvc0: prefix all macro methods with MACRO
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 28 Feb 2012 18:25:57 +0000 (19:25 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 14 Apr 2012 04:14:21 +0000 (06:14 +0200)
Some of them have non-macro counterparts.

src/gallium/drivers/nvc0/nvc0_3d.xml.h
src/gallium/drivers/nvc0/nvc0_screen.c
src/gallium/drivers/nvc0/nvc0_shader_state.c
src/gallium/drivers/nvc0/nvc0_state.c
src/gallium/drivers/nvc0/nvc0_surface.c
src/gallium/drivers/nvc0/nvc0_vbo.c

index 61ca1b87262ad12a40b1dc3738cf1389f0403157..71fa1516e16491ae7b69f47754f10d0887df2cf9 100644 (file)
@@ -1307,25 +1307,25 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVC0_3D_TFB_VARYING_LOCS__ESIZE                                0x00000004
 #define NVC0_3D_TFB_VARYING_LOCS__LEN                          0x00000020
 
-#define NVC0_3D_MACRO_VERTEX_ARRAY_PER_INSTANCE                0x00003800
+#define NVC0_3D_MACRO_VERTEX_ARRAY_PER_INSTANCE                        0x00003800
 
-#define NVC0_3D_VERTEX_ARRAY_SELECT                            0x00003820
+#define NVC0_3D_MACRO_VERTEX_ARRAY_SELECT                      0x00003808
 
-#define NVC0_3D_BLEND_ENABLES                                  0x00003858
+#define NVC0_3D_MACRO_BLEND_ENABLES                            0x00003810
 
-#define NVC0_3D_POLYGON_MODE_FRONT                             0x00003868
-#define NVC0_3D_POLYGON_MODE_FRONT_POINT                       0x00001b00
-#define NVC0_3D_POLYGON_MODE_FRONT_LINE                                0x00001b01
-#define NVC0_3D_POLYGON_MODE_FRONT_FILL                                0x00001b02
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT                       0x00003818
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_POINT                 0x00001b00
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_LINE                  0x00001b01
+#define NVC0_3D_MACRO_POLYGON_MODE_FRONT_FILL                  0x00001b02
 
-#define NVC0_3D_POLYGON_MODE_BACK                              0x00003870
-#define NVC0_3D_POLYGON_MODE_BACK_POINT                                0x00001b00
-#define NVC0_3D_POLYGON_MODE_BACK_LINE                         0x00001b01
-#define NVC0_3D_POLYGON_MODE_BACK_FILL                         0x00001b02
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK                                0x00003820
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_POINT                  0x00001b00
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_LINE                   0x00001b01
+#define NVC0_3D_MACRO_POLYGON_MODE_BACK_FILL                   0x00001b02
 
-#define NVC0_3D_GP_SELECT                                      0x00003878
+#define NVC0_3D_MACRO_GP_SELECT                                        0x00003828
 
-#define NVC0_3D_TEP_SELECT                                     0x00003880
+#define NVC0_3D_MACRO_TEP_SELECT                               0x00003830
 
 
 #endif /* NVC0_3D_XML */
index 949443d16039c14d4549c85685f2b8b7b44e373c..bad06c3f0092ff8cfbbc53c97d44ff3e2c30e7c4 100644 (file)
@@ -624,22 +624,22 @@ nvc0_screen_create(struct nouveau_device *dev)
 
    i = 0;
    MK_MACRO(NVC0_3D_MACRO_VERTEX_ARRAY_PER_INSTANCE, nvc0_9097_per_instance_bf);
-   MK_MACRO(NVC0_3D_BLEND_ENABLES, nvc0_9097_blend_enables);
-   MK_MACRO(NVC0_3D_VERTEX_ARRAY_SELECT, nvc0_9097_vertex_array_select);
-   MK_MACRO(NVC0_3D_TEP_SELECT, nvc0_9097_tep_select);
-   MK_MACRO(NVC0_3D_GP_SELECT, nvc0_9097_gp_select);
-   MK_MACRO(NVC0_3D_POLYGON_MODE_FRONT, nvc0_9097_poly_mode_front);
-   MK_MACRO(NVC0_3D_POLYGON_MODE_BACK, nvc0_9097_poly_mode_back);
+   MK_MACRO(NVC0_3D_MACRO_BLEND_ENABLES, nvc0_9097_blend_enables);
+   MK_MACRO(NVC0_3D_MACRO_VERTEX_ARRAY_SELECT, nvc0_9097_vertex_array_select);
+   MK_MACRO(NVC0_3D_MACRO_TEP_SELECT, nvc0_9097_tep_select);
+   MK_MACRO(NVC0_3D_MACRO_GP_SELECT, nvc0_9097_gp_select);
+   MK_MACRO(NVC0_3D_MACRO_POLYGON_MODE_FRONT, nvc0_9097_poly_mode_front);
+   MK_MACRO(NVC0_3D_MACRO_POLYGON_MODE_BACK, nvc0_9097_poly_mode_back);
 
    BEGIN_NVC0(push, NVC0_3D(RASTERIZE_ENABLE), 1);
    PUSH_DATA (push, 1);
    BEGIN_NVC0(push, NVC0_3D(RT_SEPARATE_FRAG_DATA), 1);
    PUSH_DATA (push, 1);
-   BEGIN_NVC0(push, NVC0_3D(GP_SELECT), 1);
+   BEGIN_NVC0(push, NVC0_3D(MACRO_GP_SELECT), 1);
    PUSH_DATA (push, 0x40);
    BEGIN_NVC0(push, NVC0_3D(LAYER), 1);
    PUSH_DATA (push, 0);
-   BEGIN_NVC0(push, NVC0_3D(TEP_SELECT), 1);
+   BEGIN_NVC0(push, NVC0_3D(MACRO_TEP_SELECT), 1);
    PUSH_DATA (push, 0x30);
    BEGIN_NVC0(push, NVC0_3D(PATCH_VERTICES), 1);
    PUSH_DATA (push, 3);
index 6cbaaf9d1d8de48f3252f68c1d07e54fdf10f1f8..54dfd8d1a1af89fc39e45ad6bab483a6c624b66b 100644 (file)
@@ -165,14 +165,14 @@ nvc0_tevlprog_validate(struct nvc0_context *nvc0)
          BEGIN_NVC0(push, NVC0_3D(TESS_MODE), 1);
          PUSH_DATA (push, tp->tp.tess_mode);
       }
-      BEGIN_NVC0(push, NVC0_3D(TEP_SELECT), 1);
+      BEGIN_NVC0(push, NVC0_3D(MACRO_TEP_SELECT), 1);
       PUSH_DATA (push, 0x31);
       BEGIN_NVC0(push, NVC0_3D(SP_START_ID(3)), 1);
       PUSH_DATA (push, tp->code_base);
       BEGIN_NVC0(push, NVC0_3D(SP_GPR_ALLOC(3)), 1);
       PUSH_DATA (push, tp->max_gpr);
    } else {
-      BEGIN_NVC0(push, NVC0_3D(TEP_SELECT), 1);
+      BEGIN_NVC0(push, NVC0_3D(MACRO_TEP_SELECT), 1);
       PUSH_DATA (push, 0x30);
    }
    nvc0_program_update_context_state(nvc0, tp, 2);
@@ -191,7 +191,7 @@ nvc0_gmtyprog_validate(struct nvc0_context *nvc0)
    if (gp && gp->code_size) {
       const boolean gp_selects_layer = gp->hdr[13] & (1 << 9);
 
-      BEGIN_NVC0(push, NVC0_3D(GP_SELECT), 1);
+      BEGIN_NVC0(push, NVC0_3D(MACRO_GP_SELECT), 1);
       PUSH_DATA (push, 0x41);
       BEGIN_NVC0(push, NVC0_3D(SP_START_ID(4)), 1);
       PUSH_DATA (push, gp->code_base);
@@ -201,7 +201,7 @@ nvc0_gmtyprog_validate(struct nvc0_context *nvc0)
       PUSH_DATA (push, gp_selects_layer ? NVC0_3D_LAYER_USE_GP : 0);
    } else {
       IMMED_NVC0(push, NVC0_3D(LAYER), 0);
-      BEGIN_NVC0(push, NVC0_3D(GP_SELECT), 1);
+      BEGIN_NVC0(push, NVC0_3D(MACRO_GP_SELECT), 1);
       PUSH_DATA (push, 0x40);
    }
    nvc0_program_update_context_state(nvc0, gp, 3);
index eb71e6b9853f5dc13d432cba754140443f62d79e..a2be53a433d4ba59c11432d4ae97f0bef2677f86 100644 (file)
@@ -102,10 +102,11 @@ nvc0_blend_state_create(struct pipe_context *pipe,
        SB_DATA    (so, 1);
        SB_DATA    (so, nvgl_logicop_func(cso->logicop_func));
 
-       SB_IMMED_3D(so, BLEND_ENABLES, 0);
+       SB_IMMED_3D(so, MACRO_BLEND_ENABLES, 0);
     } else
     if (!cso->independent_blend_enable) {
-        SB_IMMED_3D(so, BLEND_ENABLES, cso->rt[0].blend_enable ? 0xff : 0);
+        SB_IMMED_3D(so,
+                    MACRO_BLEND_ENABLES, cso->rt[0].blend_enable ? 0xff : 0);
 
         if (cso->rt[0].blend_enable) {
             SB_BEGIN_3D(so, BLEND_EQUATION_RGB, 5);
@@ -137,7 +138,7 @@ nvc0_blend_state_create(struct pipe_context *pipe,
             SB_DATA    (so, nvc0_blend_fac(cso->rt[i].alpha_src_factor));
             SB_DATA    (so, nvc0_blend_fac(cso->rt[i].alpha_dst_factor));
         }
-        SB_IMMED_3D(so, BLEND_ENABLES, en);
+        SB_IMMED_3D(so, MACRO_BLEND_ENABLES, en);
 
         SB_IMMED_3D(so, COLOR_MASK_COMMON, 0);
         SB_BEGIN_3D(so, COLOR_MASK(0), 8);
@@ -232,9 +233,9 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
     SB_IMMED_3D(so, POINT_SPRITE_ENABLE, cso->point_quad_rasterization);
     SB_IMMED_3D(so, POINT_SMOOTH_ENABLE, cso->point_smooth);
 
-    SB_BEGIN_3D(so, POLYGON_MODE_FRONT, 1);
+    SB_BEGIN_3D(so, MACRO_POLYGON_MODE_FRONT, 1);
     SB_DATA    (so, nvgl_polygon_mode(cso->fill_front));
-    SB_BEGIN_3D(so, POLYGON_MODE_BACK, 1);
+    SB_BEGIN_3D(so, MACRO_POLYGON_MODE_BACK, 1);
     SB_DATA    (so, nvgl_polygon_mode(cso->fill_back));
     SB_IMMED_3D(so, POLYGON_SMOOTH_ENABLE, cso->poly_smooth);
 
index d1a233fbcf68845d0d645d9f42013cc992666f39..3378b513936a59323468161779ffe81b99d4dd71 100644 (file)
@@ -725,10 +725,10 @@ nvc0_blitctx_prepare_state(struct nvc0_blitctx *blit)
    PUSH_DATA (push, 0xffff);
    PUSH_DATA (push, 0xffff);
    PUSH_DATA (push, 0xffff);
-   BEGIN_NVC0(push, NVC0_3D(POLYGON_MODE_FRONT), 1);
-   PUSH_DATA (push, NVC0_3D_POLYGON_MODE_FRONT_FILL);
-   BEGIN_NVC0(push, NVC0_3D(POLYGON_MODE_BACK), 1);
-   PUSH_DATA (push, NVC0_3D_POLYGON_MODE_BACK_FILL);
+   BEGIN_NVC0(push, NVC0_3D(MACRO_POLYGON_MODE_FRONT), 1);
+   PUSH_DATA (push, NVC0_3D_MACRO_POLYGON_MODE_FRONT_FILL);
+   BEGIN_NVC0(push, NVC0_3D(MACRO_POLYGON_MODE_BACK), 1);
+   PUSH_DATA (push, NVC0_3D_MACRO_POLYGON_MODE_BACK_FILL);
    IMMED_NVC0(push, NVC0_3D(POLYGON_SMOOTH_ENABLE), 0);
    IMMED_NVC0(push, NVC0_3D(POLYGON_OFFSET_FILL_ENABLE), 0);
    IMMED_NVC0(push, NVC0_3D(POLYGON_STIPPLE_ENABLE), 0);
index a8aa60f4fe5708471f54acd1c292928f425f826b..1d4d07d93c2c8f1b441c8796d0cd29a544c49cbd 100644 (file)
@@ -267,7 +267,7 @@ nvc0_update_user_vbufs(struct nvc0_context *nvc0)
       }
       offset = vb->buffer_offset + ve->src_offset;
 
-      BEGIN_1IC0(push, NVC0_3D(VERTEX_ARRAY_SELECT), 5);
+      BEGIN_1IC0(push, NVC0_3D(MACRO_VERTEX_ARRAY_SELECT), 5);
       PUSH_DATA (push, i);
       PUSH_DATAh(push, buf->address + base + size - 1);
       PUSH_DATA (push, buf->address + base + size - 1);