[Mesa-dev] [PATCH 3/3] mesa/st: Remove GLSLVersion clamping
Marek Olšák
maraeo at gmail.com
Sun Mar 27 15:57:14 UTC 2016
This series looks good to me. I'll push it shortly.
Marek
On Sat, Mar 26, 2016 at 8:35 AM, Edward O'Callaghan
<eocallaghan at alterapraxis.com> wrote:
> While here, remove itermediate glsl_feature_level variable.
>
> Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
> ---
> src/mesa/state_tracker/st_extensions.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 2fdaba0..0d6c6b1 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -552,7 +552,6 @@ void st_init_extensions(struct pipe_screen *screen,
> boolean has_lib_dxtc)
> {
> unsigned i;
> - int glsl_feature_level;
> GLboolean *extension_table = (GLboolean *) extensions;
>
> static const struct st_extension_cap_mapping cap_mapping[] = {
> @@ -844,12 +843,8 @@ void st_init_extensions(struct pipe_screen *screen,
> ARRAY_SIZE(vertex_mapping), PIPE_BUFFER,
> PIPE_BIND_VERTEX_BUFFER);
>
> - /* Figure out GLSL support. */
> - glsl_feature_level = screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL);
> -
> - consts->GLSLVersion = glsl_feature_level;
> - if (glsl_feature_level >= 410)
> - consts->GLSLVersion = 410;
> + /* Figure out GLSL support and set GLSLVersion to it. */
> + consts->GLSLVersion = screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL);
>
> _mesa_override_glsl_version(consts);
>
> @@ -858,9 +853,9 @@ void st_init_extensions(struct pipe_screen *screen,
> consts->ForceGLSLVersion = options->force_glsl_version;
> }
>
> - if (glsl_feature_level >= 400)
> + if (consts->GLSLVersion >= 400)
> extensions->ARB_gpu_shader5 = GL_TRUE;
> - if (glsl_feature_level >= 410)
> + if (consts->GLSLVersion >= 410)
> extensions->ARB_shader_precision = GL_TRUE;
>
> /* This extension needs full OpenGL 3.2, but we don't know if that's
> @@ -1036,7 +1031,7 @@ void st_init_extensions(struct pipe_screen *screen,
>
> consts->MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS);
> if (consts->MaxViewports >= 16) {
> - if (glsl_feature_level >= 400) {
> + if (consts->GLSLVersion >= 400) {
> consts->ViewportBounds.Min = -32768.0;
> consts->ViewportBounds.Max = 32767.0;
> } else {
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list