I think something is off with the piglit-waffle compatibility semantics.<br><br>The test declares that it works with core >=3.1 and legacy >=1.0. Surely if your driver can't do core 3.1, the test should be at least trying a legacy context?<br>
<br>-- Chris<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 24, 2012 at 7:30 AM, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eric,<br>
<br>
this patch breaks textureSize on drivers which fail to create a 3.1<br>
core context.<br>
<br>
The test fails with the GLXBadFBConfig error. I'm using waffle.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marek<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Nov 1, 2012 at 7:36 PM, Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>> wrote:<br>
> This lets the textureSize tests for TBOs run on i965.<br>
> ---<br>
> tests/spec/arb_texture_buffer_object/formats.c | 1 +<br>
> tests/texturing/shaders/textureSize.c | 18 ++++++++++++++++--<br>
> 2 files changed, 17 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/tests/spec/arb_texture_buffer_object/formats.c b/tests/spec/arb_texture_buffer_object/formats.c<br>
> index d1ff57d..05a6e2c 100644<br>
> --- a/tests/spec/arb_texture_buffer_object/formats.c<br>
> +++ b/tests/spec/arb_texture_buffer_object/formats.c<br>
> @@ -538,6 +538,7 @@ piglit_display(void)<br>
> glGenBuffers(1, &vbo);<br>
> glBindBuffer(GL_ARRAY_BUFFER_ARB, vbo);<br>
> if (piglit_get_gl_version() >= 31) {<br>
> + GLuint vao;<br>
> glGenVertexArrays(1, &vao);<br>
> glBindVertexArray(vao);<br>
> }<br>
> diff --git a/tests/texturing/shaders/textureSize.c b/tests/texturing/shaders/textureSize.c<br>
> index 98191b8..9168458 100644<br>
> --- a/tests/texturing/shaders/textureSize.c<br>
> +++ b/tests/texturing/shaders/textureSize.c<br>
> @@ -49,6 +49,7 @@<br>
> PIGLIT_GL_TEST_CONFIG_BEGIN<br>
><br>
> config.supports_gl_compat_version = 10;<br>
> + config.supports_gl_core_version = 31;<br>
><br>
> config.window_width = 150;<br>
> config.window_height = 30;<br>
> @@ -98,11 +99,25 @@ piglit_display()<br>
> 1, 1,<br>
> 1, -1,<br>
> };<br>
> + GLuint vbo;<br>
><br>
> glClearColor(0.5, 0.5, 0.5, 1.0);<br>
> glClear(GL_COLOR_BUFFER_BIT);<br>
><br>
> - glVertexAttribPointer(vertex_location, 2, GL_FLOAT, GL_FALSE, 0, verts);<br>
> + /* For GL core, we need to have a vertex array object bound.<br>
> + * Otherwise, we don't particularly have to. Always use a<br>
> + * vertex buffer object, though.<br>
> + */<br>
> + if (piglit_get_gl_version() >= 31) {<br>
> + GLuint vao;<br>
> + glGenVertexArrays(1, &vao);<br>
> + glBindVertexArray(vao);<br>
> + }<br>
> + glGenBuffers(1, &vbo);<br>
> + glBindBuffer(GL_ARRAY_BUFFER, vbo);<br>
> + glBufferData(GL_ARRAY_BUFFER, sizeof(verts), verts, GL_STREAM_DRAW);<br>
> +<br>
> + glVertexAttribPointer(vertex_location, 2, GL_FLOAT, GL_FALSE, 0, 0);<br>
> glEnableVertexAttribArray(vertex_location);<br>
><br>
> /* Draw consecutive squares for each mipmap level */<br>
> @@ -130,7 +145,6 @@ piglit_display()<br>
> }<br>
><br>
> glDisableVertexAttribArray(vertex_location);<br>
> -<br>
> piglit_present_results();<br>
><br>
> return pass ? PIGLIT_PASS : PIGLIT_FAIL;<br>
> --<br>
> 1.7.10.4<br>
><br>
> _______________________________________________<br>
> Piglit mailing list<br>
> <a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</div></div></blockquote></div><br></div>