ctx->Extensions.ARB_blend_func_extended = !driQueryOptionb(&intel->optionCache, "disable_blend_func_extended");
ctx->Extensions.ARB_draw_buffers_blend = true;
ctx->Extensions.ARB_uniform_buffer_object = true;
-
- if (ctx->API == API_OPENGL_CORE) {
- ctx->Extensions.ARB_texture_buffer_object = true;
- }
+ ctx->Extensions.ARB_texture_buffer_object = true;
}
if (intel->gen >= 5)
}
break;
case GL_TEXTURE_BUFFER:
- if (_mesa_is_desktop_gl(ctx)
- && ctx->Extensions.ARB_texture_buffer_object) {
+ if (ctx->API == API_OPENGL_CORE &&
+ ctx->Extensions.ARB_texture_buffer_object) {
return &ctx->Texture.BufferObject;
}
break;
{ "GL_ARB_shadow", o(ARB_shadow), GLL, 2001 },
{ "GL_ARB_sync", o(ARB_sync), GL, 2003 },
{ "GL_ARB_texture_border_clamp", o(ARB_texture_border_clamp), GLL, 2000 },
- { "GL_ARB_texture_buffer_object", o(ARB_texture_buffer_object), GL, 2008 },
+ { "GL_ARB_texture_buffer_object", o(ARB_texture_buffer_object), GLC, 2008 },
{ "GL_ARB_texture_compression", o(dummy_true), GLL, 2000 },
{ "GL_ARB_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 },
{ "GL_ARB_texture_cube_map", o(ARB_texture_cube_map), GLL, 1999 },
EXTRA_VERSION_31,
EXTRA_VERSION_32,
EXTRA_API_GL,
+ EXTRA_API_GL_CORE,
EXTRA_API_ES2,
EXTRA_NEW_BUFFERS,
EXTRA_NEW_FRAG_CLAMP,
};
static const int extra_texture_buffer_object[] = {
+ EXTRA_API_GL_CORE,
EXTRA_VERSION_31,
EXT(ARB_texture_buffer_object),
EXTRA_END
EXTRA_EXT(ARB_geometry_shader4);
EXTRA_EXT(ARB_color_buffer_float);
EXTRA_EXT(EXT_framebuffer_sRGB);
-EXTRA_EXT(ARB_texture_buffer_object);
EXTRA_EXT(OES_EGL_image_external);
EXTRA_EXT(ARB_blend_func_extended);
EXTRA_EXT(ARB_uniform_buffer_object);
enabled++;
}
break;
+ case EXTRA_API_GL_CORE:
+ if (ctx->API == API_OPENGL_CORE) {
+ total++;
+ enabled++;
+ }
+ break;
case EXTRA_NEW_BUFFERS:
if (ctx->NewState & _NEW_BUFFERS)
_mesa_update_state(ctx);
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
case GL_TEXTURE_BUFFER:
- return _mesa_is_desktop_gl(ctx)
- && ctx->Extensions.ARB_texture_buffer_object
- ? texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL;
+ return ctx->API == API_OPENGL_CORE &&
+ ctx->Extensions.ARB_texture_buffer_object ?
+ texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL;
case GL_TEXTURE_EXTERNAL_OES:
return ctx->Extensions.OES_EGL_image_external
? texUnit->CurrentTex[TEXTURE_EXTERNAL_INDEX] : NULL;
return ctx->Extensions.ARB_texture_cube_map_array
? ctx->Const.MaxCubeTextureLevels : 0;
case GL_TEXTURE_BUFFER:
- return _mesa_is_desktop_gl(ctx)
- && ctx->Extensions.ARB_texture_buffer_object
- ? 1 : 0;
+ return ctx->API == API_OPENGL_CORE &&
+ ctx->Extensions.ARB_texture_buffer_object ? 1 : 0;
case GL_TEXTURE_EXTERNAL_OES:
/* fall-through */
default:
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (!(ctx->Extensions.ARB_texture_buffer_object
- && _mesa_is_desktop_gl(ctx))) {
+ if (!(ctx->API == API_OPENGL_CORE &&
+ ctx->Extensions.ARB_texture_buffer_object)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer");
return;
}
|| _mesa_is_gles3(ctx)
? TEXTURE_2D_ARRAY_INDEX : -1;
case GL_TEXTURE_BUFFER_ARB:
- return _mesa_is_desktop_gl(ctx)
- && ctx->Extensions.ARB_texture_buffer_object
- ? TEXTURE_BUFFER_INDEX : -1;
+ return ctx->API == API_OPENGL_CORE &&
+ ctx->Extensions.ARB_texture_buffer_object ?
+ TEXTURE_BUFFER_INDEX : -1;
case GL_TEXTURE_EXTERNAL_OES:
return _mesa_is_gles(ctx) && ctx->Extensions.OES_EGL_image_external
? TEXTURE_EXTERNAL_INDEX : -1;
* From the OpenGL 3.1 spec:
* "target may also be TEXTURE_BUFFER, indicating the texture buffer."
*/
- return _mesa_is_desktop_gl(ctx) && ctx->Version >= 31;
+ return ctx->API == API_OPENGL_CORE && ctx->Version >= 31;
default:
return GL_FALSE;
}