vertex-attrib-pointer-type-size-match: use a VAO for GL 3.0 and later.

Submitted by Brian Paul on July 17, 2014, 1:26 p.m.

Details

Message ID 1405603572-11433-1-git-send-email-brianp@vmware.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Brian Paul July 17, 2014, 1:26 p.m.
With GL 3.0 and later, all vertex arrays must be in a vertex array object.
This fixes the test with Mesa.
---
 .../vertex-attrib-pointer-type-size-match.c                      |    6 ++++++
 1 file changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
index 6eb9596..5f0f0b9 100644
--- a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
+++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
@@ -53,6 +53,12 @@  piglit_init(int argc, char **argv)
 	GLint invalid_sizes[] = {
 		1, 2, 3
 	};
+	GLuint array_obj;
+
+	if (piglit_get_gl_version() >= 30) {
+		glGenVertexArrays(1, &array_obj);
+		glBindVertexArray(array_obj);
+	}
 
 	if(piglit_get_gl_version() < 33)
 		piglit_require_extension("GL_ARB_vertex_type_2_10_10_10_rev");

Comments

On Thu, Jul 17, 2014 at 6:26 AM, Brian Paul <brianp@vmware.com> wrote:
> With GL 3.0 and later, all vertex arrays must be in a vertex array object.
> This fixes the test with Mesa.

Isn't it 3.1 (i.e., specifically core profiles) and later?

> ---
>  .../vertex-attrib-pointer-type-size-match.c                      |    6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
> index 6eb9596..5f0f0b9 100644
> --- a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
> +++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
> @@ -53,6 +53,12 @@ piglit_init(int argc, char **argv)
>         GLint invalid_sizes[] = {
>                 1, 2, 3
>         };
> +       GLuint array_obj;
> +
> +       if (piglit_get_gl_version() >= 30) {

s/30/31/ (unless my understanding is wrong) and this gets a

Reviewed-by: Matt Turner <mattst88@gmail.com>
On 07/17/2014 12:36 PM, Matt Turner wrote:
> On Thu, Jul 17, 2014 at 6:26 AM, Brian Paul <brianp@vmware.com> wrote:
>> With GL 3.0 and later, all vertex arrays must be in a vertex array object.
>> This fixes the test with Mesa.
>
> Isn't it 3.1 (i.e., specifically core profiles) and later?
>
>> ---
>>   .../vertex-attrib-pointer-type-size-match.c                      |    6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
>> index 6eb9596..5f0f0b9 100644
>> --- a/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
>> +++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/vertex-attrib-pointer-type-size-match.c
>> @@ -53,6 +53,12 @@ piglit_init(int argc, char **argv)
>>          GLint invalid_sizes[] = {
>>                  1, 2, 3
>>          };
>> +       GLuint array_obj;
>> +
>> +       if (piglit_get_gl_version() >= 30) {
>
> s/30/31/ (unless my understanding is wrong) and this gets a
>
> Reviewed-by: Matt Turner <mattst88@gmail.com>

You're right, it's core profiles.  I'll should probably test for 
(piglit_is_core_profile) instead...

-Brian