[Piglit] [PATCH 1/3] Transform feedback: Stop using wrapper functions.
Ian Romanick
idr at freedesktop.org
Tue Jul 3 15:18:38 PDT 2012
On 07/02/2012 02:57 PM, Paul Berry wrote:
> The wrapper functions in tests/util/piglit-transform-feedback.{c,h}
> (e.g. piglit_BeginTransformFeedback()) are no longer needed, since the
> piglit-dispatch mechanism automatically redirects to the EXT variants
> when GL 3.0 is not supported.
>
> This patch stops using the wrapper functions; the next patch will
> remove them.
Death to the wrappers!
Acked-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> tests/spec/ext_transform_feedback/alignment.c | 13 ++++++-------
> tests/spec/ext_transform_feedback/api-errors.c | 16 ++++++++--------
> tests/spec/ext_transform_feedback/buffer-usage.c | 9 ++++-----
> .../spec/ext_transform_feedback/builtin-varyings.c | 16 ++++++++--------
> tests/spec/ext_transform_feedback/generatemipmap.c | 11 +++++------
> .../spec/ext_transform_feedback/get-buffer-state.c | 6 +++---
> .../spec/ext_transform_feedback/immediate-reuse.c | 10 +++++-----
> tests/spec/ext_transform_feedback/interleaved.c | 10 +++++-----
> .../spec/ext_transform_feedback/intervening-read.c | 10 +++++-----
> tests/spec/ext_transform_feedback/max-varyings.c | 13 ++++++-------
> tests/spec/ext_transform_feedback/negative-prims.c | 5 ++---
> tests/spec/ext_transform_feedback/order.c | 9 ++++-----
> tests/spec/ext_transform_feedback/output-type.c | 12 ++++++------
> .../ext_transform_feedback/overflow-edge-cases.c | 12 ++++++------
> tests/spec/ext_transform_feedback/position.c | 14 +++++++-------
> tests/spec/ext_transform_feedback/separate.c | 10 +++++-----
> tests/spec/ext_transform_feedback/tessellation.c | 11 +++++------
> tests/spec/glsl-1.40/tf-no-position.c | 13 ++++++-------
> 18 files changed, 96 insertions(+), 104 deletions(-)
>
> diff --git a/tests/spec/ext_transform_feedback/alignment.c b/tests/spec/ext_transform_feedback/alignment.c
> index 9e86959..c6dad96 100644
> --- a/tests/spec/ext_transform_feedback/alignment.c
> +++ b/tests/spec/ext_transform_feedback/alignment.c
> @@ -131,8 +131,7 @@ void piglit_init(int argc, char **argv)
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> piglit_AttachShader(prog, fs);
> - piglit_TransformFeedbackVaryings(prog, 5, varyings,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, 5, varyings, GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog))
> piglit_report_result(PIGLIT_FAIL);
> @@ -162,12 +161,12 @@ enum piglit_result piglit_display(void)
> memset(buffer, 0xffffffff, sizeof(buffer));
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(buffer), buffer,
> GL_STREAM_READ);
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf,
> - additional_offset,
> - sizeof(buffer) - additional_offset);
> - piglit_BeginTransformFeedback(GL_POINTS);
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf,
> + additional_offset,
> + sizeof(buffer) - additional_offset);
> + glBeginTransformFeedback(GL_POINTS);
> glDrawArrays(GL_POINTS, 0, 4);
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> pass = piglit_check_gl_error(0)&& pass;
>
> readback = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, GL_READ_ONLY);
> diff --git a/tests/spec/ext_transform_feedback/api-errors.c b/tests/spec/ext_transform_feedback/api-errors.c
> index 4e015bc..1dd8463 100644
> --- a/tests/spec/ext_transform_feedback/api-errors.c
> +++ b/tests/spec/ext_transform_feedback/api-errors.c
> @@ -159,13 +159,13 @@ do_bind(const struct test_desc *test, GLuint buf, int i)
> switch (test->bind_mode) {
> case BASE:
> printf("BindBufferBase(buffer %i)\n", i);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, i, buf);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, i, buf);
> break;
> case RANGE:
> printf("BindBufferRange(buffer %i, offset=%i, size=%i)\n", i,
> offset, size);
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, i, buf,
> - offset, size);
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, i, buf,
> + offset, size);
> break;
> case OFFSET:
> printf("BindBufferOffsetEXT(buffer %i, offset=%i)\n", i,
> @@ -210,8 +210,8 @@ do_test(const struct test_desc *test)
> num_varyings,
> test->buffer_mode == GL_INTERLEAVED_ATTRIBS
> ? "interleaved" : "separate");
> - piglit_TransformFeedbackVaryings(progs[0], num_varyings,
> - varyings, test->buffer_mode);
> + glTransformFeedbackVaryings(progs[0], num_varyings,
> + varyings, test->buffer_mode);
>
> if (test->mode == NOT_A_PROGRAM) {
> pass = piglit_check_gl_error(GL_INVALID_VALUE)&& pass;
> @@ -277,13 +277,13 @@ do_test(const struct test_desc *test)
>
> if (test->mode == END_INACTIVE) {
> printf("EndTransformFeedback\n");
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> pass = piglit_check_gl_error(GL_INVALID_OPERATION)&& pass;
> return pass;
> }
>
> printf("BeginTransformFeedback\n");
> - piglit_BeginTransformFeedback(GL_POINTS);
> + glBeginTransformFeedback(GL_POINTS);
> switch (test->mode) {
> case UNBOUND_BUFFER:
> case NO_VARYINGS:
> @@ -298,7 +298,7 @@ do_test(const struct test_desc *test)
> switch (test->mode) {
> case BEGIN_ACTIVE:
> printf("BeginTransformFeedback\n");
> - piglit_BeginTransformFeedback(GL_POINTS);
> + glBeginTransformFeedback(GL_POINTS);
> pass = piglit_check_gl_error(GL_INVALID_OPERATION)&& pass;
> break;
> case USEPROG_ACTIVE:
> diff --git a/tests/spec/ext_transform_feedback/buffer-usage.c b/tests/spec/ext_transform_feedback/buffer-usage.c
> index 0e9de31..585e9d2 100644
> --- a/tests/spec/ext_transform_feedback/buffer-usage.c
> +++ b/tests/spec/ext_transform_feedback/buffer-usage.c
> @@ -60,8 +60,7 @@ initialize_shader_and_xfb()
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext);
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> - piglit_TransformFeedbackVaryings(prog, 1,&varying,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, 1,&varying, GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -103,12 +102,12 @@ draw()
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf);
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER,
> sizeof(float), NULL, bo_modes[i]);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
>
> /* Do the draw call. Here's where we segfaulted before. */
> - piglit_BeginTransformFeedback(GL_POINTS);
> + glBeginTransformFeedback(GL_POINTS);
> glDrawArrays(GL_POINTS, 0, 1);
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
>
> /* Test the output, just to be sure. */
> readback = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER,
> diff --git a/tests/spec/ext_transform_feedback/builtin-varyings.c b/tests/spec/ext_transform_feedback/builtin-varyings.c
> index 5f79948..9bfb20f 100644
> --- a/tests/spec/ext_transform_feedback/builtin-varyings.c
> +++ b/tests/spec/ext_transform_feedback/builtin-varyings.c
> @@ -458,9 +458,9 @@ piglit_init(int argc, char **argv)
> piglit_AttachShader(prog, vs);
> piglit_BindAttribLocation(prog, 0, "vertex_pos");
> piglit_BindAttribLocation(prog, 1, "vertex_num");
> - piglit_TransformFeedbackVaryings(prog, test_to_run->num_varyings,
> - (const char **) test_to_run->varyings,
> - GL_INTERLEAVED_ATTRIBS_EXT);
> + glTransformFeedbackVaryings(prog, test_to_run->num_varyings,
> + (const char **) test_to_run->varyings,
> + GL_INTERLEAVED_ATTRIBS_EXT);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -473,8 +473,8 @@ piglit_init(int argc, char **argv)
> for (i = 0; i< test_to_run->num_varyings; ++i) {
> GLsizei size;
> GLenum type;
> - piglit_GetTransformFeedbackVarying(prog, i, 0, NULL,&size,
> - &type, NULL);
> + glGetTransformFeedbackVarying(prog, i, 0, NULL,&size,
> + &type, NULL);
> if (size != test_to_run->expected_size) {
> printf("For varying %i, expected size %i, got %i\n",
> i, test_to_run->expected_size, size);
> @@ -533,8 +533,8 @@ piglit_display(void)
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf);
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(initial_xfb_data),
> initial_xfb_data, GL_STREAM_READ);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> + glBeginTransformFeedback(GL_TRIANGLES);
> glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, query);
>
> /* Draw */
> @@ -552,7 +552,7 @@ piglit_display(void)
> }
>
> /* Check transform feedback output */
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> readback = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, GL_READ_ONLY);
> for (i = 0; i< ARRAY_SIZE(initial_xfb_data); ++i) {
> float expected =
> diff --git a/tests/spec/ext_transform_feedback/generatemipmap.c b/tests/spec/ext_transform_feedback/generatemipmap.c
> index 3fa3556..afd8865 100644
> --- a/tests/spec/ext_transform_feedback/generatemipmap.c
> +++ b/tests/spec/ext_transform_feedback/generatemipmap.c
> @@ -119,10 +119,9 @@ create_texture(void)
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf);
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(buffer),
> buffer, GL_STREAM_READ);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0,
> - xfb_buf);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> piglit_UseProgram(xfb_prog);
> - piglit_BeginTransformFeedback(GL_POINTS);
> + glBeginTransformFeedback(GL_POINTS);
> }
> if (prims_written) {
> glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN,
> @@ -147,7 +146,7 @@ create_texture(void)
> glDisable(GL_RASTERIZER_DISCARD);
> }
> if (buffer || prims_written) {
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> piglit_UseProgram(0);
> }
> if (buffer) {
> @@ -284,8 +283,8 @@ void piglit_init(int argc, char **argv)
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext);
> xfb_prog = piglit_CreateProgram();
> piglit_AttachShader(xfb_prog, vs);
> - piglit_TransformFeedbackVaryings(xfb_prog, 1, xfb_varyings,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(xfb_prog, 1, xfb_varyings,
> + GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(xfb_prog);
> if (!piglit_link_check_status(xfb_prog)) {
> piglit_report_result(PIGLIT_FAIL);
> diff --git a/tests/spec/ext_transform_feedback/get-buffer-state.c b/tests/spec/ext_transform_feedback/get-buffer-state.c
> index 1f70b5e..b71e412 100644
> --- a/tests/spec/ext_transform_feedback/get-buffer-state.c
> +++ b/tests/spec/ext_transform_feedback/get-buffer-state.c
> @@ -82,7 +82,7 @@ check_indexed(const struct test_desc *test, GLenum param,
> GLint get_result;
>
> if (test->mode == INDEXED&& test->param == param) {
> - piglit_GetIntegeri_v(param, index,&get_result);
> + glGetIntegeri_v(param, index,&get_result);
> if (get_result != expected) {
> printf("%s[%u] == %i, expected %i\n", param_string,
> index, get_result, expected);
> @@ -142,8 +142,8 @@ do_test(const struct test_desc *test)
> int size = 4 * ((i % 3) + 1);
> printf("BindBufferRange(TRANSFORM_FEEDBACK_BUFFER, %i, %u, %i, %i)\n",
> i, bufs[i], offset, size);
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, i,
> - bufs[i], offset, size);
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, i,
> + bufs[i], offset, size);
> CHECK_INTEGER(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, bufs[i]);
> }
>
> diff --git a/tests/spec/ext_transform_feedback/immediate-reuse.c b/tests/spec/ext_transform_feedback/immediate-reuse.c
> index daad7c4..699ef94 100644
> --- a/tests/spec/ext_transform_feedback/immediate-reuse.c
> +++ b/tests/spec/ext_transform_feedback/immediate-reuse.c
> @@ -86,7 +86,7 @@ piglit_init(int argc, char **argv)
> piglit_AttachShader(prog, fs);
> piglit_BindAttribLocation(prog, 0, "in_position");
> piglit_BindAttribLocation(prog, 1, "in_color");
> - piglit_TransformFeedbackVaryings(prog, 2, varyings, GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, 2, varyings, GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -141,16 +141,16 @@ piglit_display(void)
> */
> for (i = 0; i< 16; ++i) {
> glBindBuffer(GL_ARRAY_BUFFER, bufs[i % 2]);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0,
> - bufs[(i + 1) % 2]);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0,
> + bufs[(i + 1) % 2]);
> glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE,
> 8 * sizeof(float), (void *) 0);
> glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE,
> 8 * sizeof(float),
> (void *) (4 * sizeof(float)));
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBeginTransformFeedback(GL_TRIANGLES);
> glDrawArrays(GL_TRIANGLES, 0, 6);
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> }
>
> /* Check that the proper gradient was drawn */
> diff --git a/tests/spec/ext_transform_feedback/interleaved.c b/tests/spec/ext_transform_feedback/interleaved.c
> index 1bf6eea..836da16 100644
> --- a/tests/spec/ext_transform_feedback/interleaved.c
> +++ b/tests/spec/ext_transform_feedback/interleaved.c
> @@ -79,8 +79,8 @@ void piglit_init(int argc, char **argv)
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext);
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> - piglit_TransformFeedbackVaryings(prog, sizeof(varyings)/sizeof(varyings[0]),
> - varyings, GL_INTERLEAVED_ATTRIBS_EXT);
> + glTransformFeedbackVaryings(prog, sizeof(varyings)/sizeof(varyings[0]),
> + varyings, GL_INTERLEAVED_ATTRIBS_EXT);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -97,7 +97,7 @@ void piglit_init(int argc, char **argv)
> ptr[i] = 0.123456;
> }
> glUnmapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, buf);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, buf);
>
> assert(glGetError() == 0);
>
> @@ -163,10 +163,10 @@ enum piglit_result piglit_display(void)
> glLoadIdentity();
> piglit_UseProgram(prog);
> glEnable(GL_RASTERIZER_DISCARD);
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBeginTransformFeedback(GL_TRIANGLES);
> glVertexPointer(2, GL_FLOAT, 0, verts);
> glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, indices);
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> glDisable(GL_RASTERIZER_DISCARD);
>
> assert(glGetError() == 0);
> diff --git a/tests/spec/ext_transform_feedback/intervening-read.c b/tests/spec/ext_transform_feedback/intervening-read.c
> index 05e5335..bec0538 100644
> --- a/tests/spec/ext_transform_feedback/intervening-read.c
> +++ b/tests/spec/ext_transform_feedback/intervening-read.c
> @@ -124,7 +124,7 @@ piglit_init(int argc, char **argv)
> piglit_AttachShader(prog, fs);
> piglit_BindAttribLocation(prog, 0, "in_position");
> piglit_BindAttribLocation(prog, 1, "in_color");
> - piglit_TransformFeedbackVaryings(prog, 2, varyings, GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, 2, varyings, GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -194,9 +194,9 @@ piglit_display(void)
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf);
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(initial_xfb_data),
> initial_xfb_data, GL_STREAM_READ);
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf, 0,
> - sizeof(float[9][8]));
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf, 0,
> + sizeof(float[9][8]));
> + glBeginTransformFeedback(GL_TRIANGLES);
> switch (test_mode) {
> case TEST_MODE_PRIMS_GENERATED:
> glBeginQuery(GL_PRIMITIVES_GENERATED, query);
> @@ -219,7 +219,7 @@ piglit_display(void)
> glDrawArrays(GL_TRIANGLES, 6, 6);
>
> /* Finish transform feedback and test correct behavior. */
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> switch (test_mode) {
> case TEST_MODE_OUTPUT:
> readback = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER,
> diff --git a/tests/spec/ext_transform_feedback/max-varyings.c b/tests/spec/ext_transform_feedback/max-varyings.c
> index 78c46a3..04c7cae 100644
> --- a/tests/spec/ext_transform_feedback/max-varyings.c
> +++ b/tests/spec/ext_transform_feedback/max-varyings.c
> @@ -183,9 +183,9 @@ draw(GLuint vs, GLuint fs, int num_xfb_varyings, int max_varyings)
> glAttachShader(prog, vs);
> glAttachShader(prog, fs);
>
> - piglit_TransformFeedbackVaryings(prog, num_xfb_varyings,
> - xfb_varying_array + offset,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, num_xfb_varyings,
> + xfb_varying_array + offset,
> + GL_INTERLEAVED_ATTRIBS);
>
> glLinkProgram(prog);
> if (!piglit_link_check_status(prog))
> @@ -198,16 +198,15 @@ draw(GLuint vs, GLuint fs, int num_xfb_varyings, int max_varyings)
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER,
> sizeof(initial_buffer), initial_buffer,
> GL_STREAM_READ);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0,
> - xfb_buf);
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> + glBeginTransformFeedback(GL_TRIANGLES);
>
> piglit_draw_rect(coord_from_index(offset),
> coord_from_index(num_xfb_varyings - 1),
> 10,
> 10);
>
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> pass = check_xfb_output(max_varyings, num_xfb_varyings, offset)
> && pass;
>
> diff --git a/tests/spec/ext_transform_feedback/negative-prims.c b/tests/spec/ext_transform_feedback/negative-prims.c
> index 13366bc..0bb5833 100644
> --- a/tests/spec/ext_transform_feedback/negative-prims.c
> +++ b/tests/spec/ext_transform_feedback/negative-prims.c
> @@ -167,8 +167,7 @@ piglit_init(int argc, char **argv)
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> piglit_AttachShader(prog, fs);
> - piglit_TransformFeedbackVaryings(prog, 1,&varying,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, 1,&varying, GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!fs || !vs || !prog)
> piglit_report_result(PIGLIT_FAIL);
> @@ -176,5 +175,5 @@ piglit_init(int argc, char **argv)
> piglit_report_result(PIGLIT_FAIL);
>
> glUseProgram(prog);
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb, 0, 4096);
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb, 0, 4096);
> }
> diff --git a/tests/spec/ext_transform_feedback/order.c b/tests/spec/ext_transform_feedback/order.c
> index 6ddea4f..45c3922 100644
> --- a/tests/spec/ext_transform_feedback/order.c
> +++ b/tests/spec/ext_transform_feedback/order.c
> @@ -141,8 +141,7 @@ initialize_shader_and_xfb()
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext);
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> - piglit_TransformFeedbackVaryings(prog, 3, varyings,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, 3, varyings, GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -152,7 +151,7 @@ initialize_shader_and_xfb()
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf);
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER,
> 3*NUM_POINTS*sizeof(unsigned), NULL, GL_STREAM_READ);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> piglit_UseProgram(prog);
> if (!piglit_check_gl_error(0))
> piglit_report_result(PIGLIT_FAIL);
> @@ -222,7 +221,7 @@ static void
> draw()
> {
> glEnable(GL_RASTERIZER_DISCARD);
> - piglit_BeginTransformFeedback(draw_mode);
> + glBeginTransformFeedback(draw_mode);
> glBindBuffer(GL_ARRAY_BUFFER, 0);
> if (use_draw_elements) {
> glDrawElements(draw_mode, NUM_POINTS, GL_UNSIGNED_INT,
> @@ -230,7 +229,7 @@ draw()
> } else {
> glDrawArrays(draw_mode, 0, NUM_POINTS);
> }
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> if (!piglit_check_gl_error(0))
> piglit_report_result(PIGLIT_FAIL);
> }
> diff --git a/tests/spec/ext_transform_feedback/output-type.c b/tests/spec/ext_transform_feedback/output-type.c
> index 8b82a1f..27dac8e 100644
> --- a/tests/spec/ext_transform_feedback/output-type.c
> +++ b/tests/spec/ext_transform_feedback/output-type.c
> @@ -1265,9 +1265,9 @@ test_ready:
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, test->vs);
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> - piglit_TransformFeedbackVaryings(prog, test->num_varyings,
> - test->varyings,
> - GL_INTERLEAVED_ATTRIBS_EXT);
> + glTransformFeedbackVaryings(prog, test->num_varyings,
> + test->varyings,
> + GL_INTERLEAVED_ATTRIBS_EXT);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -1288,7 +1288,7 @@ test_ready:
>
> assert(glGetError() == 0);
>
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, buf);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, buf);
>
> assert(glGetError() == 0);
>
> @@ -1316,11 +1316,11 @@ enum piglit_result piglit_display(void)
> /* Render into TFBO. */
> glLoadIdentity();
> piglit_UseProgram(prog);
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBeginTransformFeedback(GL_TRIANGLES);
> glBindBuffer(GL_ARRAY_BUFFER, 0);
> glVertexPointer(2, GL_FLOAT, 0, verts);
> glDrawArrays(GL_TRIANGLES, 0, NUM_VERTICES);
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
>
> assert(glGetError() == 0);
>
> diff --git a/tests/spec/ext_transform_feedback/overflow-edge-cases.c b/tests/spec/ext_transform_feedback/overflow-edge-cases.c
> index 233abf9..c6d0194 100644
> --- a/tests/spec/ext_transform_feedback/overflow-edge-cases.c
> +++ b/tests/spec/ext_transform_feedback/overflow-edge-cases.c
> @@ -84,8 +84,8 @@ piglit_init(int argc, char **argv)
> GLuint prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> piglit_BindAttribLocation(prog, 0, "vertex_num");
> - piglit_TransformFeedbackVaryings(prog, num_varyings, varyings,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, num_varyings, varyings,
> + GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -138,20 +138,20 @@ test(int bind_size, int num_varyings, int num_primitives, int mode_index)
> glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf);
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(initial_xfb_buf),
> initial_xfb_buf, GL_STREAM_READ);
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf, 0,
> - sizeof(float) * bind_size);
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf, 0,
> + sizeof(float) * bind_size);
>
> /* Start queries and XFB */
> glBeginQuery(GL_PRIMITIVES_GENERATED, query_prims_generated);
> glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN,
> query_prims_written);
> - piglit_BeginTransformFeedback(modes[mode_index]);
> + glBeginTransformFeedback(modes[mode_index]);
>
> /* Draw */
> glDrawArrays(modes[mode_index], 0, num_primitives * vertices_per_prim);
>
> /* Stop XFB and check queries */
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> glEndQuery(GL_PRIMITIVES_GENERATED);
> glGetQueryObjectuiv(query_prims_generated, GL_QUERY_RESULT,
> &query_result);
> diff --git a/tests/spec/ext_transform_feedback/position.c b/tests/spec/ext_transform_feedback/position.c
> index 5f368bf..3a52058 100644
> --- a/tests/spec/ext_transform_feedback/position.c
> +++ b/tests/spec/ext_transform_feedback/position.c
> @@ -111,7 +111,7 @@ void piglit_init(int argc, char **argv)
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext);
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> - piglit_TransformFeedbackVaryings(prog, 1, varyings, GL_INTERLEAVED_ATTRIBS_EXT);
> + glTransformFeedbackVaryings(prog, 1, varyings, GL_INTERLEAVED_ATTRIBS_EXT);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -121,7 +121,7 @@ void piglit_init(int argc, char **argv)
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vspassthrough);
> prog_passthrough = piglit_CreateProgram();
> piglit_AttachShader(prog_passthrough, vs);
> - piglit_TransformFeedbackVaryings(prog_passthrough, 1, varyings, GL_INTERLEAVED_ATTRIBS_EXT);
> + glTransformFeedbackVaryings(prog_passthrough, 1, varyings, GL_INTERLEAVED_ATTRIBS_EXT);
> piglit_LinkProgram(prog_passthrough);
> if (!piglit_link_check_status(prog_passthrough)) {
> piglit_DeleteProgram(prog_passthrough);
> @@ -138,15 +138,15 @@ void piglit_init(int argc, char **argv)
>
> if (range) {
> puts("Testing BindBufferRange.");
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER_EXT,
> - 0, buf, offset*sizeof(float), range*sizeof(float));
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER_EXT,
> + 0, buf, offset*sizeof(float), range*sizeof(float));
> } else if (offset) {
> puts("Testing BindBufferOffset.");
> glBindBufferOffsetEXT(GL_TRANSFORM_FEEDBACK_BUFFER_EXT,
> 0, buf, offset*sizeof(float));
> } else {
> puts("Testing BindBufferBase.");
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, buf);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, buf);
> }
>
> if (!range) {
> @@ -207,11 +207,11 @@ enum piglit_result piglit_display(void)
> piglit_UseProgram(prog);
> if (discard)
> glEnable(GL_RASTERIZER_DISCARD_EXT);
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBeginTransformFeedback(GL_TRIANGLES);
> glBindBuffer(GL_ARRAY_BUFFER, 0);
> glVertexPointer(2, GL_FLOAT, 0, verts);
> glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, indices);
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> if (discard)
> glDisable(GL_RASTERIZER_DISCARD_EXT);
>
> diff --git a/tests/spec/ext_transform_feedback/separate.c b/tests/spec/ext_transform_feedback/separate.c
> index 868fbe6..6451e81 100644
> --- a/tests/spec/ext_transform_feedback/separate.c
> +++ b/tests/spec/ext_transform_feedback/separate.c
> @@ -84,8 +84,8 @@ void piglit_init(int argc, char **argv)
> vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext);
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> - piglit_TransformFeedbackVaryings(prog, sizeof(varyings)/sizeof(varyings[0]),
> - varyings, GL_SEPARATE_ATTRIBS_EXT);
> + glTransformFeedbackVaryings(prog, sizeof(varyings)/sizeof(varyings[0]),
> + varyings, GL_SEPARATE_ATTRIBS_EXT);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog)) {
> piglit_DeleteProgram(prog);
> @@ -105,7 +105,7 @@ void piglit_init(int argc, char **argv)
> ptr[j] = 0.123456;
> }
> glUnmapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER_EXT);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, i, buf[i]);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, i, buf[i]);
> }
>
> assert(glGetError() == 0);
> @@ -155,10 +155,10 @@ enum piglit_result piglit_display(void)
> glLoadIdentity();
> piglit_UseProgram(prog);
> glEnable(GL_RASTERIZER_DISCARD);
> - piglit_BeginTransformFeedback(GL_TRIANGLES);
> + glBeginTransformFeedback(GL_TRIANGLES);
> glVertexPointer(2, GL_FLOAT, 0, verts);
> glDrawArrays(GL_QUADS, 0, 4);
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> glDisable(GL_RASTERIZER_DISCARD);
>
> assert(glGetError() == 0);
> diff --git a/tests/spec/ext_transform_feedback/tessellation.c b/tests/spec/ext_transform_feedback/tessellation.c
> index 9b52a2f..37b5fce 100644
> --- a/tests/spec/ext_transform_feedback/tessellation.c
> +++ b/tests/spec/ext_transform_feedback/tessellation.c
> @@ -310,8 +310,8 @@ initialize_shader_and_xfb()
> xfb_prog = piglit_CreateProgram();
> piglit_AttachShader(xfb_prog, vs);
> piglit_AttachShader(xfb_prog, fs);
> - piglit_TransformFeedbackVaryings(xfb_prog, 3, varyings,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(xfb_prog, 3, varyings,
> + GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(xfb_prog);
> if (!piglit_link_check_status(xfb_prog)) {
> piglit_report_result(PIGLIT_FAIL);
> @@ -432,16 +432,15 @@ draw(GLuint prog, bool use_xfb, float y_offset, GLenum mode,
> memset(buffer, 0, sizeof(buffer));
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(buffer),
> buffer, GL_STREAM_READ);
> - piglit_BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0,
> - xfb_buf);
> - piglit_BeginTransformFeedback(xfb_mode);
> + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf);
> + glBeginTransformFeedback(xfb_mode);
> glBeginQuery(GL_PRIMITIVES_GENERATED, xfb_generated_query);
> glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN,
> xfb_written_query);
> }
> glDrawArrays(mode, 0, num_vertices);
> if (use_xfb) {
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
> glEndQuery(GL_PRIMITIVES_GENERATED);
> glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);
> }
> diff --git a/tests/spec/glsl-1.40/tf-no-position.c b/tests/spec/glsl-1.40/tf-no-position.c
> index 16927f8..f86706e 100644
> --- a/tests/spec/glsl-1.40/tf-no-position.c
> +++ b/tests/spec/glsl-1.40/tf-no-position.c
> @@ -75,8 +75,7 @@ void piglit_init(int argc, char **argv)
>
> prog = piglit_CreateProgram();
> piglit_AttachShader(prog, vs);
> - piglit_TransformFeedbackVaryings(prog, 1,&varying,
> - GL_INTERLEAVED_ATTRIBS);
> + glTransformFeedbackVaryings(prog, 1,&varying, GL_INTERLEAVED_ATTRIBS);
> piglit_LinkProgram(prog);
> if (!piglit_link_check_status(prog))
> piglit_report_result(PIGLIT_FAIL);
> @@ -98,12 +97,12 @@ void piglit_init(int argc, char **argv)
> memset(buffer, 0xd0, sizeof(buffer));
> glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sizeof(buffer), buffer,
> GL_STREAM_READ);
> - piglit_BindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf,
> - 0,
> - sizeof(buffer));
> - piglit_BeginTransformFeedback(GL_POINTS);
> + glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb_buf,
> + 0,
> + sizeof(buffer));
> + glBeginTransformFeedback(GL_POINTS);
> glDrawArrays(GL_POINTS, 0, ARRAY_SIZE(verts));
> - piglit_EndTransformFeedback();
> + glEndTransformFeedback();
>
> readback = glMapBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, GL_READ_ONLY);
>
More information about the Piglit
mailing list