i965: Move intel_context::reduced_primitive to brw_context.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 3 Jul 2013 18:55:59 +0000 (11:55 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 9 Jul 2013 21:09:03 +0000 (14:09 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Paul Berry <stereotype441@gmail.com>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_clip.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_sf.c
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/intel_context.h

index 74d7e7e65396cf657e8f8b344345ffd3a555dd87..cdc3b7a0e4de3a192b4ce3652b5407f6e8fb4d5c 100644 (file)
@@ -144,7 +144,7 @@ brw_upload_clip_prog(struct brw_context *brw)
    /* Populate the key:
     */
    /* BRW_NEW_REDUCED_PRIMITIVE */
-   key.primitive = brw->intel.reduced_primitive;
+   key.primitive = brw->reduced_primitive;
    /* BRW_NEW_VUE_MAP_GEOM_OUT */
    key.attrs = brw->vue_map_geom_out.slots_valid;
    /* _NEW_LIGHT */
index 6d2393e7b2ea64be5438985e0bd9c6fe19461bfa..9281da1192cc524ecf6e54f0488a65d755eaf34e 100644 (file)
@@ -832,6 +832,8 @@ struct brw_context
 
    GLuint primitive; /**< Hardware primitive, such as _3DPRIM_TRILIST. */
 
+   GLenum reduced_primitive;
+
    bool emit_state_always;
    bool has_surface_tile_offset;
    bool has_compr4;
index 5742fad712c5887f317c83642e19744b1625f33f..5d1a7aea2092d951a9f8b2b69647708cd49c0aff 100644 (file)
@@ -114,8 +114,8 @@ static void brw_set_prim(struct brw_context *brw,
       brw->primitive = hw_prim;
       brw->state.dirty.brw |= BRW_NEW_PRIMITIVE;
 
-      if (reduced_prim[prim->mode] != brw->intel.reduced_primitive) {
-        brw->intel.reduced_primitive = reduced_prim[prim->mode];
+      if (reduced_prim[prim->mode] != brw->reduced_primitive) {
+        brw->reduced_primitive = reduced_prim[prim->mode];
         brw->state.dirty.brw |= BRW_NEW_REDUCED_PRIMITIVE;
       }
    }
index ba8782b6d0c25e77f0467a4f836aa30e2f1cc3d0..291a2896c8735f7a248b0ba96b8993b40c43ca57 100644 (file)
@@ -148,7 +148,7 @@ brw_upload_sf_prog(struct brw_context *brw)
    key.attrs = brw->vue_map_geom_out.slots_valid;
 
    /* BRW_NEW_REDUCED_PRIMITIVE */
-   switch (brw->intel.reduced_primitive) {
+   switch (brw->reduced_primitive) {
    case GL_TRIANGLES: 
       /* NOTE: We just use the edgeflag attribute as an indicator that
        * unfilled triangles are active.  We don't actually do the
index c560af725031bcdc96475ca8e0606a6c476bb1af..0eed5bd132ca061808f5b66cb420380add606598 100644 (file)
@@ -395,10 +395,10 @@ static void brw_wm_populate_key( struct brw_context *brw,
 
    /* _NEW_LINE, _NEW_POLYGON, BRW_NEW_REDUCED_PRIMITIVE */
    if (ctx->Line.SmoothFlag) {
-      if (brw->intel.reduced_primitive == GL_LINES) {
+      if (brw->reduced_primitive == GL_LINES) {
         line_aa = AA_ALWAYS;
       }
-      else if (brw->intel.reduced_primitive == GL_TRIANGLES) {
+      else if (brw->reduced_primitive == GL_TRIANGLES) {
         if (ctx->Polygon.FrontMode == GL_LINE) {
            line_aa = AA_SOMETIMES;
 
index 089da634c009c86cae1b5f9f35d2512adf112d0f..46fe7f728817b13a4fec854b44c6511407d96d2b 100644 (file)
@@ -163,8 +163,6 @@ struct intel_context
    bool always_flush_cache;
    bool disable_throttling;
 
-   GLenum reduced_primitive;
-
    int driFd;
 
    __DRIcontext *driContext;