gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionally
authorMarek Olšák <maraeo@gmail.com>
Fri, 18 Nov 2011 14:51:47 +0000 (15:51 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 22 Nov 2011 19:56:50 +0000 (20:56 +0100)
Only i965g does not enable GLSL, but that driver has been unmaintained and
bitrotting for quite a while anyway.

15 files changed:
src/gallium/auxiliary/util/u_caps.c
src/gallium/docs/source/screen.rst
src/gallium/drivers/cell/ppu/cell_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i965/brw_screen.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nvc0/nvc0_screen.c
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_extensions.c

index 75677b2b133fd85223de9acf37190952e178f2fc..6230707552e87bdc537a989597ff61343ee55fe0 100644 (file)
@@ -182,7 +182,6 @@ static unsigned caps_dx_11[] = {
 
 /* OpenGL 2.1 */
 static unsigned caps_opengl_2_1[] = {
-   UTIL_CHECK_CAP(GLSL),
    UTIL_CHECK_CAP(OCCLUSION_QUERY),
    UTIL_CHECK_CAP(TWO_SIDED_STENCIL),
    UTIL_CHECK_CAP(BLEND_EQUATION_SEPARATE),
index 12721712c00d3b7a950c97979180dba4e1f21fd5..017c28d1104d47756c397cf6e2b327c0edf54c72 100644 (file)
@@ -26,7 +26,6 @@ The integer capabilities:
   normalized coordinates, and mipmaps.
 * ``PIPE_CAP_TWO_SIDED_STENCIL``: Whether the stencil test can also affect back-facing
   polygons.
-* ``PIPE_CAP_GLSL``: Deprecated.
 * ``PIPE_CAP_DUAL_SOURCE_BLEND``: Whether dual-source blend factors are supported. See
   :ref:`Blend` for more information.
 * ``PIPE_CAP_ANISOTROPIC_FILTER``: Whether textures can be filtered anisotropically.
index 86acbc73f8adc13861a370d827df8957bd8600fd..a4677fd9bc7949076a1da743b0cc9bc952c1a45a 100644 (file)
@@ -64,8 +64,6 @@ cell_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
-   case PIPE_CAP_GLSL:
-      return 1;
    case PIPE_CAP_ANISOTROPIC_FILTER:
       return 0;
    case PIPE_CAP_POINT_SPRITE:
index bf7c2c2e8d3e13b220394e57eb81f50b0b9646aa..f0128a3fe3ae7863e19f07633b8a7298b64b1f7c 100644 (file)
@@ -200,7 +200,6 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
       return 0;
 
    /* Features we can lie about (boolean caps). */
-   case PIPE_CAP_GLSL:
    case PIPE_CAP_OCCLUSION_QUERY:
       return is->debug.lie ? 1 : 0;
 
index deafd4b4ef0fdf4f341de4ac8cd5e90be831ba9d..f4abd0fc4ec13c44191f864db5c286fda14bd297 100644 (file)
@@ -160,8 +160,6 @@ brw_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
-   case PIPE_CAP_GLSL:
-      return 0;
    case PIPE_CAP_ANISOTROPIC_FILTER:
       return 0;
    case PIPE_CAP_POINT_SPRITE:
index fac13e7dda9e9572c1ee9a6c732871789df62d71..9d77cf8128e3114f0dbc0b71fac4b351c68fb533 100644 (file)
@@ -110,8 +110,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
-   case PIPE_CAP_GLSL:
-      return 1;
    case PIPE_CAP_SM3:
       return 1;
    case PIPE_CAP_ANISOTROPIC_FILTER:
index 1270c837089b4fc29d16a32495c18706839edea1..278b3ee20efbcd7712599b0d4207676eda4f7bc5 100644 (file)
@@ -107,7 +107,6 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
    case PIPE_CAP_POINT_SPRITE:
       return 1;
-   case PIPE_CAP_GLSL:
    case PIPE_CAP_SM3:
       return 1;
    case PIPE_CAP_MAX_RENDER_TARGETS:
index 0da7be48e445d0cf0d01ef40493c296a663a9910..8b109a93a586f2d5ef2b90a541c5170c0a083c43 100644 (file)
@@ -96,7 +96,6 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
    case PIPE_CAP_POINT_SPRITE:
       return 1;
-   case PIPE_CAP_GLSL:
    case PIPE_CAP_SM3:
       return 1;
    case PIPE_CAP_MAX_RENDER_TARGETS:
index 6086d43e1c08f66c78e5cee7952d35c136481bad..ce23144f2c2ee19c241f76b4602bf8929339b5a3 100644 (file)
@@ -31,8 +31,6 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                return screen->advertise_npot;
        case PIPE_CAP_TWO_SIDED_STENCIL:
                return 1;
-       case PIPE_CAP_GLSL:
-               return 1;
        case PIPE_CAP_SM3:
                /* TODO: >= nv4x support Shader Model 3.0 */
                return 0;
index ab1cec585c44fc9f9153b9ead0049e4ea144b3f1..aa7005c50edb61a480e353b7f21e2dabb27406bd 100644 (file)
@@ -89,22 +89,6 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         /* Supported features (boolean caps). */
         case PIPE_CAP_NPOT_TEXTURES:
         case PIPE_CAP_TWO_SIDED_STENCIL:
-        case PIPE_CAP_GLSL:
-            /* I'll be frank. This is a lie.
-             *
-             * We don't truly support GLSL on any of this driver's chipsets.
-             * To be fair, no chipset supports the full GLSL specification
-             * to the best of our knowledge, but some of the less esoteric
-             * features are still missing here.
-             *
-             * Rather than cripple ourselves intentionally, I'm going to set
-             * this flag, and as Gallium's interface continues to change, I
-             * hope that this single monolithic GLSL enable can slowly get
-             * split down into many different pieces and the state tracker
-             * will handle fallbacks transparently, like it should.
-             *
-             * ~ C.
-             */
         case PIPE_CAP_ANISOTROPIC_FILTER:
         case PIPE_CAP_POINT_SPRITE:
         case PIPE_CAP_OCCLUSION_QUERY:
index 3c190347d45aa0513b7700b25a452f78b93d276d..ad5863a0ece9e8bb2d733ad23081d748fa8f3c98 100644 (file)
@@ -357,7 +357,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        /* Supported features (boolean caps). */
        case PIPE_CAP_NPOT_TEXTURES:
        case PIPE_CAP_TWO_SIDED_STENCIL:
-       case PIPE_CAP_GLSL:
        case PIPE_CAP_DUAL_SOURCE_BLEND:
        case PIPE_CAP_ANISOTROPIC_FILTER:
        case PIPE_CAP_POINT_SPRITE:
index 485104942ef7c14c2c4e7fc1e7344e8721532ec2..4b71a35f1706813179661672406e011b57d5647e 100644 (file)
@@ -70,8 +70,6 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
-   case PIPE_CAP_GLSL:
-      return 1;
    case PIPE_CAP_SM3:
       return 1;
    case PIPE_CAP_ANISOTROPIC_FILTER:
index 7c4aa314044e84b8ebf2b9b618f3d05932af809e..b6061abd467b2bb66e05a54f6f0fac79e9fd63d7 100644 (file)
@@ -128,8 +128,6 @@ svga_get_paramf(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_TWO_SIDED_STENCIL:
       return 1;
-   case PIPE_CAP_GLSL:
-      return 1;
    case PIPE_CAP_ANISOTROPIC_FILTER:
       return 1;
    case PIPE_CAP_POINT_SPRITE:
index 6d6faab3baa6bd9af92ac16dcbab7923e6839bcd..afbf0af67dc40111aa6c4116a0913047bc77da43 100644 (file)
@@ -424,7 +424,6 @@ enum pipe_transfer_usage {
 enum pipe_cap {
    PIPE_CAP_NPOT_TEXTURES = 1,
    PIPE_CAP_TWO_SIDED_STENCIL = 2,
-   PIPE_CAP_GLSL = 3,  /* XXX need something better */
    PIPE_CAP_DUAL_SOURCE_BLEND = 4,
    PIPE_CAP_ANISOTROPIC_FILTER = 5,
    PIPE_CAP_POINT_SPRITE = 6,
index 3563e1d9b5492107375c202db92ed145614e6315..544f0b6952a60f897908d28a676b1b39ab7fedb4 100644 (file)
@@ -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;
    }