summaryrefslogtreecommitdiff
path: root/tests/fbo
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2013-11-24 19:58:23 +0100
committerMarek Olšák <marek.olsak@amd.com>2013-12-02 22:27:58 +0100
commitdcda816dec3601ba6cf635f65c335d6bd3fa3f66 (patch)
tree085ab87b641f6c16c1d64ee7f32dac77c5aab861 /tests/fbo
parent273da108430e5def075310e165fafdfa11f52175 (diff)
Always bind piglit_winsys_fbo instead of 0
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
Diffstat (limited to 'tests/fbo')
-rw-r--r--tests/fbo/fbo-1d.c2
-rw-r--r--tests/fbo/fbo-3d.c2
-rw-r--r--tests/fbo/fbo-alpha.c2
-rw-r--r--tests/fbo/fbo-alphatest-nocolor-ff.c2
-rw-r--r--tests/fbo/fbo-alphatest-nocolor.c2
-rw-r--r--tests/fbo/fbo-array.c2
-rw-r--r--tests/fbo/fbo-blit-d24s8.c14
-rw-r--r--tests/fbo/fbo-blit-stretch.cpp2
-rw-r--r--tests/fbo/fbo-blit.c14
-rw-r--r--tests/fbo/fbo-clearmipmap.c2
-rw-r--r--tests/fbo/fbo-copypix.c12
-rw-r--r--tests/fbo/fbo-copyteximage-simple.c2
-rw-r--r--tests/fbo/fbo-copyteximage.c2
-rw-r--r--tests/fbo/fbo-cubemap.c2
-rw-r--r--tests/fbo/fbo-depth-array.c2
-rw-r--r--tests/fbo/fbo-depth-sample-compare.c10
-rw-r--r--tests/fbo/fbo-depthstencil.c2
-rw-r--r--tests/fbo/fbo-depthtex.c4
-rw-r--r--tests/fbo/fbo-deriv.c6
-rw-r--r--tests/fbo/fbo-drawbuffers-arbfp.c2
-rw-r--r--tests/fbo/fbo-drawbuffers-blend-add.c2
-rw-r--r--tests/fbo/fbo-drawbuffers-fragcolor.c2
-rw-r--r--tests/fbo/fbo-drawbuffers-maxtargets.c2
-rw-r--r--tests/fbo/fbo-drawbuffers.c2
-rw-r--r--tests/fbo/fbo-drawbuffers2-blend.c2
-rw-r--r--tests/fbo/fbo-drawbuffers2-colormask.c2
-rw-r--r--tests/fbo/fbo-flushing-2.c2
-rw-r--r--tests/fbo/fbo-flushing.c4
-rw-r--r--tests/fbo/fbo-fragcoord.c2
-rw-r--r--tests/fbo/fbo-fragcoord2.c2
-rw-r--r--tests/fbo/fbo-generatemipmap-array.c4
-rw-r--r--tests/fbo/fbo-generatemipmap-filtering.c2
-rw-r--r--tests/fbo/fbo-generatemipmap-nonsquare.c2
-rw-r--r--tests/fbo/fbo-generatemipmap-npot.c2
-rw-r--r--tests/fbo/fbo-generatemipmap-scissor.c2
-rw-r--r--tests/fbo/fbo-generatemipmap-viewport.c4
-rw-r--r--tests/fbo/fbo-generatemipmap.c2
-rw-r--r--tests/fbo/fbo-gl_pointcoord.c2
-rw-r--r--tests/fbo/fbo-incomplete-invalid-texture.c4
-rw-r--r--tests/fbo/fbo-incomplete.cpp4
-rw-r--r--tests/fbo/fbo-luminance-alpha.c2
-rw-r--r--tests/fbo/fbo-maxsize.c2
-rw-r--r--tests/fbo/fbo-mrt-alphatest.c2
-rw-r--r--tests/fbo/fbo-nodepth-test.c2
-rw-r--r--tests/fbo/fbo-nostencil-test.c2
-rw-r--r--tests/fbo/fbo-pbo-readpixels-small.c2
-rw-r--r--tests/fbo/fbo-readdrawpix.c12
-rw-r--r--tests/fbo/fbo-readpixels.c2
-rw-r--r--tests/fbo/fbo-scissor-bitmap.c2
-rw-r--r--tests/fbo/fbo-scissor-blit.c2
-rw-r--r--tests/fbo/fbo-srgb-blit.c2
-rw-r--r--tests/fbo/fbo-srgb.c6
-rw-r--r--tests/fbo/fbo-viewport.c4
53 files changed, 90 insertions, 90 deletions
diff --git a/tests/fbo/fbo-1d.c b/tests/fbo/fbo-1d.c
index 62aa41863..0b3c84f70 100644
--- a/tests/fbo/fbo-1d.c
+++ b/tests/fbo/fbo-1d.c
@@ -98,7 +98,7 @@ draw_fbo_1d(int x, int y)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_1D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-3d.c b/tests/fbo/fbo-3d.c
index ef032d942..4cd117ba6 100644
--- a/tests/fbo/fbo-3d.c
+++ b/tests/fbo/fbo-3d.c
@@ -124,7 +124,7 @@ draw_depth(int x, int y, int depth)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_3D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-alpha.c b/tests/fbo/fbo-alpha.c
index d314bd512..1ac65d070 100644
--- a/tests/fbo/fbo-alpha.c
+++ b/tests/fbo/fbo-alpha.c
@@ -116,7 +116,7 @@ piglit_display(void)
pass = piglit_probe_pixel_rgba(fbo_width * 7 / 8, 0, fbo_gray) && pass;
/* Draw the two textures to halves of the window. */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
glEnable(GL_TEXTURE_2D);
diff --git a/tests/fbo/fbo-alphatest-nocolor-ff.c b/tests/fbo/fbo-alphatest-nocolor-ff.c
index 384b69387..0d137d761 100644
--- a/tests/fbo/fbo-alphatest-nocolor-ff.c
+++ b/tests/fbo/fbo-alphatest-nocolor-ff.c
@@ -114,7 +114,7 @@ enum piglit_result piglit_display(void)
glBindTexture(GL_TEXTURE_2D, tex);
glViewport(0, 0, piglit_width, piglit_height);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-alphatest-nocolor.c b/tests/fbo/fbo-alphatest-nocolor.c
index f0fe9436c..86c7f4ddf 100644
--- a/tests/fbo/fbo-alphatest-nocolor.c
+++ b/tests/fbo/fbo-alphatest-nocolor.c
@@ -131,7 +131,7 @@ enum piglit_result piglit_display(void)
glBindTexture(GL_TEXTURE_2D, tex);
glViewport(0, 0, piglit_width, piglit_height);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-array.c b/tests/fbo/fbo-array.c
index 0079217e4..a424c302b 100644
--- a/tests/fbo/fbo-array.c
+++ b/tests/fbo/fbo-array.c
@@ -151,7 +151,7 @@ draw_layer(int x, int y, int depth)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
diff --git a/tests/fbo/fbo-blit-d24s8.c b/tests/fbo/fbo-blit-d24s8.c
index 946528a0c..37e847011 100644
--- a/tests/fbo/fbo-blit-d24s8.c
+++ b/tests/fbo/fbo-blit-d24s8.c
@@ -179,7 +179,7 @@ run_test(void)
fbo = make_fbo(fbo_width, fbo_height);
/* query depth/stencil sizes */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glGetIntegerv(GL_DEPTH_BITS, &win_depth_bits);
glGetIntegerv(GL_STENCIL_BITS, &win_stencil_bits);
@@ -196,7 +196,7 @@ run_test(void)
}
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, fbo_width, fbo_height);
piglit_ortho_projection(fbo_width, fbo_height, GL_FALSE);
glClearDepth(0.54321);
@@ -211,7 +211,7 @@ run_test(void)
* Also blit with stencil to exercise this path.
* Not that we need it for this test.
*/
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE,
@@ -222,19 +222,19 @@ run_test(void)
/* WIN(bottom) -> FBO(middle) */
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE,
GL_DEPTH_BUFFER_BIT);
/* FBO(middle) -> WIN(top) back to verify WIN -> FBO */
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y1, x0 + SIZE, y1 + SIZE,
x0, y2, x0 + SIZE, y2 + SIZE,
GL_DEPTH_BUFFER_BIT);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
assert(glGetError() == 0);
printf("Verify 1\n");
@@ -248,7 +248,7 @@ run_test(void)
pass = verify_depth_rect(PAD, y0, SIZE, SIZE) && pass;
printf("Verify 5 (FBO)\n");
pass = verify_depth_rect(PAD, y1, SIZE, SIZE) && pass;
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
assert(glGetError() == 0);
piglit_present_results();
diff --git a/tests/fbo/fbo-blit-stretch.cpp b/tests/fbo/fbo-blit-stretch.cpp
index b809a5bd4..319899ccd 100644
--- a/tests/fbo/fbo-blit-stretch.cpp
+++ b/tests/fbo/fbo-blit-stretch.cpp
@@ -363,7 +363,7 @@ run_test(const TestCase &test)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
blit(test);
diff --git a/tests/fbo/fbo-blit.c b/tests/fbo/fbo-blit.c
index efa06613a..8c6dad879 100644
--- a/tests/fbo/fbo-blit.c
+++ b/tests/fbo/fbo-blit.c
@@ -163,7 +163,7 @@ run_test(void)
fbo = make_fbo(fbo_width, fbo_height);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, fbo_width, fbo_height);
piglit_ortho_projection(fbo_width, fbo_height, GL_FALSE);
glClearColor(1.0, 0.0, 1.0, 0.0);
@@ -175,25 +175,25 @@ run_test(void)
/* Now that we have correct samples, blit things around.
* FBO(bottom) -> WIN(middle)
*/
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE);
/* WIN(bottom) -> FBO(middle) */
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE);
/* FBO(middle) -> WIN(top) back to verify WIN -> FBO */
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y1, x0 + SIZE, y1 + SIZE,
x0, y2, x0 + SIZE, y2 + SIZE);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
pass = verify_color_rect(PAD, y0, SIZE, SIZE) && pass;
pass = verify_color_rect(PAD, y1, SIZE, SIZE) && pass;
@@ -201,7 +201,7 @@ run_test(void)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
pass = verify_color_rect(PAD, y0, SIZE, SIZE) && pass;
pass = verify_color_rect(PAD, y1, SIZE, SIZE) && pass;
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
piglit_present_results();
diff --git a/tests/fbo/fbo-clearmipmap.c b/tests/fbo/fbo-clearmipmap.c
index 80031d72f..086a4546e 100644
--- a/tests/fbo/fbo-clearmipmap.c
+++ b/tests/fbo/fbo-clearmipmap.c
@@ -118,7 +118,7 @@ draw_mipmap(int x, int y, int dim)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-copypix.c b/tests/fbo/fbo-copypix.c
index 9b83890cc..e6e841d2c 100644
--- a/tests/fbo/fbo-copypix.c
+++ b/tests/fbo/fbo-copypix.c
@@ -162,7 +162,7 @@ run_test(void)
fbo = make_fbo(fbo_width, fbo_height);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, fbo_width, fbo_height);
piglit_ortho_projection(fbo_width, fbo_height, GL_FALSE);
glClearColor(1.0, 0.0, 1.0, 0.0);
@@ -174,25 +174,25 @@ run_test(void)
/* Now that we have correct samples, blit things around.
* FBO(bottom) -> WIN(middle)
*/
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE);
/* WIN(bottom) -> FBO(middle) */
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE);
/* FBO(middle) -> WIN(top) back to verify WIN -> FBO */
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y1, x0 + SIZE, y1 + SIZE,
x0, y2, x0 + SIZE, y2 + SIZE);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
pass = verify_color_rect(PAD, y0, SIZE, SIZE) && pass;
pass = verify_color_rect(PAD, y1, SIZE, SIZE) && pass;
diff --git a/tests/fbo/fbo-copyteximage-simple.c b/tests/fbo/fbo-copyteximage-simple.c
index 8be54acc3..90dab4017 100644
--- a/tests/fbo/fbo-copyteximage-simple.c
+++ b/tests/fbo/fbo-copyteximage-simple.c
@@ -123,7 +123,7 @@ piglit_display(void)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-copyteximage.c b/tests/fbo/fbo-copyteximage.c
index e748c2b61..abd80571c 100644
--- a/tests/fbo/fbo-copyteximage.c
+++ b/tests/fbo/fbo-copyteximage.c
@@ -125,7 +125,7 @@ piglit_display(void)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-cubemap.c b/tests/fbo/fbo-cubemap.c
index 157b6fb45..3bb754969 100644
--- a/tests/fbo/fbo-cubemap.c
+++ b/tests/fbo/fbo-cubemap.c
@@ -131,7 +131,7 @@ draw_face(int x, int y, int dim, int face)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_CUBE_MAP);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-depth-array.c b/tests/fbo/fbo-depth-array.c
index 492ae5618..f89e6e51f 100644
--- a/tests/fbo/fbo-depth-array.c
+++ b/tests/fbo/fbo-depth-array.c
@@ -174,7 +174,7 @@ draw_layer(int x, int y, int depth)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
diff --git a/tests/fbo/fbo-depth-sample-compare.c b/tests/fbo/fbo-depth-sample-compare.c
index 1e925bb7b..b9ec27f6a 100644
--- a/tests/fbo/fbo-depth-sample-compare.c
+++ b/tests/fbo/fbo-depth-sample-compare.c
@@ -259,7 +259,7 @@ render_to_fbo(void)
glDisable(GL_DEPTH_TEST);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
}
@@ -298,7 +298,7 @@ show_depth_fbo(void)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, FBO);
zf = read_float_z_image(0, 0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glWindowPos2i(SIZE, 0);
glDrawPixels(SIZE, SIZE, GL_LUMINANCE, GL_FLOAT, zf);
@@ -317,7 +317,7 @@ show_depth_fbo(void)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, FBO);
zi = read_uint_z_image(0, 0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
find_uint_min_max_center(zi, SIZE * SIZE, &min, &max, &center);
printf("depth fbo min 0x%x max 0x%x center 0x%x\n", min, max, center);
@@ -343,7 +343,7 @@ draw_quad_with_depth_texture(void)
t1 = SIZE;
}
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
@@ -382,7 +382,7 @@ draw_quad_with_depth_texture(void)
static void
draw_sphere_with_fragment_shader_compare(void)
{
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0 * SIZE, 0, SIZE, SIZE);
diff --git a/tests/fbo/fbo-depthstencil.c b/tests/fbo/fbo-depthstencil.c
index e4a8e0095..ae91186e6 100644
--- a/tests/fbo/fbo-depthstencil.c
+++ b/tests/fbo/fbo-depthstencil.c
@@ -123,7 +123,7 @@ static enum piglit_result test_clear(void)
/* Display the colorbuffer. */
if (!piglit_automatic && f.iformat) {
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBlitFramebufferEXT(0, 0, BUF_SIZE, BUF_SIZE, 0, 0, BUF_SIZE, BUF_SIZE,
GL_COLOR_BUFFER_BIT, GL_NEAREST);
}
diff --git a/tests/fbo/fbo-depthtex.c b/tests/fbo/fbo-depthtex.c
index 15960553f..69aa4b3aa 100644
--- a/tests/fbo/fbo-depthtex.c
+++ b/tests/fbo/fbo-depthtex.c
@@ -113,7 +113,7 @@ enum piglit_result piglit_display(void)
/* Draw with the texture to make sure a sampler view is created for
* it before it's used as depth buffer by the FBO. */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindTexture(GL_TEXTURE_2D, db_tex);
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, frag);
glEnable(GL_FRAGMENT_PROGRAM_ARB);
@@ -140,7 +140,7 @@ enum piglit_result piglit_display(void)
glEnd();
/* Draw the depth texture as greyscale to the backbuffer. */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_FRAGMENT_PROGRAM_ARB);
glEnable(GL_TEXTURE_2D);
piglit_draw_rect_tex(-1.0f, -1.0f, 2.0f, 2.0f,
diff --git a/tests/fbo/fbo-deriv.c b/tests/fbo/fbo-deriv.c
index 7b923a7dc..3a5d23914 100644
--- a/tests/fbo/fbo-deriv.c
+++ b/tests/fbo/fbo-deriv.c
@@ -129,7 +129,7 @@ piglit_display(void)
glUseProgram(prog);
/* Draw a square to the left half of the window */
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
piglit_draw_rect(-1, -1, 1, 2);
@@ -140,13 +140,13 @@ piglit_display(void)
/* Blit the square from the FBO to the right half of the window */
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
glBlitFramebuffer(0, 0, fbo_width, fbo_height,
piglit_width/2, 0, piglit_width, piglit_height,
GL_COLOR_BUFFER_BIT, GL_NEAREST);
/* Check that both squares have the correct color */
- glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, piglit_winsys_fbo);
pass = piglit_probe_rect_rgb(0, 0, piglit_width, piglit_height,
expected) && pass;
diff --git a/tests/fbo/fbo-drawbuffers-arbfp.c b/tests/fbo/fbo-drawbuffers-arbfp.c
index fc5516038..12bb895ea 100644
--- a/tests/fbo/fbo-drawbuffers-arbfp.c
+++ b/tests/fbo/fbo-drawbuffers-arbfp.c
@@ -114,7 +114,7 @@ piglit_display(void)
piglit_draw_rect(0, 0, piglit_width, piglit_height);
glDisable(GL_FRAGMENT_PROGRAM_ARB);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
/* Draw the two green textures to halves of the window. */
glEnable(GL_TEXTURE_2D);
diff --git a/tests/fbo/fbo-drawbuffers-blend-add.c b/tests/fbo/fbo-drawbuffers-blend-add.c
index e7b61c13f..16313ab63 100644
--- a/tests/fbo/fbo-drawbuffers-blend-add.c
+++ b/tests/fbo/fbo-drawbuffers-blend-add.c
@@ -171,7 +171,7 @@ generate_and_display_drawbuffers(int count)
/* OK, now draw each of these textures to the winsys framebuffer. */
glUseProgram(0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_2D);
diff --git a/tests/fbo/fbo-drawbuffers-fragcolor.c b/tests/fbo/fbo-drawbuffers-fragcolor.c
index e8c3857a2..1d79bee48 100644
--- a/tests/fbo/fbo-drawbuffers-fragcolor.c
+++ b/tests/fbo/fbo-drawbuffers-fragcolor.c
@@ -126,7 +126,7 @@ generate_and_display_drawbuffers(int count)
/* OK, now draw each of these textures to the winsys framebuffer. */
glUseProgram(0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_2D);
diff --git a/tests/fbo/fbo-drawbuffers-maxtargets.c b/tests/fbo/fbo-drawbuffers-maxtargets.c
index 3c38809fd..de1233084 100644
--- a/tests/fbo/fbo-drawbuffers-maxtargets.c
+++ b/tests/fbo/fbo-drawbuffers-maxtargets.c
@@ -161,7 +161,7 @@ generate_and_display_drawbuffers(int count)
/* OK, now draw each of these textures to the winsys framebuffer. */
glUseProgram(0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glEnable(GL_TEXTURE_2D);
diff --git a/tests/fbo/fbo-drawbuffers.c b/tests/fbo/fbo-drawbuffers.c
index 21ea894cb..d092b4a1b 100644
--- a/tests/fbo/fbo-drawbuffers.c
+++ b/tests/fbo/fbo-drawbuffers.c
@@ -121,7 +121,7 @@ piglit_display(void)
expected = green;
}
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
/* Draw the two green textures to halves of the window. */
glEnable(GL_TEXTURE_2D);
diff --git a/tests/fbo/fbo-drawbuffers2-blend.c b/tests/fbo/fbo-drawbuffers2-blend.c
index 724e7c8be..acd4b2e91 100644
--- a/tests/fbo/fbo-drawbuffers2-blend.c
+++ b/tests/fbo/fbo-drawbuffers2-blend.c
@@ -110,7 +110,7 @@ piglit_display(void)
glColor4fv(green);
piglit_draw_rect(0, 0, piglit_width, piglit_height);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDisable(GL_BLEND);
/* Draw the two textures to halves of the window. */
diff --git a/tests/fbo/fbo-drawbuffers2-colormask.c b/tests/fbo/fbo-drawbuffers2-colormask.c
index f56cfd7bd..f0eb67f01 100644
--- a/tests/fbo/fbo-drawbuffers2-colormask.c
+++ b/tests/fbo/fbo-drawbuffers2-colormask.c
@@ -115,7 +115,7 @@ piglit_display(void)
piglit_draw_rect(0, 0, piglit_width, piglit_height);
}
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
/* Draw the two textures to halves of the window. */
diff --git a/tests/fbo/fbo-flushing-2.c b/tests/fbo/fbo-flushing-2.c
index 83f601fd6..c3ec5c9a5 100644
--- a/tests/fbo/fbo-flushing-2.c
+++ b/tests/fbo/fbo-flushing-2.c
@@ -95,7 +95,7 @@ piglit_display(void)
glColor4fv(draw_colors[draw_green]);
piglit_draw_rect(-1, -1, 2, 2);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
piglit_draw_rect_tex(x_screen, y_screen,
w_screen, h_screen,
diff --git a/tests/fbo/fbo-flushing.c b/tests/fbo/fbo-flushing.c
index db2cd6699..cc201536e 100644
--- a/tests/fbo/fbo-flushing.c
+++ b/tests/fbo/fbo-flushing.c
@@ -97,7 +97,7 @@ piglit_display(void)
piglit_ortho_projection(TEX_WIDTH, TEX_HEIGHT, GL_FALSE);
piglit_draw_rect(0, y, size, size);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
@@ -109,7 +109,7 @@ piglit_display(void)
piglit_ortho_projection(TEX_WIDTH, TEX_HEIGHT, GL_FALSE);
piglit_draw_rect(0, y, size, size);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/fbo/fbo-fragcoord.c b/tests/fbo/fbo-fragcoord.c
index 79cfef85b..71c13a697 100644
--- a/tests/fbo/fbo-fragcoord.c
+++ b/tests/fbo/fbo-fragcoord.c
@@ -104,7 +104,7 @@ piglit_display(void)
piglit_draw_rect(-1, -1, 2, 2);
/* Draw the FBO to the screen. */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/tests/fbo/fbo-fragcoord2.c b/tests/fbo/fbo-fragcoord2.c
index b583f6242..21f1413fe 100644
--- a/tests/fbo/fbo-fragcoord2.c
+++ b/tests/fbo/fbo-fragcoord2.c
@@ -166,7 +166,7 @@ test(void)
buf = malloc(piglit_width * piglit_height * 4);
glReadPixels(0, 0, piglit_width, piglit_height, GL_RGBA, GL_UNSIGNED_BYTE, buf);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glDrawBuffer(GL_BACK);
glClear(GL_COLOR_BUFFER_BIT);
glDrawPixels(piglit_width, piglit_height, GL_RGBA, GL_UNSIGNED_BYTE, buf);
diff --git a/tests/fbo/fbo-generatemipmap-array.c b/tests/fbo/fbo-generatemipmap-array.c
index d907d48e7..837523cd8 100644
--- a/tests/fbo/fbo-generatemipmap-array.c
+++ b/tests/fbo/fbo-generatemipmap-array.c
@@ -262,7 +262,7 @@ draw_mipmap_2d(int x, int y, int dim, int layer)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
glTexParameteri(GL_TEXTURE_2D_ARRAY_EXT, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -284,7 +284,7 @@ draw_mipmap_1d(int x, int y, int dim, int layer)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glTexParameteri(GL_TEXTURE_1D_ARRAY_EXT, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
glTexParameteri(GL_TEXTURE_1D_ARRAY_EXT, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
diff --git a/tests/fbo/fbo-generatemipmap-filtering.c b/tests/fbo/fbo-generatemipmap-filtering.c
index af4a41a31..33f32374c 100644
--- a/tests/fbo/fbo-generatemipmap-filtering.c
+++ b/tests/fbo/fbo-generatemipmap-filtering.c
@@ -89,7 +89,7 @@ draw_mipmap(int x, int y, int dim)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-generatemipmap-nonsquare.c b/tests/fbo/fbo-generatemipmap-nonsquare.c
index e703149da..5b0000181 100644
--- a/tests/fbo/fbo-generatemipmap-nonsquare.c
+++ b/tests/fbo/fbo-generatemipmap-nonsquare.c
@@ -114,7 +114,7 @@ draw_mipmap(int x, int y, int dim)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-generatemipmap-npot.c b/tests/fbo/fbo-generatemipmap-npot.c
index 5fa85e760..07b0d2f80 100644
--- a/tests/fbo/fbo-generatemipmap-npot.c
+++ b/tests/fbo/fbo-generatemipmap-npot.c
@@ -108,7 +108,7 @@ draw_mipmap(int x, int y, int dim)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-generatemipmap-scissor.c b/tests/fbo/fbo-generatemipmap-scissor.c
index d5822f9bb..8d78c1f78 100644
--- a/tests/fbo/fbo-generatemipmap-scissor.c
+++ b/tests/fbo/fbo-generatemipmap-scissor.c
@@ -114,7 +114,7 @@ draw_mipmap(int x, int y, int dim)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-generatemipmap-viewport.c b/tests/fbo/fbo-generatemipmap-viewport.c
index ea7d33436..d46f6c95a 100644
--- a/tests/fbo/fbo-generatemipmap-viewport.c
+++ b/tests/fbo/fbo-generatemipmap-viewport.c
@@ -98,7 +98,7 @@ create_fbo(void)
piglit_draw_rect(TEX_WIDTH / 2, TEX_HEIGHT / 2, TEX_WIDTH, TEX_HEIGHT);
/* Bind back to the (small) window to trigger the bug */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glGenerateMipmapEXT(GL_TEXTURE_2D);
done:
@@ -113,7 +113,7 @@ draw_mipmap(int x, int y, int dim)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-generatemipmap.c b/tests/fbo/fbo-generatemipmap.c
index c1bc45615..df5ae9813 100644
--- a/tests/fbo/fbo-generatemipmap.c
+++ b/tests/fbo/fbo-generatemipmap.c
@@ -108,7 +108,7 @@ draw_mipmap(int x, int y, int dim)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-gl_pointcoord.c b/tests/fbo/fbo-gl_pointcoord.c
index e5392d1f5..09b5b88e1 100644
--- a/tests/fbo/fbo-gl_pointcoord.c
+++ b/tests/fbo/fbo-gl_pointcoord.c
@@ -89,7 +89,7 @@ piglit_display(void)
/* Draw the point out if want to have a look. */
if (!piglit_automatic){
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
glClear(GL_COLOR_BUFFER_BIT);
glBlitFramebuffer(0, 0, rb_size, rb_size,
0, 0, rb_size, rb_size,
diff --git a/tests/fbo/fbo-incomplete-invalid-texture.c b/tests/fbo/fbo-incomplete-invalid-texture.c
index 017f90b68..5c63facf4 100644
--- a/tests/fbo/fbo-incomplete-invalid-texture.c
+++ b/tests/fbo/fbo-incomplete-invalid-texture.c
@@ -87,7 +87,7 @@ piglit_init(int argc, char **argv)
/* Unbind and rebind the FBO. At one point on Mesa this triggered a
* segfault down inside the glBindFramebuffer code.
*/
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
status = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
@@ -104,7 +104,7 @@ piglit_init(int argc, char **argv)
cleanup:
glBindTexture(GL_TEXTURE_2D, 0);
- glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, piglit_winsys_fbo);
glDeleteTextures(1, &tex);
glDeleteFramebuffers(1, &fbo);
diff --git a/tests/fbo/fbo-incomplete.cpp b/tests/fbo/fbo-incomplete.cpp
index d4f4f9d5d..292139c15 100644
--- a/tests/fbo/fbo-incomplete.cpp
+++ b/tests/fbo/fbo-incomplete.cpp
@@ -67,8 +67,8 @@ public:
else
glBindTexture(target, 0);
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
- glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, piglit_winsys_fbo);
glDeleteTextures(1, &tex);
glDeleteRenderbuffers(1, &rb);
diff --git a/tests/fbo/fbo-luminance-alpha.c b/tests/fbo/fbo-luminance-alpha.c
index 619b57aec..dd6ee0aba 100644
--- a/tests/fbo/fbo-luminance-alpha.c
+++ b/tests/fbo/fbo-luminance-alpha.c
@@ -126,7 +126,7 @@ piglit_display(void)
pass = piglit_probe_pixel_rgba(fbo_width * 7 / 8, 0, fbo_blend2) && pass;
/* Draw the two textures to halves of the window. */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
glColor4f(1, 1, 1, 1);
diff --git a/tests/fbo/fbo-maxsize.c b/tests/fbo/fbo-maxsize.c
index bda242cba..8bab9c858 100644
--- a/tests/fbo/fbo-maxsize.c
+++ b/tests/fbo/fbo-maxsize.c
@@ -207,7 +207,7 @@ piglit_display(void)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-mrt-alphatest.c b/tests/fbo/fbo-mrt-alphatest.c
index 78a4f7d78..3c703c39e 100644
--- a/tests/fbo/fbo-mrt-alphatest.c
+++ b/tests/fbo/fbo-mrt-alphatest.c
@@ -120,7 +120,7 @@ piglit_display(void)
/* visualize it */
glUseProgram(0);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
glViewport(0, 0, 128, 64);
glClearColor(0,0,0.5,0);
glClear(GL_COLOR_BUFFER_BIT);
diff --git a/tests/fbo/fbo-nodepth-test.c b/tests/fbo/fbo-nodepth-test.c
index 6c92132a8..f46f75579 100644
--- a/tests/fbo/fbo-nodepth-test.c
+++ b/tests/fbo/fbo-nodepth-test.c
@@ -85,7 +85,7 @@ piglit_display(void)
pass = pass && piglit_probe_rect_rgb(0, 0, piglit_width, piglit_height, green);
glDisable(GL_DEPTH_TEST);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
piglit_draw_rect_tex(0, 0, piglit_width, piglit_height,
diff --git a/tests/fbo/fbo-nostencil-test.c b/tests/fbo/fbo-nostencil-test.c
index ad13b3c7b..b47076857 100644
--- a/tests/fbo/fbo-nostencil-test.c
+++ b/tests/fbo/fbo-nostencil-test.c
@@ -85,7 +85,7 @@ piglit_display(void)
pass = pass && piglit_probe_rect_rgb(0, 0, piglit_width, piglit_height, green);
glDisable(GL_STENCIL_TEST);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
piglit_draw_rect_tex(0, 0, piglit_width, piglit_height,
diff --git a/tests/fbo/fbo-pbo-readpixels-small.c b/tests/fbo/fbo-pbo-readpixels-small.c
index 8c0ebb019..1f4744344 100644
--- a/tests/fbo/fbo-pbo-readpixels-small.c
+++ b/tests/fbo/fbo-pbo-readpixels-small.c
@@ -143,7 +143,7 @@ piglit_display(void)
glDeleteBuffersARB(1, &pbo);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/fbo/fbo-readdrawpix.c b/tests/fbo/fbo-readdrawpix.c
index 8c86cc614..62631615a 100644
--- a/tests/fbo/fbo-readdrawpix.c
+++ b/tests/fbo/fbo-readdrawpix.c
@@ -165,7 +165,7 @@ run_test(void)
fbo = make_fbo(fbo_width, fbo_height);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glViewport(0, 0, fbo_width, fbo_height);
piglit_ortho_projection(fbo_width, fbo_height, GL_FALSE);
glClearColor(1.0, 0.0, 1.0, 0.0);
@@ -177,25 +177,25 @@ run_test(void)
/* Now that we have correct samples, blit things around.
* FBO(bottom) -> WIN(middle)
*/
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE);
/* WIN(bottom) -> FBO(middle) */
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fbo);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
copy(x0, y0, x0 + SIZE, y0 + SIZE,
x0, y1, x0 + SIZE, y1 + SIZE);
/* FBO(middle) -> WIN(top) back to verify WIN -> FBO */
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fbo);
copy(x0, y1, x0 + SIZE, y1 + SIZE,
x0, y2, x0 + SIZE, y2 + SIZE);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
pass = verify_color_rect(PAD, y0, SIZE, SIZE) && pass;
pass = verify_color_rect(PAD, y1, SIZE, SIZE) && pass;
diff --git a/tests/fbo/fbo-readpixels.c b/tests/fbo/fbo-readpixels.c
index b75d1c484..25c39efbf 100644
--- a/tests/fbo/fbo-readpixels.c
+++ b/tests/fbo/fbo-readpixels.c
@@ -167,7 +167,7 @@ test_with_format(GLenum internal_format, GLenum format,
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/tests/fbo/fbo-scissor-bitmap.c b/tests/fbo/fbo-scissor-bitmap.c
index 8fa4c8a0a..b6e2e9e9a 100644
--- a/tests/fbo/fbo-scissor-bitmap.c
+++ b/tests/fbo/fbo-scissor-bitmap.c
@@ -370,7 +370,7 @@ piglit_display()
pass &= draw_and_test("FBO", fbo_width, fbo_height);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
display_texture_to_window(texture);
diff --git a/tests/fbo/fbo-scissor-blit.c b/tests/fbo/fbo-scissor-blit.c
index f1de2b36a..844e06298 100644
--- a/tests/fbo/fbo-scissor-blit.c
+++ b/tests/fbo/fbo-scissor-blit.c
@@ -181,7 +181,7 @@ piglit_display(void)
if (dst_fbo != 0) {
/* Show the contents of dst_fbo in the window */
glBindFramebuffer(GL_READ_FRAMEBUFFER, dst_fbo);
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
glBlitFramebuffer(0, 0, width, height,
0, 0, width, height,
GL_COLOR_BUFFER_BIT, GL_NEAREST);
diff --git a/tests/fbo/fbo-srgb-blit.c b/tests/fbo/fbo-srgb-blit.c
index efc0d442b..105a82e23 100644
--- a/tests/fbo/fbo-srgb-blit.c
+++ b/tests/fbo/fbo-srgb-blit.c
@@ -76,7 +76,7 @@ static void blit_rect(GLenum src_format, GLenum dst_format, float x, float y, fl
glBlitFramebufferEXT(8, 0, 16, 16, 8, 0, 16, 16, GL_COLOR_BUFFER_BIT, GL_LINEAR);
}
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glBindTexture(GL_TEXTURE_2D, dst_tex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
diff --git a/tests/fbo/fbo-srgb.c b/tests/fbo/fbo-srgb.c
index 3ab2200fe..bd2741ebd 100644
--- a/tests/fbo/fbo-srgb.c
+++ b/tests/fbo/fbo-srgb.c
@@ -92,7 +92,7 @@ draw_fbo(int x, int y)
glViewport(0, 0, piglit_width, piglit_height);
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
@@ -159,8 +159,8 @@ framebuffer_srgb_fbo(int srgb_format)
if (!piglit_probe_rect_rgb(20, 0, 20, 20, expected_blend))
pass = GL_FALSE;
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, piglit_winsys_fbo);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, piglit_winsys_fbo);
draw_fbo(0, 0);
diff --git a/tests/fbo/fbo-viewport.c b/tests/fbo/fbo-viewport.c
index 8a0812fb0..89ee71e06 100644
--- a/tests/fbo/fbo-viewport.c
+++ b/tests/fbo/fbo-viewport.c
@@ -133,7 +133,7 @@ piglit_display(void)
GL_FRAMEBUFFER_COMPLETE_EXT);
/* draw reference image in the window */
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
draw_test_image();
glReadPixels(0, 0, piglit_width, piglit_height,
GL_RGB, GL_UNSIGNED_BYTE, win_image);
@@ -162,7 +162,7 @@ piglit_display(void)
printf("Image comparison passed.\n");
}
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
#if 0 /* for debug/compare (alternate diplaying Window vs. FBO image) */
{