mesa/st: drop needless has_shader_model3 boolean
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 5 Jul 2019 14:10:49 +0000 (16:10 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 10 Jul 2019 13:49:57 +0000 (15:49 +0200)
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 <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_context.h

index 4d1ee6b418c343f1278527887df03483b4557564..f3b84d53c5996958c0628b9b9f33ac359bdd1939 100644 (file)
@@ -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++)
index b486ed68fcee033083f56d74a349e76580313ba3..ceb28d5f5c5b959dde88158cafb2d5e675050244 100644 (file)
@@ -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;