From 7870298086cfdde020437e23ba86abb61741129e Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sun, 25 Oct 2009 23:24:18 +0800 Subject: glapi: Allow normal entry points to be skipped. Reorganize glapitemp.h such that it is possible to skip normal entry points or protocol entry points by defining _GLAPI_SKIP_NORMAL_ENTRY_POINTS or _GLAPI_SKIP_PROTO_ENTRY_POINTS. Protocol entry points are those with different GLX protocols. They are skipped in libglapi.a when GLX_INDIRECT_RENDERING is defined. Signed-off-by: Chia-I Wu --- src/mesa/main/dispatch.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c index 97d213e8e1..cd5410514d 100644 --- a/src/mesa/main/dispatch.c +++ b/src/mesa/main/dispatch.c @@ -89,6 +89,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 */ -- cgit v1.2.3 From c3d61d378574878deedb44d84f506ca23e66c6ca Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 7 Sep 2009 14:46:22 +0800 Subject: mesa/main: Add support for point size array in _mesa_GetPointerv. Signed-off-by: Chia-I Wu --- src/mesa/main/getstring.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 6599ed9698..4b1f4b0ea1 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -242,6 +242,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; -- cgit v1.2.3 From 8d2edbf1395ca1e2d23b3bd2ba2c5d54f21d377b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 21 Sep 2009 18:46:28 +0800 Subject: mesa/main: Add more OpenGL ES types to glheader.h. Signed-off-by: Chia-I Wu --- src/mesa/main/glheader.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/main') 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 -- cgit v1.2.3 From 5b426288c2dbc42ef44ea13fe37afa77223107bb Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 3 Sep 2009 11:03:20 +0800 Subject: glapi: Include headers with directory prefixes. This allows different sets of generated sources and headers to be used. Signed-off-by: Chia-I Wu --- src/mesa/main/enums.c | 8 ++++---- src/mesa/main/remap.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index 606d50c59a..dedb6af7b5 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/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 -- cgit v1.2.3 From 7cdf8ab0967b1a80c16d317ed5b0e3b810312ad1 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 20 Oct 2009 12:39:56 +0800 Subject: mesa/main: Make _mesa_TexGenf and _mesa_GetTexGenfv global again. They are needed by OpenGL ES overlay. Signed-off-by: Chia-I Wu --- src/mesa/main/texgen.c | 4 ++-- src/mesa/main/texgen.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c index 733e129fcf..8d114108f8 100644 --- a/src/mesa/main/texgen.c +++ b/src/mesa/main/texgen.c @@ -208,7 +208,7 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) } -static void GLAPIENTRY +void GLAPIENTRY _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) { _mesa_TexGenfv(coord, pname, ¶m); @@ -261,7 +261,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 @@ -40,9 +40,15 @@ 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); -- cgit v1.2.3 From 34064756a5e2c8952c9de26eaebafddabd562540 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 22 Sep 2009 15:00:24 +0800 Subject: mesa/es: Add support for GL_OES_draw_texture. Signed-off-by: Chia-I Wu --- src/mesa/main/dd.h | 10 ++++++++++ src/mesa/main/extensions.c | 3 +++ src/mesa/main/mtypes.h | 3 +++ 3 files changed, 16 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 99f2cad402..0488a693b2 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -1046,6 +1046,16 @@ struct dd_function_table { GLbitfield, GLuint64); /*@}*/ #endif + +#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/extensions.c b/src/mesa/main/extensions.c index 54cf37c5f4..7a8184ffc8 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -185,6 +185,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/mtypes.h b/src/mesa/main/mtypes.h index 94d29a7dbb..e91c7e5ac1 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2485,6 +2485,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; }; -- cgit v1.2.3 From 7fb41df2cbae4cf35d0f73c2261a9409a1367903 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 30 Oct 2009 14:09:09 +0800 Subject: mesa/main: linear_to_nonlinear is not always available. Signed-off-by: Chia-I Wu --- src/mesa/main/texgetimage.c | 62 +++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 24 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 2f88718933..4b0915b3b2 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. -- cgit v1.2.3