summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-20 10:02:15 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-20 10:02:15 +0800
commit5e8240320ac39a3e8984054bc300743725312741 (patch)
treefa9575a5d33bbb524c549558e2dcf9bae9aca9eb /src/mesa/main
parent1658f80153b84d7d7f0bebeaaf89f9850f782923 (diff)
parentd8299af4ab6fe4b334292e3b6e69e4331c05d86f (diff)
Merge remote branch 'origin/opengl-es-v2'
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dd.h10
-rw-r--r--src/mesa/main/dispatch.c4
-rw-r--r--src/mesa/main/enums.c8
-rw-r--r--src/mesa/main/extensions.c3
-rw-r--r--src/mesa/main/getstring.c5
-rw-r--r--src/mesa/main/glheader.h7
-rw-r--r--src/mesa/main/mtypes.h3
-rw-r--r--src/mesa/main/remap.c2
-rw-r--r--src/mesa/main/texgen.c4
-rw-r--r--src/mesa/main/texgen.h6
-rw-r--r--src/mesa/main/texgetimage.c62
11 files changed, 83 insertions, 31 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index e99e87d905..6705c901dd 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1021,6 +1021,16 @@ struct dd_function_table {
void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q,
GLenum mode);
void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q);
+
+#if FEATURE_OES_draw_texture
+ /**
+ * \name GL_OES_draw_texture interface
+ */
+ /*@{*/
+ void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+ GLfloat width, GLfloat height);
+ /*@}*/
+#endif
};
diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c
index eb0d1ff8a7..a6a57020cc 100644
--- a/src/mesa/main/dispatch.c
+++ b/src/mesa/main/dispatch.c
@@ -87,6 +87,10 @@
#define GLAPIENTRY
#endif
+#ifdef GLX_INDIRECT_RENDERING
+/* those link to libglapi.a should provide the entry points */
+#define _GLAPI_SKIP_PROTO_ENTRY_POINTS
+#endif
#include "glapi/glapitemp.h"
#endif /* USE_X86_ASM */
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 2273138d23..aaf17aafdd 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -25,10 +25,10 @@
* SOFTWARE.
*/
-#include "glheader.h"
-#include "mfeatures.h"
-#include "enums.h"
-#include "imports.h"
+#include "main/glheader.h"
+#include "main/mfeatures.h"
+#include "main/enums.h"
+#include "main/imports.h"
typedef struct {
size_t offset;
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5fc0b1cfde..00427aa580 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -189,6 +189,9 @@ static const struct {
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
{ ON, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ OFF, "GL_S3_s3tc", F(S3_s3tc) },
+#if FEATURE_OES_draw_texture
+ { OFF, "GL_OES_draw_texture", F(OES_draw_texture) },
+#endif /* FEATURE_OES_draw_texture */
};
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index e76a790d0a..c203b046a5 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -191,6 +191,11 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
case GL_SELECTION_BUFFER_POINTER:
*params = ctx->Select.Buffer;
break;
+#if FEATURE_point_size_array
+ case GL_POINT_SIZE_ARRAY_POINTER_OES:
+ *params = (GLvoid *) ctx->Array.ArrayObj->PointSize.Ptr;
+ break;
+#endif
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" );
return;
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 81d4ccf919..77544c88c6 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -57,6 +57,13 @@
#ifndef GL_FIXED
#define GL_FIXED 0x140C
+typedef int GLfixed;
+typedef int GLclampx;
+#endif
+
+
+#ifndef GL_OES_EGL_image
+typedef void *GLeglImageOES;
#endif
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5227565f87..7eff5cadd0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2519,6 +2519,9 @@ struct gl_extensions
GLboolean SGIS_texture_lod;
GLboolean TDFX_texture_compression_FXT1;
GLboolean S3_s3tc;
+#if FEATURE_OES_draw_texture
+ GLboolean OES_draw_texture;
+#endif /* FEATURE_OES_draw_texture */
/** The extension string */
const GLubyte *String;
/** Number of supported extensions */
diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c
index 0385ae8d7d..5f32a48258 100644
--- a/src/mesa/main/remap.c
+++ b/src/mesa/main/remap.c
@@ -45,7 +45,7 @@
#define need_MESA_remap_table
-#include "remap_helper.h"
+#include "main/remap_helper.h"
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
#define MAX_ENTRY_POINTS 16
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index be4e03bc56..2ae839b2a6 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -210,7 +210,7 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
{
GLfloat p[4];
@@ -269,7 +269,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
{
struct gl_texture_unit *texUnit;
diff --git a/src/mesa/main/texgen.h b/src/mesa/main/texgen.h
index f6924ef722..eb4626033a 100644
--- a/src/mesa/main/texgen.h
+++ b/src/mesa/main/texgen.h
@@ -41,8 +41,14 @@ extern void GLAPIENTRY
_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
extern void GLAPIENTRY
+_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param );
+
+extern void GLAPIENTRY
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param );
+extern void GLAPIENTRY
+_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
+
extern void
_mesa_init_texgen_dispatch(struct _glapi_table *disp);
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index d786c41d2e..d7943eaa1e 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -42,30 +42,6 @@
-#if FEATURE_EXT_texture_sRGB
-
-/**
- * Convert a float value from linear space to a
- * non-linear sRGB value in [0, 255].
- * Not terribly efficient.
- */
-static INLINE GLfloat
-linear_to_nonlinear(GLfloat cl)
-{
- /* can't have values outside [0, 1] */
- GLfloat cs;
- if (cl < 0.0031308f) {
- cs = 12.92f * cl;
- }
- else {
- cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055);
- }
- return cs;
-}
-
-#endif /* FEATURE_EXT_texture_sRGB */
-
-
/**
* Can the given type represent negative values?
*/
@@ -233,6 +209,29 @@ get_tex_ycbcr(GLcontext *ctx, GLuint dimensions,
}
+#if FEATURE_EXT_texture_sRGB
+
+
+/**
+ * Convert a float value from linear space to a
+ * non-linear sRGB value in [0, 255].
+ * Not terribly efficient.
+ */
+static INLINE GLfloat
+linear_to_nonlinear(GLfloat cl)
+{
+ /* can't have values outside [0, 1] */
+ GLfloat cs;
+ if (cl < 0.0031308f) {
+ cs = 12.92f * cl;
+ }
+ else {
+ cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055);
+ }
+ return cs;
+}
+
+
/**
* glGetTexImagefor sRGB pixels;
*/
@@ -284,6 +283,21 @@ get_tex_srgb(GLcontext *ctx, GLuint dimensions,
}
+#else /* FEATURE_EXT_texture_sRGB */
+
+
+static INLINE void
+get_tex_srgb(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ ASSERT_NO_FEATURE();
+}
+
+
+#endif /* FEATURE_EXT_texture_sRGB */
+
+
/**
* glGetTexImagefor RGBA, Luminance, etc. pixels.
* This is the slow way since we use texture sampling.