tex-miplevel-selection: use EXT_framebuffer_object

Submitted by Ilia Mirkin on Dec. 28, 2018, 5:24 a.m.

Details

Message ID 20181228052438.32448-1-imirkin@alum.mit.edu
State New
Headers show
Series "tex-miplevel-selection: use EXT_framebuffer_object" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Ilia Mirkin Dec. 28, 2018, 5:24 a.m.
nv30 driver doesn't expose ARB_framebuffer_object, but none of its extra
features are used here. Use the EXT entrypoints instead except for the
layered binding.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---
 tests/texturing/tex-miplevel-selection.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/texturing/tex-miplevel-selection.c b/tests/texturing/tex-miplevel-selection.c
index 80f0a7e26..7c0283cbd 100644
--- a/tests/texturing/tex-miplevel-selection.c
+++ b/tests/texturing/tex-miplevel-selection.c
@@ -311,7 +311,7 @@  piglit_init(int argc, char **argv)
 		}
         }
 
-	piglit_require_extension("GL_ARB_framebuffer_object");
+	piglit_require_extension("GL_EXT_framebuffer_object");
 	piglit_require_extension("GL_ARB_sampler_objects");
 	piglit_require_extension("GL_ARB_texture_storage");
 	if (test != FIXED_FUNCTION) {
@@ -868,8 +868,8 @@  piglit_init(int argc, char **argv)
 	if (test == FIXED_FUNCTION)
 		glDisable(gltarget);
 
-	glGenFramebuffers(1, &fb);
-	glBindFramebuffer(GL_FRAMEBUFFER, fb);
+	glGenFramebuffersEXT(1, &fb);
+	glBindFramebufferEXT(GL_FRAMEBUFFER, fb);
 
 	/* set one layer/face to the expected color and the other layers/faces to black */
 	for (level = 0, dim = TEX_SIZE; dim > 0; level++, dim /= 2) {
@@ -879,21 +879,21 @@  piglit_init(int argc, char **argv)
 		for (layer = 0; layer < num_layers; layer++) {
 			switch (gltarget) {
 			case GL_TEXTURE_1D:
-				glFramebufferTexture1D(GL_FRAMEBUFFER, attachment,
+				glFramebufferTexture1DEXT(GL_FRAMEBUFFER, attachment,
 						       gltarget, tex, level);
 				break;
 			case GL_TEXTURE_2D:
 			case GL_TEXTURE_RECTANGLE:
-				glFramebufferTexture2D(GL_FRAMEBUFFER, attachment,
+				glFramebufferTexture2DEXT(GL_FRAMEBUFFER, attachment,
 						       gltarget, tex, level);
 				break;
 			case GL_TEXTURE_CUBE_MAP:
-				glFramebufferTexture2D(GL_FRAMEBUFFER, attachment,
+				glFramebufferTexture2DEXT(GL_FRAMEBUFFER, attachment,
 						       GL_TEXTURE_CUBE_MAP_POSITIVE_X + layer,
 						       tex, level);
 				break;
 			case GL_TEXTURE_3D:
-				glFramebufferTexture3D(GL_FRAMEBUFFER, attachment,
+				glFramebufferTexture3DEXT(GL_FRAMEBUFFER, attachment,
 						       gltarget, tex, level, layer);
 				break;
 			case GL_TEXTURE_1D_ARRAY:
@@ -906,7 +906,7 @@  piglit_init(int argc, char **argv)
 			if (!piglit_check_gl_error(GL_NO_ERROR))
 				piglit_report_result(PIGLIT_FAIL);
 
-			status = glCheckFramebufferStatusEXT (GL_FRAMEBUFFER);
+			status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER);
 			if (status != GL_FRAMEBUFFER_COMPLETE) {
 				fprintf(stderr, "FBO incomplete status 0x%X for level %i, layer %i\n",
 					status, level, layer);
@@ -972,8 +972,8 @@  piglit_init(int argc, char **argv)
 			break;
 	}
 
-	glDeleteFramebuffers(1, &fb);
-	glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
+	glDeleteFramebuffersEXT(1, &fb);
+	glBindFramebufferEXT(GL_FRAMEBUFFER, piglit_winsys_fbo);
 	piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
 
 	if (test == FIXED_FUNCTION)