[Piglit] [PATCH 1/5] Add wrappers for framebuffer object functions

Ian Romanick idr at freedesktop.org
Fri Oct 7 15:23:55 PDT 2011


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/util/CMakeLists.gl.txt    |    2 +
 tests/util/CMakeLists.gles1.txt |    1 +
 tests/util/CMakeLists.gles2.txt |    1 +
 tests/util/piglit-fbo-gl.c      |  130 ++++++++++++++++++++++++++++++++++
 tests/util/piglit-fbo-gles1.c   |   98 +++++++++++++++++++++++++
 tests/util/piglit-fbo-gles2.c   |   56 +++++++++++++++
 tests/util/piglit-fbo.h         |  149 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 437 insertions(+), 0 deletions(-)
 create mode 100644 tests/util/piglit-fbo-gl.c
 create mode 100644 tests/util/piglit-fbo-gles1.c
 create mode 100644 tests/util/piglit-fbo-gles2.c
 create mode 100644 tests/util/piglit-fbo.h

diff --git a/tests/util/CMakeLists.gl.txt b/tests/util/CMakeLists.gl.txt
index a03b50b..d19ac50 100644
--- a/tests/util/CMakeLists.gl.txt
+++ b/tests/util/CMakeLists.gl.txt
@@ -7,6 +7,7 @@ include_directories(
 set(UTIL_SOURCES
 	${UTIL_SOURCES}
 	glew.c
+	piglit-fbo-gl.c
 	piglit-shader.c
 	piglit-shader-gl.c
 	piglit-util-gl.c
@@ -15,6 +16,7 @@ set(UTIL_SOURCES
 IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 	add_definitions ( -DUSE_GLX )
 	add_library (piglitglxutil
+		    piglit-fbo-gl.c
 		    piglit-shader.c
 		    piglit-shader-gl.c
 		    piglit-util.c
diff --git a/tests/util/CMakeLists.gles1.txt b/tests/util/CMakeLists.gles1.txt
index e4bbb33..15d9d00 100644
--- a/tests/util/CMakeLists.gles1.txt
+++ b/tests/util/CMakeLists.gles1.txt
@@ -1,5 +1,6 @@
 set(UTIL_SOURCES
 	${UTIL_SOURCES}
+	piglit-fbo-gles1.c
 	piglit-util-gles.c
 	)
 
diff --git a/tests/util/CMakeLists.gles2.txt b/tests/util/CMakeLists.gles2.txt
index 65d55a6..674c347 100644
--- a/tests/util/CMakeLists.gles2.txt
+++ b/tests/util/CMakeLists.gles2.txt
@@ -1,5 +1,6 @@
 set(UTIL_SOURCES
 	${UTIL_SOURCES}
+	piglit-fbo-gles2.c
 	piglit-shader.c
 	piglit-shader-gles2.c
 	piglit-util-gles.c
diff --git a/tests/util/piglit-fbo-gl.c b/tests/util/piglit-fbo-gl.c
new file mode 100644
index 0000000..b6d6578
--- /dev/null
+++ b/tests/util/piglit-fbo-gl.c
@@ -0,0 +1,130 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef USE_OPENGL
+#	error USE_OPENGL is undefined
+#endif
+
+#if defined(_MSC_VER)
+#include <windows.h>
+#endif
+
+#include "piglit-util.h"
+
+PFNGLISRENDERBUFFERPROC piglit_IsRenderbuffer = NULL;
+PFNGLBINDRENDERBUFFERPROC piglit_BindRenderbuffer = NULL;
+PFNGLDELETERENDERBUFFERSPROC piglit_DeleteRenderbuffers = NULL;
+PFNGLGENRENDERBUFFERSPROC piglit_GenRenderbuffers = NULL;
+PFNGLRENDERBUFFERSTORAGEPROC piglit_RenderbufferStorage = NULL;
+PFNGLGETRENDERBUFFERPARAMETERIVPROC piglit_GetRenderbufferParameteriv = NULL;
+PFNGLISFRAMEBUFFERPROC piglit_IsFramebuffer = NULL;
+PFNGLBINDFRAMEBUFFERPROC piglit_BindFramebuffer = NULL;
+PFNGLDELETEFRAMEBUFFERSPROC piglit_DeleteFramebuffers = NULL;
+PFNGLGENFRAMEBUFFERSPROC piglit_GenFramebuffers = NULL;
+PFNGLCHECKFRAMEBUFFERSTATUSPROC piglit_CheckFramebufferStatus = NULL;
+PFNGLFRAMEBUFFERTEXTURE1DPROC piglit_FramebufferTexture1D = NULL;
+PFNGLFRAMEBUFFERTEXTURE2DPROC piglit_FramebufferTexture2D = NULL;
+PFNGLFRAMEBUFFERTEXTURE3DPROC piglit_FramebufferTexture3D = NULL;
+PFNGLFRAMEBUFFERRENDERBUFFERPROC piglit_FramebufferRenderbuffer = NULL;
+PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC piglit_GetFramebufferAttachmentParameteriv = NULL;
+PFNGLGENERATEMIPMAPPROC piglit_GenerateMipmap = NULL;
+PFNGLBLITFRAMEBUFFERPROC piglit_BlitFramebuffer = NULL;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC piglit_RenderbufferStorageMultisample = NULL;
+PFNGLFRAMEBUFFERTEXTURELAYERPROC piglit_FramebufferTextureLayer = NULL;
+
+static void
+init_functions_from_core(void)
+{
+	piglit_IsRenderbuffer = glIsRenderbuffer;
+	piglit_BindRenderbuffer = glBindRenderbuffer;
+	piglit_DeleteRenderbuffers = glDeleteRenderbuffers;
+	piglit_GenRenderbuffers = glGenRenderbuffers;
+	piglit_RenderbufferStorage = glRenderbufferStorage;
+	piglit_GetRenderbufferParameteriv = glGetRenderbufferParameteriv;
+	piglit_IsFramebuffer = glIsFramebuffer;
+	piglit_BindFramebuffer = glBindFramebuffer;
+	piglit_DeleteFramebuffers = glDeleteFramebuffers;
+	piglit_GenFramebuffers = glGenFramebuffers;
+	piglit_CheckFramebufferStatus = glCheckFramebufferStatus;
+	piglit_FramebufferTexture1D = glFramebufferTexture1D;
+	piglit_FramebufferTexture2D = glFramebufferTexture2D;
+	piglit_FramebufferTexture3D = glFramebufferTexture3D;
+	piglit_FramebufferRenderbuffer = glFramebufferRenderbuffer;
+	piglit_GetFramebufferAttachmentParameteriv =
+		glGetFramebufferAttachmentParameteriv;
+	piglit_GenerateMipmap = glGenerateMipmap;
+	piglit_BlitFramebuffer = glBlitFramebuffer;
+	piglit_RenderbufferStorageMultisample =
+		glRenderbufferStorageMultisample;
+	piglit_FramebufferTextureLayer = glFramebufferTextureLayer;
+}
+
+static void
+init_functions_from_EXT(void)
+{
+	piglit_IsRenderbuffer = glIsRenderbufferEXT;
+	piglit_BindRenderbuffer = glBindRenderbufferEXT;
+	piglit_DeleteRenderbuffers = glDeleteRenderbuffersEXT;
+	piglit_GenRenderbuffers = glGenRenderbuffersEXT;
+	piglit_RenderbufferStorage = glRenderbufferStorageEXT;
+	piglit_GetRenderbufferParameteriv = glGetRenderbufferParameterivEXT;
+	piglit_IsFramebuffer = glIsFramebufferEXT;
+	piglit_BindFramebuffer = glBindFramebufferEXT;
+	piglit_DeleteFramebuffers = glDeleteFramebuffersEXT;
+	piglit_GenFramebuffers = glGenFramebuffersEXT;
+	piglit_CheckFramebufferStatus = glCheckFramebufferStatusEXT;
+	piglit_FramebufferTexture1D = glFramebufferTexture1DEXT;
+	piglit_FramebufferTexture2D = glFramebufferTexture2DEXT;
+	piglit_FramebufferTexture3D = glFramebufferTexture3DEXT;
+	piglit_FramebufferRenderbuffer = glFramebufferRenderbufferEXT;
+	piglit_GetFramebufferAttachmentParameteriv =
+		glGetFramebufferAttachmentParameterivEXT;
+	piglit_GenerateMipmap = glGenerateMipmapEXT;
+
+	/* GL_EXT_framebuffer_blit */
+	piglit_BlitFramebuffer = glBlitFramebufferEXT;
+
+	/* GL_EXT_framebuffer_multisample */
+	piglit_RenderbufferStorageMultisample =
+		glRenderbufferStorageMultisampleEXT;
+
+	/* GL_ARB_geometry_shader4 */
+	piglit_FramebufferTextureLayer = glFramebufferTextureLayerARB;
+}
+
+void
+piglit_require_fbo(void)
+{
+	/* Both OpenGL 3.0 core and GL_ARB_framebuffer_object use the same
+	 * namespace for this functionality.
+	 */
+	if (GLEW_VERSION_3_0 || GLEW_ARB_framebuffer_object) {
+		init_functions_from_core();
+	} else if (GLEW_EXT_framebuffer_object) {
+		init_functions_from_EXT();
+	} else {
+		printf("Framebuffer objects not supported.\n");
+		piglit_report_result(PIGLIT_SKIP);
+		exit(1);
+	}
+}
diff --git a/tests/util/piglit-fbo-gles1.c b/tests/util/piglit-fbo-gles1.c
new file mode 100644
index 0000000..93326e7
--- /dev/null
+++ b/tests/util/piglit-fbo-gles1.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef USE_OPENGL_ES1
+#	error USE_OPENGL_ES1 is undefined
+#endif
+
+#if defined(_MSC_VER)
+#include <windows.h>
+#endif
+
+#include "piglit-util.h"
+#include <EGL/egl.h>
+
+PFNGLBINDFRAMEBUFFEROESPROC piglit_BindFramebuffer = NULL;
+PFNGLBINDRENDERBUFFEROESPROC piglit_BindRenderbuffer = NULL;
+PFNGLCHECKFRAMEBUFFERSTATUSOESPROC piglit_CheckFramebufferStatus = NULL;
+PFNGLDELETEFRAMEBUFFERSOESPROC piglit_DeleteFramebuffers = NULL;
+PFNGLDELETERENDERBUFFERSOESPROC piglit_DeleteRenderbuffers = NULL;
+PFNGLFRAMEBUFFERRENDERBUFFEROESPROC piglit_FramebufferRenderbuffer = NULL;
+PFNGLFRAMEBUFFERTEXTURE2DOESPROC piglit_FramebufferTexture2D = NULL;
+PFNGLGENERATEMIPMAPOESPROC piglit_GenerateMipmap = NULL;
+PFNGLGENFRAMEBUFFERSOESPROC piglit_GenFramebuffers = NULL;
+PFNGLGENRENDERBUFFERSOESPROC piglit_GenRenderbuffers = NULL;
+PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC piglit_GetFramebufferAttachmentParameteriv = NULL;
+PFNGLGETRENDERBUFFERPARAMETERIVOESPROC piglit_GetRenderbufferParameteriv = NULL;
+PFNGLISFRAMEBUFFEROESPROC piglit_IsFramebuffer = NULL;
+PFNGLISRENDERBUFFEROESPROC piglit_IsRenderbuffer = NULL;
+PFNGLRENDERBUFFERSTORAGEOESPROC piglit_RenderbufferStorage = NULL;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG piglit_RenderbufferStorageMultisample = NULL;
+
+void
+piglit_require_fbo(void)
+{
+	if (piglit_is_extension_supported("GL_OES_framebuffer_object")) {
+		piglit_BindFramebuffer = (PFNGLBINDFRAMEBUFFEROESPROC)
+			eglGetProcAddress("glBindFramebufferOES");
+		piglit_BindRenderbuffer = (PFNGLBINDRENDERBUFFEROESPROC)
+			eglGetProcAddress("glBindRenderbufferOES");
+		piglit_CheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSOESPROC)
+			eglGetProcAddress("glCheckFramebufferStatusOES");
+		piglit_DeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSOESPROC)
+			eglGetProcAddress("glDeleteFramebuffersOES");
+		piglit_DeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSOESPROC)
+			eglGetProcAddress("glDeleteRenderbuffersOES");
+		piglit_FramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFEROESPROC)
+			eglGetProcAddress("glFramebufferRenderbufferOES");
+		piglit_FramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DOESPROC)
+			eglGetProcAddress("glFramebufferTexture2DOES");
+		piglit_GenerateMipmap = (PFNGLGENERATEMIPMAPOESPROC)
+			eglGetProcAddress("glGenerateMipmapOES");
+		piglit_GenFramebuffers = (PFNGLGENFRAMEBUFFERSOESPROC)
+			eglGetProcAddress("glGenFramebuffersOES");
+		piglit_GenRenderbuffers = (PFNGLGENRENDERBUFFERSOESPROC)
+			eglGetProcAddress("glGenRenderbuffersOES");
+		piglit_GetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC)
+			eglGetProcAddress("glGetFramebufferAttachmentParameterivOES");
+		piglit_GetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVOESPROC)
+			eglGetProcAddress("glGetRenderbufferParameterivOES");
+		piglit_IsFramebuffer = (PFNGLISFRAMEBUFFEROESPROC)
+			eglGetProcAddress("glIsFramebufferOES");
+		piglit_IsRenderbuffer = (PFNGLISRENDERBUFFEROESPROC)
+			eglGetProcAddress("glIsRenderbufferOES");
+		piglit_RenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEOESPROC)
+			eglGetProcAddress("glRenderbufferStorageOES");
+		piglit_RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG)
+			eglGetProcAddress("glRenderbufferStorageMultisampleOES");
+
+		if (piglit_is_extension_supported("GL_IMG_multisampled_render_to_texture")) {
+			piglit_RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG)
+				eglGetProcAddress("glRenderbufferStorageMultisampleIMG");
+		}
+	} else {
+		printf("Framebuffer objects not supported.\n");
+		piglit_report_result(PIGLIT_SKIP);
+		exit(1);
+	}
+}
diff --git a/tests/util/piglit-fbo-gles2.c b/tests/util/piglit-fbo-gles2.c
new file mode 100644
index 0000000..1f3a2b7
--- /dev/null
+++ b/tests/util/piglit-fbo-gles2.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef USE_OPENGL_ES2
+#	error USE_OPENGL_ES2 is undefined
+#endif
+
+#if defined(_MSC_VER)
+#include <windows.h>
+#endif
+
+#include "piglit-util.h"
+#include <EGL/egl.h>
+
+PFNGLFRAMEBUFFERTEXTURE3DOES piglit_FramebufferTexture3D = NULL;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG piglit_RenderbufferStorageMultisample = NULL;
+
+void
+piglit_require_fbo(void)
+{
+	if (piglit_is_extension_supported("GL_OES_texture_3D")) {
+		piglit_FramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DOES)
+			eglGetProcAddress("glFramebufferTexture3D");
+	}
+
+	if (piglit_is_extension_supported("GL_ANGLE_framebuffer_multisample")) {
+		piglit_RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG)
+			eglGetProcAddress("glRenderbufferStorageMultisampleANGLE");
+	} else if (piglit_is_extension_supported("GL_APPLE_framebuffer_multisample")) {
+		piglit_RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG)
+			eglGetProcAddress("glRenderbufferStorageMultisampleAPPLE");
+	} else if (piglit_is_extension_supported("GL_IMG_multisampled_render_to_texture")) {
+		piglit_RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG)
+			eglGetProcAddress("glRenderbufferStorageMultisampleIMG");
+	}
+}
diff --git a/tests/util/piglit-fbo.h b/tests/util/piglit-fbo.h
new file mode 100644
index 0000000..4aef247
--- /dev/null
+++ b/tests/util/piglit-fbo.h
@@ -0,0 +1,149 @@
+/*
+ * Copyright © 2011 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+void piglit_require_fbo(void);
+
+/**
+ * \name Portable wrappers for framebuffer object functions
+ */
+/*@{*/
+#if defined(USE_OPENGL_ES1)
+PFNGLBINDFRAMEBUFFEROESPROC piglit_BindFramebuffer;
+PFNGLBINDRENDERBUFFEROESPROC piglit_BindRenderbuffer;
+#define piglit_BlitFramebuffer assert(!"glBlitFramebuffer does not exist in ES1")
+PFNGLCHECKFRAMEBUFFERSTATUSOESPROC piglit_CheckFramebufferStatus;
+PFNGLDELETEFRAMEBUFFERSOESPROC piglit_DeleteFramebuffers;
+PFNGLDELETERENDERBUFFERSOESPROC piglit_DeleteRenderbuffers;
+PFNGLFRAMEBUFFERRENDERBUFFEROESPROC piglit_FramebufferRenderbuffer;
+#define piglit_FramebufferTexture1D assert(!"glFramebufferTexture1D does not exist in ES1")
+PFNGLFRAMEBUFFERTEXTURE2DOESPROC piglit_FramebufferTexture2D;
+#define piglit_FramebufferTexture3D assert(!"glFramebufferTexture3D does not exist in ES1")
+#define piglit_FramebufferTextureLayer assert(!"glFramebufferTextureLayer does not exist in ES1")
+PFNGLGENERATEMIPMAPOESPROC piglit_GenerateMipmap;
+PFNGLGENFRAMEBUFFERSOESPROC piglit_GenFramebuffers;
+PFNGLGENRENDERBUFFERSOESPROC piglit_GenRenderbuffers;
+PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC piglit_GetFramebufferAttachmentParameteriv;
+PFNGLGETRENDERBUFFERPARAMETERIVOESPROC piglit_GetRenderbufferParameteriv;
+PFNGLISFRAMEBUFFEROESPROC piglit_IsFramebuffer;
+PFNGLISRENDERBUFFEROESPROC piglit_IsRenderbuffer;
+PFNGLRENDERBUFFERSTORAGEOESPROC piglit_RenderbufferStorage;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG piglit_RenderbufferStorageMultisample;
+
+#define GL_NONE GL_NONE_OES
+#define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES
+#define GL_RENDERBUFFER GL_RENDERBUFFER_OES
+#define GL_RGBA4 GL_RGBA4_OES
+#define GL_RGB5_A1 GL_RGB5_A1_OES
+#define GL_RGB565 GL_RGB565_OES
+#define GL_DEPTH_COMPONENT16 GL_DEPTH_COMPONENT16_OES
+#define GL_RENDERBUFFER_WIDTH GL_RENDERBUFFER_WIDTH_OES
+#define GL_RENDERBUFFER_HEIGHT GL_RENDERBUFFER_HEIGHT_OES
+#define GL_RENDERBUFFER_INTERNAL_FORMAT GL_RENDERBUFFER_INTERNAL_FORMAT_OES
+#define GL_RENDERBUFFER_RED_SIZE GL_RENDERBUFFER_RED_SIZE_OES
+#define GL_RENDERBUFFER_GREEN_SIZE GL_RENDERBUFFER_GREEN_SIZE_OES
+#define GL_RENDERBUFFER_BLUE_SIZE GL_RENDERBUFFER_BLUE_SIZE_OES
+#define GL_RENDERBUFFER_ALPHA_SIZE GL_RENDERBUFFER_ALPHA_SIZE_OES
+#define GL_RENDERBUFFER_DEPTH_SIZE GL_RENDERBUFFER_DEPTH_SIZE_OES
+#define GL_RENDERBUFFER_STENCIL_SIZE GL_RENDERBUFFER_STENCIL_SIZE_OES
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES
+#define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES
+#define GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES
+#define GL_STENCIL_ATTACHMENT GL_STENCIL_ATTACHMENT_OES
+#define GL_FRAMEBUFFER_COMPLETE GL_FRAMEBUFFER_COMPLETE_OES
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
+#define GL_FRAMEBUFFER_UNSUPPORTED GL_FRAMEBUFFER_UNSUPPORTED_OES
+#define GL_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING_OES
+#define GL_RENDERBUFFER_BINDING GL_RENDERBUFFER_BINDING_OES
+#define GL_MAX_RENDERBUFFER_SIZE GL_MAX_RENDERBUFFER_SIZE_OES
+#define GL_INVALID_FRAMEBUFFER_OPERATION GL_INVALID_FRAMEBUFFER_OPERATION_OES
+#elif defined(USE_OPENGL_ES2)
+#define piglit_BindFramebuffer glBindFramebuffer
+#define piglit_BindRenderbuffer glBindRenderbuffer
+#define piglit_BlitFramebuffer assert(!"glBlitFramebuffer does not exist in ES2")
+#define piglit_CheckFramebufferStatus glCheckFramebufferStatus
+#define piglit_DeleteFramebuffers glDeleteFramebuffers
+#define piglit_DeleteRenderbuffers glDeleteRenderbuffers
+#define piglit_FramebufferRenderbuffer glFramebufferRenderbuffer
+#define piglit_FramebufferTexture1D assert(!"glFramebufferTexture1D does not exist in ES2")
+#define piglit_FramebufferTexture2D glFramebufferTexture2D
+PFNGLFRAMEBUFFERTEXTURE3DOES piglit_FramebufferTexture3D;
+#define piglit_FramebufferTextureLayer assert(!"glFramebufferTextureLayer does not exist in ES2")
+#define piglit_GenerateMipmap glGenerateMipmap
+#define piglit_GenFramebuffers glGenFramebuffers
+#define piglit_GenRenderbuffers glGenRenderbuffers
+#define piglit_GetFramebufferAttachmentParameteriv glGetFramebufferAttachmentParameteriv
+#define piglit_GetRenderbufferParameteriv glGetRenderbufferParameteriv
+#define piglit_IsFramebuffer glIsFramebuffer
+#define piglit_IsRenderbuffer glIsRenderbuffer
+#define piglit_RenderbufferStorage glRenderbufferStorage
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG piglit_RenderbufferStorageMultisample;
+#else
+PFNGLBINDFRAMEBUFFERPROC piglit_BindFramebuffer;
+PFNGLBINDRENDERBUFFERPROC piglit_BindRenderbuffer;
+PFNGLBLITFRAMEBUFFERPROC piglit_BlitFramebuffer;
+PFNGLCHECKFRAMEBUFFERSTATUSPROC piglit_CheckFramebufferStatus;
+PFNGLDELETEFRAMEBUFFERSPROC piglit_DeleteFramebuffers;
+PFNGLDELETERENDERBUFFERSPROC piglit_DeleteRenderbuffers;
+PFNGLFRAMEBUFFERRENDERBUFFERPROC piglit_FramebufferRenderbuffer;
+PFNGLFRAMEBUFFERTEXTURE1DPROC piglit_FramebufferTexture1D;
+PFNGLFRAMEBUFFERTEXTURE2DPROC piglit_FramebufferTexture2D;
+PFNGLFRAMEBUFFERTEXTURE3DPROC piglit_FramebufferTexture3D;
+PFNGLFRAMEBUFFERTEXTURELAYERPROC piglit_FramebufferTextureLayer;
+PFNGLGENERATEMIPMAPPROC piglit_GenerateMipmap;
+PFNGLGENFRAMEBUFFERSPROC piglit_GenFramebuffers;
+PFNGLGENRENDERBUFFERSPROC piglit_GenRenderbuffers;
+PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC piglit_GetFramebufferAttachmentParameteriv;
+PFNGLGETRENDERBUFFERPARAMETERIVPROC piglit_GetRenderbufferParameteriv;
+PFNGLISFRAMEBUFFERPROC piglit_IsFramebuffer;
+PFNGLISRENDERBUFFERPROC piglit_IsRenderbuffer;
+PFNGLRENDERBUFFERSTORAGEPROC piglit_RenderbufferStorage;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC piglit_RenderbufferStorageMultisample;
+#endif
+
+
+#if !defined(USE_OPENGL)
+#define GL_COLOR_ATTACHMENT1              0x8CE1
+#define GL_COLOR_ATTACHMENT2              0x8CE2
+#define GL_COLOR_ATTACHMENT3              0x8CE3
+#define GL_COLOR_ATTACHMENT4              0x8CE4
+#define GL_COLOR_ATTACHMENT5              0x8CE5
+#define GL_COLOR_ATTACHMENT6              0x8CE6
+#define GL_COLOR_ATTACHMENT7              0x8CE7
+#define GL_COLOR_ATTACHMENT8              0x8CE8
+#define GL_COLOR_ATTACHMENT9              0x8CE9
+#define GL_COLOR_ATTACHMENT10             0x8CEA
+#define GL_COLOR_ATTACHMENT11             0x8CEB
+#define GL_COLOR_ATTACHMENT12             0x8CEC
+#define GL_COLOR_ATTACHMENT13             0x8CED
+#define GL_COLOR_ATTACHMENT14             0x8CEE
+#define GL_COLOR_ATTACHMENT15             0x8CEF
+#endif
+/*@}*/
-- 
1.7.6



More information about the Piglit mailing list