summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-07-05 16:10:49 +0200
committerErik Faye-Lund <[email protected]>2019-07-10 15:49:57 +0200
commitffbd0046863add97bb4ef9250abd4d4dc1639e4b (patch)
tree16643206eb0ff7264d0218fc6987dcc6f2497541 /src/mesa/state_tracker/st_context.c
parentaf2949e928c6ec06b6a66f127299ddb8254700b0 (diff)
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c3
1 files changed, 1 insertions, 2 deletions
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++)