mesa: enable ARB_direct_state_access in compat for GL3.1+

We could enable it for lower versions of GL but this allows us
to just use the existing version/extension checks that are already
used by the core profile.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri
2018-08-29 12:40:12 +10:00
parent 93b8b987d0
commit 781a78914c
4 changed files with 114 additions and 104 deletions

View File

@@ -196,7 +196,16 @@ _mesa_vao_attribute_map[ATTRIBUTE_MAP_MODE_MAX][VERT_ATTRIB_MAX] =
struct gl_vertex_array_object *
_mesa_lookup_vao(struct gl_context *ctx, GLuint id)
{
/* The ARB_direct_state_access specification says:
*
* "<vaobj> is [compatibility profile:
* zero, indicating the default vertex array object, or]
* the name of the vertex array object."
*/
if (id == 0) {
if (ctx->API == API_OPENGL_COMPAT)
return ctx->Array.DefaultVAO;
return NULL;
} else {
struct gl_vertex_array_object *vao;