From e197de56cdb86835f1437688a9161cd909792d80 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 19 Feb 2010 08:09:01 -0700 Subject: mesa: replace old MEMCPY macro with memcpy --- src/mesa/main/pixel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/pixel.c') diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index ca6ecd7bfb..f6c316a580 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -362,7 +362,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values ) } } else { - MEMCPY(values, pm->Map, mapsize * sizeof(GLfloat)); + memcpy(values, pm->Map, mapsize * sizeof(GLfloat)); } _mesa_unmap_pbo_dest(ctx, &ctx->Pack); @@ -401,7 +401,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values ) if (map == GL_PIXEL_MAP_S_TO_S) { /* special case */ - MEMCPY(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint)); + memcpy(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint)); } else { for (i = 0; i < mapsize; i++) { -- cgit v1.2.3 From d553479cc48d512fc5055c166a699bcfff494a24 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 25 Feb 2010 02:26:18 -0800 Subject: mesa: Remove dead error condition. --- src/mesa/main/pixel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main/pixel.c') diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index f6c316a580..e2e3854fc8 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -427,7 +427,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values ) _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelMapusv(map)"); return; } - mapsize = pm ? pm->Size : 0; + mapsize = pm->Size; if (!validate_pbo_access(ctx, &ctx->Pack, mapsize, GL_INTENSITY, GL_UNSIGNED_SHORT, values)) { -- cgit v1.2.3 From 2cf44390d1e819f23e1d7ceb3199276c9148c647 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 24 Feb 2010 12:01:14 +0800 Subject: mesa: Move src/mesa/glapi/dispatch.h to mesa. glapi/dispatch.h is a core Mesa header file. Move the header file to main/ to make this clear. It also becomes clear after this change that IN_DRI_DRIVER is only used in core Mesa to enable the remap table. --- src/mesa/es/main/drawtex.c | 2 +- src/mesa/es/main/es_generator.py | 2 +- src/mesa/glapi/dispatch.h | 37 ---------------------------------- src/mesa/glapi/gen/extension_helper.py | 2 +- src/mesa/glapi/gen/remap_helper.py | 2 +- src/mesa/main/accum.c | 2 +- src/mesa/main/api_arrayelt.c | 2 +- src/mesa/main/api_exec.c | 2 +- src/mesa/main/api_loopback.c | 2 +- src/mesa/main/api_noop.c | 2 +- src/mesa/main/arrayobj.c | 2 +- src/mesa/main/attrib.c | 2 +- src/mesa/main/colortab.c | 2 +- src/mesa/main/convolve.c | 2 +- src/mesa/main/dispatch.h | 37 ++++++++++++++++++++++++++++++++++ src/mesa/main/dlist.c | 2 +- src/mesa/main/drawpix.c | 2 +- src/mesa/main/eval.c | 2 +- src/mesa/main/feedback.c | 2 +- src/mesa/main/histogram.c | 2 +- src/mesa/main/pixel.c | 2 +- src/mesa/main/queryobj.c | 2 +- src/mesa/main/rastpos.c | 2 +- src/mesa/main/remap.c | 4 ++-- src/mesa/main/remap_helper.h | 2 +- src/mesa/main/texgen.c | 2 +- src/mesa/main/varray.c | 2 +- src/mesa/main/vtxfmt_tmp.h | 2 +- src/mesa/shader/shader_api.c | 2 +- src/mesa/vbo/vbo_exec_api.c | 2 +- src/mesa/vbo/vbo_exec_eval.c | 2 +- src/mesa/vbo/vbo_save_api.c | 2 +- src/mesa/vbo/vbo_save_loopback.c | 2 +- 33 files changed, 69 insertions(+), 69 deletions(-) delete mode 100644 src/mesa/glapi/dispatch.h create mode 100644 src/mesa/main/dispatch.h (limited to 'src/mesa/main/pixel.c') diff --git a/src/mesa/es/main/drawtex.c b/src/mesa/es/main/drawtex.c index cbd41ca975..42f4409397 100644 --- a/src/mesa/es/main/drawtex.c +++ b/src/mesa/es/main/drawtex.c @@ -25,7 +25,7 @@ #include "main/state.h" #include "main/imports.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_OES_draw_texture diff --git a/src/mesa/es/main/es_generator.py b/src/mesa/es/main/es_generator.py index 590f5940a7..f736792dec 100644 --- a/src/mesa/es/main/es_generator.py +++ b/src/mesa/es/main/es_generator.py @@ -207,7 +207,7 @@ extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... ); #include "main/compiler.h" #include "main/api_exec.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" typedef void (*_glapi_proc)(void); /* generic function pointer */ """ diff --git a/src/mesa/glapi/dispatch.h b/src/mesa/glapi/dispatch.h deleted file mode 100644 index 27f80a5062..0000000000 --- a/src/mesa/glapi/dispatch.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * 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, sub license, - * 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 NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS 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 _DISPATCH_H -#define _DISPATCH_H - -#ifdef IN_DRI_DRIVER -#define _GLAPI_USE_REMAP_TABLE -#endif - -#include "glapi/glapitable.h" -#include "glapi/glapioffsets.h" -#include "glapi/glapidispatch.h" - -#endif /* _DISPATCH_H */ diff --git a/src/mesa/glapi/gen/extension_helper.py b/src/mesa/glapi/gen/extension_helper.py index 83471d89f5..2c83b4e0d1 100644 --- a/src/mesa/glapi/gen/extension_helper.py +++ b/src/mesa/glapi/gen/extension_helper.py @@ -151,7 +151,7 @@ class PrintGlExtensionGlue(gl_XML.gl_print_base): def printRealHeader(self): print '#include "utils.h"' - print '#include "glapi/dispatch.h"' + print '#include "main/dispatch.h"' print '' return diff --git a/src/mesa/glapi/gen/remap_helper.py b/src/mesa/glapi/gen/remap_helper.py index d93c7a4285..8b50526d2b 100644 --- a/src/mesa/glapi/gen/remap_helper.py +++ b/src/mesa/glapi/gen/remap_helper.py @@ -64,7 +64,7 @@ class PrintGlRemap(gl_XML.gl_print_base): def printRealHeader(self): - print '#include "glapi/dispatch.h"' + print '#include "main/dispatch.h"' print '' return diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 032e13b96e..2012d00fd5 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -29,7 +29,7 @@ #include "macros.h" #include "state.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_accum diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 469b4529f9..ffcd194240 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -32,7 +32,7 @@ #include "context.h" #include "imports.h" #include "macros.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" typedef void (GLAPIENTRY *array_func)( const void * ); diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index e62c7aa572..f8e004af3f 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -104,7 +104,7 @@ #if FEATURE_ARB_sync #include "syncobj.h" #endif -#include "glapi/dispatch.h" +#include "main/dispatch.h" diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 3d466ac44a..aedc509fb2 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -36,7 +36,7 @@ #include "glapi/glapi.h" #include "glapi/glapitable.h" #include "glapi/glthread.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc * calls to a smaller set of driver-provided formats. Currently just diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index f72f957300..9a36394d65 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -32,7 +32,7 @@ #include "macros.h" #include "dlist.h" #include "eval.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 7feaee316d..0069cd3dcf 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -48,7 +48,7 @@ #endif #include "arrayobj.h" #include "macros.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 9a32bc335d..92fb8d289d 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -56,7 +56,7 @@ #include "varray.h" #include "viewport.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index 785813166c..52d5badf39 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -32,7 +32,7 @@ #include "state.h" #include "teximage.h" #include "texstate.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_colortable diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c index 5ed93e0c60..15e8dffc23 100644 --- a/src/mesa/main/convolve.c +++ b/src/mesa/main/convolve.c @@ -39,7 +39,7 @@ #include "image.h" #include "mtypes.h" #include "state.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_convolve diff --git a/src/mesa/main/dispatch.h b/src/mesa/main/dispatch.h new file mode 100644 index 0000000000..27f80a5062 --- /dev/null +++ b/src/mesa/main/dispatch.h @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * 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, sub license, + * 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 NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS 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 _DISPATCH_H +#define _DISPATCH_H + +#ifdef IN_DRI_DRIVER +#define _GLAPI_USE_REMAP_TABLE +#endif + +#include "glapi/glapitable.h" +#include "glapi/glapioffsets.h" +#include "glapi/glapidispatch.h" + +#endif /* _DISPATCH_H */ diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 9ef7fcae90..673db30f25 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -66,7 +66,7 @@ #include "math/m_matrix.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index 0afd47b797..84cb78612b 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -32,7 +32,7 @@ #include "framebuffer.h" #include "readpix.h" #include "state.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_drawpix diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index 58eb59b13c..bd2e1177fd 100644 --- a/src/mesa/main/eval.c +++ b/src/mesa/main/eval.c @@ -44,7 +44,7 @@ #include "eval.h" #include "macros.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_evaluators diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index fcdbb75fc4..e20456fa75 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -36,7 +36,7 @@ #include "feedback.h" #include "macros.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_feedback diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c index c7304e8dd7..3a65bb1926 100644 --- a/src/mesa/main/histogram.c +++ b/src/mesa/main/histogram.c @@ -29,7 +29,7 @@ #include "context.h" #include "image.h" #include "histogram.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_histogram diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index e2e3854fc8..675e933ca6 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -35,7 +35,7 @@ #include "macros.h" #include "pixel.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_pixel_transfer diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index 471352f472..e14511a388 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -29,7 +29,7 @@ #include "imports.h" #include "queryobj.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_queryobj diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c index be61dc265d..d72b846c36 100644 --- a/src/mesa/main/rastpos.c +++ b/src/mesa/main/rastpos.c @@ -34,7 +34,7 @@ #include "macros.h" #include "rastpos.h" #include "state.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_rastpos diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c index 5f32a48258..8d9df6b830 100644 --- a/src/mesa/main/remap.c +++ b/src/mesa/main/remap.c @@ -38,7 +38,7 @@ #include "remap.h" #include "imports.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_remap_table @@ -183,7 +183,7 @@ _mesa_map_static_functions(void) /** * Initialize the remap table. This is called in one_time_init(). * The remap table needs to be initialized before calling the - * CALL/GET/SET macros defined in glapi/dispatch.h. + * CALL/GET/SET macros defined in main/dispatch.h. */ void _mesa_init_remap_table(void) diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h index 2c8f0de467..0a5b629688 100644 --- a/src/mesa/main/remap_helper.h +++ b/src/mesa/main/remap_helper.h @@ -25,7 +25,7 @@ * SOFTWARE. */ -#include "glapi/dispatch.h" +#include "main/dispatch.h" struct gl_function_remap { GLint func_index; diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c index 2ae839b2a6..e70ea30290 100644 --- a/src/mesa/main/texgen.c +++ b/src/mesa/main/texgen.c @@ -37,7 +37,7 @@ #include "main/texgen.h" #include "main/texstate.h" #include "math/m_matrix.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_texgen diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 86878d6a8a..b4128f84d8 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -34,7 +34,7 @@ #include "mtypes.h" #include "varray.h" #include "arrayobj.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h index ae636fb24f..037c4b1888 100644 --- a/src/mesa/main/vtxfmt_tmp.h +++ b/src/mesa/main/vtxfmt_tmp.h @@ -29,7 +29,7 @@ #define PRE_LOOPBACK( FUNC ) #endif -#include "glapi/dispatch.h" +#include "main/dispatch.h" static void GLAPIENTRY TAG(ArrayElement)( GLint i ) { diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 129a973cf1..d0d0575b0b 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -46,7 +46,7 @@ #include "shader/shader_api.h" #include "shader/slang/slang_compile.h" #include "shader/slang/slang_link.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 3dde982371..e40f5f9dc4 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -41,7 +41,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/light.h" #include "main/api_arrayelt.h" #include "main/api_noop.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "vbo_context.h" diff --git a/src/mesa/vbo/vbo_exec_eval.c b/src/mesa/vbo/vbo_exec_eval.c index a7846213d0..23ad12608f 100644 --- a/src/mesa/vbo/vbo_exec_eval.c +++ b/src/mesa/vbo/vbo_exec_eval.c @@ -29,7 +29,7 @@ #include "main/context.h" #include "main/macros.h" #include "math/m_eval.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "vbo_exec.h" diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 3a64c0cf01..a5d027982f 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -78,7 +78,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/api_validate.h" #include "main/api_arrayelt.h" #include "main/vtxfmt.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "vbo_context.h" diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c index 8d9ae307d6..f253c854d2 100644 --- a/src/mesa/vbo/vbo_save_loopback.c +++ b/src/mesa/vbo/vbo_save_loopback.c @@ -30,7 +30,7 @@ #include "main/enums.h" #include "main/imports.h" #include "main/mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "glapi/glapi.h" #include "vbo_context.h" -- cgit v1.2.3