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 <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -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++)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user