Path: blob/21.2-virgl/src/mapi/glapi/glapi_priv.h
4560 views
/*1* Mesa 3-D graphics library2*3* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the "Software"),7* to deal in the Software without restriction, including without limitation8* the rights to use, copy, modify, merge, publish, distribute, sublicense,9* and/or sell copies of the Software, and to permit persons to whom the10* Software is furnished to do so, subject to the following conditions:11*12* The above copyright notice and this permission notice shall be included13* in all copies or substantial portions of the Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS16* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL18* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR19* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,20* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR21* OTHER DEALINGS IN THE SOFTWARE.22*/232425#ifndef _GLAPI_PRIV_H26#define _GLAPI_PRIV_H272829#define GL_GLEXT_PROTOTYPES30#include "GL/gl.h"31#include "GL/glext.h"3233typedef int GLclampx;3435#include "glapi/glapi.h"363738#ifdef __cplusplus39extern "C" {40#endif4142/* entrypoint */4344extern void45init_glapi_relocs_once(void);464748extern _glapi_proc49generate_entrypoint(unsigned int functionOffset);505152extern void53fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset);545556extern _glapi_proc57get_entrypoint_address(unsigned int functionOffset);585960/**61* Size (in bytes) of dispatch function (entrypoint).62*/63#if defined(USE_X86_ASM)64# if defined(USE_ELF_TLS)65# define DISPATCH_FUNCTION_SIZE 1666# else67# define DISPATCH_FUNCTION_SIZE 3268# endif69#endif7071#if defined(USE_X64_64_ASM)72# if defined(USE_ELF_TLS)73# define DISPATCH_FUNCTION_SIZE 1674# endif75#endif767778/**79* Number of extension functions which we can dynamically add at runtime.80*81* Number of extension functions is also subject to the size of backing exec82* mem we allocate. For the common case of dispatch stubs with size 16 bytes,83* the two limits will be hit simultaneously. For larger dispatch function84* sizes, MAX_EXTENSION_FUNCS is effectively reduced.85*/86#define MAX_EXTENSION_FUNCS 256878889#ifdef __cplusplus90}91#endif9293#endif949596