From: Kenneth Graunke Date: Wed, 3 Jul 2013 18:55:59 +0000 (-0700) Subject: i965: Move intel_context::reduced_primitive to brw_context. X-Git-Tag: mesa-9.2.1~382 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe0a8cb30dd53bed0d024b01e2c2b60911a3c526;p=platform%2Fupstream%2Fmesa.git i965: Move intel_context::reduced_primitive to brw_context. Signed-off-by: Kenneth Graunke Acked-by: Chris Forbes Acked-by: Paul Berry Acked-by: Anuj Phogat --- diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index 74d7e7e..cdc3b7a 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -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 */ diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 6d2393e..9281da1 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -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; diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 5742fad..5d1a7ae 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -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; } } diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index ba8782b..291a289 100644 --- a/src/mesa/drivers/dri/i965/brw_sf.c +++ b/src/mesa/drivers/dri/i965/brw_sf.c @@ -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 diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index c560af7..0eed5bd 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -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; diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 089da63..46fe7f7 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -163,8 +163,6 @@ struct intel_context bool always_flush_cache; bool disable_throttling; - GLenum reduced_primitive; - int driFd; __DRIcontext *driContext;