From bb2d02c7b53d2bcbdddcbe4e82a912e5183fdb8c Mon Sep 17 00:00:00 2001 From: Fredrik Höglund Date: Tue, 9 Apr 2013 20:44:58 +0200 Subject: glapi: Add infrastructure for ARB_vertex_attrib_binding Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick --- src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml | 58 ++++++++++++++++++++++++ src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl_API.xml | 6 ++- src/mesa/main/tests/dispatch_sanity.cpp | 12 ++--- src/mesa/main/varray.c | 43 ++++++++++++++++++ src/mesa/main/varray.h | 23 ++++++++++ 6 files changed, 136 insertions(+), 7 deletions(-) create mode 100644 src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml diff --git a/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml b/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml new file mode 100644 index 00000000000..0ee6a3c00be --- /dev/null +++ b/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index cbbf659dd01..9c253878325 100644 --- a/src/mapi/glapi/gen/Makefile.am +++ b/src/mapi/glapi/gen/Makefile.am @@ -125,6 +125,7 @@ API_XML = \ ARB_texture_storage_multisample.xml \ ARB_texture_storage.xml \ ARB_vertex_array_object.xml \ + ARB_vertex_attrib_binding.xml \ AMD_draw_buffers_blend.xml \ AMD_performance_monitor.xml \ ARB_vertex_type_2_10_10_10_rev.xml \ diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 69014c5d2f0..a2d914ac46f 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8458,7 +8458,11 @@ - + + + + + diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 58cff9b60fa..922f0acafc2 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -854,12 +854,12 @@ const struct function gl_core_functions_possible[] = { // { "glDispatchComputeIndirect", 43, -1 }, // XXX: Add to xml // { "glCopyImageSubData", 43, -1 }, // XXX: Add to xml // { "glTextureView", 43, -1 }, // XXX: Add to xml -// { "glBindVertexBuffer", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribFormat", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribIFormat", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribLFormat", 43, -1 }, // XXX: Add to xml -// { "glVertexAttribBinding", 43, -1 }, // XXX: Add to xml -// { "glVertexBindingDivisor", 43, -1 }, // XXX: Add to xml + { "glBindVertexBuffer", 43, -1 }, + { "glVertexAttribFormat", 43, -1 }, + { "glVertexAttribIFormat", 43, -1 }, + { "glVertexAttribLFormat", 43, -1 }, + { "glVertexAttribBinding", 43, -1 }, + { "glVertexBindingDivisor", 43, -1 }, // { "glVertexArrayBindVertexBufferEXT", 43, -1 }, // XXX: Add to xml // { "glVertexArrayVertexAttribFormatEXT", 43, -1 }, // XXX: Add to xml // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 }, // XXX: Add to xml diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index e6997f4862f..a705b6b9368 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1230,6 +1230,49 @@ _mesa_primitive_restart_index(const struct gl_context *ctx, GLenum ib_type) } +/** + * GL_ARB_vertex_attrib_binding + */ +void GLAPIENTRY +_mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset, + GLsizei stride) +{ +} + + +void GLAPIENTRY +_mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeOffset) +{ +} + + +void GLAPIENTRY +_mesa_VertexAttribIFormat(GLuint attribIndex, GLint size, GLenum type, + GLuint relativeOffset) +{ +} + + +void GLAPIENTRY +_mesa_VertexAttribLFormat(GLuint attribIndex, GLint size, GLenum type, + GLuint relativeOffset) +{ +} + + +void GLAPIENTRY +_mesa_VertexAttribBinding(GLuint attribIndex, GLuint bindingIndex) +{ +} + + +void GLAPIENTRY +_mesa_VertexBindingDivisor(GLuint bindingIndex, GLuint divisor) +{ +} + + /** * Copy one client vertex array to another. */ diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index 7e611e8c752..2b54fde9836 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -250,6 +250,29 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor); extern unsigned _mesa_primitive_restart_index(const struct gl_context *ctx, GLenum ib_type); +extern void GLAPIENTRY +_mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset, + GLsizei stride); + +extern void GLAPIENTRY +_mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type, + GLboolean normalized, GLuint relativeOffset); + +extern void GLAPIENTRY +_mesa_VertexAttribIFormat(GLuint attribIndex, GLint size, GLenum type, + GLuint relativeOffset); + +extern void GLAPIENTRY +_mesa_VertexAttribLFormat(GLuint attribIndex, GLint size, GLenum type, + GLuint relativeOffset); + +extern void GLAPIENTRY +_mesa_VertexAttribBinding(GLuint attribIndex, GLuint bindingIndex); + +extern void GLAPIENTRY +_mesa_VertexBindingDivisor(GLuint bindingIndex, GLuint divisor); + + extern void _mesa_copy_client_array(struct gl_context *ctx, struct gl_client_array *dst, -- cgit v1.2.3