summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-11-07 10:55:23 +0100
committerPierre-Eric Pelloux-Prayer <[email protected]>2019-11-19 08:49:45 +0100
commit657396aa10c75e712efd32ed58601ad14b4dc0ef (patch)
tree66403b1f5d3386caef6d843e2d782e27ddb3771f /src/mesa
parentbb2241bf06b6e23eb632523ae582e90c4c429a8b (diff)
mesa: extend vertex_array_attrib_format to support EXT_dsa
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/varray.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index d046d5af302..0d272ed9c30 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -3076,8 +3076,8 @@ _mesa_VertexAttribLFormat(GLuint attribIndex, GLint size, GLenum type,
static void
-vertex_array_attrib_format(GLuint vaobj, GLuint attribIndex, GLint size,
- GLenum type, GLboolean normalized,
+vertex_array_attrib_format(GLuint vaobj, bool isExtDsa, GLuint attribIndex,
+ GLint size, GLenum type, GLboolean normalized,
GLboolean integer, GLboolean doubles,
GLbitfield legalTypes, GLsizei sizeMax,
GLuint relativeOffset, const char *func)
@@ -3094,13 +3094,7 @@ vertex_array_attrib_format(GLuint vaobj, GLuint attribIndex, GLint size,
if (!vao)
return;
} else {
- /* The ARB_direct_state_access spec says:
- *
- * "An INVALID_OPERATION error is generated by
- * VertexArrayAttrib*Format if <vaobj> is not [compatibility profile:
- * zero or] the name of an existing vertex array object."
- */
- vao = _mesa_lookup_vao_err(ctx, vaobj, false, func);
+ vao = _mesa_lookup_vao_err(ctx, vaobj, isExtDsa, func);
if (!vao)
return;
@@ -3136,7 +3130,7 @@ _mesa_VertexArrayAttribFormat(GLuint vaobj, GLuint attribIndex, GLint size,
GLenum type, GLboolean normalized,
GLuint relativeOffset)
{
- vertex_array_attrib_format(vaobj, attribIndex, size, type, normalized,
+ vertex_array_attrib_format(vaobj, false, attribIndex, size, type, normalized,
GL_FALSE, GL_FALSE, ATTRIB_FORMAT_TYPES_MASK,
BGRA_OR_4, relativeOffset,
"glVertexArrayAttribFormat");
@@ -3148,7 +3142,7 @@ _mesa_VertexArrayAttribIFormat(GLuint vaobj, GLuint attribIndex,
GLint size, GLenum type,
GLuint relativeOffset)
{
- vertex_array_attrib_format(vaobj, attribIndex, size, type, GL_FALSE,
+ vertex_array_attrib_format(vaobj, false, attribIndex, size, type, GL_FALSE,
GL_TRUE, GL_FALSE, ATTRIB_IFORMAT_TYPES_MASK,
4, relativeOffset,
"glVertexArrayAttribIFormat");
@@ -3160,7 +3154,7 @@ _mesa_VertexArrayAttribLFormat(GLuint vaobj, GLuint attribIndex,
GLint size, GLenum type,
GLuint relativeOffset)
{
- vertex_array_attrib_format(vaobj, attribIndex, size, type, GL_FALSE,
+ vertex_array_attrib_format(vaobj, false, attribIndex, size, type, GL_FALSE,
GL_FALSE, GL_TRUE, ATTRIB_LFORMAT_TYPES_MASK,
4, relativeOffset,
"glVertexArrayAttribLFormat");