From: Erik Faye-Lund Date: Fri, 5 Jul 2019 14:10:49 +0000 (+0200) Subject: mesa/st: drop needless has_shader_model3 boolean X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ffbd0046863add97bb4ef9250abd4d4dc1639e4b;p=mesa.git mesa/st: drop needless has_shader_model3 boolean This boolean is only consulted once during init, so there's nothing much saved by storing this in the context. So let's just check directly when we need it instead. Signed-off-by: Erik Faye-Lund Reviewed-by: Marek Olšák --- diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 4d1ee6b418c..f3b84d53c59 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -603,7 +603,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, st->has_stencil_export = screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT); - st->has_shader_model3 = screen->get_param(screen, PIPE_CAP_SM3); st->has_etc1 = screen->is_format_supported(screen, PIPE_FORMAT_ETC1_RGB8, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW); @@ -687,7 +686,7 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, * is not supported */ ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat = - !st->has_shader_model3; + !screen->get_param(screen, PIPE_CAP_SM3); if (ctx->Const.GLSLVersion < 400) { for (i = 0; i < MESA_SHADER_STAGES; i++) diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index b486ed68fce..ceb28d5f5c5 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -133,7 +133,6 @@ struct st_context GLboolean clamp_vert_color_in_shader; boolean has_stencil_export; /**< can do shader stencil export? */ boolean has_time_elapsed; - boolean has_shader_model3; boolean has_etc1; boolean has_etc2; boolean has_astc_2d_ldr;