Author: jgardou Date: Sun Sep 22 00:25:59 2013 New Revision: 60300
URL: http://svn.reactos.org/svn/reactos?rev=60300&view=rev Log: [MESA/OPENGL32] - Disable un-used mesa features (ATI/NV programs) for a leaner build - Print a fixme instead of asserting in software version of wglGetProcAddress
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/CMakeLists.txt trunk/reactos/dll/opengl/mesa/src/mesa/main/arbprogram.c trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c trunk/reactos/dll/opengl/mesa/src/mesa/main/mfeatures.h trunk/reactos/dll/opengl/mesa/src/mesa/program/CMakeLists.txt trunk/reactos/dll/opengl/opengl32/swimpl.c
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/CMakeLists.txt [iso-8859-1] Sun Sep 22 00:25:59 2013 @@ -8,7 +8,7 @@ api_validate.c accum.c arbprogram.c - atifragshader.c + # atifragshader.c attrib.c arrayobj.c blend.c @@ -54,7 +54,7 @@ mipmap.c mm.c multisample.c - nvprogram.c + # nvprogram.c pack.c pbo.c pixel.c
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/arbprogram.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/arbprogram.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/arbprogram.c [iso-8859-1] Sun Sep 22 00:25:59 2013 @@ -370,6 +370,7 @@
base = & prog->Base; } +#if FEATURE_NV_vertex_program else if ((target == GL_VERTEX_PROGRAM_ARB || target == GL_VERTEX_STATE_PROGRAM_NV) && ctx->Extensions.NV_vertex_program) { @@ -378,6 +379,7 @@
base = & prog->Base; } +#endif else if (target == GL_FRAGMENT_PROGRAM_ARB && ctx->Extensions.ARB_fragment_program) { struct gl_fragment_program *prog = ctx->FragmentProgram.Current; @@ -385,6 +387,7 @@
base = & prog->Base; } +#if FEATURE_NV_fragment_program else if (target == GL_FRAGMENT_PROGRAM_NV && ctx->Extensions.NV_fragment_program) { struct gl_fragment_program *prog = ctx->FragmentProgram.Current; @@ -392,6 +395,7 @@
base = & prog->Base; } +#endif else { _mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(target)"); return;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c [iso-8859-1] Sun Sep 22 00:25:59 2013 @@ -5027,7 +5027,7 @@ /* * GL_NV_fragment_program */ -#if FEATURE_NV_fragment_program +#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program static void GLAPIENTRY save_ProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) @@ -5148,6 +5148,7 @@ } }
+#if FEATURE_NV_fragment_program static void GLAPIENTRY save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) @@ -5178,7 +5179,6 @@ } }
- static void GLAPIENTRY save_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const float v[]) @@ -5204,7 +5204,7 @@ (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } - +#endif #endif /* FEATURE_NV_fragment_program */
@@ -10218,7 +10218,9 @@ SET_GetVertexAttribdvARB(table, _mesa_GetVertexAttribdvARB); SET_GetVertexAttribfvARB(table, _mesa_GetVertexAttribfvARB); SET_GetVertexAttribivARB(table, _mesa_GetVertexAttribivARB); +#if FEATURE_NV_vertex_program SET_GetVertexAttribPointervNV(table, _mesa_GetVertexAttribPointervNV); +#endif SET_ProgramEnvParameter4dARB(table, save_ProgramEnvParameter4dARB); SET_ProgramEnvParameter4dvARB(table, save_ProgramEnvParameter4dvARB); SET_ProgramEnvParameter4fARB(table, save_ProgramEnvParameter4fARB);
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/mfeatures.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/mfeatures.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/mfeatures.h [iso-8859-1] Sun Sep 22 00:25:59 2013 @@ -132,10 +132,10 @@ #define FEATURE_EXT_transform_feedback FEATURE_GL
#define FEATURE_APPLE_object_purgeable FEATURE_GL -#define FEATURE_ATI_fragment_shader FEATURE_GL +#define FEATURE_ATI_fragment_shader 0 #define FEATURE_NV_fence FEATURE_GL -#define FEATURE_NV_fragment_program FEATURE_GL -#define FEATURE_NV_vertex_program FEATURE_GL +#define FEATURE_NV_fragment_program 0 +#define FEATURE_NV_vertex_program 0
#define FEATURE_OES_EGL_image 1 #define FEATURE_OES_draw_texture FEATURE_ES1
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/program/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/pr... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/program/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/program/CMakeLists.txt [iso-8859-1] Sun Sep 22 00:25:59 2013 @@ -5,8 +5,8 @@ arbprogparse.c hash_table.c ir_to_mesa.cpp - nvfragparse.c - nvvertparse.c + # nvfragparse.c + # nvvertparse.c program.c program_parse_extra.c prog_cache.c
Modified: trunk/reactos/dll/opengl/opengl32/swimpl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/opengl32/swimpl.... ============================================================================== --- trunk/reactos/dll/opengl/opengl32/swimpl.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/opengl32/swimpl.c [iso-8859-1] Sun Sep 22 00:25:59 2013 @@ -103,7 +103,9 @@ (void) ctx; if(name == GL_RENDERER) return (const GLubyte *) "ReactOS Software Implementation"; - + /* Don't claim to support the fancy extensions that mesa supports, they will be slow anyway */ + if(name == GL_EXTENSIONS) + return (const GLubyte *)""; return NULL; }
@@ -593,7 +595,7 @@ PROC sw_GetProcAddress(LPCSTR name) { /* We don't support any extensions */ - assert(FALSE); + FIXME("Asking for proc address %s, returning NULL.\n", name); return NULL; }