1 /**************************************************************************
3 * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
4 * Copyright (c) 2008 VMware, Inc.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sub license, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
15 * The above copyright notice and this permission notice (including the
16 * next paragraph) shall be included in all copies or substantial portions
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
23 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 **************************************************************************/
29 #include "main/imports.h"
30 #include "main/context.h"
31 #include "main/macros.h"
32 #include "main/mfeatures.h"
34 #include "pipe/p_context.h"
35 #include "pipe/p_defines.h"
36 #include "pipe/p_screen.h"
38 #include "st_context.h"
39 #include "st_extensions.h"
42 static int _min(int a, int b)
44 return (a < b) ? a : b;
47 static float _maxf(float a, float b)
49 return (a > b) ? a : b;
52 static int _clamp(int a, int min, int max)
64 * Query driver to get implementation limits.
65 * Note that we have to limit/clamp against Mesa's internal limits too.
67 void st_init_limits(struct st_context *st)
69 struct pipe_screen *screen = st->pipe->screen;
70 struct gl_constants *c = &st->ctx->Const;
74 = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
78 = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_3D_LEVELS),
79 MAX_3D_TEXTURE_LEVELS);
81 c->MaxCubeTextureLevels
82 = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS),
83 MAX_CUBE_TEXTURE_LEVELS);
86 = _min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE);
88 c->MaxTextureImageUnits
89 = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
90 MAX_TEXTURE_IMAGE_UNITS);
92 c->MaxVertexTextureImageUnits
93 = _min(screen->get_param(screen, PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS),
94 MAX_VERTEX_TEXTURE_IMAGE_UNITS);
96 c->MaxCombinedTextureImageUnits
97 = _min(screen->get_param(screen, PIPE_CAP_MAX_COMBINED_SAMPLERS),
98 MAX_COMBINED_TEXTURE_IMAGE_UNITS);
100 c->MaxTextureCoordUnits
101 = _min(c->MaxTextureImageUnits, MAX_TEXTURE_COORD_UNITS);
103 c->MaxTextureUnits = _min(c->MaxTextureImageUnits, c->MaxTextureCoordUnits);
106 = _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
107 1, MAX_DRAW_BUFFERS);
110 = _maxf(1.0f, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH));
112 = _maxf(1.0f, screen->get_paramf(screen, PIPE_CAP_MAX_LINE_WIDTH_AA));
115 = _maxf(1.0f, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH));
117 = _maxf(1.0f, screen->get_paramf(screen, PIPE_CAP_MAX_POINT_WIDTH_AA));
118 /* called after _mesa_create_context/_mesa_init_point, fix default user
119 * settable max point size up
121 st->ctx->Point.MaxSize = MAX2(c->MaxPointSize, c->MaxPointSizeAA);
122 /* these are not queryable. Note that GL basically mandates a 1.0 minimum
123 * for non-aa sizes, but we can go down to 0.0 for aa points.
125 c->MinPointSize = 1.0f;
126 c->MinPointSizeAA = 0.0f;
128 c->MaxTextureMaxAnisotropy
129 = _maxf(2.0f, screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_ANISOTROPY));
132 = screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_LOD_BIAS);
135 = CLAMP(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
136 1, MAX_DRAW_BUFFERS);
138 /* Quads always follow GL provoking rules. */
139 c->QuadsFollowProvokingVertexConvention = GL_FALSE;
141 for (sh = 0; sh < MESA_SHADER_TYPES; ++sh) {
142 struct gl_shader_compiler_options *options =
143 &st->ctx->ShaderCompilerOptions[sh];
144 struct gl_program_constants *pc;
147 case PIPE_SHADER_FRAGMENT:
148 pc = &c->FragmentProgram;
150 case PIPE_SHADER_VERTEX:
151 pc = &c->VertexProgram;
153 case PIPE_SHADER_GEOMETRY:
154 pc = &c->GeometryProgram;
161 pc->MaxNativeInstructions = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS);
162 pc->MaxNativeAluInstructions = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS);
163 pc->MaxNativeTexInstructions = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS);
164 pc->MaxNativeTexIndirections = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS);
165 pc->MaxNativeAttribs = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INPUTS);
166 pc->MaxNativeTemps = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_TEMPS);
167 pc->MaxNativeAddressRegs = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ADDRS);
168 pc->MaxNativeParameters = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONSTS);
169 pc->MaxUniformComponents = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);
171 options->EmitNoNoise = TRUE;
173 /* TODO: make these more fine-grained if anyone needs it */
174 options->EmitNoIfs = !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);
175 options->EmitNoLoops = !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);
176 options->EmitNoFunctions = !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES);
177 options->EmitNoMainReturn = !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES);
179 options->EmitNoCont = !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED);
181 options->EmitNoIndirectInput = !screen->get_shader_param(screen, sh,
182 PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR);
183 options->EmitNoIndirectOutput = !screen->get_shader_param(screen, sh,
184 PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR);
185 options->EmitNoIndirectTemp = !screen->get_shader_param(screen, sh,
186 PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR);
187 options->EmitNoIndirectUniform = !screen->get_shader_param(screen, sh,
188 PIPE_SHADER_CAP_INDIRECT_CONST_ADDR);
190 if(options->EmitNoLoops)
191 options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
194 /* PIPE_CAP_MAX_FS_INPUTS specifies the number of COLORn + GENERICn inputs
195 * and is set in MaxNativeAttribs. It's always 2 colors + N generic
196 * attributes. The GLSL compiler never uses COLORn for varyings, so we
197 * subtract the 2 colors to get the maximum number of varyings (generic
198 * attributes) supported by a driver. */
199 c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_INPUTS) - 2;
200 c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING);
202 /* XXX we'll need a better query here someday */
203 if (screen->get_param(screen, PIPE_CAP_GLSL)) {
204 c->GLSLVersion = 120;
210 * Use pipe_screen::get_param() to query PIPE_CAP_ values to determine
211 * which GL extensions are supported.
212 * Quite a few extensions are always supported because they are standard
213 * features or can be built on top of other gallium features.
214 * Some fine tuning may still be needed.
216 void st_init_extensions(struct st_context *st)
218 struct pipe_screen *screen = st->pipe->screen;
219 struct gl_context *ctx = st->ctx;
222 * Extensions that are supported by all Gallium drivers:
224 ctx->Extensions.ARB_copy_buffer = GL_TRUE;
225 ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
226 ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
227 ctx->Extensions.ARB_fragment_program = GL_TRUE;
228 ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
229 ctx->Extensions.ARB_map_buffer_range = GL_TRUE;
230 ctx->Extensions.ARB_multisample = GL_TRUE;
231 ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; /* XXX temp */
232 ctx->Extensions.ARB_texture_compression = GL_TRUE;
233 ctx->Extensions.ARB_texture_cube_map = GL_TRUE;
234 ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
235 ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE;
236 ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE;
237 ctx->Extensions.ARB_vertex_array_object = GL_TRUE;
238 ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;
239 ctx->Extensions.ARB_vertex_program = GL_TRUE;
240 ctx->Extensions.ARB_window_pos = GL_TRUE;
242 ctx->Extensions.EXT_blend_color = GL_TRUE;
243 ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
244 ctx->Extensions.EXT_blend_logic_op = GL_TRUE;
245 ctx->Extensions.EXT_blend_minmax = GL_TRUE;
246 ctx->Extensions.EXT_blend_subtract = GL_TRUE;
247 ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
248 ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
249 ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
250 ctx->Extensions.EXT_fog_coord = GL_TRUE;
251 ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
252 ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;
253 ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
254 ctx->Extensions.EXT_point_parameters = GL_TRUE;
255 ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
256 ctx->Extensions.EXT_secondary_color = GL_TRUE;
257 ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
258 ctx->Extensions.EXT_texture_env_add = GL_TRUE;
259 ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
260 ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
261 ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
262 ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
263 if (ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2)
264 ctx->Extensions.EXT_texture_format_BGRA8888 = GL_TRUE;
266 ctx->Extensions.APPLE_vertex_array_object = GL_TRUE;
268 ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE;
270 ctx->Extensions.MESA_pack_invert = GL_TRUE;
272 ctx->Extensions.NV_blend_square = GL_TRUE;
273 ctx->Extensions.NV_texgen_reflection = GL_TRUE;
274 ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
275 ctx->Extensions.NV_texture_rectangle = GL_TRUE;
277 /* possibly could support the following two */
278 ctx->Extensions.NV_vertex_program = GL_TRUE;
279 ctx->Extensions.NV_vertex_program1_1 = GL_TRUE;
282 #if FEATURE_OES_EGL_image
283 ctx->Extensions.OES_EGL_image = GL_TRUE;
285 #if FEATURE_OES_draw_texture
286 ctx->Extensions.OES_draw_texture = GL_TRUE;
289 ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;
292 * Extensions that depend on the driver/hardware:
294 if (screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS) > 0) {
295 ctx->Extensions.ARB_draw_buffers = GL_TRUE;
298 if (screen->get_param(screen, PIPE_CAP_TEXTURE_SWIZZLE) > 0) {
299 ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
302 if (screen->get_param(screen, PIPE_CAP_GLSL)) {
303 ctx->Extensions.ARB_fragment_shader = GL_TRUE;
304 ctx->Extensions.ARB_vertex_shader = GL_TRUE;
305 ctx->Extensions.ARB_shader_objects = GL_TRUE;
306 ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
307 ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE;
308 ctx->Extensions.EXT_separate_shader_objects = GL_TRUE;
311 if (screen->get_param(screen, PIPE_CAP_TEXTURE_MIRROR_REPEAT) > 0) {
312 ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE;
315 if (screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_SEPARATE)) {
316 ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
319 if (screen->get_param(screen, PIPE_CAP_TEXTURE_MIRROR_CLAMP) > 0) {
320 ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE;
321 ctx->Extensions.ATI_texture_mirror_once = GL_TRUE;
324 if (screen->get_param(screen, PIPE_CAP_NPOT_TEXTURES)) {
325 ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
328 if (screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS) > 1) {
329 ctx->Extensions.ARB_multitexture = GL_TRUE;
332 if (screen->get_param(screen, PIPE_CAP_TWO_SIDED_STENCIL)) {
333 ctx->Extensions.ATI_separate_stencil = GL_TRUE;
334 ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
337 if (screen->get_param(screen, PIPE_CAP_ANISOTROPIC_FILTER)) {
338 ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
341 if (screen->get_param(screen, PIPE_CAP_POINT_SPRITE)) {
342 ctx->Extensions.ARB_point_sprite = GL_TRUE;
343 /* GL_NV_point_sprite is not supported by gallium because we don't
344 * support the GL_POINT_SPRITE_R_MODE_NV option.
348 if (screen->get_param(screen, PIPE_CAP_OCCLUSION_QUERY)) {
349 ctx->Extensions.ARB_occlusion_query = GL_TRUE;
350 ctx->Extensions.ARB_occlusion_query2 = GL_TRUE;
352 if (screen->get_param(screen, PIPE_CAP_TIMER_QUERY)) {
353 ctx->Extensions.EXT_timer_query = GL_TRUE;
356 if (screen->get_param(screen, PIPE_CAP_TEXTURE_SHADOW_MAP)) {
357 ctx->Extensions.ARB_depth_texture = GL_TRUE;
358 ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE;
359 ctx->Extensions.ARB_shadow = GL_TRUE;
360 ctx->Extensions.EXT_shadow_funcs = GL_TRUE;
361 /*ctx->Extensions.ARB_shadow_ambient = GL_TRUE;*/
364 /* GL_EXT_packed_depth_stencil requires both the ability to render to
365 * a depth/stencil buffer and texture from depth/stencil source.
367 if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
369 PIPE_BIND_DEPTH_STENCIL) &&
370 screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
372 PIPE_BIND_SAMPLER_VIEW)) {
373 ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
375 else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
377 PIPE_BIND_DEPTH_STENCIL) &&
378 screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
380 PIPE_BIND_SAMPLER_VIEW)) {
381 ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
385 if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
387 PIPE_BIND_SAMPLER_VIEW) ||
388 screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
390 PIPE_BIND_SAMPLER_VIEW)) {
391 ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
392 ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE;
393 if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
395 PIPE_BIND_RENDER_TARGET) ||
396 screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
398 PIPE_BIND_RENDER_TARGET)) {
399 ctx->Extensions.EXT_framebuffer_sRGB = GL_TRUE;
400 ctx->Const.sRGBCapable = GL_TRUE;
404 if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8_UNORM,
406 PIPE_BIND_SAMPLER_VIEW)) {
407 ctx->Extensions.ARB_texture_rg = GL_TRUE;
411 if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
413 PIPE_BIND_SAMPLER_VIEW) &&
415 ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
416 ctx->Extensions.S3_s3tc = GL_TRUE;
419 if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_UNORM,
421 PIPE_BIND_SAMPLER_VIEW) &&
422 screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_SNORM,
424 PIPE_BIND_SAMPLER_VIEW) &&
425 screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_UNORM,
427 PIPE_BIND_SAMPLER_VIEW) &&
428 screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_SNORM,
430 PIPE_BIND_SAMPLER_VIEW)
432 ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
435 if (screen->is_format_supported(screen, PIPE_FORMAT_LATC1_UNORM,
437 PIPE_BIND_SAMPLER_VIEW) &&
438 screen->is_format_supported(screen, PIPE_FORMAT_LATC1_SNORM,
440 PIPE_BIND_SAMPLER_VIEW) &&
441 screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM,
443 PIPE_BIND_SAMPLER_VIEW) &&
444 screen->is_format_supported(screen, PIPE_FORMAT_LATC2_SNORM,
446 PIPE_BIND_SAMPLER_VIEW)) {
447 ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
450 if (screen->is_format_supported(screen, PIPE_FORMAT_LATC2_UNORM,
452 PIPE_BIND_SAMPLER_VIEW)) {
453 ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
457 if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY,
459 PIPE_BIND_SAMPLER_VIEW) ||
460 screen->is_format_supported(screen, PIPE_FORMAT_YUYV,
462 PIPE_BIND_SAMPLER_VIEW)) {
463 ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
466 /* GL_EXT_texture_array */
467 if (screen->get_param(screen, PIPE_CAP_ARRAY_TEXTURES)) {
468 ctx->Extensions.EXT_texture_array = GL_TRUE;
469 ctx->Extensions.MESA_texture_array = GL_TRUE;
472 /* GL_ARB_framebuffer_object */
473 if (ctx->Extensions.EXT_packed_depth_stencil) {
474 /* we support always support GL_EXT_framebuffer_blit */
475 ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
478 if (st->pipe->render_condition) {
479 ctx->Extensions.NV_conditional_render = GL_TRUE;
482 if (screen->get_param(screen, PIPE_CAP_INDEP_BLEND_ENABLE)) {
483 ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
486 if (screen->get_param(screen, PIPE_CAP_INDEP_BLEND_FUNC)) {
487 ctx->Extensions.ARB_draw_buffers_blend = GL_TRUE;
490 /* GL_ARB_half_float_vertex */
491 if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_FLOAT,
493 PIPE_BIND_VERTEX_BUFFER)) {
494 ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
497 if (screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY, PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
498 #if 0 /* XXX re-enable when GLSL compiler again supports geometry shaders */
499 ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
503 if (screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) {
504 ctx->Extensions.NV_primitive_restart = GL_TRUE;
507 if (screen->get_param(screen, PIPE_CAP_DEPTH_CLAMP)) {
508 ctx->Extensions.ARB_depth_clamp = GL_TRUE;
511 if (screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT)) {
512 ctx->Extensions.ARB_shader_stencil_export = GL_TRUE;
515 if (screen->get_param(screen, PIPE_CAP_TGSI_INSTANCEID)) {
516 ctx->Extensions.ARB_draw_instanced = GL_TRUE;
518 if (screen->get_param(screen, PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR)) {
519 ctx->Extensions.ARB_instanced_arrays = GL_TRUE;
522 if (screen->fence_finish) {
523 ctx->Extensions.ARB_sync = GL_TRUE;