diff options
-rw-r--r-- | tests/spec/arb_direct_state_access/dsa-utils.c | 19 | ||||
-rw-r--r-- | tests/spec/arb_direct_state_access/dsa-utils.h | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/spec/arb_direct_state_access/dsa-utils.c b/tests/spec/arb_direct_state_access/dsa-utils.c index f065dbc54..aaa172720 100644 --- a/tests/spec/arb_direct_state_access/dsa-utils.c +++ b/tests/spec/arb_direct_state_access/dsa-utils.c @@ -94,3 +94,22 @@ check_indexed_vao_param_(GLuint vao, GLuint index, GLuint param, return true; } + +bool +check_vbo_binding_(GLuint vao, GLuint bindingindex, GLuint vbo, + GLintptr offset, GLsizeiptr stride, + const char *file, int line) +{ + bool pass = true; + + pass = check_indexed_vao_param_(vao, bindingindex, + GL_VERTEX_BINDING_BUFFER, vbo, file, line) && pass; + + pass = check_indexed_vao_param_(vao, bindingindex, + GL_VERTEX_BINDING_OFFSET, offset, file, line) && pass; + + pass = check_indexed_vao_param_(vao, bindingindex, + GL_VERTEX_BINDING_STRIDE, stride, file, line) && pass; + + return pass; +} diff --git a/tests/spec/arb_direct_state_access/dsa-utils.h b/tests/spec/arb_direct_state_access/dsa-utils.h index 707a9674c..ed3a50695 100644 --- a/tests/spec/arb_direct_state_access/dsa-utils.h +++ b/tests/spec/arb_direct_state_access/dsa-utils.h @@ -66,6 +66,14 @@ bool check_indexed_vao_param_(GLuint vao, GLuint index, GLuint param, check_indexed_vao_param_(vao, index, param, expected, \ __FILE__, __LINE__) +bool check_vbo_binding_(GLuint vao, GLuint bindingindex, GLuint vbo, + GLintptr offset, GLsizeiptr stride, + const char *file, int line); + +#define check_vbo_binding(vao, bindingindex, vbo, offset, stride) \ + check_vbo_binding_(vao, bindingindex, vbo, offset, stride, \ + __FILE__, __LINE__) + #ifdef __cplusplus } /* end extern "C" */ #endif |