~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i965/intel_extensions_es2.c

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**************************************************************************
2
 
 * 
3
 
 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
4
 
 * All Rights Reserved.
5
 
 * 
6
 
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 
 * copy of this software and associated documentation files (the
8
 
 * "Software"), to deal in the Software without restriction, including
9
 
 * without limitation the rights to use, copy, modify, merge, publish,
10
 
 * distribute, sub license, and/or sell copies of the Software, and to
11
 
 * permit persons to whom the Software is furnished to do so, subject to
12
 
 * the following conditions:
13
 
 * 
14
 
 * The above copyright notice and this permission notice (including the
15
 
 * next paragraph) shall be included in all copies or substantial portions
16
 
 * of the Software.
17
 
 * 
18
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
 
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21
 
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22
 
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 
 * 
26
 
 **************************************************************************/
27
 
 
28
 
#include "main/extensions.h"
29
 
#include "main/mfeatures.h"
30
 
 
31
 
#include "intel_extensions.h"
32
 
 
33
 
static const char *es2_extensions[] = {
34
 
   /* Used by mesa internally (cf all_mesa_extensions in ../common/utils.c) */
35
 
   "GL_ARB_draw_buffers",
36
 
   "GL_ARB_multisample",
37
 
   "GL_ARB_texture_compression",
38
 
   "GL_ARB_transpose_matrix",
39
 
   "GL_ARB_vertex_buffer_object",
40
 
   "GL_ARB_window_pos",
41
 
   "GL_EXT_blend_func_separate",
42
 
   "GL_EXT_compiled_vertex_array",
43
 
   "GL_EXT_framebuffer_blit",
44
 
   "GL_EXT_multi_draw_arrays",
45
 
   "GL_EXT_polygon_offset",
46
 
   "GL_EXT_texture_object",
47
 
   "GL_EXT_vertex_array",
48
 
   "GL_IBM_multimode_draw_arrays",
49
 
   "GL_MESA_window_pos",
50
 
   "GL_NV_vertex_program",
51
 
 
52
 
   /* Required by GLES2 */
53
 
   "GL_ARB_fragment_program",
54
 
   "GL_ARB_fragment_shader",
55
 
   "GL_ARB_multitexture",
56
 
   "GL_ARB_shader_objects",
57
 
   "GL_ARB_texture_cube_map",
58
 
   "GL_ARB_texture_mirrored_repeat",
59
 
   "GL_ARB_texture_non_power_of_two",
60
 
   "GL_ARB_vertex_shader",
61
 
   "GL_EXT_blend_color",
62
 
   "GL_EXT_blend_equation_separate",
63
 
   "GL_EXT_blend_minmax",
64
 
   "GL_EXT_blend_subtract",
65
 
   "GL_EXT_stencil_wrap",
66
 
   "GL_NV_blend_square",
67
 
 
68
 
   /* Optional GLES2 */
69
 
   "GL_ARB_framebuffer_object",
70
 
   "GL_EXT_texture_filter_anisotropic",
71
 
   "GL_ARB_depth_texture",
72
 
   "GL_EXT_packed_depth_stencil",
73
 
   "GL_EXT_framebuffer_object",
74
 
   "GL_EXT_texture_format_BGRA8888",
75
 
 
76
 
#if FEATURE_OES_EGL_image
77
 
   "GL_OES_EGL_image",
78
 
#endif
79
 
 
80
 
   NULL,
81
 
};
82
 
 
83
 
/**
84
 
 * \brief Extensions to disable.
85
 
 *
86
 
 * These extensions must be manually disabled because they may have been
87
 
 * enabled by default.
88
 
 */
89
 
static const char* es2_extensions_disabled[] = {
90
 
   "GL_OES_standard_derivatives",
91
 
   NULL,
92
 
};
93
 
 
94
 
/**
95
 
 * Initializes potential list of extensions if ctx == NULL, or actually enables
96
 
 * extensions for a context.
97
 
 */
98
 
void
99
 
intelInitExtensionsES2(struct gl_context *ctx)
100
 
{
101
 
   int i;
102
 
 
103
 
   /* Can't use driInitExtensions() since it uses extensions from
104
 
    * main/remap_helper.h when called the first time. */
105
 
 
106
 
   for (i = 0; es2_extensions[i]; i++)
107
 
      _mesa_enable_extension(ctx, es2_extensions[i]);
108
 
   for (i = 0; es2_extensions_disabled[i]; i++)
109
 
      _mesa_disable_extension(ctx, es2_extensions_disabled[i]);
110
 
}