[Piglit] [PATCH 6/8] GL_ARB_texture_buffer_object: Add a test for syncing with glBufferSubData().

Eric Anholt eric at anholt.net
Wed Oct 30 23:11:07 CET 2013


Ian Romanick <idr at freedesktop.org> writes:

> On 10/08/2013 02:09 PM, Eric Anholt wrote:
>
> With something done about the versioning comment below,
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

>> +	/* Make the buffer bigger than the data to trigger the driver
>> +	 * code path we want.
>> +	 */
>> +	glBufferData(GL_TEXTURE_BUFFER, 4096, NULL, GL_STREAM_DRAW);
>> +	glBufferSubData(GL_TEXTURE_BUFFER, 0, sizeof(g_rgba8), g_rgba8);
>> +
>> +	glGenTextures(1, &tex);
>> +	glBindTexture(GL_TEXTURE_BUFFER, tex);
>> +	glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA8, bo);
>> +
>> +	piglit_draw_rect(-1, -1, 1, 2);
>> +	glBufferSubData(GL_TEXTURE_BUFFER, 0, sizeof(b_rgba8), b_rgba8);
>> +	piglit_draw_rect(0, -1, 1, 2);
>> +
>> +	pass = pass && piglit_probe_rect_rgba(0, 0,
>> +					      piglit_width / 2, piglit_height,
>> +					      green);
>> +	pass = pass && piglit_probe_rect_rgba(piglit_width / 2, 0,
>> +					      piglit_width / 2, piglit_height,
>> +					      blue);
>> +
>> +	piglit_present_results();
>> +
>> +	return pass ? PIGLIT_PASS : PIGLIT_FAIL;
>> +}
>> +
>> +void
>> +piglit_init(int argc, char **argv)
>> +{
>> +	piglit_require_GLSL_version(140);
>> +	if (piglit_get_gl_version() < 31)
>
> I don't think anyone will exposed GLSL 1.40 without GL 3.1.  For this to
> be useful, the test should use a 1.20 shader with
> GL_ARB_texture_buffer_object enabled in the pre-3.1 case.

Not even Ironlake?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20131030/8f889c03/attachment.pgp>


More information about the Piglit mailing list