mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
st/mesa: drop dependence on API profile in st_init_extensions
The extensions and limits being set in the conditional block are core-only anyway and don't have any effect on other profiles. Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
2599b92eb9
commit
4155d1c7b0
4 changed files with 11 additions and 14 deletions
|
|
@ -242,7 +242,7 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
|
||||||
|
|
||||||
/* GL limits and extensions */
|
/* GL limits and extensions */
|
||||||
st_init_limits(st->pipe->screen, &ctx->Const, &ctx->Extensions);
|
st_init_limits(st->pipe->screen, &ctx->Const, &ctx->Extensions);
|
||||||
st_init_extensions(st->pipe->screen, ctx->API, &ctx->Const,
|
st_init_extensions(st->pipe->screen, &ctx->Const,
|
||||||
&ctx->Extensions, &st->options, ctx->Mesa_DXTn);
|
&ctx->Extensions, &st->options, ctx->Mesa_DXTn);
|
||||||
|
|
||||||
/* Enable shader-based fallbacks for ARB_color_buffer_float if needed. */
|
/* Enable shader-based fallbacks for ARB_color_buffer_float if needed. */
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,6 @@ get_max_samples_for_formats(struct pipe_screen *screen,
|
||||||
* Some fine tuning may still be needed.
|
* Some fine tuning may still be needed.
|
||||||
*/
|
*/
|
||||||
void st_init_extensions(struct pipe_screen *screen,
|
void st_init_extensions(struct pipe_screen *screen,
|
||||||
gl_api api,
|
|
||||||
struct gl_constants *consts,
|
struct gl_constants *consts,
|
||||||
struct gl_extensions *extensions,
|
struct gl_extensions *extensions,
|
||||||
struct st_config_options *options,
|
struct st_config_options *options,
|
||||||
|
|
@ -844,17 +843,16 @@ void st_init_extensions(struct pipe_screen *screen,
|
||||||
consts->DisableVaryingPacking = GL_TRUE;
|
consts->DisableVaryingPacking = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (api == API_OPENGL_CORE) {
|
consts->MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS);
|
||||||
consts->MaxViewports = screen->get_param(screen, PIPE_CAP_MAX_VIEWPORTS);
|
if (consts->MaxViewports >= 16) {
|
||||||
if (consts->MaxViewports >= 16) {
|
consts->ViewportBounds.Min = -16384.0;
|
||||||
consts->ViewportBounds.Min = -16384.0;
|
consts->ViewportBounds.Max = 16384.0;
|
||||||
consts->ViewportBounds.Max = 16384.0;
|
extensions->ARB_viewport_array = GL_TRUE;
|
||||||
extensions->ARB_viewport_array = GL_TRUE;
|
extensions->ARB_fragment_layer_viewport = GL_TRUE;
|
||||||
extensions->ARB_fragment_layer_viewport = GL_TRUE;
|
if (extensions->AMD_vertex_shader_layer)
|
||||||
if (extensions->AMD_vertex_shader_layer)
|
extensions->AMD_vertex_shader_viewport_index = GL_TRUE;
|
||||||
extensions->AMD_vertex_shader_viewport_index = GL_TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (consts->MaxProgramTextureGatherComponents > 0)
|
if (consts->MaxProgramTextureGatherComponents > 0)
|
||||||
extensions->ARB_texture_gather = GL_TRUE;
|
extensions->ARB_texture_gather = GL_TRUE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ extern void st_init_limits(struct pipe_screen *screen,
|
||||||
struct gl_extensions *extensions);
|
struct gl_extensions *extensions);
|
||||||
|
|
||||||
extern void st_init_extensions(struct pipe_screen *screen,
|
extern void st_init_extensions(struct pipe_screen *screen,
|
||||||
gl_api api,
|
|
||||||
struct gl_constants *consts,
|
struct gl_constants *consts,
|
||||||
struct gl_extensions *extensions,
|
struct gl_extensions *extensions,
|
||||||
struct st_config_options *options,
|
struct st_config_options *options,
|
||||||
|
|
|
||||||
|
|
@ -928,7 +928,7 @@ static unsigned get_version(struct pipe_screen *screen,
|
||||||
_mesa_init_extensions(&extensions);
|
_mesa_init_extensions(&extensions);
|
||||||
|
|
||||||
st_init_limits(screen, &consts, &extensions);
|
st_init_limits(screen, &consts, &extensions);
|
||||||
st_init_extensions(screen, api, &consts, &extensions, options, GL_TRUE);
|
st_init_extensions(screen, &consts, &extensions, options, GL_TRUE);
|
||||||
|
|
||||||
return _mesa_get_version(&extensions, &consts, api);
|
return _mesa_get_version(&extensions, &consts, api);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue