[Mesa-dev] [PATCH 16/29] i965: Remove has_aa_line_parameters.
Kenneth Graunke
kenneth at whitecape.org
Fri Sep 27 16:45:55 PDT 2013
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 <kenneth at whitecape.org>
---
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 b846c3f..92e5d9f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -436,7 +436,6 @@ brwCreateContext(int 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 7e15186..4d4502a 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1036,7 +1036,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 7f4cd6f..5d1c27d 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)
--
1.8.3.4
More information about the mesa-dev
mailing list