diff options
Diffstat (limited to 'mesa')
-rw-r--r-- | mesa/drivers/dri/common/spantmp2.h | 2 | ||||
-rw-r--r-- | mesa/main/api_validate.h | 55 | ||||
-rw-r--r-- | mesa/main/arrayobj.h | 83 | ||||
-rw-r--r-- | mesa/main/bufferobj.h | 3 | ||||
-rw-r--r-- | mesa/main/colortab.h | 95 | ||||
-rw-r--r-- | mesa/main/context.h | 8 | ||||
-rw-r--r-- | mesa/main/hash.h | 2 | ||||
-rw-r--r-- | mesa/main/mtypes.h | 1 | ||||
-rw-r--r-- | mesa/main/vtxfmt.h | 69 | ||||
-rw-r--r-- | mesa/shader/program.h | 8 |
10 files changed, 17 insertions, 309 deletions
diff --git a/mesa/drivers/dri/common/spantmp2.h b/mesa/drivers/dri/common/spantmp2.h index 447f3d1..c152226 100644 --- a/mesa/drivers/dri/common/spantmp2.h +++ b/mesa/drivers/dri/common/spantmp2.h @@ -400,7 +400,7 @@ # define READ_RGBA( rgba, _x, _y ) \ do { \ GLuint p = GET_VALUE(_x, _y); \ - *((uint32_t *) rgba) = (t << 8) | 0xff; \ + *((uint32_t *) rgba) = (p << 8) | 0xff; \ } while (0) # else # define READ_RGBA( rgba, _x, _y ) \ diff --git a/mesa/main/api_validate.h b/mesa/main/api_validate.h deleted file mode 100644 index 6064d15..0000000 --- a/mesa/main/api_validate.h +++ /dev/null @@ -1,55 +0,0 @@ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL 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 API_VALIDATE_H -#define API_VALIDATE_H - - -#include "mtypes.h" - - -extern GLuint -_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, - const void *indices, - struct gl_buffer_object *elementBuf); - -extern GLboolean -_mesa_validate_DrawArrays(GLcontext *ctx, - GLenum mode, GLint start, GLsizei count); - -extern GLboolean -_mesa_validate_DrawElements(GLcontext *ctx, - GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex); - -extern GLboolean -_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, - GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex); - - -#endif diff --git a/mesa/main/arrayobj.h b/mesa/main/arrayobj.h deleted file mode 100644 index 8999edc..0000000 --- a/mesa/main/arrayobj.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.6 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2006 - * Copyright (C) 2009 VMware, Inc. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL OR IBM 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 ARRAYOBJ_H -#define ARRAYOBJ_H - -#include "context.h" - -/** - * \file arrayobj.h - * Functions for the GL_APPLE_vertex_array_object extension. - * - * \author Ian Romanick <idr@us.ibm.com> - * \author Brian Paul - */ - -/* - * Internal functions - */ - -extern struct gl_array_object * -_mesa_new_array_object( GLcontext *ctx, GLuint name ); - -extern void -_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj ); - -extern void -_mesa_reference_array_object(GLcontext *ctx, - struct gl_array_object **ptr, - struct gl_array_object *arrayObj); - -extern void -_mesa_initialize_array_object( GLcontext *ctx, - struct gl_array_object *obj, GLuint name ); - - -extern void -_mesa_update_array_object_max_element(GLcontext *ctx, - struct gl_array_object *arrayObj); - - -/* - * API functions - */ - - -void GLAPIENTRY _mesa_BindVertexArray( GLuint id ); - -void GLAPIENTRY _mesa_BindVertexArrayAPPLE( GLuint id ); - -void GLAPIENTRY _mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids); - -void GLAPIENTRY _mesa_GenVertexArrays(GLsizei n, GLuint *arrays); - -void GLAPIENTRY _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer); - -GLboolean GLAPIENTRY _mesa_IsVertexArrayAPPLE( GLuint id ); - -#endif /* ARRAYOBJ_H */ diff --git a/mesa/main/bufferobj.h b/mesa/main/bufferobj.h index 9f732ec..e9438ef 100644 --- a/mesa/main/bufferobj.h +++ b/mesa/main/bufferobj.h @@ -60,6 +60,9 @@ extern void _mesa_init_buffer_objects( GLcontext *ctx ); extern void +_mesa_free_buffer_objects( GLcontext *ctx ); + +extern void _mesa_update_default_objects_buffer_objects(GLcontext *ctx); diff --git a/mesa/main/colortab.h b/mesa/main/colortab.h deleted file mode 100644 index 652fb58..0000000 --- a/mesa/main/colortab.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 1999-2006 Brian Paul 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL 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 COLORTAB_H -#define COLORTAB_H - - -#include "main/mtypes.h" - -#if FEATURE_colortable - -#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) \ - do { \ - (driver)->CopyColorTable = impl ## CopyColorTable; \ - (driver)->CopyColorSubTable = impl ## CopyColorSubTable; \ - (driver)->UpdateTexturePalette = impl ## UpdateTexturePalette; \ - } while (0) - -extern void GLAPIENTRY -_mesa_ColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, GLenum type, - const GLvoid *table ); - -extern void GLAPIENTRY -_mesa_ColorSubTable( GLenum target, GLsizei start, - GLsizei count, GLenum format, GLenum type, - const GLvoid *table ); - -extern void -_mesa_init_colortable_dispatch(struct _glapi_table *disp); - -#else /* FEATURE_colortable */ - -#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) do { } while (0) - -static INLINE void GLAPIENTRY -_mesa_ColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, GLenum type, - const GLvoid *table ) -{ - ASSERT_NO_FEATURE(); -} - -static INLINE void GLAPIENTRY -_mesa_ColorSubTable( GLenum target, GLsizei start, - GLsizei count, GLenum format, GLenum type, - const GLvoid *table ) -{ - ASSERT_NO_FEATURE(); -} - -static INLINE void -_mesa_init_colortable_dispatch(struct _glapi_table *disp) -{ -} - -#endif /* FEATURE_colortable */ - - -extern void -_mesa_init_colortable( struct gl_color_table *table ); - -extern void -_mesa_free_colortable_data( struct gl_color_table *table ); - -extern void -_mesa_init_colortables( GLcontext *ctx ); - -extern void -_mesa_free_colortables_data( GLcontext *ctx ); - - -#endif /* COLORTAB_H */ diff --git a/mesa/main/context.h b/mesa/main/context.h index c3be106..5a4f860 100644 --- a/mesa/main/context.h +++ b/mesa/main/context.h @@ -207,8 +207,8 @@ _mesa_Flush( void ); do { \ if (MESA_VERBOSE & VERBOSE_STATE) \ _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", MESA_FUNCTION);\ - if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) \ - ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES); \ + if (ctx->Driver.NeedFlush) \ + ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES | FLUSH_UPDATE_CURRENT); \ ctx->NewState |= newstate; \ } while (0) @@ -226,8 +226,8 @@ do { \ do { \ if (MESA_VERBOSE & VERBOSE_STATE) \ _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", MESA_FUNCTION); \ - if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) \ - ctx->Driver.FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \ + if (ctx->Driver.NeedFlush) \ + ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES | FLUSH_UPDATE_CURRENT); \ ctx->NewState |= newstate; \ } while (0) diff --git a/mesa/main/hash.h b/mesa/main/hash.h index d18db76..4f916f9 100644 --- a/mesa/main/hash.h +++ b/mesa/main/hash.h @@ -39,7 +39,7 @@ extern struct _mesa_HashTable *_mesa_NewHashTable(void); extern void _mesa_DeleteHashTable(struct _mesa_HashTable *table); -extern void *_mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key); +extern void *_mesa_HashLookup(struct _mesa_HashTable *table, GLuint key); extern void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data); diff --git a/mesa/main/mtypes.h b/mesa/main/mtypes.h index cde2f5f..14de8f9 100644 --- a/mesa/main/mtypes.h +++ b/mesa/main/mtypes.h @@ -1422,6 +1422,7 @@ struct gl_viewport_attrib */ struct gl_buffer_object { + _glthread_Mutex Mutex; GLint RefCount; GLuint Name; GLenum Usage; /**< GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, etc. */ diff --git a/mesa/main/vtxfmt.h b/mesa/main/vtxfmt.h deleted file mode 100644 index fb6c23a..0000000 --- a/mesa/main/vtxfmt.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * \file vtxfmt.h - * - * \author Keith Whitwell <keith@tungstengraphics.com> - * \author Gareth Hughes - */ - -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL 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 _VTXFMT_H_ -#define _VTXFMT_H_ - -#if FEATURE_beginend - -extern void _mesa_init_exec_vtxfmt( GLcontext *ctx ); - -extern void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ); -extern void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ); - -extern void _mesa_restore_exec_vtxfmt( GLcontext *ctx ); - -#else /* FEATURE_beginend */ - -static INLINE void -_mesa_init_exec_vtxfmt( GLcontext *ctx ) -{ -} - -static INLINE void -_mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) -{ -} - -static INLINE void -_mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) -{ -} - -static INLINE void -_mesa_restore_exec_vtxfmt( GLcontext *ctx ) -{ -} - -#endif /* FEATURE_beginend */ - -#endif /* _VTXFMT_H_ */ diff --git a/mesa/shader/program.h b/mesa/shader/program.h index 56a4191..0187a2c 100644 --- a/mesa/shader/program.h +++ b/mesa/shader/program.h @@ -119,8 +119,14 @@ _mesa_combine_programs(GLcontext *ctx, const struct gl_program *progA, const struct gl_program *progB); +extern void +_mesa_find_used_registers(const struct gl_program *prog, + gl_register_file file, + GLboolean used[], GLuint usedSize); + extern GLint -_mesa_find_free_register(const struct gl_program *prog, GLuint regFile); +_mesa_find_free_register(const GLboolean used[], + GLuint maxRegs, GLuint firstReg); extern void _mesa_postprocess_program(GLcontext *ctx, struct gl_program *prog); |