---
 .../spec/arb_direct_state_access/framebufferblit.c | 37 ++++++++++------------
 1 file changed, 16 insertions(+), 21 deletions(-)

diff --git a/tests/spec/arb_direct_state_access/framebufferblit.c 
b/tests/spec/arb_direct_state_access/framebufferblit.c
index 2866c78..fb746d1 100644
--- a/tests/spec/arb_direct_state_access/framebufferblit.c
+++ b/tests/spec/arb_direct_state_access/framebufferblit.c
@@ -94,11 +94,11 @@ display_texture(int x, int y, GLuint tex, int layers)
                                          tex, 0);
 
                /* Blit layer to screen */
-               glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo);
-               glBindFramebuffer(GL_READ_FRAMEBUFFER, tempFBO);
-               glBlitFramebuffer(0, 0, texWidth, texHeight,
-                                 x, y, x + texWidth, y + texDepth * texHeight,
-                                 GL_COLOR_BUFFER_BIT, GL_NEAREST);
+               glBlitNamedFramebuffer(tempFBO, piglit_winsys_fbo,
+                                      0, 0, texWidth, texHeight,
+                                      x, y, x + texWidth,
+                                      y + texDepth * texHeight,
+                                      GL_COLOR_BUFFER_BIT, GL_NEAREST);
        } else {
                int i;
 
@@ -118,19 +118,18 @@ display_texture(int x, int y, GLuint tex, int layers)
                        }
 
                        /* Blit layer to screen */
-                       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 
piglit_winsys_fbo);
-                       glBindFramebuffer(GL_READ_FRAMEBUFFER, tempFBO);
-                       glBlitFramebuffer(0, 0, texWidth, texHeight,
-                                         x,
-                                          y + i * texHeight,
-                                         x + texWidth,
-                                          y + (i + 1) * texHeight,
-                                         GL_COLOR_BUFFER_BIT, GL_NEAREST);
+                       glBlitNamedFramebuffer(tempFBO, piglit_winsys_fbo,
+                                              0, 0, texWidth, texHeight,
+                                              x,
+                                               y + i * texHeight,
+                                              x + texWidth,
+                                               y + (i + 1) * texHeight,
+                                              GL_COLOR_BUFFER_BIT,
+                                              GL_NEAREST);
                }
        }
 
        /* Cleanup temp fbo */
-       glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
        glDeleteFramebuffers(1, &tempFBO);
 
        return piglit_check_gl_error(GL_NO_ERROR);
@@ -249,11 +248,9 @@ testFramebufferBlitLayered(int x, int y, bool srcLayered, 
bool dstLayered)
        }
 
        /* Blit from source to destination framebuffers */
-       glBindFramebuffer(GL_READ_FRAMEBUFFER, srcFBO);
-       glBindFramebuffer(GL_DRAW_FRAMEBUFFER, dstFBO);
-       glBlitFramebuffer(0, 0, texWidth, texHeight,
-                         0, 0, texWidth, texHeight,
-                         GL_COLOR_BUFFER_BIT, GL_LINEAR);
+       glBlitNamedFramebuffer(srcFBO, dstFBO, 0, 0, texWidth, texHeight,
+                              0, 0, texWidth, texHeight,
+                              GL_COLOR_BUFFER_BIT, GL_LINEAR);
 
        /* Display the results */
        display_texture(x, y, srcTex, srcLayered ? texDepth : 1);
@@ -271,7 +268,6 @@ testFramebufferBlitLayered(int x, int y, bool srcLayered, 
bool dstLayered)
        }
 
        /* Clean up */
-       glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
        glDeleteFramebuffers(1, &srcFBO);
        glDeleteFramebuffers(1, &dstFBO);
        glDeleteTextures(1, &srcTex);
@@ -297,7 +293,6 @@ piglit_display(void)
 {
        bool pass = true;
 
-       glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
        glClearColor(1,1,1,1);
        glClear(GL_COLOR_BUFFER_BIT);
 
-- 
2.1.0

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to