summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/bugs/fdo28551.c11
-rw-r--r--tests/fbo/fbo-drawbuffers-fragcolor.c4
-rw-r--r--tests/fbo/fbo-drawbuffers-maxtargets.c4
-rw-r--r--tests/fbo/fbo-formats.h38
-rw-r--r--tests/fbo/fbo-rg.c33
-rw-r--r--tests/general/depth-clamp-range.c5
-rw-r--r--tests/general/depth_clamp.c5
-rw-r--r--tests/general/draw-elements-base-vertex.c23
-rw-r--r--tests/general/object_purgeable.c27
-rw-r--r--tests/general/object_purgeable.h29
-rw-r--r--tests/general/provoking-vertex.c25
-rw-r--r--tests/general/sync_api.c39
-rw-r--r--tests/general/timer_query.c43
-rw-r--r--tests/shaders/fp-unpack-01.c5
-rw-r--r--tests/shaders/glsl-fs-texture2drect.c4
-rw-r--r--tests/shaders/glsl-reload-source.c4
-rw-r--r--tests/shaders/glsl-uniform-out-of-bounds.c6
-rw-r--r--tests/shaders/shader_runner.c4
-rw-r--r--tests/spec/arb_color_buffer_float/common.h7
-rw-r--r--tests/texturing/rg-draw-pixels.c4
-rw-r--r--tests/texturing/rg-teximage-01.c5
-rw-r--r--tests/texturing/rg-teximage-02.c6
-rw-r--r--tests/texturing/tex-srgb.c6
-rw-r--r--tests/texturing/tex-swizzle.c4
-rw-r--r--tests/texturing/texture-integer.c18
-rw-r--r--tests/texturing/texwrap.c68
26 files changed, 24 insertions, 403 deletions
diff --git a/tests/bugs/fdo28551.c b/tests/bugs/fdo28551.c
index c54bcd85f..52c709253 100644
--- a/tests/bugs/fdo28551.c
+++ b/tests/bugs/fdo28551.c
@@ -26,17 +26,6 @@
#include "piglit-util.h"
-#ifndef GL_FRAMEBUFFER
-#define GL_FRAMEBUFFER 0x8D40
-#endif
-#ifndef GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
-#endif
-
-#ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
-#endif
-
int piglit_width = 100;
int piglit_height = 100;
diff --git a/tests/fbo/fbo-drawbuffers-fragcolor.c b/tests/fbo/fbo-drawbuffers-fragcolor.c
index 585aa4847..f6ed72145 100644
--- a/tests/fbo/fbo-drawbuffers-fragcolor.c
+++ b/tests/fbo/fbo-drawbuffers-fragcolor.c
@@ -34,10 +34,6 @@
#include <string.h>
#include "piglit-util.h"
-#ifndef GL_COLOR_ATTACHMENT0
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#endif
-
int piglit_width = 256;
int piglit_height = 256;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
diff --git a/tests/fbo/fbo-drawbuffers-maxtargets.c b/tests/fbo/fbo-drawbuffers-maxtargets.c
index 9d3f442c2..968d8266a 100644
--- a/tests/fbo/fbo-drawbuffers-maxtargets.c
+++ b/tests/fbo/fbo-drawbuffers-maxtargets.c
@@ -34,10 +34,6 @@
#include <string.h>
#include "piglit-util.h"
-#ifndef GL_COLOR_ATTACHMENT0
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#endif
-
int piglit_width = 256;
int piglit_height = 256;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
index 01729ae3b..275bc580d 100644
--- a/tests/fbo/fbo-formats.h
+++ b/tests/fbo/fbo-formats.h
@@ -25,44 +25,6 @@
*
*/
-#ifndef GL_ARB_framebuffer_object
-#define GL_DEPTH_STENCIL 0x84F9
-#endif
-
-#ifndef GL_ARB_depth_buffer_float
-#define GL_DEPTH_COMPONENT32F 0x8CAC
-#define GL_DEPTH32F_STENCIL8 0x8CAD
-#endif
-
-#ifndef GL_ARB_texture_rg
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_R16 0x822A
-#define GL_RG8 0x822B
-#define GL_RG16 0x822C
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#endif
-
-#ifndef GL_VERSION_3_0
-#define GL_COMPRESSED_RED 0x8225
-#define GL_COMPRESSED_RG 0x8226
-#endif
struct format_desc {
GLenum internalformat;
diff --git a/tests/fbo/fbo-rg.c b/tests/fbo/fbo-rg.c
index 053f544fc..bf3b677b3 100644
--- a/tests/fbo/fbo-rg.c
+++ b/tests/fbo/fbo-rg.c
@@ -37,39 +37,6 @@
#include "piglit-util.h"
-#ifndef GL_ARB_texture_rg
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_R16 0x822A
-#define GL_RG8 0x822B
-#define GL_RG16 0x822C
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#endif
-
-#ifndef GL_VERSION_3_1
-#define GL_RED_SNORM 0x8F90
-#define GL_RG_SNORM 0x8F91
-#define GL_R8_SNORM 0x8F94
-#define GL_RG8_SNORM 0x8F95
-#define GL_R16_SNORM 0x8F98
-#define GL_RG16_SNORM 0x8F99
-#endif
#define EPSILON (1.0 / 255.0)
diff --git a/tests/general/depth-clamp-range.c b/tests/general/depth-clamp-range.c
index ea9693354..cb7b58ac2 100644
--- a/tests/general/depth-clamp-range.c
+++ b/tests/general/depth-clamp-range.c
@@ -35,11 +35,6 @@
int piglit_width = 150, piglit_height = 150;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH;
-/* In case the headers have the old enum name but not the new */
-#ifndef GL_DEPTH_CLAMP
-#define GL_DEPTH_CLAMP GL_DEPTH_CLAMP_NV
-#endif
-
void
piglit_init(int argc, char **argv)
{
diff --git a/tests/general/depth_clamp.c b/tests/general/depth_clamp.c
index 97df03c53..cf1afadca 100644
--- a/tests/general/depth_clamp.c
+++ b/tests/general/depth_clamp.c
@@ -39,11 +39,6 @@
int piglit_width = 100, piglit_height = 150;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH;
-/* In case the headers have the old enum name but not the new */
-#ifndef GL_DEPTH_CLAMP
-#define GL_DEPTH_CLAMP GL_DEPTH_CLAMP_NV
-#endif
-
void
piglit_init(int argc, char **argv)
{
diff --git a/tests/general/draw-elements-base-vertex.c b/tests/general/draw-elements-base-vertex.c
index fb65d4042..d53ad0f08 100644
--- a/tests/general/draw-elements-base-vertex.c
+++ b/tests/general/draw-elements-base-vertex.c
@@ -32,24 +32,6 @@
#include "piglit-util.h"
-/* GLEW hasn't added support for this yet. */
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-#ifndef GL_ARB_draw_elements_base_vertex
-#define GL_ARB_draw_elements_base_vertex
-typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode,
- GLsizei count, GLenum type,
- const GLvoid *indices,
- GLint basevertex);
-#endif
-
-static PFNGLDRAWELEMENTSBASEVERTEXPROC pglDrawElementsBaseVertex = NULL;
-
int piglit_width = 300, piglit_height = 300;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
@@ -65,9 +47,6 @@ piglit_init(int argc, char **argv)
GLuint vbo;
int i;
- pglDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)
- piglit_get_proc_address("glDrawElementsBaseVertex");
-
glewInit();
piglit_require_extension("GL_ARB_vertex_buffer_object");
piglit_require_extension("GL_ARB_draw_elements_base_vertex");
@@ -127,7 +106,7 @@ piglit_display(void)
glOrtho(0, piglit_width, 0, piglit_height, -1, 1);
glTranslatef(i * 20, 0, 0);
- pglDrawElementsBaseVertex(GL_QUADS, 8, GL_UNSIGNED_INT,
+ glDrawElementsBaseVertex(GL_QUADS, 8, GL_UNSIGNED_INT,
(void *)(uintptr_t)ib_offset, i * 4);
glPopMatrix();
diff --git a/tests/general/object_purgeable.c b/tests/general/object_purgeable.c
index 9793cffef..1c53b594f 100644
--- a/tests/general/object_purgeable.c
+++ b/tests/general/object_purgeable.c
@@ -28,10 +28,6 @@
#include "piglit-util.h"
#include "object_purgeable.h"
-PFNGLOBJECTPURGEABLEAPPLEPROC pglObjectPurgeableAPPLE = NULL;
-PFNGLOBJECTUNPURGEABLEAPPLEPROC pglObjectUnpurgeableAPPLE = NULL;
-PFNGLGETOBJECTPARAMETERIVAPPLEPROC pglGetObjectParameterivAPPLE = NULL;
-
#define FAIL_ON_ERROR(string) \
do { \
const GLenum err = glGetError(); \
@@ -57,13 +53,6 @@ void
init_ObjectPurgeableAPI(void)
{
piglit_require_extension("GL_APPLE_object_purgeable");
-
- pglObjectPurgeableAPPLE = (PFNGLOBJECTPURGEABLEAPPLEPROC)
- piglit_get_proc_address("glObjectPurgeableAPPLE");
- pglObjectUnpurgeableAPPLE = (PFNGLOBJECTUNPURGEABLEAPPLEPROC)
- piglit_get_proc_address("glObjectUnpurgeableAPPLE");
- pglGetObjectParameterivAPPLE = (PFNGLGETOBJECTPARAMETERIVAPPLEPROC)
- piglit_get_proc_address("glGetObjectParameterivAPPLE");
}
@@ -88,10 +77,10 @@ test_DefaultObject(GLenum objectType)
* "INVALID_VALUE is generated if the <name> parameter of
* ObjectUnpurgeableAPPLE or ObjectUnpurgeableAPPLE is zero."
*/
- (void) (*pglObjectPurgeableAPPLE)(objectType, 0, GL_VOLATILE_APPLE);
+ glObjectPurgeableAPPLE(objectType, 0, GL_VOLATILE_APPLE);
EXPECT_AN_ERROR("glObjectPurgeableAPPLE", GL_INVALID_VALUE);
- (void) (*pglObjectUnpurgeableAPPLE)(objectType, 0, GL_RETAINED_APPLE);
+ glObjectUnpurgeableAPPLE(objectType, 0, GL_RETAINED_APPLE);
EXPECT_AN_ERROR("glObjectUnpurgeableAPPLE", GL_INVALID_VALUE);
/* From the GL_APPLE_object_purgeable spec:
@@ -99,7 +88,7 @@ test_DefaultObject(GLenum objectType)
* "INVALID_VALUE is generated if the <name> parameter of
* GetObjectParameterivAPPLE is zero."
*/
- (*pglGetObjectParameterivAPPLE)(objectType, 0, GL_PURGEABLE_APPLE,
+ glGetObjectParameterivAPPLE(objectType, 0, GL_PURGEABLE_APPLE,
&param);
EXPECT_AN_ERROR("glGetObjectParameterivAPPLE", GL_INVALID_VALUE);
@@ -113,7 +102,7 @@ test_ObjectpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
GLboolean pass = GL_TRUE;
GLenum ret;
- ret = (*pglObjectPurgeableAPPLE)(objectType, name, option);
+ ret = glObjectPurgeableAPPLE(objectType, name, option);
FAIL_ON_ERROR("glObjectPurgeableAPPLE");
switch (option) {
@@ -168,7 +157,7 @@ test_ObjectpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
* "If ObjectPurgeableAPPLE is called and PURGEABLE_APPLE is
* already TRUE, the error INVALID_OPERATION is generated."
*/
- (void) (*pglObjectPurgeableAPPLE)(objectType, name, option);
+ glObjectPurgeableAPPLE(objectType, name, option);
EXPECT_AN_ERROR("glObjectPurgeableAPPLE", GL_INVALID_OPERATION);
return pass;
@@ -181,7 +170,7 @@ test_ObjectunpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
GLboolean pass = GL_TRUE;
GLenum ret;
- ret = (*pglObjectUnpurgeableAPPLE)(objectType, name, option);
+ ret = glObjectUnpurgeableAPPLE(objectType, name, option);
FAIL_ON_ERROR("glObjectUnpurgeableAPPLE");
switch (option) {
@@ -236,7 +225,7 @@ test_ObjectunpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
* "If ObjectUnpurgeableAPPLE is called and PURGEABLE_APPLE is
* already FALSE, the error INVALID_OPERATION is returned."
*/
- (void) (*pglObjectUnpurgeableAPPLE)(objectType, name, option);
+ glObjectUnpurgeableAPPLE(objectType, name, option);
EXPECT_AN_ERROR("glObjectPurgeableAPPLE", GL_INVALID_OPERATION);
return pass;
@@ -249,7 +238,7 @@ test_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum expect)
GLboolean pass = GL_TRUE;
GLint param;
- (*pglGetObjectParameterivAPPLE)(objectType, name, GL_PURGEABLE_APPLE,
+ glGetObjectParameterivAPPLE(objectType, name, GL_PURGEABLE_APPLE,
&param);
FAIL_ON_ERROR("glGetObjectParameterivAPPLE");
diff --git a/tests/general/object_purgeable.h b/tests/general/object_purgeable.h
index 8acd85e47..b0823c069 100644
--- a/tests/general/object_purgeable.h
+++ b/tests/general/object_purgeable.h
@@ -26,35 +26,6 @@
*/
#ifndef OBJECT_PURGEABLE_H
-#define OBJECT_PURGEABLE_H
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-
-#ifndef GL_APPLE_object_purgeable
-#define GL_APPLE_object_purgeable 1
-
-#define GL_RELEASED_APPLE 0x8A19
-#define GL_VOLATILE_APPLE 0x8A1A
-#define GL_RETAINED_APPLE 0x8A1B
-#define GL_UNDEFINED_APPLE 0x8A1C
-#define GL_PURGEABLE_APPLE 0x8A1D
-#define GL_BUFFER_OBJECT_APPLE 0x85B3
-
-
-typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
-typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);
-typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint* params);
-
-#endif
-
-extern PFNGLOBJECTPURGEABLEAPPLEPROC pglObjectPurgeableAPPLE;
-extern PFNGLOBJECTUNPURGEABLEAPPLEPROC pglObjectUnpurgeableAPPLE;
-extern PFNGLGETOBJECTPARAMETERIVAPPLEPROC pglGetObjectParameterivAPPLE;
extern void init_ObjectPurgeableAPI(void);
diff --git a/tests/general/provoking-vertex.c b/tests/general/provoking-vertex.c
index 701686b8f..98ee307b9 100644
--- a/tests/general/provoking-vertex.c
+++ b/tests/general/provoking-vertex.c
@@ -36,35 +36,14 @@
int piglit_width = 400, piglit_height = 300;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-#ifndef GL_EXT_provoking_vertex
-#define GL_EXT_provoking_vertex
-#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
-#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
-#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
-#define GL_PROVOKING_VERTEX_EXT 0x8E4F
-typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
-#endif
-
-static PFNGLPROVOKINGVERTEXEXTPROC pglProvokingVertexEXT = 0;
-
void
piglit_init(int argc, char **argv)
{
piglit_require_extension("GL_EXT_provoking_vertex");
- pglProvokingVertexEXT = (PFNGLPROVOKINGVERTEXEXTPROC)
- piglit_get_proc_address("glProvokingVertexEXT");
-
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
glShadeModel(GL_FLAT);
-
glClearColor(0.2, 0.2, 0.2, 1.0);
}
@@ -77,7 +56,7 @@ piglit_display(void)
GLboolean pass = GL_TRUE;
glClear(GL_COLOR_BUFFER_BIT);
- pglProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT);
+ glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT);
glBegin(GL_TRIANGLES);
glColor3f(1.0, 0.0, 0.0);
glVertex3i(125, 125, 0);
@@ -87,7 +66,7 @@ piglit_display(void)
glVertex3i(150, 150, 0);
glEnd();
- pglProvokingVertexEXT(GL_LAST_VERTEX_CONVENTION_EXT);
+ glProvokingVertexEXT(GL_LAST_VERTEX_CONVENTION_EXT);
glBegin(GL_TRIANGLES);
glColor3f(1.0, 0.0, 0.0);
glVertex3i(200, 125, 0);
diff --git a/tests/general/sync_api.c b/tests/general/sync_api.c
index e05b1c76b..ef4d2ef40 100644
--- a/tests/general/sync_api.c
+++ b/tests/general/sync_api.c
@@ -46,45 +46,6 @@ int piglit_height = 300;
} \
} while (0)
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-
-#ifndef GL_ARB_sync
-#define GL_ARB_sync 1
-
-#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
-#define GL_OBJECT_TYPE 0x9112
-#define GL_SYNC_CONDITION 0x9113
-#define GL_SYNC_STATUS 0x9114
-#define GL_SYNC_FLAGS 0x9115
-#define GL_SYNC_FENCE 0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
-#define GL_UNSIGNALED 0x9118
-#define GL_SIGNALED 0x9119
-#define GL_ALREADY_SIGNALED 0x911A
-#define GL_TIMEOUT_EXPIRED 0x911B
-#define GL_CONDITION_SATISFIED 0x911C
-#define GL_WAIT_FAILED 0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
-#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
-
-typedef int64_t GLint64;
-typedef uint64_t GLuint64;
-typedef struct __GLsync *GLsync;
-
-typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
-typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
-typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
-typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
-typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params);
-typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
-#endif
-
static void
reshape(int width, int height)
{
diff --git a/tests/general/timer_query.c b/tests/general/timer_query.c
index 9ff9e4d77..28f495c4c 100644
--- a/tests/general/timer_query.c
+++ b/tests/general/timer_query.c
@@ -33,29 +33,10 @@
#include "piglit-util.h"
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-#ifndef GL_ARB_timer_query
-#define GL_TIME_ELAPSED 0x88BF
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
-typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
-#endif
-
int piglit_width = 180, piglit_height = 100;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH;
static GLuint timer_query;
-static PFNGLGENQUERIESPROC gen_queries = NULL;
-static PFNGLBEGINQUERYPROC begin_query = NULL;
-static PFNGLENDQUERYPROC end_query = NULL;
-static PFNGLGETQUERYIVPROC get_queryiv = NULL;
-static PFNGLGETQUERYOBJECTIVPROC get_query_objectiv = NULL;
-static PFNGLGETQUERYOBJECTI64VPROC get_query_objecti64v = NULL;
-static PFNGLGETQUERYOBJECTUI64VPROC get_query_objectui64v = NULL;
void
piglit_init(int argc, char **argv)
@@ -66,24 +47,16 @@ piglit_init(int argc, char **argv)
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
- gen_queries = GLEW_GET_FUN(__glewGenQueriesARB);
- begin_query = GLEW_GET_FUN(__glewBeginQueryARB);
- end_query = GLEW_GET_FUN(__glewEndQueryARB);
- get_queryiv = GLEW_GET_FUN(__glewGetQueryivARB);
- get_query_objectiv = GLEW_GET_FUN(__glewGetQueryObjectivARB);
- get_query_objecti64v = GLEW_GET_FUN(__glewGetQueryObjecti64vEXT);
- get_query_objectui64v = GLEW_GET_FUN(__glewGetQueryObjectui64vEXT);
-
/* It is legal for a driver to support the query API but not have
* any query bits. I wonder how many applications actually check for
* this case...
*/
- (*get_queryiv)(GL_TIME_ELAPSED, GL_QUERY_COUNTER_BITS, &query_bits);
+ (*glGetQueryivARB)(GL_TIME_ELAPSED, GL_QUERY_COUNTER_BITS, &query_bits);
if (query_bits == 0) {
piglit_report_result(PIGLIT_SKIP);
}
- (*gen_queries)(1, &timer_query);
+ (*glGenQueriesARB)(1, &timer_query);
}
enum piglit_result
@@ -97,7 +70,7 @@ piglit_display(void)
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/* Start a query */
- (*begin_query)(GL_TIME_ELAPSED_EXT, timer_query);
+ (*glBeginQueryARB)(GL_TIME_ELAPSED_EXT, timer_query);
/* Paint something */
glColor3ub(0xff, 0xff, 0xff);
@@ -110,16 +83,16 @@ piglit_display(void)
glEnd();
/* Stop a query */
- (*end_query)(GL_TIME_ELAPSED_EXT);
+ (*glEndQueryARB)(GL_TIME_ELAPSED_EXT);
/* In this case poll until available */
while (!available)
- (*get_query_objectiv)(timer_query, GL_QUERY_RESULT_AVAILABLE, &available);
+ (*glGetQueryObjectivARB)(timer_query, GL_QUERY_RESULT_AVAILABLE, &available);
/* Get the result */
- (*get_query_objectiv)(timer_query, GL_QUERY_RESULT, &nsecs);
- (*get_query_objecti64v)(timer_query, GL_QUERY_RESULT, &nsecs64);
- (*get_query_objectui64v)(timer_query, GL_QUERY_RESULT, &nsecs64u);
+ (*glGetQueryObjectivARB)(timer_query, GL_QUERY_RESULT, &nsecs);
+ (*glGetQueryObjecti64vEXT)(timer_query, GL_QUERY_RESULT, &nsecs64);
+ (*glGetQueryObjectui64vEXT)(timer_query, GL_QUERY_RESULT, &nsecs64u);
if ((nsecs & 0xffffffff) != (nsecs64 & 0xffffffff)) {
printf("timer_query: 32 and 64-bit results differ!\n");
diff --git a/tests/shaders/fp-unpack-01.c b/tests/shaders/fp-unpack-01.c
index dfaf36916..b470b3c56 100644
--- a/tests/shaders/fp-unpack-01.c
+++ b/tests/shaders/fp-unpack-01.c
@@ -59,11 +59,6 @@ union uif {
unsigned int ui;
};
-
-#ifndef GL_HALF_FLOAT
-#define GL_HALF_FLOAT 0x140B
-#endif
-
static const GLenum types[4] = {
GL_BYTE,
GL_UNSIGNED_BYTE,
diff --git a/tests/shaders/glsl-fs-texture2drect.c b/tests/shaders/glsl-fs-texture2drect.c
index 6242fd20a..367786fdb 100644
--- a/tests/shaders/glsl-fs-texture2drect.c
+++ b/tests/shaders/glsl-fs-texture2drect.c
@@ -32,10 +32,6 @@
#include "piglit-util.h"
-#ifndef GL_TEXTURE_RECTANGLE
-#define GL_TEXTURE_RECTANGLE 0x84F5
-#endif
-
int piglit_width = 50, piglit_height = 50;
int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE;
diff --git a/tests/shaders/glsl-reload-source.c b/tests/shaders/glsl-reload-source.c
index ce33b10e3..8e4c505d7 100644
--- a/tests/shaders/glsl-reload-source.c
+++ b/tests/shaders/glsl-reload-source.c
@@ -35,10 +35,6 @@
#include "piglit-util.h"
#include "piglit-framework.h"
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-
int piglit_width = 100, piglit_height = 100;
int piglit_window_mode = GLUT_RGB;
diff --git a/tests/shaders/glsl-uniform-out-of-bounds.c b/tests/shaders/glsl-uniform-out-of-bounds.c
index b4e861c50..a689339de 100644
--- a/tests/shaders/glsl-uniform-out-of-bounds.c
+++ b/tests/shaders/glsl-uniform-out-of-bounds.c
@@ -37,10 +37,6 @@
#include "piglit-util.h"
#include "piglit-framework.h"
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-
int piglit_width = 100, piglit_height = 100;
int piglit_window_mode = GLUT_RGB;
@@ -126,7 +122,7 @@ static const char fs_vector_template[] =
static void test_vector(const char *glsl_type, const char * suffix,
- void (APIENTRY *uniform)(GLint, GLsizei, const GLfloat*))
+ void (GLAPIENTRY *uniform)(GLint, GLsizei, const GLfloat*))
{
char buffer[2*sizeof(vs_vector_template)];
GLuint vs, fs;
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 9a7ce3ee5..f3f797dba 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -33,10 +33,6 @@
#include <ctype.h>
#include "piglit-util.h"
-#ifndef GL_GEOMETRY_SHADER_ARB
-#define GL_GEOMETRY_SHADER_ARB 0x8DD9
-#endif
-
int piglit_width = 250, piglit_height = 250;
int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE;
diff --git a/tests/spec/arb_color_buffer_float/common.h b/tests/spec/arb_color_buffer_float/common.h
index 1f7d042bd..e3873ac9c 100644
--- a/tests/spec/arb_color_buffer_float/common.h
+++ b/tests/spec/arb_color_buffer_float/common.h
@@ -32,13 +32,6 @@
#include "piglit-util.h"
-#ifndef GL_COLOR_ATTACHMENT0
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#endif
-#ifndef GL_COLOR_ATTACHMENT1
-#define GL_COLOR_ATTACHMENT1 0x8CE1
-#endif
-
int piglit_width = 128;
int piglit_height = 128;
int piglit_window_mode = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE;
diff --git a/tests/texturing/rg-draw-pixels.c b/tests/texturing/rg-draw-pixels.c
index eabd83598..2260ae9d4 100644
--- a/tests/texturing/rg-draw-pixels.c
+++ b/tests/texturing/rg-draw-pixels.c
@@ -31,10 +31,6 @@
#include "piglit-util.h"
#include "piglit-framework.h"
-#ifndef GL_RG
-#define GL_RG 0x8227
-#endif
-
int piglit_width = 40, piglit_height = 30;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
diff --git a/tests/texturing/rg-teximage-01.c b/tests/texturing/rg-teximage-01.c
index b923031f4..f35e229bc 100644
--- a/tests/texturing/rg-teximage-01.c
+++ b/tests/texturing/rg-teximage-01.c
@@ -36,11 +36,6 @@
#include "piglit-util.h"
#include "rg-teximage-common.h"
-#ifndef GL_ARB_texture_rg
-#define GL_R8 0x8229
-#define GL_R16 0x822A
-#endif
-
#define WIDTH 256
#define HEIGHT 256
static float rgba_image[4 * WIDTH * HEIGHT];
diff --git a/tests/texturing/rg-teximage-02.c b/tests/texturing/rg-teximage-02.c
index 5479b415a..5958cfbd5 100644
--- a/tests/texturing/rg-teximage-02.c
+++ b/tests/texturing/rg-teximage-02.c
@@ -36,12 +36,6 @@
#include "piglit-util.h"
#include "rg-teximage-common.h"
-#ifndef GL_ARB_texture_rg
-#define GL_RG 0x8227
-#define GL_RG8 0x822B
-#define GL_RG16 0x822C
-#endif
-
#define WIDTH 256
#define HEIGHT 256
static float rgba_image[4 * WIDTH * HEIGHT];
diff --git a/tests/texturing/tex-srgb.c b/tests/texturing/tex-srgb.c
index 722e9c47f..049d85bba 100644
--- a/tests/texturing/tex-srgb.c
+++ b/tests/texturing/tex-srgb.c
@@ -32,12 +32,6 @@
#include "piglit-util.h"
-#ifndef GL_EXT_texture_sRGB_decode
-#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48
-#define GL_DECODE_EXT 0x8A49
-#define GL_SKIP_DECODE_EXT 0x8A4A
-#endif
-
int piglit_width = 128, piglit_height = 128;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
diff --git a/tests/texturing/tex-swizzle.c b/tests/texturing/tex-swizzle.c
index ae6076020..63dd79cc7 100644
--- a/tests/texturing/tex-swizzle.c
+++ b/tests/texturing/tex-swizzle.c
@@ -33,10 +33,6 @@
#include "piglit-util.h"
-#ifndef GL_TEXTURE_SWIZZLE_RGBA_EXT
-#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
-#endif
-
int piglit_width = 400, piglit_height = 300;
int piglit_window_mode = GLUT_RGB | GLUT_DOUBLE;
diff --git a/tests/texturing/texture-integer.c b/tests/texturing/texture-integer.c
index edffdc97e..345d3b01b 100644
--- a/tests/texturing/texture-integer.c
+++ b/tests/texturing/texture-integer.c
@@ -29,16 +29,6 @@
#include "piglit-util.h"
-/* These are missing in some versions of glext.h */
-#ifndef GL_MIN_PROGRAM_TEXEL_OFFSET_EXT
-#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904
-#endif
-
-#ifndef GL_MAX_PROGRAM_TEXEL_OFFSET_EXT
-#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905
-#endif
-
-
#define ELEMENTS(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY[0]))
@@ -548,19 +538,19 @@ test_limits(void)
{
GLint val = 0;
- glGetIntegerv(GL_MIN_PROGRAM_TEXEL_OFFSET_EXT, &val);
+ glGetIntegerv(GL_MIN_PROGRAM_TEXEL_OFFSET, &val);
if (val > -8) {
fprintf(stderr,
- "%s failure: query of GL_MIN_PROGRAM_TEXEL_OFFSET_EXT "
+ "%s failure: query of GL_MIN_PROGRAM_TEXEL_OFFSET "
"returned %d\n",
TestName, val);
return GL_FALSE;
}
- glGetIntegerv(GL_MAX_PROGRAM_TEXEL_OFFSET_EXT, &val);
+ glGetIntegerv(GL_MAX_PROGRAM_TEXEL_OFFSET, &val);
if (val < 7) {
fprintf(stderr,
- "%s failure: query of GL_MAX_PROGRAM_TEXEL_OFFSET_EXT "
+ "%s failure: query of GL_MAX_PROGRAM_TEXEL_OFFSET "
"returned %d\n",
TestName, val);
return GL_FALSE;
diff --git a/tests/texturing/texwrap.c b/tests/texturing/texwrap.c
index 4b743a6af..60c0c0ae7 100644
--- a/tests/texturing/texwrap.c
+++ b/tests/texturing/texwrap.c
@@ -68,40 +68,6 @@
#include "piglit-util.h"
-#ifndef GL_TEXTURE_SWIZZLE_RGBA_EXT
-#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
-#endif
-
-#ifndef GL_VERSION_3_0
-#define GL_VERSION_3_0 1
-#define GL_RGBA32F 0x8814
-#define GL_RGB32F 0x8815
-#define GL_RGBA16F 0x881A
-#define GL_RGB16F 0x881B
-#define GL_TEXTURE_RED_TYPE 0x8C10
-#define GL_TEXTURE_GREEN_TYPE 0x8C11
-#define GL_TEXTURE_BLUE_TYPE 0x8C12
-#define GL_TEXTURE_ALPHA_TYPE 0x8C13
-#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
-#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
-#define GL_TEXTURE_DEPTH_TYPE 0x8C16
-#define GL_UNSIGNED_NORMALIZED 0x8C17
-#define GL_R11F_G11F_B10F 0x8C3A
-#define GL_RGB9_E5 0x8C3D
-#define GL_RGBA32UI 0x8D70
-#define GL_RGB32UI 0x8D71
-#define GL_RGBA16UI 0x8D76
-#define GL_RGB16UI 0x8D77
-#define GL_RGBA8UI 0x8D7C
-#define GL_RGB8UI 0x8D7D
-#define GL_RGBA32I 0x8D82
-#define GL_RGB32I 0x8D83
-#define GL_RGBA16I 0x8D88
-#define GL_RGB16I 0x8D89
-#define GL_RGBA8I 0x8D8E
-#define GL_RGB8I 0x8D8F
-#endif
-
/* Only *_ARB versions of these exist. I am lazy to add the suffix. */
#define GL_ALPHA32F 0x8816
#define GL_INTENSITY32F 0x8817
@@ -125,40 +91,6 @@
/* Only *_ATI versions of these exist. It's nicer without the suffix. */
#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC 0x8837
-
-#ifndef GL_ARB_texture_rg
-#define GL_RG 0x8227
-#define GL_RG_INTEGER 0x8228
-#define GL_R8 0x8229
-#define GL_R16 0x822A
-#define GL_RG8 0x822B
-#define GL_RG16 0x822C
-#define GL_R16F 0x822D
-#define GL_R32F 0x822E
-#define GL_RG16F 0x822F
-#define GL_RG32F 0x8230
-#define GL_R8I 0x8231
-#define GL_R8UI 0x8232
-#define GL_R16I 0x8233
-#define GL_R16UI 0x8234
-#define GL_R32I 0x8235
-#define GL_R32UI 0x8236
-#define GL_RG8I 0x8237
-#define GL_RG8UI 0x8238
-#define GL_RG16I 0x8239
-#define GL_RG16UI 0x823A
-#define GL_RG32I 0x823B
-#define GL_RG32UI 0x823C
-#endif
-
-#ifndef GL_ARB_texture_compression_rgtc
-#define GL_ARB_texture_compression_rgtc 1
-#define GL_COMPRESSED_RED_RGTC1 0x8DBB
-#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
-#define GL_COMPRESSED_RG_RGTC2 0x8DBD
-#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
-#endif /* GL_ARB_texture_compression_rgtc */
-
/* Formats. */
#define FORMAT(f) #f, f