aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/GL/mesa
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
commitf4092abdf94af6a99aff944d6264bc1284e8bdd4 (patch)
tree2ac1c9cc16ceb93edb2c4382c088dac5aeafdf0f /nx-X11/programs/Xserver/GL/mesa
parenta840692edc9c6d19cd7c057f68e39c7d95eb767d (diff)
downloadnx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.gz
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.bz2
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.zip
Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1
Summary: Imported nx-X11-3.1.0-1.tar.gz Keywords: Imported nx-X11-3.1.0-1.tar.gz into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/GL/mesa')
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp1462
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c64
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile77
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/GLcore/module/Imakefile53
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/Imakefile47
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/X/Imakefile93
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/X/module/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c914
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c151
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.h106
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h102
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile56
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/array_cache/module/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/main/Imakefile61
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/main/module/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/math/Imakefile55
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/math/module/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/shader/Imakefile59
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/shader/grammar/Imakefile54
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile59
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile46
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile63
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/swrast/module/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile55
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/swrast_setup/module/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile66
-rw-r--r--nx-X11/programs/Xserver/GL/mesa/tnl/module/Imakefile6
27 files changed, 3685 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp b/nx-X11/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp
new file mode 100644
index 000000000..6fca465cd
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp
@@ -0,0 +1,1462 @@
+LIBRARY GLcore
+VERSION LIBRARY_VERSION
+EXPORTS
+
+_mesa_set_aa_triangle_function
+_mesa_Accum
+_mesa_ClearAccum
+_mesa_alloc_accum_buffer
+_mesa_clear_accum_buffer
+_mesa_AlphaFunc
+_mesa_alpha_test
+_mesa_alloc_alpha_buffers
+_mesa_clear_alpha_buffers
+_mesa_read_alpha_pixels
+_mesa_read_alpha_span
+_mesa_write_alpha_pixels
+_mesa_write_alpha_span
+_mesa_write_mono_alpha_pixels
+_mesa_write_mono_alpha_span
+_mesa_PopAttrib
+_mesa_PopClientAttrib
+_mesa_PushAttrib
+_mesa_PushClientAttrib
+_mesa_Bitmap
+_mesa_BlendColor
+_mesa_BlendEquation
+_mesa_BlendFunc
+_mesa_BlendFuncSeparateEXT
+_mesa_blend_pixels
+_mesa_blend_span
+_mesa_Clear
+_mesa_ClearColor
+_mesa_ClearIndex
+_mesa_DrawBuffer
+_mesa_ReadBuffer
+_mesa_ResizeBuffersMESA
+_mesa_ClipPlane
+_mesa_GetClipPlane
+gl_init_clip
+gl_update_clipmask
+gl_update_userclip
+gl_user_cliptest
+gl_userclip_point
+gl_viewclip_point
+_mesa_ColorSubTable
+_mesa_ColorTable
+_mesa_ColorTableParameterfv
+_mesa_ColorTableParameteriv
+_mesa_CopyColorSubTable
+_mesa_CopyColorTable
+_mesa_GetColorTable
+_mesa_GetColorTableParameterfv
+_mesa_GetColorTableParameteriv
+_mesa_free_colortable_data
+_mesa_init_colortable
+gl_read_config_file
+gl_register_config_var
+_mesa_Finish
+_mesa_Flush
+_mesa_create_visual
+_mesa_destroy_visual
+_mesa_get_dispatch
+_mesa_initialize_context
+_mesa_initialize_framebuffer
+_mesa_initialize_visual
+_mesa_swapbuffers
+gl_compile_error
+gl_context_initialize
+gl_copy_context
+gl_create_context
+gl_create_framebuffer
+gl_create_visual
+gl_destroy_context
+gl_destroy_framebuffer
+gl_destroy_visual
+gl_error
+gl_free_context_data
+gl_get_current_context
+gl_make_current
+gl_make_current2
+gl_problem
+gl_warning
+_mesa_CopyPixels
+_mesa_LockArraysEXT
+_mesa_UnlockArraysEXT
+gl_alloc_cva_store
+gl_cva_compile_cassette
+gl_cva_force_precalc
+gl_cva_init
+gl_free_cva_store
+gl_merge_cva
+gl_prepare_arrays_cva
+gl_rescue_cva
+_mesa_ClearDepth
+_mesa_DepthFunc
+_mesa_DepthMask
+_mesa_alloc_depth_buffer
+_mesa_clear_depth_buffer
+_mesa_depth_test_pixels
+_mesa_depth_test_span
+_mesa_read_depth_span
+_mesa_read_depth_span_float
+_mesa_zbuffer_address
+glAccum
+glActiveTextureARB
+glAlphaFunc
+glAreTexturesResident
+glAreTexturesResidentEXT
+glArrayElement
+glArrayElementEXT
+glBegin
+glBindTexture
+glBindTextureEXT
+glBitmap
+glBlendColor
+glBlendColorEXT
+glBlendEquation
+glBlendEquationEXT
+glBlendFunc
+glBlendFuncSeparateEXT
+glBlendFuncSeparateINGR
+glCallList
+glCallLists
+glClear
+glClearAccum
+glClearColor
+glClearDepth
+glClearIndex
+glClearStencil
+glClientActiveTextureARB
+glClipPlane
+glColor3b
+glColor3bv
+glColor3d
+glColor3dv
+glColor3f
+glColor3fv
+glColor3i
+glColor3iv
+glColor3s
+glColor3sv
+glColor3ub
+glColor3ubv
+glColor3ui
+glColor3uiv
+glColor3us
+glColor3usv
+glColor4b
+glColor4bv
+glColor4d
+glColor4dv
+glColor4f
+glColor4fv
+glColor4i
+glColor4iv
+glColor4s
+glColor4sv
+glColor4ub
+glColor4ubv
+glColor4ui
+glColor4uiv
+glColor4us
+glColor4usv
+glColorMask
+glColorMaterial
+glColorPointer
+glColorPointerEXT
+glColorSubTable
+glColorSubTableEXT
+glColorTable
+glColorTableEXT
+glColorTableParameterfv
+glColorTableParameterfvSGI
+glColorTableParameteriv
+glColorTableParameterivSGI
+glColorTableSGI
+glCombinerInputNV
+glCombinerOutputNV
+glCombinerParameterfNV
+glCombinerParameterfvNV
+glCombinerParameteriNV
+glCombinerParameterivNV
+glCompressedTexImage1DARB
+glCompressedTexImage2DARB
+glCompressedTexImage3DARB
+glCompressedTexSubImage1DARB
+glCompressedTexSubImage2DARB
+glCompressedTexSubImage3DARB
+glConvolutionFilter1D
+glConvolutionFilter1DEXT
+glConvolutionFilter2D
+glConvolutionFilter2DEXT
+glConvolutionParameterf
+glConvolutionParameterfEXT
+glConvolutionParameterfv
+glConvolutionParameterfvEXT
+glConvolutionParameteri
+glConvolutionParameteriEXT
+glConvolutionParameteriv
+glConvolutionParameterivEXT
+glCopyColorSubTable
+glCopyColorSubTableEXT
+glCopyColorTable
+glCopyColorTableSGI
+glCopyConvolutionFilter1D
+glCopyConvolutionFilter1DEXT
+glCopyConvolutionFilter2D
+glCopyConvolutionFilter2DEXT
+glCopyPixels
+glCopyTexImage1D
+glCopyTexImage1DEXT
+glCopyTexImage2D
+glCopyTexImage2DEXT
+glCopyTexSubImage1D
+glCopyTexSubImage1DEXT
+glCopyTexSubImage2D
+glCopyTexSubImage2DEXT
+glCopyTexSubImage3D
+glCopyTexSubImage3DEXT
+glCullFace
+glCullParameterdvEXT
+glCullParameterfvEXT
+glDeleteLists
+glDeleteTextures
+glDeleteTexturesEXT
+glDepthFunc
+glDepthMask
+glDepthRange
+glDetailTexFuncSGIS
+glDisable
+glDisableClientState
+glDrawArrays
+glDrawArraysEXT
+glDrawBuffer
+glDrawElements
+glDrawPixels
+glDrawRangeElements
+glDrawRangeElementsEXT
+glEdgeFlag
+glEdgeFlagPointer
+glEdgeFlagPointerEXT
+glEdgeFlagv
+glEnable
+glEnableClientState
+glEnd
+glEndList
+glEvalCoord1d
+glEvalCoord1dv
+glEvalCoord1f
+glEvalCoord1fv
+glEvalCoord2d
+glEvalCoord2dv
+glEvalCoord2f
+glEvalCoord2fv
+glEvalMesh1
+glEvalMesh2
+glEvalPoint1
+glEvalPoint2
+glFeedbackBuffer
+glFinalCombinerInputNV
+glFinish
+glFlush
+glFlushRasterSGIX
+glFlushVertexArrayRangeNV
+glFogCoordPointerEXT
+glFogCoorddEXT
+glFogCoorddvEXT
+glFogCoordfEXT
+glFogCoordfvEXT
+glFogf
+glFogfv
+glFogi
+glFogiv
+glFragmentColorMaterialSGIX
+glFragmentLightModelfSGIX
+glFragmentLightModelfvSGIX
+glFragmentLightModeliSGIX
+glFragmentLightModelivSGIX
+glFragmentLightfSGIX
+glFragmentLightfvSGIX
+glFragmentLightiSGIX
+glFragmentLightivSGIX
+glFragmentMaterialfSGIX
+glFragmentMaterialfvSGIX
+glFragmentMaterialiSGIX
+glFragmentMaterialivSGIX
+glFrameZoomSGIX
+glFrontFace
+glFrustum
+glGenLists
+glGenTextures
+glGenTexturesEXT
+glGetBooleanv
+glGetClipPlane
+glGetColorTable
+glGetColorTableEXT
+glGetColorTableParameterfv
+glGetColorTableParameterfvEXT
+glGetColorTableParameterfvSGI
+glGetColorTableParameteriv
+glGetColorTableParameterivEXT
+glGetColorTableParameterivSGI
+glGetColorTableSGI
+glGetCombinerInputParameterfvNV
+glGetCombinerInputParameterivNV
+glGetCombinerOutputParameterfvNV
+glGetCombinerOutputParameterivNV
+glGetCompressedTexImageARB
+glGetConvolutionFilter
+glGetConvolutionFilterEXT
+glGetConvolutionParameterfv
+glGetConvolutionParameterfvEXT
+glGetConvolutionParameteriv
+glGetConvolutionParameterivEXT
+glGetDetailTexFuncSGIS
+glGetDoublev
+glGetError
+glGetFinalCombinerInputParameterfvNV
+glGetFinalCombinerInputParameterivNV
+glGetFloatv
+glGetFragmentLightfvSGIX
+glGetFragmentLightivSGIX
+glGetFragmentMaterialfvSGIX
+glGetFragmentMaterialivSGIX
+glGetHistogram
+glGetHistogramEXT
+glGetHistogramParameterfv
+glGetHistogramParameterfvEXT
+glGetHistogramParameteriv
+glGetHistogramParameterivEXT
+glGetInstrumentsSGIX
+glGetIntegerv
+glGetLightfv
+glGetLightiv
+glGetListParameterfvSGIX
+glGetListParameterivSGIX
+glGetMapdv
+glGetMapfv
+glGetMapiv
+glGetMaterialfv
+glGetMaterialiv
+glGetMinmax
+glGetMinmaxEXT
+glGetMinmaxParameterfv
+glGetMinmaxParameterfvEXT
+glGetMinmaxParameteriv
+glGetMinmaxParameterivEXT
+glGetPixelMapfv
+glGetPixelMapuiv
+glGetPixelMapusv
+glGetPixelTexGenParameterfvSGIS
+glGetPixelTexGenParameterivSGIS
+glGetPointerv
+glGetPointervEXT
+glGetPolygonStipple
+glGetSeparableFilter
+glGetSeparableFilterEXT
+glGetSharpenTexFuncSGIS
+glGetString
+glGetTexEnvfv
+glGetTexEnviv
+glGetTexFilterFuncSGIS
+glGetTexGendv
+glGetTexGenfv
+glGetTexGeniv
+glGetTexImage
+glGetTexLevelParameterfv
+glGetTexLevelParameteriv
+glGetTexParameterfv
+glGetTexParameteriv
+glHint
+glHintPGI
+glHistogram
+glHistogramEXT
+glIndexFuncEXT
+glIndexMask
+glIndexMaterialEXT
+glIndexPointer
+glIndexPointerEXT
+glIndexd
+glIndexdv
+glIndexf
+glIndexfv
+glIndexi
+glIndexiv
+glIndexs
+glIndexsv
+glIndexub
+glIndexubv
+glInitNames
+glInstrumentsBufferSGIX
+glInterleavedArrays
+glIsEnabled
+glIsList
+glIsTexture
+glIsTextureEXT
+glLightEnviSGIX
+glLightModelf
+glLightModelfv
+glLightModeli
+glLightModeliv
+glLightf
+glLightfv
+glLighti
+glLightiv
+glLineStipple
+glLineWidth
+glListBase
+glListParameterfSGIX
+glListParameterfvSGIX
+glListParameteriSGIX
+glListParameterivSGIX
+glLoadIdentity
+glLoadMatrixd
+glLoadMatrixf
+glLoadName
+glLoadTransposeMatrixdARB
+glLoadTransposeMatrixfARB
+glLockArraysEXT
+glLogicOp
+glMap1d
+glMap1f
+glMap2d
+glMap2f
+glMapGrid1d
+glMapGrid1f
+glMapGrid2d
+glMapGrid2f
+glMaterialf
+glMaterialfv
+glMateriali
+glMaterialiv
+glMatrixMode
+glMinmax
+glMinmaxEXT
+glMultMatrixd
+glMultMatrixf
+glMultTransposeMatrixdARB
+glMultTransposeMatrixfARB
+glMultiTexCoord1dARB
+glMultiTexCoord1dvARB
+glMultiTexCoord1fARB
+glMultiTexCoord1fvARB
+glMultiTexCoord1iARB
+glMultiTexCoord1ivARB
+glMultiTexCoord1sARB
+glMultiTexCoord1svARB
+glMultiTexCoord2dARB
+glMultiTexCoord2dvARB
+glMultiTexCoord2fARB
+glMultiTexCoord2fvARB
+glMultiTexCoord2iARB
+glMultiTexCoord2ivARB
+glMultiTexCoord2sARB
+glMultiTexCoord2svARB
+glMultiTexCoord3dARB
+glMultiTexCoord3dvARB
+glMultiTexCoord3fARB
+glMultiTexCoord3fvARB
+glMultiTexCoord3iARB
+glMultiTexCoord3ivARB
+glMultiTexCoord3sARB
+glMultiTexCoord3svARB
+glMultiTexCoord4dARB
+glMultiTexCoord4dvARB
+glMultiTexCoord4fARB
+glMultiTexCoord4fvARB
+glMultiTexCoord4iARB
+glMultiTexCoord4ivARB
+glMultiTexCoord4sARB
+glMultiTexCoord4svARB
+glNewList
+glNormal3b
+glNormal3bv
+glNormal3d
+glNormal3dv
+glNormal3f
+glNormal3fv
+glNormal3i
+glNormal3iv
+glNormal3s
+glNormal3sv
+glNormalPointer
+glNormalPointerEXT
+glOrtho
+glPassThrough
+glPixelMapfv
+glPixelMapuiv
+glPixelMapusv
+glPixelStoref
+glPixelStorei
+glPixelTexGenParameterfSGIS
+glPixelTexGenParameterfvSGIS
+glPixelTexGenParameteriSGIS
+glPixelTexGenParameterivSGIS
+glPixelTexGenSGIX
+glPixelTransferf
+glPixelTransferi
+glPixelZoom
+glPointParameterfEXT
+glPointParameterfSGIS
+glPointParameterfvEXT
+glPointParameterfvSGIS
+glPointSize
+glPollInstrumentsSGIX
+glPolygonMode
+glPolygonOffset
+glPolygonOffsetEXT
+glPolygonStipple
+glPopAttrib
+glPopClientAttrib
+glPopMatrix
+glPopName
+glPrioritizeTextures
+glPrioritizeTexturesEXT
+glPushAttrib
+glPushClientAttrib
+glPushMatrix
+glPushName
+glRasterPos2d
+glRasterPos2dv
+glRasterPos2f
+glRasterPos2fv
+glRasterPos2i
+glRasterPos2iv
+glRasterPos2s
+glRasterPos2sv
+glRasterPos3d
+glRasterPos3dv
+glRasterPos3f
+glRasterPos3fv
+glRasterPos3i
+glRasterPos3iv
+glRasterPos3s
+glRasterPos3sv
+glRasterPos4d
+glRasterPos4dv
+glRasterPos4f
+glRasterPos4fv
+glRasterPos4i
+glRasterPos4iv
+glRasterPos4s
+glRasterPos4sv
+glReadBuffer
+glReadInstrumentsSGIX
+glReadPixels
+glRectd
+glRectdv
+glRectf
+glRectfv
+glRecti
+glRectiv
+glRects
+glRectsv
+glReferencePlaneSGIX
+glRenderMode
+glResetHistogram
+glResetHistogramEXT
+glResetMinmax
+glResetMinmaxEXT
+glResizeBuffersMESA
+glRotated
+glRotatef
+glSampleCoverageARB
+glSampleMaskEXT
+glSampleMaskSGIS
+glSamplePassARB
+glSamplePatternEXT
+glSamplePatternSGIS
+glScaled
+glScalef
+glScissor
+glSelectBuffer
+glSeparableFilter2D
+glSeparableFilter2DEXT
+glShadeModel
+glSharpenTexFuncSGIS
+glSpriteParameterfSGIX
+glSpriteParameterfvSGIX
+glSpriteParameteriSGIX
+glSpriteParameterivSGIX
+glStartInstrumentsSGIX
+glStencilFunc
+glStencilMask
+glStencilOp
+glStopInstrumentsSGIX
+glTagSampleBufferSGIX
+glTbufferMask3DFX
+glTexCoord1d
+glTexCoord1dv
+glTexCoord1f
+glTexCoord1fv
+glTexCoord1i
+glTexCoord1iv
+glTexCoord1s
+glTexCoord1sv
+glTexCoord2d
+glTexCoord2dv
+glTexCoord2f
+glTexCoord2fv
+glTexCoord2i
+glTexCoord2iv
+glTexCoord2s
+glTexCoord2sv
+glTexCoord3d
+glTexCoord3dv
+glTexCoord3f
+glTexCoord3fv
+glTexCoord3i
+glTexCoord3iv
+glTexCoord3s
+glTexCoord3sv
+glTexCoord4d
+glTexCoord4dv
+glTexCoord4f
+glTexCoord4fv
+glTexCoord4i
+glTexCoord4iv
+glTexCoord4s
+glTexCoord4sv
+glTexCoordPointer
+glTexCoordPointerEXT
+glTexEnvf
+glTexEnvfv
+glTexEnvi
+glTexEnviv
+glTexFilterFuncSGIS
+glTexGend
+glTexGendv
+glTexGenf
+glTexGenfv
+glTexGeni
+glTexGeniv
+glTexImage1D
+glTexImage2D
+glTexImage3D
+glTexImage3DEXT
+glTexImage4DSGIS
+glTexParameterf
+glTexParameterfv
+glTexParameteri
+glTexParameteriv
+glTexSubImage1D
+glTexSubImage1DEXT
+glTexSubImage2D
+glTexSubImage2DEXT
+glTexSubImage3D
+glTexSubImage3DEXT
+glTexSubImage4DSGIS
+glTranslated
+glTranslatef
+glUnlockArraysEXT
+glVertex2d
+glVertex2dv
+glVertex2f
+glVertex2fv
+glVertex2i
+glVertex2iv
+glVertex2s
+glVertex2sv
+glVertex3d
+glVertex3dv
+glVertex3f
+glVertex3fv
+glVertex3i
+glVertex3iv
+glVertex3s
+glVertex3sv
+glVertex4d
+glVertex4dv
+glVertex4f
+glVertex4fv
+glVertex4i
+glVertex4iv
+glVertex4s
+glVertex4sv
+glVertexArrayRangeNV
+glVertexPointer
+glVertexPointerEXT
+glVertexWeightPointerEXT
+glVertexWeightfEXT
+glVertexWeightfvEXT
+glViewport
+glWindowPos2dMESA
+glWindowPos2dvMESA
+glWindowPos2fMESA
+glWindowPos2fvMESA
+glWindowPos2iMESA
+glWindowPos2ivMESA
+glWindowPos2sMESA
+glWindowPos2svMESA
+glWindowPos3dMESA
+glWindowPos3dvMESA
+glWindowPos3fMESA
+glWindowPos3fvMESA
+glWindowPos3iMESA
+glWindowPos3ivMESA
+glWindowPos3sMESA
+glWindowPos3svMESA
+glWindowPos4dMESA
+glWindowPos4dvMESA
+glWindowPos4fMESA
+glWindowPos4fvMESA
+glWindowPos4iMESA
+glWindowPos4ivMESA
+glWindowPos4sMESA
+glWindowPos4svMESA
+_mesa_CallList
+_mesa_CallLists
+_mesa_DeleteLists
+_mesa_EndList
+_mesa_GenLists
+_mesa_IsList
+_mesa_ListBase
+_mesa_NewList
+_mesa_init_dlist_table
+gl_compile_cassette
+gl_destroy_list
+gl_init_lists
+gl_save_error
+mesa_print_display_list
+_mesa_DrawPixels
+_mesa_clip_pixelrect
+_mesa_Disable
+_mesa_DisableClientState
+_mesa_Enable
+_mesa_EnableClientState
+_mesa_IsEnabled
+_mesa_set_enable
+gl_lookup_enum_by_name
+gl_lookup_enum_by_nr
+_mesa_EvalCoord1d
+_mesa_EvalCoord1dv
+_mesa_EvalCoord1f
+_mesa_EvalCoord1fv
+_mesa_EvalCoord2d
+_mesa_EvalCoord2dv
+_mesa_EvalCoord2f
+_mesa_EvalCoord2fv
+_mesa_EvalMesh1
+_mesa_EvalMesh2
+_mesa_EvalPoint1
+_mesa_EvalPoint2
+_mesa_GetMapdv
+_mesa_GetMapfv
+_mesa_GetMapiv
+_mesa_Map1d
+_mesa_Map1f
+_mesa_Map2d
+_mesa_Map2f
+_mesa_MapGrid1d
+_mesa_MapGrid1f
+_mesa_MapGrid2d
+_mesa_MapGrid2f
+_mesa_evaluator_components
+gl_copy_map_points1d
+gl_copy_map_points1f
+gl_copy_map_points2d
+gl_copy_map_points2f
+gl_eval_vb
+gl_init_eval
+gl_extension_is_enabled
+gl_extensions_add
+gl_extensions_ctr
+gl_extensions_disable
+gl_extensions_dtr
+gl_extensions_enable
+gl_extensions_get_string
+_mesa_FeedbackBuffer
+_mesa_InitNames
+_mesa_LoadName
+_mesa_PassThrough
+_mesa_PopName
+_mesa_PushName
+_mesa_RenderMode
+_mesa_SelectBuffer
+gl_feedback_line
+gl_feedback_points
+gl_feedback_triangle
+gl_feedback_vertex
+gl_select_line
+gl_select_points
+gl_select_triangle
+gl_update_hitflag
+_mesa_Fogf
+_mesa_Fogfv
+_mesa_Fogi
+_mesa_Fogiv
+_mesa_fog_ci_pixels
+_mesa_fog_rgba_pixels
+_mesa_fog_vertices
+_mesa_init_fog
+_mesa_GetBooleanv
+_mesa_GetDoublev
+_mesa_GetError
+_mesa_GetFloatv
+_mesa_GetIntegerv
+_mesa_GetPointerv
+_mesa_GetString
+_glapi_add_entrypoint
+_glapi_check_multithread
+_glapi_check_table
+_glapi_get_context
+_glapi_get_dispatch
+_glapi_get_dispatch_table_size
+_glapi_get_proc_address
+_glapi_get_proc_name
+_glapi_get_proc_offset
+_glapi_get_version
+_glapi_set_context
+_glapi_set_dispatch
+_glapi_noop_enable_warnings
+_glthread_GetID
+_glthread_GetTSD
+_glthread_InitTSD
+_glthread_SetTSD
+_mesa_DeleteHashTable
+_mesa_HashFindFreeKeyBlock
+_mesa_HashFirstEntry
+_mesa_HashInsert
+_mesa_HashLookup
+_mesa_HashPrint
+_mesa_HashRemove
+_mesa_NewHashTable
+_mesa_Hint
+_mesa_HintPGI
+_mesa_try_Hint
+_mesa_bytes_per_pixel
+_mesa_components_in_format
+_mesa_image_address
+_mesa_image_row_stride
+_mesa_is_legal_format_and_type
+_mesa_native_packing
+_mesa_pack_bitmap
+_mesa_pack_polygon_stipple
+_mesa_pack_rgba_span
+_mesa_sizeof_packed_type
+_mesa_sizeof_type
+_mesa_swap2
+_mesa_swap4
+_mesa_unpack_bitmap
+_mesa_unpack_depth_span
+_mesa_unpack_float_color_span
+_mesa_unpack_image
+_mesa_unpack_index_span
+_mesa_unpack_polygon_stipple
+_mesa_unpack_stencil_span
+_mesa_unpack_ubyte_color_span
+_mesa_ConvolutionFilter1D
+_mesa_ConvolutionFilter2D
+_mesa_ConvolutionParameterf
+_mesa_ConvolutionParameterfv
+_mesa_ConvolutionParameteri
+_mesa_ConvolutionParameteriv
+_mesa_CopyConvolutionFilter1D
+_mesa_CopyConvolutionFilter2D
+_mesa_GetConvolutionFilter
+_mesa_GetConvolutionParameterfv
+_mesa_GetConvolutionParameteriv
+_mesa_GetHistogram
+_mesa_GetHistogramParameterfv
+_mesa_GetHistogramParameteriv
+_mesa_GetMinmax
+_mesa_GetMinmaxParameterfv
+_mesa_GetMinmaxParameteriv
+_mesa_GetSeparableFilter
+_mesa_Histogram
+_mesa_Minmax
+_mesa_ResetHistogram
+_mesa_ResetMinmax
+_mesa_SeparableFilter2D
+_mesa_update_histogram
+_mesa_update_minmax
+_mesa_ColorMaterial
+_mesa_GetLightfv
+_mesa_GetLightiv
+_mesa_GetMaterialfv
+_mesa_GetMaterialiv
+_mesa_LightModelf
+_mesa_LightModelfv
+_mesa_LightModeli
+_mesa_LightModeliv
+_mesa_Lightf
+_mesa_Lightfv
+_mesa_Lighti
+_mesa_Lightiv
+_mesa_Materialf
+_mesa_Materialfv
+_mesa_Materiali
+_mesa_Materialiv
+_mesa_ShadeModel
+gl_compute_light_positions
+gl_compute_shine_table
+gl_compute_spot_exp_table
+gl_material_bitmask
+gl_update_color_material
+gl_update_lighting
+gl_update_material
+gl_update_normal_transform
+_mesa_LineStipple
+_mesa_LineWidth
+gl_set_line_function
+_mesa_LogicOp
+_mesa_logicop_ci_pixels
+_mesa_logicop_ci_span
+_mesa_logicop_rgba_pixels
+_mesa_logicop_rgba_span
+_mesa_ColorMask
+_mesa_IndexMask
+_mesa_mask_index_pixels
+_mesa_mask_index_span
+_mesa_mask_rgba_pixels
+_mesa_mask_rgba_span
+_mesa_DepthRange
+_mesa_Frustum
+_mesa_LoadIdentity
+_mesa_LoadMatrixd
+_mesa_LoadMatrixf
+_mesa_LoadTransposeMatrixdARB
+_mesa_LoadTransposeMatrixfARB
+_mesa_MatrixMode
+_mesa_MultMatrixd
+_mesa_MultMatrixf
+_mesa_MultTransposeMatrixdARB
+_mesa_MultTransposeMatrixfARB
+_mesa_Ortho
+_mesa_PopMatrix
+_mesa_PushMatrix
+_mesa_Rotated
+_mesa_Rotatef
+_mesa_Scaled
+_mesa_Scalef
+_mesa_Translated
+_mesa_Translatef
+_mesa_Viewport
+gl_Viewport
+gl_calculate_model_project_matrix
+gl_mat_mul_floats
+gl_mat_mul_mat
+gl_matrix_alloc_inv
+gl_matrix_analyze
+gl_matrix_copy
+gl_matrix_ctr
+gl_matrix_dtr
+gl_matrix_invert
+gl_matrix_mul
+gl_matrix_transposed
+gl_matrix_transposef
+gl_print_matrix
+gl_rotation_matrix
+_mesa_calloc
+_mesa_free
+_mesa_malloc
+_mesa_bitcount
+_mesa_init_math
+gl_sqrt
+gl_alloc_pb
+gl_flush_pb
+gl_build_immediate_pipeline
+gl_build_precalc_pipeline
+gl_pipeline_init
+gl_print_active_pipeline
+gl_print_pipe_ops
+gl_print_pipeline
+gl_print_tri_caps
+gl_print_vert_flags
+gl_reset_cva_vb
+gl_run_pipeline
+gl_update_pipelines
+_mesa_GetPixelMapfv
+_mesa_GetPixelMapuiv
+_mesa_GetPixelMapusv
+_mesa_PixelMapfv
+_mesa_PixelMapuiv
+_mesa_PixelMapusv
+_mesa_PixelStoref
+_mesa_PixelStorei
+_mesa_PixelTransferf
+_mesa_PixelTransferi
+_mesa_PixelZoom
+_mesa_lookup_rgba
+_mesa_map_ci
+_mesa_map_ci8_to_rgba
+_mesa_map_ci_to_rgba
+_mesa_map_ci_to_rgba_ubyte
+_mesa_map_rgba
+_mesa_map_stencil
+_mesa_scale_and_bias_rgba
+_mesa_shift_and_offset_ci
+_mesa_shift_and_offset_stencil
+_mesa_transform_rgba
+_mesa_GetPixelTexGenParameterfvSGIS
+_mesa_GetPixelTexGenParameterivSGIS
+_mesa_PixelTexGenParameterfSGIS
+_mesa_PixelTexGenParameterfvSGIS
+_mesa_PixelTexGenParameteriSGIS
+_mesa_PixelTexGenParameterivSGIS
+_mesa_PixelTexGenSGIX
+_mesa_pixeltexgen
+_mesa_PointParameterfEXT
+_mesa_PointParameterfvEXT
+_mesa_PointSize
+gl_set_point_function
+_mesa_CullFace
+_mesa_FrontFace
+_mesa_GetPolygonStipple
+_mesa_PolygonMode
+_mesa_PolygonOffset
+_mesa_PolygonOffsetEXT
+_mesa_PolygonStipple
+gl_set_quad_function
+_mesa_RasterPos2d
+_mesa_RasterPos2dv
+_mesa_RasterPos2f
+_mesa_RasterPos2fv
+_mesa_RasterPos2i
+_mesa_RasterPos2iv
+_mesa_RasterPos2s
+_mesa_RasterPos2sv
+_mesa_RasterPos3d
+_mesa_RasterPos3dv
+_mesa_RasterPos3f
+_mesa_RasterPos3fv
+_mesa_RasterPos3i
+_mesa_RasterPos3iv
+_mesa_RasterPos3s
+_mesa_RasterPos3sv
+_mesa_RasterPos4d
+_mesa_RasterPos4dv
+_mesa_RasterPos4f
+_mesa_RasterPos4fv
+_mesa_RasterPos4i
+_mesa_RasterPos4iv
+_mesa_RasterPos4s
+_mesa_RasterPos4sv
+_mesa_ReadPixels
+_mesa_Rectd
+_mesa_Rectdv
+_mesa_Rectf
+_mesa_Rectfv
+_mesa_Recti
+_mesa_Rectiv
+_mesa_Rects
+_mesa_Rectsv
+_mesa_Scissor
+gl_scissor_pixels
+gl_scissor_span
+gl_init_shade
+gl_shade_rastpos
+gl_update_lighting_function
+gl_read_index_span
+gl_read_rgba_span
+gl_write_index_span
+gl_write_monocolor_span
+gl_write_monoindex_span
+gl_write_multitexture_span
+gl_write_rgba_span
+gl_write_texture_span
+gl_clean_color
+gl_default_nr_stages
+gl_default_pipeline
+gl_import_client_data
+gl_init_vbxform
+gl_update_materials
+_mesa_init_exec_table
+_mesa_init_no_op_table
+gl_print_enable_flags
+gl_print_state
+gl_update_state
+_mesa_ClearStencil
+_mesa_StencilFunc
+_mesa_StencilMask
+_mesa_StencilOp
+_mesa_alloc_stencil_buffer
+_mesa_clear_stencil_buffer
+_mesa_read_stencil_span
+_mesa_stencil_and_ztest_pixels
+_mesa_stencil_and_ztest_span
+_mesa_write_stencil_span
+_mesa_CompressedTexImage1DARB
+_mesa_CompressedTexImage2DARB
+_mesa_CompressedTexImage3DARB
+_mesa_CompressedTexSubImage1DARB
+_mesa_CompressedTexSubImage2DARB
+_mesa_CompressedTexSubImage3DARB
+_mesa_CopyTexImage1D
+_mesa_CopyTexImage2D
+_mesa_CopyTexSubImage1D
+_mesa_CopyTexSubImage2D
+_mesa_CopyTexSubImage3D
+_mesa_GetCompressedTexImageARB
+_mesa_GetTexImage
+_mesa_TexImage1D
+_mesa_TexImage2D
+_mesa_TexImage3D
+_mesa_TexImage3DEXT
+_mesa_TexSubImage1D
+_mesa_TexSubImage2D
+_mesa_TexSubImage3D
+_mesa_alloc_texture_image
+_mesa_base_tex_format
+_mesa_compressed_image_size
+_mesa_free_texture_image
+_mesa_get_teximage_from_driver
+_mesa_select_tex_image
+_mesa_select_tex_object
+_mesa_AreTexturesResident
+_mesa_BindTexture
+_mesa_DeleteTextures
+_mesa_GenTextures
+_mesa_IsTexture
+_mesa_PrioritizeTextures
+_mesa_test_texobj_completeness
+gl_alloc_texture_object
+gl_free_texture_object
+_mesa_ActiveTextureARB
+_mesa_ClientActiveTextureARB
+_mesa_GetTexEnvfv
+_mesa_GetTexEnviv
+_mesa_GetTexGendv
+_mesa_GetTexGenfv
+_mesa_GetTexGeniv
+_mesa_GetTexLevelParameterfv
+_mesa_GetTexLevelParameteriv
+_mesa_GetTexParameterfv
+_mesa_GetTexParameteriv
+_mesa_TexEnvf
+_mesa_TexEnvfv
+_mesa_TexEnvi
+_mesa_TexEnviv
+_mesa_TexGend
+_mesa_TexGendv
+_mesa_TexGenf
+_mesa_TexGenfv
+_mesa_TexGeni
+_mesa_TexGeniv
+_mesa_TexParameterf
+_mesa_TexParameterfv
+_mesa_TexParameteri
+_mesa_TexParameteriv
+gl_put_texobj_on_dirty_list
+gl_remove_texobj_from_dirty_list
+gl_update_dirty_texobjs
+_mesa_set_texture_sampler
+gl_init_texture
+gl_texture_pixels
+gl_update_texture_unit
+gl_init_translate
+gl_cull_triangle
+gl_set_triangle_function
+_mesa_ArrayElement
+_mesa_ColorPointer
+_mesa_ColorPointerEXT
+_mesa_DrawArrays
+_mesa_DrawElements
+_mesa_DrawRangeElements
+_mesa_EdgeFlagPointer
+_mesa_EdgeFlagPointerEXT
+_mesa_IndexPointer
+_mesa_IndexPointerEXT
+_mesa_InterleavedArrays
+_mesa_NormalPointer
+_mesa_NormalPointerEXT
+_mesa_TexCoordPointer
+_mesa_TexCoordPointerEXT
+_mesa_VertexPointer
+_mesa_VertexPointerEXT
+gl_exec_array_elements
+gl_update_client_state
+gl_immediate_alloc
+gl_immediate_free
+gl_vb_create_for_cva
+gl_vb_create_for_immediate
+gl_vb_free
+gl_cull_vb
+gl_dont_cull_vb
+gl_fast_copy_vb
+gl_make_normal_cullmask
+gl_purge_vertices
+_mesa_Begin
+_mesa_Color3b
+_mesa_Color3bv
+_mesa_Color3d
+_mesa_Color3dv
+_mesa_Color3f
+_mesa_Color3fv
+_mesa_Color3i
+_mesa_Color3iv
+_mesa_Color3s
+_mesa_Color3sv
+_mesa_Color3ub
+_mesa_Color3ubv
+_mesa_Color3ui
+_mesa_Color3uiv
+_mesa_Color3us
+_mesa_Color3usv
+_mesa_Color4b
+_mesa_Color4bv
+_mesa_Color4d
+_mesa_Color4dv
+_mesa_Color4f
+_mesa_Color4fv
+_mesa_Color4i
+_mesa_Color4iv
+_mesa_Color4s
+_mesa_Color4sv
+_mesa_Color4ub
+_mesa_Color4ubv
+_mesa_Color4ui
+_mesa_Color4uiv
+_mesa_Color4us
+_mesa_Color4usv
+_mesa_EdgeFlag
+_mesa_EdgeFlagv
+_mesa_End
+_mesa_Indexd
+_mesa_Indexdv
+_mesa_Indexf
+_mesa_Indexfv
+_mesa_Indexi
+_mesa_Indexiv
+_mesa_Indexs
+_mesa_Indexsv
+_mesa_Indexub
+_mesa_Indexubv
+_mesa_MultiTexCoord1dARB
+_mesa_MultiTexCoord1dvARB
+_mesa_MultiTexCoord1fARB
+_mesa_MultiTexCoord1fvARB
+_mesa_MultiTexCoord1iARB
+_mesa_MultiTexCoord1ivARB
+_mesa_MultiTexCoord1sARB
+_mesa_MultiTexCoord1svARB
+_mesa_MultiTexCoord2dARB
+_mesa_MultiTexCoord2dvARB
+_mesa_MultiTexCoord2fARB
+_mesa_MultiTexCoord2fvARB
+_mesa_MultiTexCoord2iARB
+_mesa_MultiTexCoord2ivARB
+_mesa_MultiTexCoord2sARB
+_mesa_MultiTexCoord2svARB
+_mesa_MultiTexCoord3dARB
+_mesa_MultiTexCoord3dvARB
+_mesa_MultiTexCoord3fARB
+_mesa_MultiTexCoord3fvARB
+_mesa_MultiTexCoord3iARB
+_mesa_MultiTexCoord3ivARB
+_mesa_MultiTexCoord3sARB
+_mesa_MultiTexCoord3svARB
+_mesa_MultiTexCoord4dARB
+_mesa_MultiTexCoord4dvARB
+_mesa_MultiTexCoord4fARB
+_mesa_MultiTexCoord4fvARB
+_mesa_MultiTexCoord4iARB
+_mesa_MultiTexCoord4ivARB
+_mesa_MultiTexCoord4sARB
+_mesa_MultiTexCoord4svARB
+_mesa_Normal3b
+_mesa_Normal3bv
+_mesa_Normal3d
+_mesa_Normal3dv
+_mesa_Normal3f
+_mesa_Normal3fv
+_mesa_Normal3i
+_mesa_Normal3iv
+_mesa_Normal3s
+_mesa_Normal3sv
+_mesa_TexCoord1d
+_mesa_TexCoord1dv
+_mesa_TexCoord1f
+_mesa_TexCoord1fv
+_mesa_TexCoord1i
+_mesa_TexCoord1iv
+_mesa_TexCoord1s
+_mesa_TexCoord1sv
+_mesa_TexCoord2d
+_mesa_TexCoord2dv
+_mesa_TexCoord2f
+_mesa_TexCoord2fv
+_mesa_TexCoord2i
+_mesa_TexCoord2iv
+_mesa_TexCoord2s
+_mesa_TexCoord2sv
+_mesa_TexCoord3d
+_mesa_TexCoord3dv
+_mesa_TexCoord3f
+_mesa_TexCoord3fv
+_mesa_TexCoord3i
+_mesa_TexCoord3iv
+_mesa_TexCoord3s
+_mesa_TexCoord3sv
+_mesa_TexCoord4d
+_mesa_TexCoord4dv
+_mesa_TexCoord4f
+_mesa_TexCoord4fv
+_mesa_TexCoord4i
+_mesa_TexCoord4iv
+_mesa_TexCoord4s
+_mesa_TexCoord4sv
+_mesa_Vertex2d
+_mesa_Vertex2dv
+_mesa_Vertex2f
+_mesa_Vertex2fv
+_mesa_Vertex2i
+_mesa_Vertex2iv
+_mesa_Vertex2s
+_mesa_Vertex2sv
+_mesa_Vertex3d
+_mesa_Vertex3dv
+_mesa_Vertex3f
+_mesa_Vertex3fv
+_mesa_Vertex3i
+_mesa_Vertex3iv
+_mesa_Vertex3s
+_mesa_Vertex3sv
+_mesa_Vertex4d
+_mesa_Vertex4dv
+_mesa_Vertex4f
+_mesa_Vertex4fv
+_mesa_Vertex4i
+_mesa_Vertex4iv
+_mesa_Vertex4s
+_mesa_Vertex4sv
+gl_Begin
+gl_End
+gl_Vertex2f
+gl_render_elts
+gl_render_vb_indirect
+gl_init_vbrender
+gl_reduced_prim_change
+gl_render_clipped_line
+gl_render_clipped_triangle
+gl_render_vb
+gl_set_render_vb_function
+RESET_IMMEDIATE
+gl_compute_orflag
+gl_copy_prev_vertices
+gl_copy_to_current
+gl_execute_cassette
+gl_fixup_cassette
+gl_fixup_input
+gl_flush_vb
+gl_internal_flush
+gl_maybe_transform_vb
+gl_print_cassette
+gl_print_cassette_flags
+gl_reset_input
+gl_reset_vb
+gl_texcoord_size
+gl_vector1ub_alloc
+gl_vector1ub_free
+gl_vector1ub_init
+gl_vector1ui_alloc
+gl_vector1ui_free
+gl_vector1ui_init
+gl_vector3f_alloc
+gl_vector3f_free
+gl_vector3f_init
+gl_vector3f_print
+gl_vector4f_alloc
+gl_vector4f_clean_elem
+gl_vector4f_free
+gl_vector4f_init
+gl_vector4f_print
+gl_vector4ub_alloc
+gl_vector4ub_free
+gl_vector4ub_init
+gl_init_vertices
+_mesa_WindowPos2dMESA
+_mesa_WindowPos2dvMESA
+_mesa_WindowPos2fMESA
+_mesa_WindowPos2fvMESA
+_mesa_WindowPos2iMESA
+_mesa_WindowPos2ivMESA
+_mesa_WindowPos2sMESA
+_mesa_WindowPos2svMESA
+_mesa_WindowPos3dMESA
+_mesa_WindowPos3dvMESA
+_mesa_WindowPos3fMESA
+_mesa_WindowPos3fvMESA
+_mesa_WindowPos3iMESA
+_mesa_WindowPos3ivMESA
+_mesa_WindowPos3sMESA
+_mesa_WindowPos3svMESA
+_mesa_WindowPos4dMESA
+_mesa_WindowPos4dvMESA
+_mesa_WindowPos4fMESA
+_mesa_WindowPos4fvMESA
+_mesa_WindowPos4iMESA
+_mesa_WindowPos4ivMESA
+_mesa_WindowPos4sMESA
+_mesa_WindowPos4svMESA
+gl_init_transformation
+gl_project_points
+gl_transform_point_sz
+gl_transform_vector
+gl_write_zoomed_index_span
+gl_write_zoomed_rgb_span
+gl_write_zoomed_rgba_span
+gl_write_zoomed_stencil_span
+__MESA_beginDispatchOverride
+__MESA_copyContext
+__MESA_createBuffer
+__MESA_createContext
+__MESA_destroyBuffer
+__MESA_destroyContext
+__MESA_dispatchExec
+__MESA_endDispatchOverride
+__MESA_forceCurrent
+__MESA_initVisuals
+__MESA_loseCurrent
+__MESA_makeCurrent
+__MESA_notifyDestroy
+__MESA_notifyResize
+__MESA_notifySwapBuffers
+__MESA_resetExtension
+__MESA_resizeBuffers
+__MESA_screenProbe
+__MESA_setVisualConfigs
+__MESA_shareContext
+__MESA_swapBuffers
+__glFloorLog2
+XMesaCreateImage
+XMesaDestroyImage
+XMesaGetPixel
+XMesaPutImageHelper
+XMesaCopySubBuffer
+XMesaCreateContext
+XMesaCreatePixmapBuffer
+XMesaCreateVisual
+XMesaCreateWindowBuffer
+XMesaCreateWindowBuffer2
+XMesaDestroyBuffer
+XMesaDestroyContext
+XMesaDestroyVisual
+XMesaDitherColor
+XMesaFindBuffer
+XMesaFlush
+XMesaForceCurrent
+XMesaGarbageCollect
+XMesaGetBackBuffer
+XMesaGetCurrentBuffer
+XMesaGetCurrentContext
+XMesaGetCurrentReadBuffer
+XMesaGetDepthBuffer
+XMesaGetString
+XMesaLoseCurrent
+XMesaMakeCurrent
+XMesaMakeCurrent2
+XMesaReset
+XMesaSetFXmode
+XMesaSetVisualDisplay
+XMesaSwapBuffers
+XMesaUnbindContext
+xmesa_alloc_back_buffer
+xmesa_color_to_pixel
+xmesa_update_state
+xmesa_get_line_func
+xmesa_get_points_func
+xmesa_get_triangle_func
+
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcore-def.cpp,v 1.1 2000/08/10 17:40:29 dawes Exp $ */
diff --git a/nx-X11/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c b/nx-X11/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c
new file mode 100644
index 000000000..4e03b59fe
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c
@@ -0,0 +1,64 @@
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.5 2000/02/23 04:46:55 martin Exp $ */
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin <kevin@precisioninsight.com>
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "xf86Module.h"
+
+static MODULESETUPPROTO(GLcoreSetup);
+
+static XF86ModuleVersionInfo VersRec =
+{
+ "GLcore",
+ MODULEVENDORSTRING,
+ MODINFOSTRING1,
+ MODINFOSTRING2,
+ XORG_VERSION_CURRENT,
+ 1, 0, 0,
+ ABI_CLASS_EXTENSION,
+ ABI_EXTENSION_VERSION,
+ MOD_CLASS_NONE,
+ {0,0,0,0}
+};
+
+XF86ModuleData GLcoreModuleData = { &VersRec, GLcoreSetup, NULL };
+
+static pointer
+GLcoreSetup(pointer module, pointer opts, int *errmaj, int *errmin)
+{
+ /* Need a non-NULL return value to indicate success */
+ return (pointer)1;
+}
diff --git a/nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile b/nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile
new file mode 100644
index 000000000..154a5c1a0
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile
@@ -0,0 +1,77 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/GLcore/Imakefile,v 1.3 2002/05/31 18:12:36 dawes Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define MesaInXServer
+#define MesaBuildDir ../main/
+#define MesaACBuildDir ../array_cache/
+#define MesaMathBuildDir ../math/
+#define MesaSwrastBuildDir ../swrast/
+#define MesaSwrastSetupBuildDir ../swrast_setup/
+#define MesaTnlBuildDir ../tnl/
+#define MesaShaderBuildDir ../shader/
+#define MesaGrammarBuildDir ../shader/grammar/
+#define MesaSlangBuildDir ../shader/slang/
+#define MesaXBuildDir ../X/
+
+#include "../../../../../lib/GL/mesa/array_cache/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/swrast/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/swrast_setup/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/tnl/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/main/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/math/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/shader/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/shader/grammar/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/shader/slang/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/drivers/x11/Imakefile.inc"
+#include "../../../../../lib/GL/mesa/Imakefile.inc"
+
+#ifdef IHaveModules
+ MSRCS = GLcoremodule.c
+ MOBJS = GLcoremodule.o
+#endif
+
+ XOBJS = ../X/?*.o
+
+ OBJS = $(COREMESAOBJS) $(MOBJS)
+
+ DONES = ../main/DONE ../X/DONE ../array_cache/DONE \
+ ../math/DONE ../swrast/DONE ../swrast_setup/DONE \
+ ../tnl/DONE ../shader/DONE ../shader/grammar/DONE \
+ ../shader/slang/DONE
+
+ INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \
+ -I$(MESASRCDIR)/include -I$(GLXLIBSRC)/include \
+ -I$(MESASRCDIR)/src/mesa \
+ -I$(SERVERSRC)/include
+
+ DEFINES = $(GLX_DEFINES)
+
+#ifdef IHaveModules
+ModuleObjectRule()
+
+DepLibraryModuleTarget(GLcore, $(DONES) $(OBJS),$(OBJS) $(XOBJS))
+InstallLibraryModule(GLcore,$(MODULEDIR),extensions)
+
+#else
+NormalDepLibraryTarget(GLcore, $(DONES) $(OBJS), $(OBJS) $(XOBJS))
+NormalLibraryObjectRule()
+#endif
+
+InstallDriverSDKLibraryModule(GLcore,$(DRIVERSDKMODULEDIR),extensions)
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/GLcore/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/GLcore/module/Imakefile
new file mode 100644
index 000000000..18dcdf0a1
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/GLcore/module/Imakefile
@@ -0,0 +1,53 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/GLcore/Imakefile,v 1.2 2002/02/25 18:00:38 dawes Exp $
+
+#define IHaveModules
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define MesaInXServer
+#define MesaBuildDir ../../main/module/
+#define MesaACBuildDir ../../array_cache/module/
+#define MesaMathBuildDir ../../math/module/
+#define MesaSwrastBuildDir ../../swrast/module/
+#define MesaSwrastSetupBuildDir ../../swrast_setup/module/
+#define MesaTnlBuildDir ../../tnl/module/
+#define MesaXBuildDir ../../X/module/
+
+#include "../../../../../../lib/GL/mesa/array_cache/Imakefile.inc"
+#include "../../../../../../lib/GL/mesa/swrast/Imakefile.inc"
+#include "../../../../../../lib/GL/mesa/swrast_setup/Imakefile.inc"
+#include "../../../../../../lib/GL/mesa/tnl/Imakefile.inc"
+#include "../../../../../../lib/GL/mesa/math/Imakefile.inc"
+#include "../../../../../../lib/GL/mesa/drivers/x11/Imakefile.inc"
+#include "../../../../../../lib/GL/mesa/Imakefile.inc"
+
+#if DoLoadableServer
+ MSRCS = GLcoremodule.c
+ MOBJS = GLcoremodule.o
+#endif
+
+ XOBJS = ../../X/module/?*.o
+
+ OBJS = $(COREMESAOBJS) $(MOBJS)
+
+ DONES = ../../module/DONE ../../X/module/DONE \
+ ../../array_cache/module/DONE ../../math/module/DONE \
+ ../../swrast/module/DONE \
+ ../../swrast_setup/module/DONE ../../tnl/module/DONE
+
+ INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \
+ -I$(MESASRCDIR)/include -I$(GLXLIBSRC)/include \
+ -I$(MESASRCDIR)/src/mesa \
+ -I$(SERVERSRC)/include
+
+ DEFINES = $(GLX_DEFINES)
+
+ModuleObjectRule()
+
+DepLibraryModuleTarget(GLcore, $(DONES) $(OBJS),$(OBJS) $(XOBJS))
+InstallLibraryModule(GLcore,$(MODULEDIR),extensions)
+
+InstallDriverSDKLibraryModule(GLcore,$(DRIVERSDKMODULEDIR),extensions)
+
+LinkSourceFile(GLcoremodule.c,..)
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/Imakefile b/nx-X11/programs/Xserver/GL/mesa/Imakefile
new file mode 100644
index 000000000..ea7d18aa2
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/Imakefile
@@ -0,0 +1,47 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.23 2002/11/22 22:56:00 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+ MODSUBDIR = module
+#endif
+#endif
+
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#define IHaveSubdirs
+ SUBDIRS = main math array_cache swrast swrast_setup tnl shader X GLcore $(MODSUBDIR)
+#endif
+
+#include <Server.tmpl>
+
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../lib/GL/mesa/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/Imakefile.inc"
+#endif
+
+ INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \
+ -I$(MESASRCDIR)/include -I$(GLXLIBSRC)/include \
+ -I$(MESASRCDIR)/src/mesa \
+ -I$(SERVERSRC)/include
+
+ DEFINES = $(GLX_DEFINES)
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
+DependTarget()
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/Imakefile b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile
new file mode 100644
index 000000000..57fb7ff36
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile
@@ -0,0 +1,93 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.16 2002/11/22 22:56:01 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaXBuildDir /**/
+#define MesaInXServer
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/drivers/x11/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/drivers/x11/Imakefile.inc"
+#endif
+
+
+LinkSourceFile(compsize.c,$(MESASRCDIR)/src/glx/x11)
+
+ DRIVER_SRCS = $(XMESA_SRCS)
+ DRIVER_OBJS = $(XMESA_OBJS)
+
+ COMMON_SRCS = driverfuncs.c
+ COMMON_OBJS = driverfuncs.o
+
+#ifndef XFree86Version
+
+/* This appears to be the quickest way to build a non-XFree86 server */
+GLXSRV_DEFINES = -DXFree86Server
+
+#endif
+
+ GLX_SRCS = xf86glx.c xf86glx_util.c compsize.c
+ GLX_OBJS = xf86glx.o xf86glx_util.o compsize.o
+
+ SRCS = $(DRIVER_SRCS) $(GLX_SRCS) $(COMMON_SRCS)
+ OBJS = $(DRIVER_OBJS) $(GLX_OBJS) $(COMMON_OBJS)
+
+ INCLUDES = -I$(SERVERSRC)/GL/mesa/X -I$(XINCLUDESRC) \
+ -I$(EXTINCSRC) \
+ -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/src -I$(MESASRCDIR)/src/mesa/drivers/x11 \
+ -I$(MESASRCDIR)/include \
+ -I$(LIBSRC)/GL/glx -I$(LIBSRC)/GL/include \
+ -I$(SERVERSRC)/include -I$(SERVERSRC)/GL/include \
+ -I$(SERVERSRC)/GL/glx \
+ -I$(XF86OSSRC) \
+ -I$(DRMSRCDIR)/shared-core
+
+ DEFINES = $(GLX_DEFINES) $(GLXSRV_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
+#if defined(IHaveModules) && BuildModuleInSubdir
+LinkSourceFile(xf86glx.c,..)
+LinkSourceFile(xf86glx_util.c,..)
+#endif
+
+#ifndef MesaDrvSrcDir
+#define MesaDrvSrcDir $(MESASRCDIR)/src/mesa/drivers/dri
+#endif
+
+MESADRVSRCDIR = MesaDrvSrcDir
+
+
+LinkSourceFile(driverfuncs.c, $(MESADRVSRCDIR)/../common)
+LinkSourceFile(driverfuncs.h, $(MESADRVSRCDIR)/../common)
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/X/module/Imakefile
new file mode 100644
index 000000000..eee4c7556
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/X/module/Imakefile
@@ -0,0 +1,6 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/module/Imakefile,v 1.1 2002/05/31 18:12:38 dawes Exp $
+
+#define IHaveModules
+
+#include "../Imakefile"
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c
new file mode 100644
index 000000000..5dd4e7c37
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c
@@ -0,0 +1,914 @@
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.19 2003/07/16 01:38:27 dawes Exp $ */
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin <kevin@precisioninsight.com>
+ * Brian E. Paul <brian@precisioninsight.com>
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <regionstr.h>
+#include <resource.h>
+#include <GL/gl.h>
+#include <GL/glxint.h>
+#include <GL/glxtokens.h>
+#include <scrnintstr.h>
+#include <config.h>
+#include <glxserver.h>
+#include <glxscreens.h>
+#include <glxdrawable.h>
+#include <glxcontext.h>
+#include <glxext.h>
+#include <glxutil.h>
+#include "xf86glxint.h"
+#include "context.h"
+#include "xmesaP.h"
+#include <GL/xf86glx.h>
+#include "context.h"
+
+/*
+ * This define is for the glcore.h header file.
+ * If you add it here, then make sure you also add it in
+ * ../../../glx/Imakefile.
+ */
+#if 0
+#define DEBUG
+#include <GL/internal/glcore.h>
+#undef DEBUG
+#else
+#include <GL/internal/glcore.h>
+#endif
+
+#include "glcontextmodes.h"
+
+/*
+ * This structure is statically allocated in the __glXScreens[]
+ * structure. This struct is not used anywhere other than in
+ * __glXScreenInit to initialize each of the active screens
+ * (__glXActiveScreens[]). Several of the fields must be initialized by
+ * the screenProbe routine before they are copied to the active screens
+ * struct. In particular, the contextCreate, pGlxVisual, numVisuals,
+ * and numUsableVisuals fields must be initialized.
+ */
+static __GLXscreenInfo __glDDXScreenInfo = {
+ __MESA_screenProbe, /* Must be generic and handle all screens */
+ __MESA_createContext, /* Substitute screen's createContext routine */
+ __MESA_createBuffer, /* Substitute screen's createBuffer routine */
+ NULL, /* Set up modes in probe */
+ NULL, /* Set up pVisualPriv in probe */
+ 0, /* Set up numVisuals in probe */
+ 0, /* Set up numUsableVisuals in probe */
+ NULL, /* GLextensions is overwritten by __glXScreenInit */
+ "Vendor String", /* GLXvendor is overwritten by __glXScreenInit */
+ "Version String", /* GLXversion is overwritten by __glXScreenInit */
+ "Extensions String", /* GLXextensions is overwritten by __glXScreenInit */
+ NULL /* WrappedPositionWindow is overwritten */
+};
+
+void *__glXglDDXScreenInfo(void) {
+ return &__glDDXScreenInfo;
+}
+
+static __GLXextensionInfo __glDDXExtensionInfo = {
+ GL_CORE_MESA,
+ __MESA_resetExtension,
+ __MESA_initVisuals,
+ __MESA_setVisualConfigs
+};
+
+void *__glXglDDXExtensionInfo(void) {
+ return &__glDDXExtensionInfo;
+}
+
+static __MESA_screen MESAScreens[MAXSCREENS];
+static __GLcontext *MESA_CC = NULL;
+
+static int numConfigs = 0;
+static __GLXvisualConfig *visualConfigs = NULL;
+static void **visualPrivates = NULL;
+
+
+static int count_bits(unsigned int n)
+{
+ int bits = 0;
+
+ while (n > 0) {
+ if (n & 1) bits++;
+ n >>= 1;
+ }
+ return bits;
+}
+
+
+static XMesaVisual find_mesa_visual(int screen, VisualID vid)
+{
+ __MESA_screen * const pMScr = &MESAScreens[screen];
+ const __GLcontextModes *modes;
+ unsigned i = 0;
+
+ for ( modes = pMScr->modes ; modes != NULL ; modes = modes->next ) {
+ if ( modes->visualID == vid ) {
+ break;
+ }
+
+ i++;
+ }
+
+ return (modes != NULL) ? pMScr->xm_vis[i] : NULL;
+}
+
+
+/*
+ * In the case the driver defines no GLX visuals we'll use these.
+ * Note that for TrueColor and DirectColor visuals, bufferSize is the
+ * sum of redSize, greenSize, blueSize and alphaSize, which may be larger
+ * than the nplanes/rootDepth of the server's X11 visuals
+ */
+#define NUM_FALLBACK_CONFIGS 5
+static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = {
+ /* [0] = RGB, double buffered, Z */
+ {
+ -1, /* vid */
+ -1, /* class */
+ True, /* rgba */
+ -1, -1, -1, 0, /* rgba sizes */
+ -1, -1, -1, 0, /* rgba masks */
+ 0, 0, 0, 0, /* rgba accum sizes */
+ True, /* doubleBuffer */
+ False, /* stereo */
+ -1, /* bufferSize */
+ 16, /* depthSize */
+ 0, /* stencilSize */
+ 0, /* auxBuffers */
+ 0, /* level */
+ GLX_NONE, /* visualRating */
+ GLX_NONE, /* transparentPixel */
+ 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */
+ 0 /* transparentIndex */
+ },
+ /* [1] = RGB, double buffered, Z, stencil, accum */
+ {
+ -1, /* vid */
+ -1, /* class */
+ True, /* rgba */
+ -1, -1, -1, 0, /* rgba sizes */
+ -1, -1, -1, 0, /* rgba masks */
+ 16, 16, 16, 0, /* rgba accum sizes */
+ True, /* doubleBuffer */
+ False, /* stereo */
+ -1, /* bufferSize */
+ 16, /* depthSize */
+ 8, /* stencilSize */
+ 0, /* auxBuffers */
+ 0, /* level */
+ GLX_NONE, /* visualRating */
+ GLX_NONE, /* transparentPixel */
+ 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */
+ 0 /* transparentIndex */
+ },
+ /* [2] = RGB+Alpha, double buffered, Z, stencil, accum */
+ {
+ -1, /* vid */
+ -1, /* class */
+ True, /* rgba */
+ -1, -1, -1, 8, /* rgba sizes */
+ -1, -1, -1, -1, /* rgba masks */
+ 16, 16, 16, 16, /* rgba accum sizes */
+ True, /* doubleBuffer */
+ False, /* stereo */
+ -1, /* bufferSize */
+ 16, /* depthSize */
+ 8, /* stencilSize */
+ 0, /* auxBuffers */
+ 0, /* level */
+ GLX_NONE, /* visualRating */
+ GLX_NONE, /* transparentPixel */
+ 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */
+ 0 /* transparentIndex */
+ },
+ /* [3] = RGB+Alpha, single buffered, Z, stencil, accum */
+ {
+ -1, /* vid */
+ -1, /* class */
+ True, /* rgba */
+ -1, -1, -1, 8, /* rgba sizes */
+ -1, -1, -1, -1, /* rgba masks */
+ 16, 16, 16, 16, /* rgba accum sizes */
+ False, /* doubleBuffer */
+ False, /* stereo */
+ -1, /* bufferSize */
+ 16, /* depthSize */
+ 8, /* stencilSize */
+ 0, /* auxBuffers */
+ 0, /* level */
+ GLX_NONE, /* visualRating */
+ GLX_NONE, /* transparentPixel */
+ 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */
+ 0 /* transparentIndex */
+ },
+ /* [4] = CI, double buffered, Z */
+ {
+ -1, /* vid */
+ -1, /* class */
+ False, /* rgba? (false = color index) */
+ -1, -1, -1, 0, /* rgba sizes */
+ -1, -1, -1, 0, /* rgba masks */
+ 0, 0, 0, 0, /* rgba accum sizes */
+ True, /* doubleBuffer */
+ False, /* stereo */
+ -1, /* bufferSize */
+ 16, /* depthSize */
+ 0, /* stencilSize */
+ 0, /* auxBuffers */
+ 0, /* level */
+ GLX_NONE, /* visualRating */
+ GLX_NONE, /* transparentPixel */
+ 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */
+ 0 /* transparentIndex */
+ },
+};
+
+
+static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
+ VisualID *defaultVisp,
+ int ndepth, DepthPtr pdepth,
+ int rootDepth)
+{
+ int numRGBconfigs;
+ int numCIconfigs;
+ int numVisuals = *nvisualp;
+ int numNewVisuals;
+ int numNewConfigs;
+ VisualPtr pVisual = *visualp;
+ VisualPtr pVisualNew = NULL;
+ VisualID *orig_vid = NULL;
+ __GLcontextModes *modes;
+ __GLXvisualConfig *pNewVisualConfigs = NULL;
+ void **glXVisualPriv;
+ void **pNewVisualPriv;
+ int found_default;
+ int i, j, k;
+
+ if (numConfigs > 0)
+ numNewConfigs = numConfigs;
+ else
+ numNewConfigs = NUM_FALLBACK_CONFIGS;
+
+ /* Alloc space for the list of new GLX visuals */
+ pNewVisualConfigs = (__GLXvisualConfig *)
+ __glXMalloc(numNewConfigs * sizeof(__GLXvisualConfig));
+ if (!pNewVisualConfigs) {
+ return FALSE;
+ }
+
+ /* Alloc space for the list of new GLX visual privates */
+ pNewVisualPriv = (void **) __glXMalloc(numNewConfigs * sizeof(void *));
+ if (!pNewVisualPriv) {
+ __glXFree(pNewVisualConfigs);
+ return FALSE;
+ }
+
+ /*
+ ** If SetVisualConfigs was not called, then use default GLX
+ ** visual configs.
+ */
+ if (numConfigs == 0) {
+ memcpy(pNewVisualConfigs, FallbackConfigs,
+ NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig));
+ memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *));
+ }
+ else {
+ /* copy driver's visual config info */
+ for (i = 0; i < numConfigs; i++) {
+ pNewVisualConfigs[i] = visualConfigs[i];
+ pNewVisualPriv[i] = visualPrivates[i];
+ }
+ }
+
+ /* Count the number of RGB and CI visual configs */
+ numRGBconfigs = 0;
+ numCIconfigs = 0;
+ for (i = 0; i < numNewConfigs; i++) {
+ if (pNewVisualConfigs[i].rgba)
+ numRGBconfigs++;
+ else
+ numCIconfigs++;
+ }
+
+ /* Count the total number of visuals to compute */
+ numNewVisuals = 0;
+ for (i = 0; i < numVisuals; i++) {
+ numNewVisuals +=
+ (pVisual[i].class == TrueColor || pVisual[i].class == DirectColor)
+ ? numRGBconfigs : numCIconfigs;
+ }
+
+ /* Reset variables for use with the next screen/driver's visual configs */
+ visualConfigs = NULL;
+ numConfigs = 0;
+
+ /* Alloc temp space for the list of orig VisualIDs for each new visual */
+ orig_vid = (VisualID *)__glXMalloc(numNewVisuals * sizeof(VisualID));
+ if (!orig_vid) {
+ __glXFree(pNewVisualPriv);
+ __glXFree(pNewVisualConfigs);
+ return FALSE;
+ }
+
+ /* Alloc space for the list of glXVisuals */
+ modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes));
+ if (modes == NULL) {
+ __glXFree(orig_vid);
+ __glXFree(pNewVisualPriv);
+ __glXFree(pNewVisualConfigs);
+ return FALSE;
+ }
+
+ /* Alloc space for the list of glXVisualPrivates */
+ glXVisualPriv = (void **)__glXMalloc(numNewVisuals * sizeof(void *));
+ if (!glXVisualPriv) {
+ _gl_context_modes_destroy( modes );
+ __glXFree(orig_vid);
+ __glXFree(pNewVisualPriv);
+ __glXFree(pNewVisualConfigs);
+ return FALSE;
+ }
+
+ /* Alloc space for the new list of the X server's visuals */
+ pVisualNew = (VisualPtr)__glXMalloc(numNewVisuals * sizeof(VisualRec));
+ if (!pVisualNew) {
+ __glXFree(glXVisualPriv);
+ _gl_context_modes_destroy( modes );
+ __glXFree(orig_vid);
+ __glXFree(pNewVisualPriv);
+ __glXFree(pNewVisualConfigs);
+ return FALSE;
+ }
+
+ /* Initialize the new visuals */
+ found_default = FALSE;
+ MESAScreens[screenInfo.numScreens-1].modes = modes;
+ for (i = j = 0; i < numVisuals; i++) {
+ int is_rgb = (pVisual[i].class == TrueColor ||
+ pVisual[i].class == DirectColor);
+
+ for (k = 0; k < numNewConfigs; k++) {
+ if (pNewVisualConfigs[k].rgba != is_rgb)
+ continue;
+
+ assert( modes != NULL );
+
+ /* Initialize the new visual */
+ pVisualNew[j] = pVisual[i];
+ pVisualNew[j].vid = FakeClientID(0);
+
+ /* Check for the default visual */
+ if (!found_default && pVisual[i].vid == *defaultVisp) {
+ *defaultVisp = pVisualNew[j].vid;
+ found_default = TRUE;
+ }
+
+ /* Save the old VisualID */
+ orig_vid[j] = pVisual[i].vid;
+
+ /* Initialize the glXVisual */
+ _gl_copy_visual_to_context_mode( modes, & pNewVisualConfigs[k] );
+ modes->visualID = pVisualNew[j].vid;
+
+ /*
+ * If the class is -1, then assume the X visual information
+ * is identical to what GLX needs, and take them from the X
+ * visual. NOTE: if class != -1, then all other fields MUST
+ * be initialized.
+ */
+ if (modes->visualType == GLX_NONE) {
+ modes->visualType = _gl_convert_from_x_visual_type( pVisual[i].class );
+ modes->redBits = count_bits(pVisual[i].redMask);
+ modes->greenBits = count_bits(pVisual[i].greenMask);
+ modes->blueBits = count_bits(pVisual[i].blueMask);
+ modes->alphaBits = modes->alphaBits;
+ modes->redMask = pVisual[i].redMask;
+ modes->greenMask = pVisual[i].greenMask;
+ modes->blueMask = pVisual[i].blueMask;
+ modes->alphaMask = modes->alphaMask;
+ modes->rgbBits = (is_rgb)
+ ? (modes->redBits + modes->greenBits +
+ modes->blueBits + modes->alphaBits)
+ : rootDepth;
+ }
+
+ /* Save the device-dependent private for this visual */
+ glXVisualPriv[j] = pNewVisualPriv[k];
+
+ j++;
+ modes = modes->next;
+ }
+ }
+
+ assert(j <= numNewVisuals);
+
+ /* Save the GLX visuals in the screen structure */
+ MESAScreens[screenInfo.numScreens-1].num_vis = numNewVisuals;
+ MESAScreens[screenInfo.numScreens-1].private = glXVisualPriv;
+
+ /* Set up depth's VisualIDs */
+ for (i = 0; i < ndepth; i++) {
+ int numVids = 0;
+ VisualID *pVids = NULL;
+ int k, n = 0;
+
+ /* Count the new number of VisualIDs at this depth */
+ for (j = 0; j < pdepth[i].numVids; j++)
+ for (k = 0; k < numNewVisuals; k++)
+ if (pdepth[i].vids[j] == orig_vid[k])
+ numVids++;
+
+ /* Allocate a new list of VisualIDs for this depth */
+ pVids = (VisualID *)__glXMalloc(numVids * sizeof(VisualID));
+
+ /* Initialize the new list of VisualIDs for this depth */
+ for (j = 0; j < pdepth[i].numVids; j++)
+ for (k = 0; k < numNewVisuals; k++)
+ if (pdepth[i].vids[j] == orig_vid[k])
+ pVids[n++] = pVisualNew[k].vid;
+
+ /* Update this depth's list of VisualIDs */
+ __glXFree(pdepth[i].vids);
+ pdepth[i].vids = pVids;
+ pdepth[i].numVids = numVids;
+ }
+
+ /* Update the X server's visuals */
+ *nvisualp = numNewVisuals;
+ *visualp = pVisualNew;
+
+ /* Free the old list of the X server's visuals */
+ __glXFree(pVisual);
+
+ /* Clean up temporary allocations */
+ __glXFree(orig_vid);
+ __glXFree(pNewVisualPriv);
+ __glXFree(pNewVisualConfigs);
+
+ /* Free the private list created by DDX HW driver */
+ if (visualPrivates)
+ xfree(visualPrivates);
+ visualPrivates = NULL;
+
+ return TRUE;
+}
+
+void __MESA_setVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
+ void **privates)
+{
+ numConfigs = nconfigs;
+ visualConfigs = configs;
+ visualPrivates = privates;
+}
+
+Bool __MESA_initVisuals(VisualPtr *visualp, DepthPtr *depthp,
+ int *nvisualp, int *ndepthp, int *rootDepthp,
+ VisualID *defaultVisp, unsigned long sizes,
+ int bitsPerRGB)
+{
+ /*
+ * Setup the visuals supported by this particular screen.
+ */
+ return init_visuals(nvisualp, visualp, defaultVisp,
+ *ndepthp, *depthp, *rootDepthp);
+}
+
+static void fixup_visuals(int screen)
+{
+ ScreenPtr pScreen = screenInfo.screens[screen];
+ __MESA_screen *pMScr = &MESAScreens[screen];
+ int j;
+ __GLcontextModes *modes;
+
+ for ( modes = pMScr->modes ; modes != NULL ; modes = modes->next ) {
+ const int vis_class = _gl_convert_to_x_visual_type( modes->visualType );
+ const int nplanes = (modes->rgbBits - modes->alphaBits);
+ const VisualPtr pVis = pScreen->visuals;
+
+ /* Find a visual that matches the GLX visual's class and size */
+ for (j = 0; j < pScreen->numVisuals; j++) {
+ if (pVis[j].class == vis_class &&
+ pVis[j].nplanes == nplanes) {
+
+ /* Fixup the masks */
+ modes->redMask = pVis[j].redMask;
+ modes->greenMask = pVis[j].greenMask;
+ modes->blueMask = pVis[j].blueMask;
+
+ /* Recalc the sizes */
+ modes->redBits = count_bits(modes->redMask);
+ modes->greenBits = count_bits(modes->greenMask);
+ modes->blueBits = count_bits(modes->blueMask);
+ }
+ }
+ }
+}
+
+static void init_screen_visuals(int screen)
+{
+ ScreenPtr pScreen = screenInfo.screens[screen];
+ __GLcontextModes *modes;
+ XMesaVisual *pXMesaVisual;
+ int *used;
+ int i, j;
+
+ /* Alloc space for the list of XMesa visuals */
+ pXMesaVisual = (XMesaVisual *)__glXMalloc(MESAScreens[screen].num_vis *
+ sizeof(XMesaVisual));
+ __glXMemset(pXMesaVisual, 0,
+ MESAScreens[screen].num_vis * sizeof(XMesaVisual));
+
+ /* FIXME: Change 'used' to be a array of bits (rather than of ints),
+ * FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less
+ * FIXME: than 64 or 128 the stack array can be used instead of calling
+ * FIXME: __glXMalloc / __glXFree. If nothing else, convert 'used' to
+ * FIXME: array of bytes instead of ints!
+ */
+ used = (int *)__glXMalloc(pScreen->numVisuals * sizeof(int));
+ __glXMemset(used, 0, pScreen->numVisuals * sizeof(int));
+
+ i = 0;
+ for ( modes = MESAScreens[screen].modes
+ ; modes != NULL
+ ; modes = modes->next ) {
+ const int vis_class = _gl_convert_to_x_visual_type( modes->visualType );
+ const int nplanes = (modes->rgbBits - modes->alphaBits);
+ const VisualPtr pVis = pScreen->visuals;
+
+ for (j = 0; j < pScreen->numVisuals; j++) {
+ if (pVis[j].class == vis_class &&
+ pVis[j].nplanes == nplanes &&
+ pVis[j].redMask == modes->redMask &&
+ pVis[j].greenMask == modes->greenMask &&
+ pVis[j].blueMask == modes->blueMask &&
+ !used[j]) {
+
+ /* Create the XMesa visual */
+ pXMesaVisual[i] =
+ XMesaCreateVisual(pScreen,
+ pVis,
+ modes->rgbMode,
+ (modes->alphaBits > 0),
+ modes->doubleBufferMode,
+ modes->stereoMode,
+ GL_TRUE, /* ximage_flag */
+ modes->depthBits,
+ modes->stencilBits,
+ modes->accumRedBits,
+ modes->accumGreenBits,
+ modes->accumBlueBits,
+ modes->accumAlphaBits,
+ modes->samples,
+ modes->level,
+ modes->visualRating);
+ /* Set the VisualID */
+ modes->visualID = pVis[j].vid;
+
+ /* Mark this visual used */
+ used[j] = 1;
+ break;
+ }
+ }
+
+ if ( j == pScreen->numVisuals ) {
+ ErrorF("No matching visual for __GLcontextMode with "
+ "visual class = %d (%d), nplanes = %u\n",
+ vis_class,
+ modes->visualType,
+ (modes->rgbBits - modes->alphaBits) );
+ }
+ else if ( modes->visualID == -1 ) {
+ FatalError( "Matching visual found, but visualID still -1!\n" );
+ }
+
+ i++;
+ }
+
+ __glXFree(used);
+
+ MESAScreens[screen].xm_vis = pXMesaVisual;
+}
+
+Bool __MESA_screenProbe(int screen)
+{
+ /*
+ * Set up the current screen's visuals.
+ */
+ __glDDXScreenInfo.modes = MESAScreens[screen].modes;
+ __glDDXScreenInfo.pVisualPriv = MESAScreens[screen].private;
+ __glDDXScreenInfo.numVisuals =
+ __glDDXScreenInfo.numUsableVisuals = MESAScreens[screen].num_vis;
+
+ /*
+ * Set the current screen's createContext routine. This could be
+ * wrapped by a DDX GLX context creation routine.
+ */
+ __glDDXScreenInfo.createContext = __MESA_createContext;
+
+ /*
+ * The ordering of the rgb compenents might have been changed by the
+ * driver after mi initialized them.
+ */
+ fixup_visuals(screen);
+
+ /*
+ * Find the GLX visuals that are supported by this screen and create
+ * XMesa's visuals.
+ */
+ init_screen_visuals(screen);
+
+ return TRUE;
+}
+
+extern void __MESA_resetExtension(void)
+{
+ int i, j;
+
+ XMesaReset();
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ for (j = 0; j < MESAScreens[i].num_vis; j++) {
+ if (MESAScreens[i].xm_vis[j]) {
+ XMesaDestroyVisual(MESAScreens[i].xm_vis[j]);
+ MESAScreens[i].xm_vis[j] = NULL;
+ }
+ }
+ _gl_context_modes_destroy( MESAScreens[i].modes );
+ MESAScreens[i].modes = NULL;
+ __glXFree(MESAScreens[i].private);
+ MESAScreens[i].private = NULL;
+ __glXFree(MESAScreens[i].xm_vis);
+ MESAScreens[i].xm_vis = NULL;
+ MESAScreens[i].num_vis = 0;
+ }
+ __glDDXScreenInfo.modes = NULL;
+ MESA_CC = NULL;
+}
+
+void __MESA_createBuffer(__GLXdrawablePrivate *glxPriv)
+{
+ DrawablePtr pDraw = glxPriv->pDraw;
+ XMesaVisual xm_vis = find_mesa_visual(pDraw->pScreen->myNum,
+ glxPriv->modes->visualID);
+ __GLdrawablePrivate *glPriv = &glxPriv->glPriv;
+ __MESA_buffer buf;
+
+ if (xm_vis == NULL) {
+ ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n",
+ glxPriv->modes->visualID);
+ }
+ buf = (__MESA_buffer)__glXMalloc(sizeof(struct __MESA_bufferRec));
+
+ /* Create Mesa's buffers */
+ if (glxPriv->type == DRAWABLE_WINDOW) {
+ buf->xm_buf = (void *)XMesaCreateWindowBuffer(xm_vis,
+ (WindowPtr)pDraw);
+ } else {
+ buf->xm_buf = (void *)XMesaCreatePixmapBuffer(xm_vis,
+ (PixmapPtr)pDraw, 0);
+ }
+
+ /* Wrap the front buffer's resize routine */
+ buf->fbresize = glPriv->frontBuffer.resize;
+ glPriv->frontBuffer.resize = __MESA_resizeBuffers;
+
+ /* Wrap the swap buffers routine */
+ buf->fbswap = glxPriv->swapBuffers;
+ glxPriv->swapBuffers = __MESA_swapBuffers;
+
+ /* Save Mesa's private buffer structure */
+ glPriv->private = (void *)buf;
+ glPriv->freePrivate = __MESA_destroyBuffer;
+}
+
+GLboolean __MESA_resizeBuffers(__GLdrawableBuffer *buffer,
+ GLint x, GLint y,
+ GLuint width, GLuint height,
+ __GLdrawablePrivate *glPriv,
+ GLuint bufferMask)
+{
+ __MESA_buffer buf = (__MESA_buffer)glPriv->private;
+
+ if (buf->xm_buf)
+ XMesaResizeBuffers(buf->xm_buf);
+
+ return (*buf->fbresize)(buffer, x, y, width, height, glPriv, bufferMask);
+}
+
+GLboolean __MESA_swapBuffers(__GLXdrawablePrivate *glxPriv)
+{
+ __MESA_buffer buf = (__MESA_buffer)glxPriv->glPriv.private;
+
+ /*
+ ** Do not call the wrapped swap buffers routine since Mesa has
+ ** already done the swap.
+ */
+ XMesaSwapBuffers(buf->xm_buf);
+
+ return GL_TRUE;
+}
+
+void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv)
+{
+ __MESA_buffer buf = (__MESA_buffer)glPriv->private;
+ __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other;
+
+ /* Destroy Mesa's buffers */
+ if (buf->xm_buf)
+ XMesaDestroyBuffer(buf->xm_buf);
+
+ /* Unwrap these routines */
+ glxPriv->swapBuffers = buf->fbswap;
+ glPriv->frontBuffer.resize = buf->fbresize;
+
+ __glXFree(glPriv->private);
+ glPriv->private = NULL;
+}
+
+__GLinterface *__MESA_createContext(__GLimports *imports,
+ __GLcontextModes *modes,
+ __GLinterface *shareGC)
+{
+ __GLcontext *gl_ctx = NULL;
+ __GLcontext *m_share = NULL;
+ __GLXcontext *glxc = (__GLXcontext *)imports->other;
+ XMesaVisual xm_vis;
+
+ if (shareGC)
+ m_share = (__GLcontext *)shareGC;
+
+ xm_vis = find_mesa_visual(glxc->pScreen->myNum, glxc->modes->visualID);
+ if (xm_vis) {
+ XMesaContext xmshare = m_share ? m_share->DriverCtx : 0;
+ XMesaContext xmctx = XMesaCreateContext(xm_vis, xmshare);
+ gl_ctx = xmctx ? &xmctx->mesa : 0;
+ }
+ else {
+ ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n",
+ glxc->modes->visualID);
+ }
+
+
+ if (!gl_ctx)
+ return NULL;
+
+ gl_ctx->imports = *imports;
+ gl_ctx->exports.destroyContext = __MESA_destroyContext;
+ gl_ctx->exports.loseCurrent = __MESA_loseCurrent;
+ gl_ctx->exports.makeCurrent = __MESA_makeCurrent;
+ gl_ctx->exports.shareContext = __MESA_shareContext;
+ gl_ctx->exports.copyContext = __MESA_copyContext;
+ gl_ctx->exports.forceCurrent = __MESA_forceCurrent;
+ gl_ctx->exports.notifyResize = __MESA_notifyResize;
+ gl_ctx->exports.notifyDestroy = __MESA_notifyDestroy;
+ gl_ctx->exports.notifySwapBuffers = __MESA_notifySwapBuffers;
+ gl_ctx->exports.dispatchExec = __MESA_dispatchExec;
+ gl_ctx->exports.beginDispatchOverride = __MESA_beginDispatchOverride;
+ gl_ctx->exports.endDispatchOverride = __MESA_endDispatchOverride;
+
+ return (__GLinterface *)gl_ctx;
+}
+
+GLboolean __MESA_destroyContext(__GLcontext *gc)
+{
+ XMesaContext xmesa = (XMesaContext) gc->DriverCtx;
+ XMesaDestroyContext( xmesa );
+ return GL_TRUE;
+}
+
+GLboolean __MESA_loseCurrent(__GLcontext *gc)
+{
+ XMesaContext xmesa = (XMesaContext) gc->DriverCtx;
+ MESA_CC = NULL;
+ __glXLastContext = NULL;
+ return XMesaLoseCurrent(xmesa);
+}
+
+GLboolean __MESA_makeCurrent(__GLcontext *gc)
+{
+ __GLdrawablePrivate *drawPriv = gc->imports.getDrawablePrivate( gc );
+ __MESA_buffer drawBuf = (__MESA_buffer)drawPriv->private;
+ __GLdrawablePrivate *readPriv = gc->imports.getReadablePrivate( gc );
+ __MESA_buffer readBuf = (__MESA_buffer)readPriv->private;
+ XMesaContext xmesa = (XMesaContext) gc->DriverCtx;
+
+ MESA_CC = gc;
+ return XMesaMakeCurrent2(xmesa, drawBuf->xm_buf, readBuf->xm_buf);
+}
+
+GLboolean __MESA_shareContext(__GLcontext *gc, __GLcontext *gcShare)
+{
+ /* NOT_DONE */
+ /* XXX I don't see where/how this could ever be called */
+ ErrorF("__MESA_shareContext\n");
+ return GL_FALSE;
+}
+
+GLboolean __MESA_copyContext(__GLcontext *dst, const __GLcontext *src,
+ GLuint mask)
+{
+ XMesaContext xm_dst = (XMesaContext) dst->DriverCtx;
+ const XMesaContext xm_src = (const XMesaContext) src->DriverCtx;
+ _mesa_copy_context(&xm_src->mesa, &xm_dst->mesa, mask);
+ return GL_TRUE;
+}
+
+GLboolean __MESA_forceCurrent(__GLcontext *gc)
+{
+ XMesaContext xmesa = (XMesaContext) gc->DriverCtx;
+ MESA_CC = gc;
+ return XMesaForceCurrent(xmesa);
+}
+
+GLboolean __MESA_notifyResize(__GLcontext *gc)
+{
+ /* NOT_DONE */
+ ErrorF("__MESA_notifyResize\n");
+ return GL_FALSE;
+}
+
+void __MESA_notifyDestroy(__GLcontext *gc)
+{
+ /* NOT_DONE */
+ ErrorF("__MESA_notifyDestroy\n");
+ return;
+}
+
+void __MESA_notifySwapBuffers(__GLcontext *gc)
+{
+ _mesa_notifySwapBuffers(gc);
+}
+
+struct __GLdispatchStateRec *__MESA_dispatchExec(__GLcontext *gc)
+{
+ /* NOT_DONE */
+ ErrorF("__MESA_dispatchExec\n");
+ return NULL;
+}
+
+void __MESA_beginDispatchOverride(__GLcontext *gc)
+{
+ /* NOT_DONE */
+ ErrorF("__MESA_beginDispatchOverride\n");
+ return;
+}
+
+void __MESA_endDispatchOverride(__GLcontext *gc)
+{
+ /* NOT_DONE */
+ ErrorF("__MESA_endDispatchOverride\n");
+ return;
+}
+
+
+/*
+ * Server-side GLX uses these functions which are normally defined
+ * in the OpenGL SI.
+ */
+
+GLuint __glFloorLog2(GLuint val)
+{
+ int c = 0;
+
+ while (val > 1) {
+ c++;
+ val >>= 1;
+ }
+ return c;
+}
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c
new file mode 100644
index 000000000..6441a4b4f
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c
@@ -0,0 +1,151 @@
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c,v 1.5 2000/03/02 16:07:39 martin Exp $ */
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin <kevin@precisioninsight.com>
+ * Brian Paul <brian@precisioninsight.com>
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <gcstruct.h>
+#include "pixmapstr.h"
+#include "xf86glx_util.h"
+#include <X11/Xmd.h>
+#include "GL/xf86glx.h"
+
+#ifdef ROUNDUP
+#undef ROUNDUP
+#endif
+
+#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * ((pad)>>3))
+
+XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height, char *data)
+{
+ XMesaImage *image;
+
+ image = (XMesaImage *)xalloc(sizeof(XMesaImage));
+
+ if (image) {
+ image->width = width;
+ image->height = height;
+ image->data = data;
+ /* Always pad to 32 bits */
+ image->bytes_per_line = ROUNDUP((bitsPerPixel * width), 32);
+ image->bits_per_pixel = bitsPerPixel;
+ }
+
+ return image;
+}
+
+void XMesaDestroyImage(XMesaImage *image)
+{
+ if (image->data)
+ free(image->data);
+ xfree(image);
+}
+
+unsigned long XMesaGetPixel(XMesaImage *image, int x, int y)
+{
+ CARD8 *row = (CARD8 *)(image->data + y*image->bytes_per_line);
+ CARD8 *i8;
+ CARD16 *i16;
+ CARD32 *i32;
+ switch (image->bits_per_pixel) {
+ case 8:
+ i8 = (CARD8 *)row;
+ return i8[x];
+ break;
+ case 15:
+ case 16:
+ i16 = (CARD16 *)row;
+ return i16[x];
+ break;
+ case 24: /* WARNING: architecture specific code */
+ i8 = (CARD8 *)row;
+ return (((CARD32)i8[x*3]) |
+ (((CARD32)i8[x*3+1])<<8) |
+ (((CARD32)i8[x*3+2])<<16));
+ break;
+ case 32:
+ i32 = (CARD32 *)row;
+ return i32[x];
+ break;
+ }
+ return 0;
+}
+
+#ifndef XMESA_USE_PUTPIXEL_MACRO
+void XMesaPutPixel(XMesaImage *image, int x, int y, unsigned long pixel)
+{
+ CARD8 *row = (CARD8 *)(image->data + y*image->bytes_per_line);
+ CARD8 *i8;
+ CARD16 *i16;
+ CARD32 *i32;
+ switch (image->bits_per_pixel) {
+ case 8:
+ i8 = (CARD8 *)row;
+ i8[x] = (CARD8)pixel;
+ break;
+ case 15:
+ case 16:
+ i16 = (CARD16 *)row;
+ i16[x] = (CARD16)pixel;
+ break;
+ case 24: /* WARNING: architecture specific code */
+ i8 = (CARD8 *)__row;
+ i8[x*3] = (CARD8)(p);
+ i8[x*3+1] = (CARD8)(p>>8);
+ i8[x*3+2] = (CARD8)(p>>16);
+ case 32:
+ i32 = (CARD32 *)row;
+ i32[x] = (CARD32)pixel;
+ break;
+ }
+}
+#endif
+
+void XMesaPutImageHelper(ScreenPtr display,
+ DrawablePtr d, GCPtr gc,
+ XMesaImage *image,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ unsigned int width, unsigned int height)
+{
+ /* NOT_DONE: Verify that the following works for all depths */
+ char *src = (image->data +
+ src_y * image->bytes_per_line +
+ ((src_x * image->bits_per_pixel) >> 3));
+
+ ValidateGC(d, gc);
+ (*gc->ops->PutImage)(d, gc, d->depth, dest_x, dest_y, width, height,
+ 0, ZPixmap, src);
+}
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.h b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.h
new file mode 100644
index 000000000..809c1550f
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.h
@@ -0,0 +1,106 @@
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h,v 1.5 2000/08/10 17:40:29 dawes Exp $ */
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin <kevin@precisioninsight.com>
+ * Brian Paul <brian@precisioninsight.com>
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _XF86GLX_UTIL_H_
+#define _XF86GLX_UTIL_H_
+
+#ifdef __CYGWIN__
+#undef WIN32
+#undef _WIN32
+#endif
+
+#include <screenint.h>
+#include <pixmap.h>
+#include <gc.h>
+#include "GL/xmesa.h"
+
+#define XMESA_USE_PUTPIXEL_MACRO
+
+struct _XMesaImageRec {
+ int width, height;
+ char *data;
+ int bytes_per_line; /* Padded to 32 bits */
+ int bits_per_pixel;
+};
+
+extern XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height,
+ char *data);
+extern void XMesaDestroyImage(XMesaImage *image);
+extern unsigned long XMesaGetPixel(XMesaImage *image, int x, int y);
+#ifdef XMESA_USE_PUTPIXEL_MACRO
+#define XMesaPutPixel(__i,__x,__y,__p) \
+{ \
+ CARD8 *__row = (CARD8 *)(__i->data + __y*__i->bytes_per_line); \
+ CARD8 *__i8; \
+ CARD16 *__i16; \
+ CARD32 *__i32; \
+ switch (__i->bits_per_pixel) { \
+ case 8: \
+ __i8 = (CARD8 *)__row; \
+ __i8[__x] = (CARD8)__p; \
+ break; \
+ case 15: \
+ case 16: \
+ __i16 = (CARD16 *)__row; \
+ __i16[__x] = (CARD16)__p; \
+ break; \
+ case 24: /* WARNING: architecture specific code */ \
+ __i8 = (CARD8 *)__row; \
+ __i8[__x*3] = (CARD8)(__p); \
+ __i8[__x*3+1] = (CARD8)(__p>>8); \
+ __i8[__x*3+2] = (CARD8)(__p>>16); \
+ break; \
+ case 32: \
+ __i32 = (CARD32 *)__row; \
+ __i32[__x] = (CARD32)__p; \
+ break; \
+ } \
+}
+#else
+extern void XMesaPutPixel(XMesaImage *image, int x, int y,
+ unsigned long pixel);
+#endif
+
+extern void XMesaPutImageHelper(ScreenPtr display,
+ DrawablePtr d, GCPtr gc,
+ XMesaImage *image,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ unsigned int width, unsigned int height);
+
+#endif /* _XF86GLX_UTIL_H_ */
diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h b/nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h
new file mode 100644
index 000000000..974ff0364
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h
@@ -0,0 +1,102 @@
+/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.4 2002/02/22 21:45:08 dawes Exp $ */
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin <kevin@precisioninsight.com>
+ *
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _XF86GLXINT_H_
+#define _XF86GLXINT_H_
+
+#include <miscstruct.h>
+#include <GL/gl.h>
+#include <GL/xmesa.h>
+
+typedef struct __MESA_screenRec __MESA_screen;
+struct __MESA_screenRec {
+ int num_vis;
+ __GLcontextModes *modes;
+ XMesaVisual *xm_vis;
+ void **private;
+};
+
+typedef struct __MESA_bufferRec *__MESA_buffer;
+struct __MESA_bufferRec {
+ XMesaBuffer xm_buf;
+ GLboolean (*fbresize)(__GLdrawableBuffer *buf,
+ GLint x, GLint y, GLuint width, GLuint height,
+ __GLdrawablePrivate *glPriv, GLuint bufferMask);
+ GLboolean (*fbswap)(__GLXdrawablePrivate *glxPriv);
+};
+
+extern void __MESA_setVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
+ void **privates);
+extern Bool __MESA_initVisuals(VisualPtr *visualp, DepthPtr *depthp,
+ int *nvisualp, int *ndepthp, int *rootDepthp,
+ VisualID *defaultVisp, unsigned long sizes,
+ int bitsPerRGB);
+extern Bool __MESA_screenProbe(int screen);
+
+extern void __MESA_resetExtension(void);
+
+extern void __MESA_createBuffer(__GLXdrawablePrivate *glxPriv);
+extern GLboolean __MESA_resizeBuffers(__GLdrawableBuffer *buf,
+ GLint x, GLint y,
+ GLuint width, GLuint height,
+ __GLdrawablePrivate *glPriv,
+ GLuint bufferMask);
+extern GLboolean __MESA_swapBuffers(__GLXdrawablePrivate *glxPriv);
+extern void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv);
+
+extern __GLinterface *__MESA_createContext(__GLimports *imports,
+ __GLcontextModes *modes,
+ __GLinterface *shareGC);
+extern GLboolean __MESA_destroyContext(__GLcontext *gc);
+extern GLboolean __MESA_loseCurrent(__GLcontext *gc);
+extern GLboolean __MESA_makeCurrent(__GLcontext *gc);
+extern GLboolean __MESA_shareContext(__GLcontext *gc, __GLcontext *gcShare);
+extern GLboolean __MESA_copyContext(__GLcontext *dst, const __GLcontext *src,
+ GLuint mask);
+extern GLboolean __MESA_forceCurrent(__GLcontext *gc);
+
+extern GLboolean __MESA_notifyResize(__GLcontext *gc);
+extern void __MESA_notifyDestroy(__GLcontext *gc);
+extern void __MESA_notifySwapBuffers(__GLcontext *gc);
+extern struct __GLdispatchStateRec *__MESA_dispatchExec(__GLcontext *gc);
+extern void __MESA_beginDispatchOverride(__GLcontext *gc);
+extern void __MESA_endDispatchOverride(__GLcontext *gc);
+
+extern GLuint __glFloorLog2(GLuint val);
+
+#endif /* _XF86GLXINT_H_ */
diff --git a/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile b/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile
new file mode 100644
index 000000000..8126c3f30
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile
@@ -0,0 +1,56 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/array_cache/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaACBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/array_cache/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/array_cache/Imakefile.inc"
+#endif
+
+ SRCS = $(MESA_AC_SRCS)
+ OBJS = $(MESA_AC_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/array_cache \
+ -I$(MESASRCDIR)/src/mesa/math \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/array_cache/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/array_cache/module/Imakefile
new file mode 100644
index 000000000..86c585012
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/array_cache/module/Imakefile
@@ -0,0 +1,6 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/array_cache/module/Imakefile,v 1.1 2002/05/31 18:12:39 dawes Exp $
+
+#define IHaveModules
+
+#include "../Imakefile"
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/main/Imakefile b/nx-X11/programs/Xserver/GL/mesa/main/Imakefile
new file mode 100644
index 000000000..463812236
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/main/Imakefile
@@ -0,0 +1,61 @@
+XCOMM $XdotOrg: xc/programs/Xserver/GL/mesa/main/Imakefile,v 1.2 2004/08/19 07:34:43 kem Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/math/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+/* Large PIC tables needed for Solaris/SPARC builds */
+#if defined(SunArchitecture) && defined(SparcArchitecture) && defined(LargePositionIndependentCFlags)
+ PICFLAGS = LargePositionIndependentCFlags
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/main/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/main/Imakefile.inc"
+#endif
+
+ SRCS = $(COREMESABASESRCS)
+ OBJS = $(COREMESABASEOBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/main/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/main/module/Imakefile
new file mode 100644
index 000000000..e21afd5e5
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/main/module/Imakefile
@@ -0,0 +1,6 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/math/module/Imakefile,v 1.1 2002/05/31 18:12:40 dawes Exp $
+
+#define IHaveModules
+
+#include "../Imakefile"
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/math/Imakefile b/nx-X11/programs/Xserver/GL/mesa/math/Imakefile
new file mode 100644
index 000000000..49720974c
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/math/Imakefile
@@ -0,0 +1,55 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/math/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaMathBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/math/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/math/Imakefile.inc"
+#endif
+
+ SRCS = $(MESA_MATH_SRCS)
+ OBJS = $(MESA_MATH_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/math \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/math/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/math/module/Imakefile
new file mode 100644
index 000000000..e21afd5e5
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/math/module/Imakefile
@@ -0,0 +1,6 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/math/module/Imakefile,v 1.1 2002/05/31 18:12:40 dawes Exp $
+
+#define IHaveModules
+
+#include "../Imakefile"
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/Imakefile b/nx-X11/programs/Xserver/GL/mesa/shader/Imakefile
new file mode 100644
index 000000000..7b14ab7b9
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/shader/Imakefile
@@ -0,0 +1,59 @@
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#define IHaveSubdirs
+ SUBDIRS = grammar slang
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaShaderBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/shader/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/shader/Imakefile.inc"
+#endif
+
+ SRCS = $(MESA_SHADER_SRCS)
+ OBJS = $(MESA_SHADER_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/src/mesa/shader/grammar \
+ -I$(MESASRCDIR)/src/mesa/shader/slang \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/grammar/Imakefile b/nx-X11/programs/Xserver/GL/mesa/shader/grammar/Imakefile
new file mode 100644
index 000000000..c16b3ddad
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/shader/grammar/Imakefile
@@ -0,0 +1,54 @@
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaGrammarBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../../lib/GL/mesa/shader/grammar/Imakefile.inc"
+#else
+#include "../../../../../../../lib/GL/mesa/shader/grammar/Imakefile.inc"
+#endif
+
+ SRCS = $(MESA_GRAMMAR_SRCS)
+ OBJS = $(MESA_GRAMMAR_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/src/mesa/shader/grammar \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile
new file mode 100644
index 000000000..0bee2b774
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile
@@ -0,0 +1,59 @@
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#define IHaveSubdirs
+ SUBDIRS = library
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaSlangBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../../lib/GL/mesa/shader/slang/Imakefile.inc"
+#else
+#include "../../../../../../../lib/GL/mesa/shader/slang/Imakefile.inc"
+#endif
+
+ SRCS = $(MESA_SLANG_SRCS)
+ OBJS = $(MESA_SLANG_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/src/mesa/shader/grammar \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile b/nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile
new file mode 100644
index 000000000..e332121c9
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile
@@ -0,0 +1,46 @@
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaLibraryBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../../../lib/GL/mesa/shader/slang/library/Imakefile.inc"
+#else
+#include "../../../../../../../../lib/GL/mesa/shader/slang/library/Imakefile.inc"
+#endif
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/src/mesa/shader/grammar \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile b/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile
new file mode 100644
index 000000000..817fead69
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile
@@ -0,0 +1,63 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+/* Large PIC tables needed for Solaris/SPARC builds */
+#if defined(SunArchitecture) && defined(SparcArchitecture) && defined(LargePositionIndependentCFlags)
+ PICFLAGS = LargePositionIndependentCFlags
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaSwrastBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/swrast/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/swrast/Imakefile.inc"
+#endif
+
+
+ SRCS = $(MESA_SWRAST_SRCS)
+ OBJS = $(MESA_SWRAST_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/src/mesa/swrast \
+ -I$(MESASRCDIR)/src/mesa/swrast_setup \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/swrast/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/swrast/module/Imakefile
new file mode 100644
index 000000000..7d9974ed0
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/swrast/module/Imakefile
@@ -0,0 +1,6 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast/module/Imakefile,v 1.1 2002/05/31 18:12:40 dawes Exp $
+
+#define IHaveModules
+
+#include "../Imakefile"
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile b/nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile
new file mode 100644
index 000000000..b530457e9
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile
@@ -0,0 +1,55 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast_setup/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaSwrastSetupBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/swrast_setup/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/swrast_setup/Imakefile.inc"
+#endif
+
+ SRCS = $(MESA_SWR_SETUP_SRCS)
+ OBJS = $(MESA_SWR_SETUP_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/src/mesa/swrast_setup \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/swrast_setup/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/swrast_setup/module/Imakefile
new file mode 100644
index 000000000..5221debc0
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/swrast_setup/module/Imakefile
@@ -0,0 +1,6 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast_setup/module/Imakefile,v 1.1 2002/05/31 18:12:41 dawes Exp $
+
+#define IHaveModules
+
+#include "../Imakefile"
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile b/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile
new file mode 100644
index 000000000..c52696e4f
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile
@@ -0,0 +1,66 @@
+XCOMM $XdotOrg: xc/programs/Xserver/GL/mesa/tnl/Imakefile,v 1.2 2004/08/19 07:34:44 kem Exp $
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/tnl/Imakefile,v 1.8 2002/11/22 22:56:02 tsi Exp $
+
+#if DoLoadableServer
+#if !BuildModuleInSubdir
+#define IHaveModules
+#elif !defined(IHaveModules)
+#define IHaveSubdirs
+SUBDIRS = module
+#endif
+#endif
+
+/* Large PIC tables needed for Solaris/SPARC builds */
+#if defined(SunArchitecture) && defined(SparcArchitecture) && defined(LargePositionIndependentCFlags)
+ PICFLAGS = LargePositionIndependentCFlags
+#endif
+
+
+#include <Server.tmpl>
+
+#define NeedAllMesaSrc
+#define NeedToLinkMesaSrc
+#define MesaTnlBuildDir /**/
+#if !defined(IHaveModules) || !BuildModuleInSubdir
+#include "../../../../../lib/GL/mesa/tnl/Imakefile.inc"
+#else
+#include "../../../../../../lib/GL/mesa/tnl/Imakefile.inc"
+#endif
+
+
+ SRCS = $(MESA_TNL_SRCS)
+ OBJS = $(MESA_TNL_OBJS)
+
+ INCLUDES = -I$(MESASRCDIR)/src/mesa \
+ -I$(MESASRCDIR)/src/mesa/array_cache \
+ -I$(MESASRCDIR)/src/mesa/math \
+ -I$(MESASRCDIR)/src/mesa/main \
+ -I$(MESASRCDIR)/src/mesa/glapi \
+ -I$(MESASRCDIR)/src/mesa/shader \
+ -I$(MESASRCDIR)/src/mesa/tnl \
+ -I$(MESASRCDIR)/include \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \
+ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \
+ -I$(LIBSRC)/GL/include \
+ -I$(XF86SRC) -I$(INCLUDESRC)
+
+ DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
+
+#ifdef IHaveModules
+ModuleObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
+
+SubdirLibraryRule($(OBJS))
+
+LintLibraryTarget(dri,$(SRCS))
+NormalLintTarget($(SRCS))
+
+DependTarget()
+
+#ifdef IHaveSubdirs
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+#endif
+
diff --git a/nx-X11/programs/Xserver/GL/mesa/tnl/module/Imakefile b/nx-X11/programs/Xserver/GL/mesa/tnl/module/Imakefile
new file mode 100644
index 000000000..5d2a4489d
--- /dev/null
+++ b/nx-X11/programs/Xserver/GL/mesa/tnl/module/Imakefile
@@ -0,0 +1,6 @@
+XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/tnl/module/Imakefile,v 1.1 2002/05/31 18:12:42 dawes Exp $
+
+#define IHaveModules
+
+#include "../Imakefile"
+