i965: Remove artificial dependency between math instructions.
[mesa.git] / src / mesa / state_tracker / st_extensions.c
index 33cd1295bfd433a640093208bc133d4f0dd00bdf..4207cb64a3a26e8a4766cec8f8e4800214c6f1d3 100644 (file)
@@ -287,6 +287,11 @@ void st_init_limits(struct st_context *st)
       screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS);
    c->MaxTransformFeedbackInterleavedComponents =
       screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS);
+   c->MaxVertexStreams =
+      MAX2(1, screen->get_param(screen, PIPE_CAP_MAX_VERTEX_STREAMS));
+
+   /* The vertex stream must fit into pipe_stream_output_info::stream */
+   assert(c->MaxVertexStreams <= 4);
 
    c->StripTextureBorder = GL_TRUE;
 
@@ -427,6 +432,7 @@ void st_init_extensions(struct st_context *st)
       { o(ARB_texture_multisample),          PIPE_CAP_TEXTURE_MULTISAMPLE              },
       { o(ARB_texture_query_lod),            PIPE_CAP_TEXTURE_QUERY_LOD                },
       { o(ARB_sample_shading),               PIPE_CAP_SAMPLE_SHADING                   },
+      { o(ARB_draw_indirect),                PIPE_CAP_DRAW_INDIRECT                    }
    };
 
    /* Required: render target and sampler support */
@@ -507,6 +513,11 @@ void st_init_extensions(struct st_context *st)
 
       { { o(OES_compressed_ETC1_RGB8_texture) },
         { PIPE_FORMAT_ETC1_RGB8 } },
+
+      { { o(ARB_stencil_texturing) },
+        { PIPE_FORMAT_X24S8_UINT,
+          PIPE_FORMAT_S8X24_UINT },
+        GL_TRUE }, /* at least one format must be supported */
    };
 
    /* Required: vertex fetch support. */
@@ -538,6 +549,7 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.ARB_ES2_compatibility = GL_TRUE;
    ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
    ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE;
+   ctx->Extensions.ARB_explicit_uniform_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;
@@ -612,7 +624,7 @@ void st_init_extensions(struct st_context *st)
    /* This extension needs full OpenGL 3.2, but we don't know if that's
     * supported at this point. Only check the GLSL version. */
    if (ctx->Const.GLSLVersion >= 150 &&
-       screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER)) {
+       screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER_VIEWPORT)) {
       ctx->Extensions.AMD_vertex_shader_layer = GL_TRUE;
    }
 
@@ -625,6 +637,7 @@ void st_init_extensions(struct st_context *st)
       ctx->Extensions.ARB_shading_language_packing = GL_TRUE;
       ctx->Extensions.OES_depth_texture_cube_map = GL_TRUE;
       ctx->Extensions.ARB_shading_language_420pack = GL_TRUE;
+      ctx->Extensions.ARB_texture_query_levels = GL_TRUE;
 
       if (!st->options.disable_shader_bit_encoding) {
          ctx->Extensions.ARB_shader_bit_encoding = GL_TRUE;
@@ -802,6 +815,9 @@ void st_init_extensions(struct st_context *st)
          ctx->Const.ViewportBounds.Min = -16384.0;
          ctx->Const.ViewportBounds.Max = 16384.0;
          ctx->Extensions.ARB_viewport_array = GL_TRUE;
+         ctx->Extensions.ARB_fragment_layer_viewport = GL_TRUE;
+         if (ctx->Extensions.AMD_vertex_shader_layer)
+            ctx->Extensions.AMD_vertex_shader_viewport_index = GL_TRUE;
       }
    }
    if (ctx->Const.MaxProgramTextureGatherComponents > 0)