state.c revision ed39a43b8cb2e1cf69b097fc89365cde470ebf51
1ed39a43b8cb2e1cf69b097fc89365cde470ebf51Keith Whitwell/* $Id: state.c,v 1.64 2001/03/29 21:16:25 keithw Exp $ */ 2d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 3d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul/* 4d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * Mesa 3-D graphics library 5fa4525e289b475b928a7b2c4055af9dd7fe46600Brian Paul * Version: 3.5 6d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * 7479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 8d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * 9d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * Permission is hereby granted, free of charge, to any person obtaining a 10d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * copy of this software and associated documentation files (the "Software"), 11d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * to deal in the Software without restriction, including without limitation 12d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * the rights to use, copy, modify, merge, publish, distribute, sublicense, 13d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * and/or sell copies of the Software, and to permit persons to whom the 14d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * Software is furnished to do so, subject to the following conditions: 15d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * 16d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * The above copyright notice and this permission notice shall be included 17d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * in all copies or substantial portions of the Software. 18d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * 19d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 22d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 23d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul */ 26d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 27d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 28a02fb6afc865a30077ae4d802a7020371c141e73Brian Paul/* 292448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell * This file manages recalculation of derived values in the 302448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell * __GLcontext. 31a02fb6afc865a30077ae4d802a7020371c141e73Brian Paul */ 32a02fb6afc865a30077ae4d802a7020371c141e73Brian Paul 33d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 34d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#ifdef PC_HEADER 35d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "all.h" 36d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#else 37d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "glheader.h" 38d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "accum.h" 39d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "alpha.h" 40ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell#include "api_loopback.h" 41d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "attrib.h" 42d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "bitmap.h" 43d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "blend.h" 44d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "buffers.h" 45d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "clip.h" 46d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "colortab.h" 47d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "context.h" 48cf8eebee075e3f69c3daa4ea88994e07527055e4Brian Paul#include "convolve.h" 49d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "copypix.h" 50d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "depth.h" 51d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "dlist.h" 52d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "drawpix.h" 53d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "enable.h" 54d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "eval.h" 55d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "get.h" 56d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "feedback.h" 57d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "fog.h" 58d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "hint.h" 598a9507442a9811e2c4a4bac6a993e8a900c50d4dBrian Paul#include "histogram.h" 60d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "light.h" 61d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "lines.h" 62d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "logic.h" 63d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "masking.h" 64d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "matrix.h" 65d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "mmath.h" 66d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "pixel.h" 672b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul#include "pixeltex.h" 68d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "points.h" 69d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "polygon.h" 70d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "rastpos.h" 71d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "readpix.h" 72d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "scissor.h" 73d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "state.h" 74d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "stencil.h" 75d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "teximage.h" 76d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "texobj.h" 77d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "texstate.h" 785e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen#include "mtypes.h" 79d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "varray.h" 80d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#include "winpos.h" 8123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell 8223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#include "math/m_matrix.h" 8323caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell#include "math/m_xform.h" 84d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#endif 85d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 86d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 87d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paulstatic int 88d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paulgeneric_noop(void) 89d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul{ 90d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#ifdef DEBUG 9108836341788a9f9d638d9dc8328510ccd18ddeb5Brian Paul _mesa_problem(NULL, "undefined function dispatch"); 92d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul#endif 93d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul return 0; 94d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul} 95d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 96d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 975fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul/* 985fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul * Set all pointers in the given dispatch table to point to a 995fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul * generic no-op function. 1005fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul */ 101d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paulvoid 1025fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul_mesa_init_no_op_table(struct _glapi_table *table, GLuint tableSize) 103d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul{ 1045fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul GLuint i; 1055fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul void **dispatch = (void **) table; 1065fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul for (i = 0; i < tableSize; i++) { 1075fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul dispatch[i] = (void *) generic_noop; 108d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul } 109d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul} 110d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 111d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 112cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 113d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul/* 114d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * Initialize the given dispatch table with pointers to Mesa's 115d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul * immediate-mode commands. 116ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell * 117ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell * Pointers to begin/end object commands and a few others 118ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell * are provided via the vtxfmt interface elsewhere. 119d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul */ 120d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paulvoid 1215fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul_mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize) 122d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul{ 123d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul /* first initialize all dispatch slots to no-op */ 1245fb84d263b8068467a2429942ecf113a0a4c8a60Brian Paul _mesa_init_no_op_table(exec, tableSize); 125d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 126ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell _mesa_loopback_init_api_table( exec, GL_FALSE ); 127ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell 128d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul /* load the dispatch slots we understand */ 129d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Accum = _mesa_Accum; 130d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->AlphaFunc = _mesa_AlphaFunc; 131d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Bitmap = _mesa_Bitmap; 132d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->BlendFunc = _mesa_BlendFunc; 133d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CallList = _mesa_CallList; 134d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CallLists = _mesa_CallLists; 135d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Clear = _mesa_Clear; 136d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ClearAccum = _mesa_ClearAccum; 137d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ClearColor = _mesa_ClearColor; 138d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ClearDepth = _mesa_ClearDepth; 139d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ClearIndex = _mesa_ClearIndex; 140d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ClearStencil = _mesa_ClearStencil; 141d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ClipPlane = _mesa_ClipPlane; 142d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ColorMask = _mesa_ColorMask; 143d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ColorMaterial = _mesa_ColorMaterial; 144d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyPixels = _mesa_CopyPixels; 145d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CullFace = _mesa_CullFace; 146d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DeleteLists = _mesa_DeleteLists; 147d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DepthFunc = _mesa_DepthFunc; 148d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DepthMask = _mesa_DepthMask; 149d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DepthRange = _mesa_DepthRange; 150d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Disable = _mesa_Disable; 151d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DrawBuffer = _mesa_DrawBuffer; 152d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DrawPixels = _mesa_DrawPixels; 153d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Enable = _mesa_Enable; 154d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->EndList = _mesa_EndList; 155d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->FeedbackBuffer = _mesa_FeedbackBuffer; 156d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Finish = _mesa_Finish; 157d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Flush = _mesa_Flush; 158fe5d67d95f3a5fc84c5421d409a6464642aaf2cbKeith Whitwell exec->FogCoordPointerEXT = _mesa_FogCoordPointerEXT; 159d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Fogf = _mesa_Fogf; 160d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Fogfv = _mesa_Fogfv; 161d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Fogi = _mesa_Fogi; 162d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Fogiv = _mesa_Fogiv; 163d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->FrontFace = _mesa_FrontFace; 164d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Frustum = _mesa_Frustum; 165d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GenLists = _mesa_GenLists; 166d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetBooleanv = _mesa_GetBooleanv; 167d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetClipPlane = _mesa_GetClipPlane; 168d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetDoublev = _mesa_GetDoublev; 169d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetError = _mesa_GetError; 170d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetFloatv = _mesa_GetFloatv; 171d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetIntegerv = _mesa_GetIntegerv; 172d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetLightfv = _mesa_GetLightfv; 173d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetLightiv = _mesa_GetLightiv; 174d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMapdv = _mesa_GetMapdv; 175d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMapfv = _mesa_GetMapfv; 176d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMapiv = _mesa_GetMapiv; 177d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMaterialfv = _mesa_GetMaterialfv; 178d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMaterialiv = _mesa_GetMaterialiv; 179d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetPixelMapfv = _mesa_GetPixelMapfv; 180d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetPixelMapuiv = _mesa_GetPixelMapuiv; 181d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetPixelMapusv = _mesa_GetPixelMapusv; 182d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetPolygonStipple = _mesa_GetPolygonStipple; 183d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetString = _mesa_GetString; 184d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexEnvfv = _mesa_GetTexEnvfv; 185d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexEnviv = _mesa_GetTexEnviv; 186d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexGendv = _mesa_GetTexGendv; 187d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexGenfv = _mesa_GetTexGenfv; 188d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexGeniv = _mesa_GetTexGeniv; 189d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexImage = _mesa_GetTexImage; 190d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexLevelParameterfv = _mesa_GetTexLevelParameterfv; 191d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexLevelParameteriv = _mesa_GetTexLevelParameteriv; 192d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexParameterfv = _mesa_GetTexParameterfv; 193d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetTexParameteriv = _mesa_GetTexParameteriv; 194d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Hint = _mesa_Hint; 195d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->IndexMask = _mesa_IndexMask; 196d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->InitNames = _mesa_InitNames; 197d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->IsEnabled = _mesa_IsEnabled; 198d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->IsList = _mesa_IsList; 199d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LightModelf = _mesa_LightModelf; 200d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LightModelfv = _mesa_LightModelfv; 201d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LightModeli = _mesa_LightModeli; 202d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LightModeliv = _mesa_LightModeliv; 203d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Lightf = _mesa_Lightf; 204d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Lightfv = _mesa_Lightfv; 205d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Lighti = _mesa_Lighti; 206d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Lightiv = _mesa_Lightiv; 207d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LineStipple = _mesa_LineStipple; 208d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LineWidth = _mesa_LineWidth; 209d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ListBase = _mesa_ListBase; 210d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LoadIdentity = _mesa_LoadIdentity; 211d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LoadMatrixd = _mesa_LoadMatrixd; 212d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LoadMatrixf = _mesa_LoadMatrixf; 213d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LoadName = _mesa_LoadName; 214d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LogicOp = _mesa_LogicOp; 215d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Map1d = _mesa_Map1d; 216d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Map1f = _mesa_Map1f; 217d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Map2d = _mesa_Map2d; 218d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Map2f = _mesa_Map2f; 219d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MapGrid1d = _mesa_MapGrid1d; 220d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MapGrid1f = _mesa_MapGrid1f; 221d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MapGrid2d = _mesa_MapGrid2d; 222d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MapGrid2f = _mesa_MapGrid2f; 223d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MatrixMode = _mesa_MatrixMode; 224d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MultMatrixd = _mesa_MultMatrixd; 225d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MultMatrixf = _mesa_MultMatrixf; 226d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->NewList = _mesa_NewList; 227d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Ortho = _mesa_Ortho; 228d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PassThrough = _mesa_PassThrough; 229d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelMapfv = _mesa_PixelMapfv; 230d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelMapuiv = _mesa_PixelMapuiv; 231d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelMapusv = _mesa_PixelMapusv; 232d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelStoref = _mesa_PixelStoref; 233d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelStorei = _mesa_PixelStorei; 234d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelTransferf = _mesa_PixelTransferf; 235d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelTransferi = _mesa_PixelTransferi; 236d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PixelZoom = _mesa_PixelZoom; 237d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PointSize = _mesa_PointSize; 238d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PolygonMode = _mesa_PolygonMode; 239d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PolygonOffset = _mesa_PolygonOffset; 240d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PolygonStipple = _mesa_PolygonStipple; 241d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PopAttrib = _mesa_PopAttrib; 242d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PopMatrix = _mesa_PopMatrix; 243d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PopName = _mesa_PopName; 244d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PushAttrib = _mesa_PushAttrib; 245d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PushMatrix = _mesa_PushMatrix; 246d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PushName = _mesa_PushName; 247d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2d = _mesa_RasterPos2d; 248d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2dv = _mesa_RasterPos2dv; 249d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2f = _mesa_RasterPos2f; 250d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2fv = _mesa_RasterPos2fv; 251d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2i = _mesa_RasterPos2i; 252d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2iv = _mesa_RasterPos2iv; 253d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2s = _mesa_RasterPos2s; 254d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos2sv = _mesa_RasterPos2sv; 255d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3d = _mesa_RasterPos3d; 256d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3dv = _mesa_RasterPos3dv; 257d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3f = _mesa_RasterPos3f; 258d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3fv = _mesa_RasterPos3fv; 259d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3i = _mesa_RasterPos3i; 260d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3iv = _mesa_RasterPos3iv; 261d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3s = _mesa_RasterPos3s; 262d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos3sv = _mesa_RasterPos3sv; 263d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4d = _mesa_RasterPos4d; 264d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4dv = _mesa_RasterPos4dv; 265d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4f = _mesa_RasterPos4f; 266d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4fv = _mesa_RasterPos4fv; 267d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4i = _mesa_RasterPos4i; 268d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4iv = _mesa_RasterPos4iv; 269d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4s = _mesa_RasterPos4s; 270d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RasterPos4sv = _mesa_RasterPos4sv; 271d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ReadBuffer = _mesa_ReadBuffer; 272d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ReadPixels = _mesa_ReadPixels; 273d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->RenderMode = _mesa_RenderMode; 274d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Rotated = _mesa_Rotated; 275d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Rotatef = _mesa_Rotatef; 276d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Scaled = _mesa_Scaled; 277d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Scalef = _mesa_Scalef; 278d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Scissor = _mesa_Scissor; 279fe5d67d95f3a5fc84c5421d409a6464642aaf2cbKeith Whitwell exec->SecondaryColorPointerEXT = _mesa_SecondaryColorPointerEXT; 280d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->SelectBuffer = _mesa_SelectBuffer; 281d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ShadeModel = _mesa_ShadeModel; 282d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->StencilFunc = _mesa_StencilFunc; 283d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->StencilMask = _mesa_StencilMask; 284d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->StencilOp = _mesa_StencilOp; 285d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexEnvf = _mesa_TexEnvf; 286d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexEnvfv = _mesa_TexEnvfv; 287d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexEnvi = _mesa_TexEnvi; 288d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexEnviv = _mesa_TexEnviv; 289d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexGend = _mesa_TexGend; 290d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexGendv = _mesa_TexGendv; 291d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexGenf = _mesa_TexGenf; 292d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexGenfv = _mesa_TexGenfv; 293d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexGeni = _mesa_TexGeni; 294d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexGeniv = _mesa_TexGeniv; 295d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexImage1D = _mesa_TexImage1D; 296d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexImage2D = _mesa_TexImage2D; 297d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexParameterf = _mesa_TexParameterf; 298d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexParameterfv = _mesa_TexParameterfv; 299d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexParameteri = _mesa_TexParameteri; 300d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexParameteriv = _mesa_TexParameteriv; 301d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Translated = _mesa_Translated; 302d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Translatef = _mesa_Translatef; 303d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Viewport = _mesa_Viewport; 304d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 305d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul /* 1.1 */ 306d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->AreTexturesResident = _mesa_AreTexturesResident; 307d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->BindTexture = _mesa_BindTexture; 308d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ColorPointer = _mesa_ColorPointer; 309d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyTexImage1D = _mesa_CopyTexImage1D; 310d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyTexImage2D = _mesa_CopyTexImage2D; 311d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyTexSubImage1D = _mesa_CopyTexSubImage1D; 312d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyTexSubImage2D = _mesa_CopyTexSubImage2D; 313d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DeleteTextures = _mesa_DeleteTextures; 314d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->DisableClientState = _mesa_DisableClientState; 315d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->EdgeFlagPointer = _mesa_EdgeFlagPointer; 316d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->EnableClientState = _mesa_EnableClientState; 317d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GenTextures = _mesa_GenTextures; 318d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetPointerv = _mesa_GetPointerv; 319d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->IndexPointer = _mesa_IndexPointer; 320d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->InterleavedArrays = _mesa_InterleavedArrays; 321d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->IsTexture = _mesa_IsTexture; 322d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->NormalPointer = _mesa_NormalPointer; 323d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PopClientAttrib = _mesa_PopClientAttrib; 324d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PrioritizeTextures = _mesa_PrioritizeTextures; 325d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PushClientAttrib = _mesa_PushClientAttrib; 326d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexCoordPointer = _mesa_TexCoordPointer; 327d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexSubImage1D = _mesa_TexSubImage1D; 328d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexSubImage2D = _mesa_TexSubImage2D; 329d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->VertexPointer = _mesa_VertexPointer; 330d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 331d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul /* 1.2 */ 332d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyTexSubImage3D = _mesa_CopyTexSubImage3D; 333d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexImage3D = _mesa_TexImage3D; 334d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexSubImage3D = _mesa_TexSubImage3D; 335d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 336d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul /* OpenGL 1.2 GL_ARB_imaging */ 337d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->BlendColor = _mesa_BlendColor; 338d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->BlendEquation = _mesa_BlendEquation; 339d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ColorSubTable = _mesa_ColorSubTable; 340d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ColorTable = _mesa_ColorTable; 341d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ColorTableParameterfv = _mesa_ColorTableParameterfv; 342d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ColorTableParameteriv = _mesa_ColorTableParameteriv; 343d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ConvolutionFilter1D = _mesa_ConvolutionFilter1D; 344d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ConvolutionFilter2D = _mesa_ConvolutionFilter2D; 345d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ConvolutionParameterf = _mesa_ConvolutionParameterf; 346d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ConvolutionParameterfv = _mesa_ConvolutionParameterfv; 347d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ConvolutionParameteri = _mesa_ConvolutionParameteri; 348d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ConvolutionParameteriv = _mesa_ConvolutionParameteriv; 349d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyColorSubTable = _mesa_CopyColorSubTable; 350d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyColorTable = _mesa_CopyColorTable; 351d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyConvolutionFilter1D = _mesa_CopyConvolutionFilter1D; 352d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyConvolutionFilter2D = _mesa_CopyConvolutionFilter2D; 353d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetColorTable = _mesa_GetColorTable; 354d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetColorTableParameterfv = _mesa_GetColorTableParameterfv; 355d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetColorTableParameteriv = _mesa_GetColorTableParameteriv; 356d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetConvolutionFilter = _mesa_GetConvolutionFilter; 357d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetConvolutionParameterfv = _mesa_GetConvolutionParameterfv; 358d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetConvolutionParameteriv = _mesa_GetConvolutionParameteriv; 359d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetHistogram = _mesa_GetHistogram; 360d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetHistogramParameterfv = _mesa_GetHistogramParameterfv; 361d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetHistogramParameteriv = _mesa_GetHistogramParameteriv; 362d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMinmax = _mesa_GetMinmax; 363d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMinmaxParameterfv = _mesa_GetMinmaxParameterfv; 364d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetMinmaxParameteriv = _mesa_GetMinmaxParameteriv; 365d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->GetSeparableFilter = _mesa_GetSeparableFilter; 366d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Histogram = _mesa_Histogram; 367d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->Minmax = _mesa_Minmax; 368d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ResetHistogram = _mesa_ResetHistogram; 369d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ResetMinmax = _mesa_ResetMinmax; 370d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->SeparableFilter2D = _mesa_SeparableFilter2D; 371d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 3721a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 2. GL_EXT_blend_color */ 3731a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul#if 0 3741a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->BlendColorEXT = _mesa_BlendColorEXT; 3751a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul#endif 3761a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul 3771a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 3. GL_EXT_polygon_offset */ 3781a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT; 3791a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul 3801a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 6. GL_EXT_texture3d */ 381ead285a9266bb5f80e68de122490a6afb88df6f3Brian Paul#if 0 382d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->CopyTexSubImage3DEXT = _mesa_CopyTexSubImage3D; 383d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexImage3DEXT = _mesa_TexImage3DEXT; 384d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->TexSubImage3DEXT = _mesa_TexSubImage3D; 385ead285a9266bb5f80e68de122490a6afb88df6f3Brian Paul#endif 386d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 3871a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 11. GL_EXT_histogram */ 3881a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetHistogramEXT = _mesa_GetHistogram; 3891a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv; 3901a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv; 3911a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetMinmaxEXT = _mesa_GetMinmax; 3921a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv; 3931a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv; 394d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 3951a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* ?. GL_SGIX_pixel_texture */ 3962b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul exec->PixelTexGenSGIX = _mesa_PixelTexGenSGIX; 3972b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul 3981a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 15. GL_SGIS_pixel_texture */ 3992b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul exec->PixelTexGenParameteriSGIS = _mesa_PixelTexGenParameteriSGIS; 4002b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul exec->PixelTexGenParameterivSGIS = _mesa_PixelTexGenParameterivSGIS; 4012b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul exec->PixelTexGenParameterfSGIS = _mesa_PixelTexGenParameterfSGIS; 4022b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul exec->PixelTexGenParameterfvSGIS = _mesa_PixelTexGenParameterfvSGIS; 4032b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul exec->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS; 4042b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul exec->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS; 4052b2e925ea4a5652b0ab73b1efbce345a42663842Brian Paul 4061f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul /* 30. GL_EXT_vertex_array */ 4071f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul exec->ColorPointerEXT = _mesa_ColorPointerEXT; 4081f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul exec->EdgeFlagPointerEXT = _mesa_EdgeFlagPointerEXT; 4091f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul exec->IndexPointerEXT = _mesa_IndexPointerEXT; 4101f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul exec->NormalPointerEXT = _mesa_NormalPointerEXT; 4111f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul exec->TexCoordPointerEXT = _mesa_TexCoordPointerEXT; 4121f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul exec->VertexPointerEXT = _mesa_VertexPointerEXT; 4131f0e213bf88500e9c2f7ca92e57392efae5e4459Brian Paul 4141a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 37. GL_EXT_blend_minmax */ 4151a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul#if 0 4161a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->BlendEquationEXT = _mesa_BlendEquationEXT; 4171a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul#endif 418d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 4191a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 54. GL_EXT_point_parameters */ 420d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PointParameterfEXT = _mesa_PointParameterfEXT; 421d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->PointParameterfvEXT = _mesa_PointParameterfvEXT; 422d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 4231a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 78. GL_EXT_paletted_texture */ 424ead285a9266bb5f80e68de122490a6afb88df6f3Brian Paul#if 0 4251a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->ColorTableEXT = _mesa_ColorTableEXT; 4261a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->ColorSubTableEXT = _mesa_ColorSubTableEXT; 427ead285a9266bb5f80e68de122490a6afb88df6f3Brian Paul#endif 4281a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetColorTableEXT = _mesa_GetColorTable; 4291a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv; 4301a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv; 431d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 4321a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 97. GL_EXT_compiled_vertex_array */ 4331a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->LockArraysEXT = _mesa_LockArraysEXT; 4341a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->UnlockArraysEXT = _mesa_UnlockArraysEXT; 4351a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul 4361a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 173. GL_INGR_blend_func_separate */ 4371a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT; 4381a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul 4391a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 196. GL_MESA_resize_buffers */ 4401a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA; 4411a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul 4421a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* 197. GL_MESA_window_pos */ 4431a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2dMESA = _mesa_WindowPos2dMESA; 4441a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA; 4451a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2fMESA = _mesa_WindowPos2fMESA; 4461a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA; 4471a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2iMESA = _mesa_WindowPos2iMESA; 4481a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA; 4491a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2sMESA = _mesa_WindowPos2sMESA; 4501a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos2svMESA = _mesa_WindowPos2svMESA; 4511a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3dMESA = _mesa_WindowPos3dMESA; 4521a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA; 4531a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3fMESA = _mesa_WindowPos3fMESA; 4541a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA; 4551a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3iMESA = _mesa_WindowPos3iMESA; 4561a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA; 4571a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3sMESA = _mesa_WindowPos3sMESA; 4581a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos3svMESA = _mesa_WindowPos3svMESA; 4591a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4dMESA = _mesa_WindowPos4dMESA; 4601a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA; 4611a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4fMESA = _mesa_WindowPos4fMESA; 4621a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA; 4631a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4iMESA = _mesa_WindowPos4iMESA; 4641a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA; 4651a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4sMESA = _mesa_WindowPos4sMESA; 4661a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul exec->WindowPos4svMESA = _mesa_WindowPos4svMESA; 467d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 4681a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* ARB 1. GL_ARB_multitexture */ 469d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ActiveTextureARB = _mesa_ActiveTextureARB; 470d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->ClientActiveTextureARB = _mesa_ClientActiveTextureARB; 471d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 4721a1cf7ed75d799bbda34399ddab7949b8c06686eBrian Paul /* ARB 3. GL_ARB_transpose_matrix */ 473d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LoadTransposeMatrixdARB = _mesa_LoadTransposeMatrixdARB; 474d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB; 475d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB; 476d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul exec->MultTransposeMatrixfARB = _mesa_MultTransposeMatrixfARB; 4771207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul 4781207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul /* ARB 12. GL_ARB_texture_compression */ 4791207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul exec->CompressedTexImage3DARB = _mesa_CompressedTexImage3DARB; 4801207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul exec->CompressedTexImage2DARB = _mesa_CompressedTexImage2DARB; 4811207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul exec->CompressedTexImage1DARB = _mesa_CompressedTexImage1DARB; 4821207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul exec->CompressedTexSubImage3DARB = _mesa_CompressedTexSubImage3DARB; 4831207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul exec->CompressedTexSubImage2DARB = _mesa_CompressedTexSubImage2DARB; 4841207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul exec->CompressedTexSubImage1DARB = _mesa_CompressedTexSubImage1DARB; 4851207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul exec->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB; 4861207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul 487d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul} 488d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 489d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 4901207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul 491d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul/**********************************************************************/ 492d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul/***** State update logic *****/ 493d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul/**********************************************************************/ 494d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 495d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 4961e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwellstatic void 497a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulupdate_polygon( GLcontext *ctx ) 4981e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell{ 499cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET); 500cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell 501bfa023921c9d1aa872237e0ac6085160f7c2cbc5Keith Whitwell if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) 502bfa023921c9d1aa872237e0ac6085160f7c2cbc5Keith Whitwell ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK; 503d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 5041e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* Any Polygon offsets enabled? */ 505f1d6b384415a083c358d3824e77f3d434f08bfccBrian Paul ctx->Polygon._OffsetAny = GL_FALSE; 5061e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->_TriangleCaps &= ~DD_TRI_OFFSET; 507d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 5081e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Polygon.OffsetPoint || 5091e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->Polygon.OffsetLine || 510f1d6b384415a083c358d3824e77f3d434f08bfccBrian Paul ctx->Polygon.OffsetFill) { 5111e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->_TriangleCaps |= DD_TRI_OFFSET; 512f1d6b384415a083c358d3824e77f3d434f08bfccBrian Paul ctx->Polygon._OffsetAny = GL_TRUE; 513f1d6b384415a083c358d3824e77f3d434f08bfccBrian Paul } 5141e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell} 515d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 5165e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansenstatic void 517a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulcalculate_model_project_matrix( GLcontext *ctx ) 5181e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell{ 5191e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (!ctx->_NeedEyeCoords) { 52023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell _math_matrix_mul_matrix( &ctx->_ModelProjectMatrix, 52123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell &ctx->ProjectionMatrix, 52223caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell &ctx->ModelView ); 5231e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 524ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell _math_matrix_analyse( &ctx->_ModelProjectMatrix ); 525d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul } 5261e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell} 527d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 5281e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwellstatic void 529a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulupdate_modelview_scale( GLcontext *ctx ) 5301e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell{ 5311e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->_ModelViewInvScale = 1.0F; 5321e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->ModelView.flags & (MAT_FLAG_UNIFORM_SCALE | 5331e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell MAT_FLAG_GENERAL_SCALE | 5341e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell MAT_FLAG_GENERAL_3D | 5351e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell MAT_FLAG_GENERAL) ) { 5361e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell const GLfloat *m = ctx->ModelView.inv; 5371e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell GLfloat f = m[2] * m[2] + m[6] * m[6] + m[10] * m[10]; 5381e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (f < 1e-12) f = 1.0; 5391e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->_NeedEyeCoords) 5401e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->_ModelViewInvScale = 1.0/GL_SQRT(f); 5411e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell else 5421e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->_ModelViewInvScale = GL_SQRT(f); 5431e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell } 5441e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell} 545d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 5461e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 5475e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen/* Bring uptodate any state that relies on _NeedEyeCoords. 5481e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 5491e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwellstatic void 550a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulupdate_tnl_spaces( GLcontext *ctx, GLuint oldneedeyecoords ) 5515e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen{ 5521e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* Check if the truth-value interpretations of the bitfields have 5535e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen * changed: 5541e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 555a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if ((oldneedeyecoords == 0) != (ctx->_NeedEyeCoords == 0)) { 5561e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* Recalculate all state that depends on _NeedEyeCoords. 557d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul */ 558a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul update_modelview_scale(ctx); 559a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul calculate_model_project_matrix(ctx); 56008836341788a9f9d638d9dc8328510ccd18ddeb5Brian Paul _mesa_compute_light_positions( ctx ); 5611e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 5621e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Driver.LightingSpaceChange) 5631e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->Driver.LightingSpaceChange( ctx ); 564d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul } 565a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul else { 5661e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell GLuint new_state = ctx->NewState; 567d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 568cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell /* Recalculate that same state only if it has been invalidated 56922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * by other statechanges. 5701e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 5715e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_MODELVIEW) 572a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul update_modelview_scale(ctx); 5731e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 5745e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION)) 575a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul calculate_model_project_matrix(ctx); 57622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes 5771e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW)) 57808836341788a9f9d638d9dc8328510ccd18ddeb5Brian Paul _mesa_compute_light_positions( ctx ); 5791e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell } 5801e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell} 5811e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 5821e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 5831e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwellstatic void 584a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulupdate_drawbuffer( GLcontext *ctx ) 5851e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell{ 5861e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Xmin = 0; 5871e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Ymin = 0; 5881e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Xmax = ctx->DrawBuffer->Width; 5891e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Ymax = ctx->DrawBuffer->Height; 5901e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Scissor.Enabled) { 5911e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Scissor.X > ctx->DrawBuffer->_Xmin) { 5921e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Xmin = ctx->Scissor.X; 5931e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell } 5941e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Scissor.Y > ctx->DrawBuffer->_Ymin) { 5951e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Ymin = ctx->Scissor.Y; 5961e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell } 5971e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Scissor.X + ctx->Scissor.Width < ctx->DrawBuffer->_Xmax) { 5981e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Xmax = ctx->Scissor.X + ctx->Scissor.Width; 599d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul } 6001e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Scissor.Y + ctx->Scissor.Height < ctx->DrawBuffer->_Ymax) { 6011e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->DrawBuffer->_Ymax = ctx->Scissor.Y + ctx->Scissor.Height; 6021e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell } 6031e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell } 6041e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell} 605d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 606d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 6071e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell/* NOTE: This routine references Tranform attribute values to compute 6081e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * userclip positions in clip space, but is only called on 6091e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * _NEW_PROJECTION. The _mesa_ClipPlane() function keeps these values 6101e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * uptodate across changes to the Transform attributes. 6111e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 6121e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwellstatic void 613a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulupdate_projection( GLcontext *ctx ) 6141e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell{ 615ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell _math_matrix_analyse( &ctx->ProjectionMatrix ); 61622144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes 6171e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* Recompute clip plane positions in clipspace. This is also done 6181e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * in _mesa_ClipPlane(). 6191e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 6201e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Transform._AnyClip) { 6211e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell GLuint p; 622a864432fb4333dfbbe669554de7485d8426e1c38Brian Paul for (p = 0; p < ctx->Const.MaxClipPlanes; p++) { 6231e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Transform.ClipEnabled[p]) { 62408836341788a9f9d638d9dc8328510ccd18ddeb5Brian Paul _mesa_transform_vector( ctx->Transform._ClipUserPlane[p], 6251e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->Transform.EyeUserPlane[p], 6261e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->ProjectionMatrix.inv ); 627d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul } 628d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul } 629d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul } 6301e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell} 6311e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 6321e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 633a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul/* 634a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul * Return a bitmask of IMAGE_*_BIT flags which to indicate which 635a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul * pixel transfer operations are enabled. 636a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul */ 637a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulstatic void 638a852378a6289d154364dde440f89a39bbfc33e2dBrian Paulupdate_image_transfer_state(GLcontext *ctx) 639a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul{ 640a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul GLuint mask = 0; 641a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 642a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.RedScale != 1.0F || ctx->Pixel.RedBias != 0.0F || 643a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.GreenScale != 1.0F || ctx->Pixel.GreenBias != 0.0F || 644a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.BlueScale != 1.0F || ctx->Pixel.BlueBias != 0.0F || 645a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.AlphaScale != 1.0F || ctx->Pixel.AlphaBias != 0.0F) 646a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_SCALE_BIAS_BIT; 647a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 648a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset) 649a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_SHIFT_OFFSET_BIT; 6505e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen 651a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.MapColorFlag) 652a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_MAP_COLOR_BIT; 653a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 654a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.ColorTableEnabled) 655a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_COLOR_TABLE_BIT; 656a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 657a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.Convolution1DEnabled || 658a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.Convolution2DEnabled || 65945015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.Separable2DEnabled) { 660a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_CONVOLUTION_BIT; 66145015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul if (ctx->Pixel.PostConvolutionScale[0] != 1.0F || 66245015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.PostConvolutionScale[1] != 1.0F || 66345015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.PostConvolutionScale[2] != 1.0F || 66445015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.PostConvolutionScale[3] != 1.0F || 66545015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.PostConvolutionBias[0] != 0.0F || 66645015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.PostConvolutionBias[1] != 0.0F || 66745015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.PostConvolutionBias[2] != 0.0F || 66845015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul ctx->Pixel.PostConvolutionBias[3] != 0.0F) { 66945015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul mask |= IMAGE_POST_CONVOLUTION_SCALE_BIAS; 67045015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul } 67145015e4d79d63183f6d9c4e4fad655921e07b0abBrian Paul } 672a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 673a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.PostConvolutionColorTableEnabled) 674a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT; 675a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 676a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->ColorMatrix.type != MATRIX_IDENTITY || 677a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixScale[0] != 1.0F || 678a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixBias[0] != 0.0F || 679a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixScale[1] != 1.0F || 680a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixBias[1] != 0.0F || 681a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixScale[2] != 1.0F || 682a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixBias[2] != 0.0F || 683a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixScale[3] != 1.0F || 684a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->Pixel.PostColorMatrixBias[3] != 0.0F) 685a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_COLOR_MATRIX_BIT; 686a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 687a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.PostColorMatrixColorTableEnabled) 688a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT; 689a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 690a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.HistogramEnabled) 691a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_HISTOGRAM_BIT; 692a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 693a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul if (ctx->Pixel.MinMaxEnabled) 694a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul mask |= IMAGE_MIN_MAX_BIT; 695a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 696a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul ctx->_ImageTransferState = mask; 697a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul} 698a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul 6991e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 7008e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7018e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7028e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul/* Note: This routine refers to derived texture attribute values to 7038e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * compute the ENABLE_TEXMAT flags, but is only called on 7048e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * _NEW_TEXTURE_MATRIX. On changes to _NEW_TEXTURE, the ENABLE_TEXMAT 7058e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * flags are updated by _mesa_update_textures(), below. 7068e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * 7078e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * If both TEXTURE and TEXTURE_MATRIX change at once, these values 7088e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * will be computed twice. 7098e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul */ 7108e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paulstatic void 7118e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paulupdate_texture_matrices( GLcontext *ctx ) 7128e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul{ 7138e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul GLuint i; 7148e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 715ed39a43b8cb2e1cf69b097fc89365cde470ebf51Keith Whitwell ctx->Texture._TexMatEnabled = 0; 7168e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7178e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul for (i=0; i < ctx->Const.MaxTextureUnits; i++) { 7188e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (ctx->TextureMatrix[i].flags & MAT_DIRTY) { 7198e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul _math_matrix_analyse( &ctx->TextureMatrix[i] ); 7208e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7218e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (ctx->Driver.TextureMatrix) 7228e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->Driver.TextureMatrix( ctx, i, &ctx->TextureMatrix[i] ); 7238e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7248e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (ctx->Texture.Unit[i]._ReallyEnabled && 7258e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->TextureMatrix[i].type != MATRIX_IDENTITY) 726ed39a43b8cb2e1cf69b097fc89365cde470ebf51Keith Whitwell ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(i); 7278e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7288e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7298e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul} 7308e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7318e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7328e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul/* Note: This routine refers to derived texture matrix values to 7338e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * compute the ENABLE_TEXMAT flags, but is only called on 7348e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * _NEW_TEXTURE. On changes to _NEW_TEXTURE_MATRIX, the ENABLE_TEXMAT 7358e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * flags are updated by _mesa_update_texture_matrices, above. 7368e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * 7378e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * If both TEXTURE and TEXTURE_MATRIX change at once, these values 7388e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * will be computed twice. 7398e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul */ 7408e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paulstatic void 7418e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paulupdate_texture_state( GLcontext *ctx ) 7428e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul{ 7438e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul GLuint i; 7448e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7458e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->Texture._ReallyEnabled = 0; 7468e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->Texture._GenFlags = 0; 7478e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->_NeedNormals &= ~NEED_NORMALS_TEXGEN; 7488e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->_NeedEyeCoords &= ~NEED_EYE_TEXGEN; 749ed39a43b8cb2e1cf69b097fc89365cde470ebf51Keith Whitwell ctx->Texture._TexMatEnabled = 0; 750ed39a43b8cb2e1cf69b097fc89365cde470ebf51Keith Whitwell ctx->Texture._TexGenEnabled = 0; 7518e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7528e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul /* Update texture unit state. 7538e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul */ 7548e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul for (i=0; i < ctx->Const.MaxTextureUnits; i++) { 7558e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i]; 7568e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7578e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_ReallyEnabled = 0; 7588e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_GenFlags = 0; 7598e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7608e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texUnit->Enabled) 7618e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul continue; 7628e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7638e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul /* Find the texture of highest dimensionality that is enabled 7648e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul * and complete. We'll use it for texturing. 7658e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul */ 7668e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texUnit->Enabled & TEXTURE0_CUBE) { 7678e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul struct gl_texture_object *texObj = texUnit->CurrentCubeMap; 7688e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texObj->Complete) { 7698e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul _mesa_test_texobj_completeness(ctx, texObj); 7708e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7718e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texObj->Complete) { 7728e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_ReallyEnabled = TEXTURE0_CUBE; 7738e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_Current = texObj; 7748e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7758e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7768e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7778e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texUnit->_ReallyEnabled && (texUnit->Enabled & TEXTURE0_3D)) { 7788e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul struct gl_texture_object *texObj = texUnit->Current3D; 7798e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texObj->Complete) { 7808e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul _mesa_test_texobj_completeness(ctx, texObj); 7818e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7828e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texObj->Complete) { 7838e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_ReallyEnabled = TEXTURE0_3D; 7848e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_Current = texObj; 7858e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7868e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7878e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7888e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texUnit->_ReallyEnabled && (texUnit->Enabled & TEXTURE0_2D)) { 7898e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul struct gl_texture_object *texObj = texUnit->Current2D; 7908e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texObj->Complete) { 7918e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul _mesa_test_texobj_completeness(ctx, texObj); 7928e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7938e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texObj->Complete) { 7948e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_ReallyEnabled = TEXTURE0_2D; 7958e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_Current = texObj; 7968e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7978e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 7988e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 7998e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texUnit->_ReallyEnabled && (texUnit->Enabled & TEXTURE0_1D)) { 8008e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul struct gl_texture_object *texObj = texUnit->Current1D; 8018e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texObj->Complete) { 8028e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul _mesa_test_texobj_completeness(ctx, texObj); 8038e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8048e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texObj->Complete) { 8058e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_ReallyEnabled = TEXTURE0_1D; 8068e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_Current = texObj; 8078e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8088e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8098e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8108e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (!texUnit->_ReallyEnabled) { 8118e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_Current = NULL; 8128e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul continue; 8138e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8148e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8158e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul { 8168e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul GLuint flag = texUnit->_ReallyEnabled << (i * 4); 8178e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->Texture._ReallyEnabled |= flag; 8188e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8198e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8208e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texUnit->TexGenEnabled) { 8218e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texUnit->TexGenEnabled & S_BIT) { 8228e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_GenFlags |= texUnit->_GenBitS; 8238e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8248e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texUnit->TexGenEnabled & T_BIT) { 8258e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_GenFlags |= texUnit->_GenBitT; 8268e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8278e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texUnit->TexGenEnabled & Q_BIT) { 8288e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_GenFlags |= texUnit->_GenBitQ; 8298e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8308e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (texUnit->TexGenEnabled & R_BIT) { 8318e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul texUnit->_GenFlags |= texUnit->_GenBitR; 8328e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8338e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 834ed39a43b8cb2e1cf69b097fc89365cde470ebf51Keith Whitwell ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(i); 8358e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->Texture._GenFlags |= texUnit->_GenFlags; 8368e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8378e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8388e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (ctx->TextureMatrix[i].type != MATRIX_IDENTITY) 839ed39a43b8cb2e1cf69b097fc89365cde470ebf51Keith Whitwell ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(i); 8408e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8418e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8428e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS) { 8438e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->_NeedNormals |= NEED_NORMALS_TEXGEN; 8448e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->_NeedEyeCoords |= NEED_EYE_TEXGEN; 8458e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8468e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8478e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul if (ctx->Texture._GenFlags & TEXGEN_NEED_EYE_COORD) { 8488e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul ctx->_NeedEyeCoords |= NEED_EYE_TEXGEN; 8498e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul } 8508e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul} 8518e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8528e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul 8531e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell/* 8541e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * If ctx->NewState is non-zero then this function MUST be called before 8551e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * rendering any primitive. Basically, function pointers and miscellaneous 8561e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * flags are updated to reflect the current state of the state machine. 8571e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * 858cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * The above constraint is now maintained largely by the two Exec 859cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * dispatch tables, which trigger the appropriate flush on transition 860cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * between State and Geometry modes. 861cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * 862cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * Special care is taken with the derived value _NeedEyeCoords. This 8631e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * is a bitflag which is updated with information from a number of 8641e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * attribute groups (MODELVIEW, LIGHT, TEXTURE). A lot of derived 8651e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * state references this value, and must be treated with care to 8661e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * ensure that updates are done correctly. All state dependent on 8671e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * _NeedEyeCoords is calculated from within _mesa_update_tnl_spaces(), 86822144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * and from nowhere else. 8691e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 87008836341788a9f9d638d9dc8328510ccd18ddeb5Brian Paulvoid _mesa_update_state( GLcontext *ctx ) 8711e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell{ 872479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul const GLuint new_state = ctx->NewState; 873479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul const GLuint oldneedeyecoords = ctx->_NeedEyeCoords; 8741e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 8751e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (MESA_VERBOSE & VERBOSE_STATE) 87608836341788a9f9d638d9dc8328510ccd18ddeb5Brian Paul _mesa_print_state("", new_state); 8771e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 8785e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_MODELVIEW) 879ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell _math_matrix_analyse( &ctx->ModelView ); 8801e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 8815e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_PROJECTION) 882a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul update_projection( ctx ); 883d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 8845e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_TEXTURE_MATRIX) 8858e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul update_texture_matrices( ctx ); 8861e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 8875e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_COLOR_MATRIX) 888ad2ac216fa0cbebc36530bf9e5256e902710b892Keith Whitwell _math_matrix_analyse( &ctx->ColorMatrix ); 8895e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen 8901e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* References ColorMatrix.type (derived above). 8911e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 892cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell if (new_state & _IMAGE_NEW_TRANSFER_STATE) 893a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul update_image_transfer_state(ctx); 8941e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 8951e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* Contributes to NeedEyeCoords, NeedNormals. 896d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul */ 8975e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_TEXTURE) 8988e39ad2cd67d49be40ff0822f3269affdf83d601Brian Paul update_texture_state( ctx ); 899d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 9005e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & (_NEW_BUFFERS|_NEW_SCISSOR)) 901a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul update_drawbuffer( ctx ); 902d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 9035e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_POLYGON) 904a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul update_polygon( ctx ); 905d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 9061e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* Contributes to NeedEyeCoords, NeedNormals. 9071e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 9085e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen if (new_state & _NEW_LIGHT) 90908836341788a9f9d638d9dc8328510ccd18ddeb5Brian Paul _mesa_update_lighting( ctx ); 910d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 9111e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell /* We can light in object space if the modelview matrix preserves 9121e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * lengths and relative angles. 9131e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 9141e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (new_state & (_NEW_MODELVIEW|_NEW_LIGHT)) { 9151e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->_NeedEyeCoords &= ~NEED_EYE_LIGHT_MODELVIEW; 9161e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (ctx->Light.Enabled && 9171e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell !TEST_MAT_FLAGS( &ctx->ModelView, MAT_FLAGS_LENGTH_PRESERVING)) 9181e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell ctx->_NeedEyeCoords |= NEED_EYE_LIGHT_MODELVIEW; 9191e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell } 920d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul 92106d05afdd687fcd1d59d46c6a86c2e5707e1859bBrian Paul 922cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell /* ctx->_NeedEyeCoords is now uptodate. 9231e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * 924cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * If the truth value of this variable has changed, update for the 925cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * new lighting space and recompute the positions of lights and the 9261e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * normal transform. 9275e3bc0c2a2bcdf59949410f94c9b705fc1281ce8Jouk Jansen * 9281e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell * If the lighting space hasn't changed, may still need to recompute 92922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * light positions & normal transforms for other reasons. 9301e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell */ 9311e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell if (new_state & (_NEW_MODELVIEW | 9321e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell _NEW_PROJECTION | 9331e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell _NEW_LIGHT | 934cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell _MESA_NEW_NEED_EYE_COORDS)) 935a852378a6289d154364dde440f89a39bbfc33e2dBrian Paul update_tnl_spaces( ctx, oldneedeyecoords ); 9361e1aac034c986a08248861363c0baa27dc2ae2d5Keith Whitwell 93723caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell /* 93823caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * Here the driver sets up all the ctx->Driver function pointers 93923caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * to it's specific, private functions, and performs any 94023caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * internal state management necessary, including invalidating 94123caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell * state of active modules. 942cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * 943cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * Set ctx->NewState to zero to avoid recursion if 944cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell * Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?) 94523caf20169ac38436ee9c13914f1d6aa7cf6bb5eKeith Whitwell */ 946d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul ctx->NewState = 0; 947cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290Keith Whitwell ctx->Driver.UpdateState(ctx, new_state); 9482448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ctx->Array.NewState = 0; 949479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul 9502448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell /* At this point we can do some assertions to be sure the required 95122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes * device driver function pointers are all initialized. 952479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul */ 9532448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.GetString); 9542448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.UpdateState); 9552448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.Clear); 9562448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.SetDrawBuffer); 9572448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.GetBufferSize); 958479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul if (ctx->Visual.accumRedBits > 0) { 9592448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.Accum); 960479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul } 9612448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.DrawPixels); 9622448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.ReadPixels); 9632448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.CopyPixels); 9642448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.Bitmap); 9652448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.ResizeBuffersMESA); 9662448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.TexImage1D); 9672448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.TexImage2D); 9682448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.TexImage3D); 9692448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.TexSubImage1D); 9702448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.TexSubImage2D); 9712448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.TexSubImage3D); 972c499ce31baf820e84d133c2189f88e15a1a36672Brian Paul ASSERT(ctx->Driver.CopyTexImage1D); 973c499ce31baf820e84d133c2189f88e15a1a36672Brian Paul ASSERT(ctx->Driver.CopyTexImage2D); 974c499ce31baf820e84d133c2189f88e15a1a36672Brian Paul ASSERT(ctx->Driver.CopyTexSubImage1D); 975c499ce31baf820e84d133c2189f88e15a1a36672Brian Paul ASSERT(ctx->Driver.CopyTexSubImage2D); 976c499ce31baf820e84d133c2189f88e15a1a36672Brian Paul ASSERT(ctx->Driver.CopyTexSubImage3D); 977479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul if (ctx->Extensions.ARB_texture_compression) { 9782448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.CompressedTexImage1D); 9792448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.CompressedTexImage2D); 9802448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.CompressedTexImage3D); 9812448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.CompressedTexSubImage1D); 9822448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.CompressedTexSubImage2D); 9832448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.CompressedTexSubImage3D); 9842448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.IsCompressedFormat); 9852448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.GetCompressedTexImage); 9862448fc7deeaa870d879de17158f243f239c05b15Keith Whitwell ASSERT(ctx->Driver.BaseCompressedTexFormat); 987479fa1db1dc7cb8e48219ac28edfb2f2a9c971b2Brian Paul } 988d0a3ea051a3825441cdc97a82fa9a9c6e7e83087Brian Paul} 989