diff options
author | Marek Olšák <[email protected]> | 2011-11-18 15:51:47 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-11-22 20:56:50 +0100 |
commit | 2a0126932b320806e030c1c085791e257516e0cd (patch) | |
tree | b804f36cbf1b79a75df6d93346930d6e268bf521 /src/mesa | |
parent | a92ee4abfe5c0bdd9cc921dee5f18436f1df8a4d (diff) |
gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionally
Only i965g does not enable GLSL, but that driver has been unmaintained and
bitrotting for quite a while anyway.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 3563e1d9b54..544f0b6952a 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -213,15 +213,10 @@ void st_init_limits(struct st_context *st) c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_INPUTS) - 2; c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING); - /* XXX we'll need a better query here someday */ - if (screen->get_param(screen, PIPE_CAP_GLSL)) { - c->MinProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MIN_TEXEL_OFFSET); - c->MaxProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MAX_TEXEL_OFFSET); + c->MinProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MIN_TEXEL_OFFSET); + c->MaxProgramTexelOffset = screen->get_param(screen, PIPE_CAP_MAX_TEXEL_OFFSET); - c->GLSLVersion = 120; - _mesa_override_glsl_version(st->ctx); - c->UniformBooleanTrue = ~0; - } + c->UniformBooleanTrue = ~0; c->StripTextureBorder = GL_TRUE; } @@ -249,16 +244,23 @@ void st_init_extensions(struct st_context *st) struct gl_context *ctx = st->ctx; int i; + ctx->Const.GLSLVersion = 120; + _mesa_override_glsl_version(st->ctx); + /* * Extensions that are supported by all Gallium drivers: */ ctx->Extensions.ARB_copy_buffer = GL_TRUE; ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE; + ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE; ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE; ctx->Extensions.ARB_fragment_program = GL_TRUE; + ctx->Extensions.ARB_fragment_shader = GL_TRUE; ctx->Extensions.ARB_half_float_pixel = GL_TRUE; ctx->Extensions.ARB_map_buffer_range = GL_TRUE; ctx->Extensions.ARB_sampler_objects = GL_TRUE; + ctx->Extensions.ARB_shader_objects = GL_TRUE; + ctx->Extensions.ARB_shading_language_100 = GL_TRUE; ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; /* XXX temp */ ctx->Extensions.ARB_texture_cube_map = GL_TRUE; ctx->Extensions.ARB_texture_env_combine = GL_TRUE; @@ -267,6 +269,7 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.ARB_texture_storage = GL_TRUE; ctx->Extensions.ARB_vertex_array_object = GL_TRUE; ctx->Extensions.ARB_vertex_program = GL_TRUE; + ctx->Extensions.ARB_vertex_shader = GL_TRUE; ctx->Extensions.ARB_window_pos = GL_TRUE; ctx->Extensions.EXT_blend_color = GL_TRUE; @@ -281,6 +284,7 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.EXT_point_parameters = GL_TRUE; ctx->Extensions.EXT_provoking_vertex = GL_TRUE; ctx->Extensions.EXT_secondary_color = GL_TRUE; + ctx->Extensions.EXT_separate_shader_objects = GL_TRUE; ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE; @@ -317,15 +321,6 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.EXT_texture_swizzle = GL_TRUE; } - if (screen->get_param(screen, PIPE_CAP_GLSL)) { - ctx->Extensions.ARB_fragment_shader = GL_TRUE; - ctx->Extensions.ARB_vertex_shader = GL_TRUE; - ctx->Extensions.ARB_shader_objects = GL_TRUE; - ctx->Extensions.ARB_shading_language_100 = GL_TRUE; - ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE; - ctx->Extensions.EXT_separate_shader_objects = GL_TRUE; - } - if (screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_SEPARATE)) { ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; } |