From fc5b865cec99c34586b2f5484c46af419b2a0395 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 26 Sep 2013 12:10:48 -0700 Subject: [PATCH] i965: Remove has_aa_line_parameters. This flag is only used in one place, and is only set on one platform. Just check for original Gen4 in the relevant function. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_context.c | 1 - src/mesa/drivers/dri/i965/brw_context.h | 1 - src/mesa/drivers/dri/i965/brw_misc_state.c | 6 +++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index d6d40ad8b19..66459af3d6a 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -440,7 +440,6 @@ brwCreateContext(gl_api api, if (brw->is_g4x || brw->gen >= 5) { brw->CMD_VF_STATISTICS = GM45_3DSTATE_VF_STATISTICS; brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45; - brw->has_aa_line_parameters = true; } else { brw->CMD_VF_STATISTICS = GEN4_3DSTATE_VF_STATISTICS; brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_965; diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 0c6482d2a27..88e03a7bddc 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -1055,7 +1055,6 @@ struct brw_context bool has_surface_tile_offset; bool has_compr4; bool has_negative_rhw_bug; - bool has_aa_line_parameters; bool has_pln; /** diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index 7f4cd6f737d..5d1c27d8bab 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -838,7 +838,11 @@ static void upload_aa_line_parameters(struct brw_context *brw) { struct gl_context *ctx = &brw->ctx; - if (!ctx->Line.SmoothFlag || !brw->has_aa_line_parameters) + if (!ctx->Line.SmoothFlag) + return; + + /* Original Gen4 doesn't have 3DSTATE_AA_LINE_PARAMETERS. */ + if (brw->gen == 4 && !brw->is_g4x) return; if (brw->gen == 6) -- 2.30.2