DRI XFree86-4_3_99_12-merge import

This commit is contained in:
Eric Anholt 2004-06-16 09:22:17 +00:00
parent 1c133c27cc
commit 22bad9474b
157 changed files with 518 additions and 2201 deletions

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.5 2004/01/28 18:11:50 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
@ -425,12 +425,8 @@ __GLXdispatchRenderProcPtr __glXRenderTable[] = {
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXDisp_SampleCoverageARB, __glXNoSuchRenderOpcode,
#ifndef MISSING_GL_EXTS
__glXDisp_WindowPos3fARB /* 230 */ __glXDisp_WindowPos3fARB /* 230 */
#else
__glXNoSuchRenderOpcode
#endif
}; };
__GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = { __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
@ -826,10 +822,6 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE] = {
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXDispSwap_SampleCoverageARB, __glXNoSuchRenderOpcode,
#ifndef MISSING_GL_EXTS
__glXDispSwap_WindowPos3fARB /* 230 */ __glXDispSwap_WindowPos3fARB /* 230 */
#else
__glXNoSuchRenderOpcode
#endif
}; };

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.4 2003/09/28 20:15:42 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
#ifndef _GLX_g_disptab_h_ #ifndef _GLX_g_disptab_h_
#define _GLX_g_disptab_h_ #define _GLX_g_disptab_h_
@ -325,7 +325,6 @@ extern void __glXDisp_MultiTexCoord4dvARB(GLbyte*);
extern void __glXDisp_MultiTexCoord4fvARB(GLbyte*); extern void __glXDisp_MultiTexCoord4fvARB(GLbyte*);
extern void __glXDisp_MultiTexCoord4ivARB(GLbyte*); extern void __glXDisp_MultiTexCoord4ivARB(GLbyte*);
extern void __glXDisp_MultiTexCoord4svARB(GLbyte*); extern void __glXDisp_MultiTexCoord4svARB(GLbyte*);
extern void __glXDisp_SampleCoverageARB(GLbyte *);
extern void __glXDisp_WindowPos3fARB(GLbyte *); extern void __glXDisp_WindowPos3fARB(GLbyte *);
extern int __glXSwapRender(__GLXclientState*, GLbyte*); extern int __glXSwapRender(__GLXclientState*, GLbyte*);
@ -622,7 +621,6 @@ extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte*);
extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte*); extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte*);
extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte*); extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte*);
extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte*); extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte*);
extern void __glXDispSwap_SampleCoverageARB(GLbyte *);
extern void __glXDispSwap_WindowPos3fARB(GLbyte *); extern void __glXDispSwap_WindowPos3fARB(GLbyte *);
#define __GLX_MIN_GLXCMD_OPCODE 1 #define __GLX_MIN_GLXCMD_OPCODE 1

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.c,v 1.5 2004/01/28 18:11:50 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
@ -45,13 +45,8 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
#ifndef MISSING_GL_EXTS
__glXDisp_PointParameterfARB, /* 2065 */ __glXDisp_PointParameterfARB, /* 2065 */
__glXDisp_PointParameterfvARB, /* 2066 */ __glXDisp_PointParameterfvARB, /* 2066 */
#else
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
#endif
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
@ -2109,36 +2104,22 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __
__glXDisp_CopyTexSubImage1D, /* 4121 */ __glXDisp_CopyTexSubImage1D, /* 4121 */
__glXDisp_CopyTexSubImage2D, /* 4122 */ __glXDisp_CopyTexSubImage2D, /* 4122 */
__glXDisp_CopyTexSubImage3D, /* 4123 */ __glXDisp_CopyTexSubImage3D, /* 4123 */
#ifndef MISSING_GL_EXTS
__glXDisp_FogCoordfv, /* 4124 */
__glXDisp_FogCoorddv, /* 4125 */
__glXDisp_SecondaryColor3bv, /* 4126 */
__glXDisp_SecondaryColor3sv, /* 4127 */
__glXDisp_SecondaryColor3iv, /* 4128 */
__glXDisp_SecondaryColor3fv, /* 4129 */
__glXDisp_SecondaryColor3dv, /* 4130 */
__glXDisp_SecondaryColor3ubv, /* 4131 */
__glXDisp_SecondaryColor3usv, /* 4132 */
__glXDisp_SecondaryColor3uiv, /* 4133 */
__glXDisp_BlendFuncSeparate, /* 4134 */
#else
__glXNoSuchRenderOpcode, /* 4124 */ __glXNoSuchRenderOpcode, /* 4124 */
__glXNoSuchRenderOpcode, /* 4125 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4126 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4127 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4128 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4129 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4130 */ __glXNoSuchRenderOpcode, /* 4130 */
__glXNoSuchRenderOpcode, /* 4131 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4132 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4133 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4134 */ __glXNoSuchRenderOpcode,
#endif __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4135 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4136 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4137 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4138 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4139 */
__glXNoSuchRenderOpcode, /* 4140 */ __glXNoSuchRenderOpcode, /* 4140 */
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
@ -2219,20 +2200,7 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4219 */ __glXNoSuchRenderOpcode, /* 4219 */
#ifndef MISSING_GL_EXTS
__glXDisp_ActiveStencilFaceEXT, /* 4220 */ __glXDisp_ActiveStencilFaceEXT, /* 4220 */
# ifndef __DARWIN__
__glXDisp_PointParameteri, /* 4221 */
__glXDisp_PointParameteriv, /* 4222 */
# else
__glXDisp_PointParameteriNV, /* 4221 */
__glXDisp_PointParameterivNV, /* 4222 */
# endif
#else
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
#endif
}; };
__GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = {
__glXDisp_AreTexturesResidentEXT, /* 11 */ __glXDisp_AreTexturesResidentEXT, /* 11 */
@ -2255,13 +2223,8 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
#ifndef MISSING_GL_EXTS
__glXDispSwap_PointParameterfARB, /* 2065 */ __glXDispSwap_PointParameterfARB, /* 2065 */
__glXDispSwap_PointParameterfvARB, /* 2066 */ __glXDispSwap_PointParameterfvARB, /* 2066 */
#else
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
#endif
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
@ -4319,36 +4282,22 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT
__glXDispSwap_CopyTexSubImage1D, /* 4121 */ __glXDispSwap_CopyTexSubImage1D, /* 4121 */
__glXDispSwap_CopyTexSubImage2D, /* 4122 */ __glXDispSwap_CopyTexSubImage2D, /* 4122 */
__glXDispSwap_CopyTexSubImage3D, /* 4123 */ __glXDispSwap_CopyTexSubImage3D, /* 4123 */
#ifndef MISSING_GL_EXTS
__glXDispSwap_FogCoordfv, /* 4124 */
__glXDispSwap_FogCoorddv, /* 4125 */
__glXDispSwap_SecondaryColor3bv, /* 4126 */
__glXDispSwap_SecondaryColor3sv, /* 4127 */
__glXDispSwap_SecondaryColor3iv, /* 4128 */
__glXDispSwap_SecondaryColor3fv, /* 4129 */
__glXDispSwap_SecondaryColor3dv, /* 4130 */
__glXDispSwap_SecondaryColor3ubv, /* 4131 */
__glXDispSwap_SecondaryColor3usv, /* 4132 */
__glXDispSwap_SecondaryColor3uiv, /* 4133 */
__glXDisp_BlendFuncSeparate, /* 4134 */
#else
__glXNoSuchRenderOpcode, /* 4124 */ __glXNoSuchRenderOpcode, /* 4124 */
__glXNoSuchRenderOpcode, /* 4125 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4126 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4127 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4128 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4129 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4130 */ __glXNoSuchRenderOpcode, /* 4130 */
__glXNoSuchRenderOpcode, /* 4131 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4132 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4133 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4134 */ __glXNoSuchRenderOpcode,
#endif __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4135 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4136 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4137 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4138 */ __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4139 */
__glXNoSuchRenderOpcode, /* 4140 */ __glXNoSuchRenderOpcode, /* 4140 */
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
@ -4429,20 +4378,7 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 4219 */ __glXNoSuchRenderOpcode, /* 4219 */
#ifndef MISSING_GL_EXTS
__glXDispSwap_ActiveStencilFaceEXT, /* 4220 */ __glXDispSwap_ActiveStencilFaceEXT, /* 4220 */
# ifndef __DARWIN__
__glXDispSwap_PointParameteri, /* 4221 */
__glXDispSwap_PointParameteriv, /* 4222 */
# else
__glXDispSwap_PointParameteriNV, /* 4221 */
__glXDispSwap_PointParameterivNV, /* 4222 */
# endif
#else
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
#endif
}; };
__GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = {
__glXDispSwap_AreTexturesResidentEXT, /* 11 */ __glXDispSwap_AreTexturesResidentEXT, /* 11 */

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.5 2004/01/28 18:11:50 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
#ifndef _GLX_g_disptab_EXT_h_ #ifndef _GLX_g_disptab_EXT_h_
#define _GLX_g_disptab_EXT_h_ #define _GLX_g_disptab_EXT_h_
@ -69,44 +69,6 @@ extern void __glXDisp_CopyTexSubImage2D(GLbyte*);
extern void __glXDisp_CopyTexSubImage3D(GLbyte*); extern void __glXDisp_CopyTexSubImage3D(GLbyte*);
extern void __glXDisp_PointParameterfARB(GLbyte*); extern void __glXDisp_PointParameterfARB(GLbyte*);
extern void __glXDisp_PointParameterfvARB(GLbyte*); extern void __glXDisp_PointParameterfvARB(GLbyte*);
extern void __glXDisp_FogCoordfv(GLbyte *);
extern void __glXDisp_FogCoorddv(GLbyte *);
extern void __glXDispSwap_FogCoordfv(GLbyte *);
extern void __glXDispSwap_FogCoorddv(GLbyte *);
extern void __glXDisp_SecondaryColor3bv(GLbyte *);
extern void __glXDisp_SecondaryColor3sv(GLbyte *);
extern void __glXDisp_SecondaryColor3iv(GLbyte *);
extern void __glXDisp_SecondaryColor3ubv(GLbyte *);
extern void __glXDisp_SecondaryColor3usv(GLbyte *);
extern void __glXDisp_SecondaryColor3uiv(GLbyte *);
extern void __glXDisp_SecondaryColor3fv(GLbyte *);
extern void __glXDisp_SecondaryColor3dv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3bv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3sv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3iv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3ubv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3usv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3uiv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3fv(GLbyte *);
extern void __glXDispSwap_SecondaryColor3dv(GLbyte *);
extern void __glXDisp_BlendFuncSeparate(GLbyte *);
extern void __glXDispSwap_BlendFuncSeparate(GLbyte *);
#ifdef __DARWIN__
extern void __glXDisp_PointParameteriNV(GLbyte *);
extern void __glXDisp_PointParameterivNV(GLbyte *);
extern void __glXDispSwap_PointParameteriNV(GLbyte *);
extern void __glXDispSwap_PointParameterivNV(GLbyte *);
#else
extern void __glXDisp_PointParameteri(GLbyte *);
extern void __glXDisp_PointParameteriv(GLbyte *);
extern void __glXDispSwap_PointParameteri(GLbyte *);
extern void __glXDispSwap_PointParameteriv(GLbyte *);
#endif
extern void __glXDisp_ActiveStencilFaceEXT(GLbyte*); extern void __glXDisp_ActiveStencilFaceEXT(GLbyte*);
extern int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState*, GLbyte*); extern int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState*, GLbyte*);
@ -150,7 +112,7 @@ extern void __glXDispSwap_PointParameterfvARB(GLbyte*);
extern void __glXDispSwap_ActiveStencilFaceEXT(GLbyte*); extern void __glXDispSwap_ActiveStencilFaceEXT(GLbyte*);
#define __GLX_MIN_RENDER_OPCODE_EXT 2053 #define __GLX_MIN_RENDER_OPCODE_EXT 2053
#define __GLX_MAX_RENDER_OPCODE_EXT 4222 #define __GLX_MAX_RENDER_OPCODE_EXT 4220
#define __GLX_MIN_VENDPRIV_OPCODE_EXT 11 #define __GLX_MIN_VENDPRIV_OPCODE_EXT 11
#define __GLX_MAX_VENDPRIV_OPCODE_EXT 14 #define __GLX_MAX_VENDPRIV_OPCODE_EXT 14
#define __GLX_VENDPRIV_TABLE_SIZE_EXT (__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1) #define __GLX_VENDPRIV_TABLE_SIZE_EXT (__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1)

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.8 2004/02/03 21:34:36 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
@ -59,157 +59,6 @@ void __glXDisp_Begin(GLbyte *pc)
); );
} }
#define __GLX_SWAP_GLbyte(ptr)
#define __GLX_SWAP_GLshort(ptr) __GLX_SWAP_SHORT(ptr)
#define __GLX_SWAP_GLint(ptr) __GLX_SWAP_INT(ptr)
#define __GLX_SWAP_GLubyte(ptr)
#define __GLX_SWAP_GLushort(ptr) __GLX_SWAP_SHORT(ptr)
#define __GLX_SWAP_GLuint(ptr) __GLX_SWAP_INT(ptr)
#define __GLX_SWAP_GLdouble(ptr) __GLX_SWAP_DOUBLE(ptr)
#define __GLX_SWAP_GLfloat(ptr) __GLX_SWAP_FLOAT(ptr)
#define __GLX_SWAP_GLbyte_ARRAY(ptr,count) (void) swapEnd; (void) swapPC; (void) sw;
#define __GLX_SWAP_GLshort_ARRAY(ptr,count) __GLX_SWAP_SHORT_ARRAY(ptr,count)
#define __GLX_SWAP_GLint_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count)
#define __GLX_SWAP_GLenum_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count)
#define __GLX_SWAP_GLubyte_ARRAY(ptr,count) (void) swapEnd; (void) swapPC; (void) sw;
#define __GLX_SWAP_GLushort_ARRAY(ptr,count) __GLX_SWAP_SHORT_ARRAY(ptr,count)
#define __GLX_SWAP_GLuint_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count)
#define __GLX_SWAP_GLdouble_ARRAY(ptr,count) __GLX_SWAP_DOUBLE_ARRAY(ptr,count)
#define __GLX_SWAP_GLfloat_ARRAY(ptr,count) __GLX_SWAP_FLOAT_ARRAY(ptr,count)
#ifdef __GLX_ALIGN64
/* If type is not GLdouble, the compiler should optimize this away.
*/
# define GLX_DO_ALIGN_MAGIC(count, type) \
do { \
if ( (sizeof(type) == 8) && ((unsigned long)(pc) & 7)) \
{ \
__GLX_MEM_COPY(pc-4, pc, (count * sizeof( type ) )); \
pc -= 4; \
} \
} while( 0 )
#else
# define GLX_DO_ALIGN_MAGIC(count, type)
#endif
#define dispatch_template_1( name, type ) \
void __glXDisp_ ## name ( GLbyte * pc ) \
{ \
GLX_DO_ALIGN_MAGIC( 1, type ); \
gl ## name ( (type *) pc ); \
} \
void __glXDispSwap_ ## name ( GLbyte * pc ) \
{ \
__GLX_DECLARE_SWAP_VARIABLES; \
GLX_DO_ALIGN_MAGIC( 1, type ); \
__GLX_SWAP_ ## type ( pc ); \
gl ## name ( (type *) pc ); \
}
#define dispatch_template_3( name, type ) \
void __glXDisp_ ## name ( GLbyte * pc ) \
{ \
GLX_DO_ALIGN_MAGIC( 3, type ); \
gl ## name ( (type *) pc ); \
} \
void __glXDispSwap_ ## name ( GLbyte * pc ) \
{ \
__GLX_DECLARE_SWAP_VARIABLES; \
__GLX_DECLARE_SWAP_ARRAY_VARIABLES; \
GLX_DO_ALIGN_MAGIC( 3, type ); \
__GLX_SWAP_ ## type ## _ARRAY(pc, 3); \
gl ## name ( (type *) pc ); \
}
#define dispatch_template_4( name, type ) \
void __glXDisp_ ## name ( GLbyte * pc ) \
{ \
GLX_DO_ALIGN_MAGIC( 4, type ); \
gl ## name ( (type *) pc ); \
} \
void __glXDispSwap_ ## name ( GLbyte * pc ) \
{ \
__GLX_DECLARE_SWAP_VARIABLES; \
__GLX_DECLARE_SWAP_ARRAY_VARIABLES; \
GLX_DO_ALIGN_MAGIC( 4, type ); \
__GLX_SWAP_ ## type ## _ARRAY(pc, 4); \
gl ## name ( (type *) pc ); \
}
#define dispatch_template_4s( name, type ) \
void __glXDisp_ ## name ( GLbyte * pc ) \
{ \
GLX_DO_ALIGN_MAGIC( 4, type ); \
gl ## name ( ((type *) pc)[0], ((type *) pc)[1], \
((type *) pc)[2], ((type *) pc)[3] ); \
} \
void __glXDispSwap_ ## name ( GLbyte * pc ) \
{ \
__GLX_DECLARE_SWAP_VARIABLES; \
__GLX_DECLARE_SWAP_ARRAY_VARIABLES; \
GLX_DO_ALIGN_MAGIC( 4, type ); \
__GLX_SWAP_ ## type ## _ARRAY(pc, 4); \
gl ## name ( ((type *) pc)[0], ((type *) pc)[1], \
((type *) pc)[2], ((type *) pc)[3] ); \
}
/**
* \bug All of the enum1 templates need to be updated to handle the case where
* \c type is \c GLdouble. When the type is a double, the data comes before
* the enum. This is also the reason the invocation of the
* \c GLX_DO_ALIGN_MAGIC macro was removed.
*/
#define dispatch_template_enum1_1s( name, type ) \
void __glXDisp_ ## name ( GLbyte * pc ) \
{ \
gl ## name ( *(GLenum *) (pc + 0), \
*(type *) (pc + 4) ); \
} \
void __glXDispSwap_ ## name ( GLbyte * pc ) \
{ \
__GLX_DECLARE_SWAP_VARIABLES; \
__GLX_SWAP_INT (pc + 0); \
__GLX_SWAP_ ## type (pc + 4); \
gl ## name ( *(GLenum *) (pc + 0), \
*(type *) (pc + 4) ); \
}
#define dispatch_template_enum1_Vv( name, type ) \
void __glXDisp_ ## name ( GLbyte * pc ) \
{ \
gl ## name ( *(GLenum *) (pc + 0), \
(type *) (pc + 4) ); \
} \
void __glXDispSwap_ ## name ( GLbyte * pc ) \
{ \
GLenum pname; GLint compsize; \
__GLX_DECLARE_SWAP_VARIABLES; \
__GLX_DECLARE_SWAP_ARRAY_VARIABLES; \
__GLX_SWAP_INT(pc + 0); \
pname = *(GLenum *)(pc + 0); \
compsize = __gl ## name ## _size(pname); \
if (compsize < 0) compsize = 0; \
__GLX_SWAP_ ## type ## _ARRAY(pc + 4, compsize); \
gl ## name ( *(GLenum *) (pc + 0), \
(type *) (pc + 4) ); \
}
#ifndef MISSING_GL_EXTS
dispatch_template_1( FogCoordfv, GLfloat )
dispatch_template_1( FogCoorddv, GLdouble )
dispatch_template_3( SecondaryColor3bv, GLbyte )
dispatch_template_3( SecondaryColor3sv, GLshort )
dispatch_template_3( SecondaryColor3iv, GLint )
dispatch_template_3( SecondaryColor3ubv, GLubyte )
dispatch_template_3( SecondaryColor3usv, GLushort )
dispatch_template_3( SecondaryColor3uiv, GLuint )
dispatch_template_3( SecondaryColor3fv, GLfloat )
dispatch_template_3( SecondaryColor3dv, GLdouble )
dispatch_template_4s( BlendFuncSeparate, GLenum )
#endif /* !MISSING_GL_EXTS */
void __glXDisp_Color3bv(GLbyte *pc) void __glXDisp_Color3bv(GLbyte *pc)
{ {
glColor3bv( glColor3bv(
@ -1133,7 +982,6 @@ void __glXDisp_TexGend(GLbyte *pc)
void __glXDisp_TexGendv(GLbyte *pc) void __glXDisp_TexGendv(GLbyte *pc)
{ {
#ifdef __GLX_ALIGN64
GLenum pname; GLenum pname;
GLint cmdlen; GLint cmdlen;
GLint compsize; GLint compsize;
@ -1142,6 +990,8 @@ void __glXDisp_TexGendv(GLbyte *pc)
compsize = __glTexGendv_size(pname); compsize = __glTexGendv_size(pname);
if (compsize < 0) compsize = 0; if (compsize < 0) compsize = 0;
cmdlen = __GLX_PAD(8+compsize*8); cmdlen = __GLX_PAD(8+compsize*8);
#ifdef __GLX_ALIGN64
if ((unsigned long)(pc) & 7) { if ((unsigned long)(pc) & 7) {
__GLX_MEM_COPY(pc-4, pc, cmdlen); __GLX_MEM_COPY(pc-4, pc, cmdlen);
pc -= 4; pc -= 4;
@ -2230,8 +2080,6 @@ void __glXDisp_MultiTexCoord4svARB(GLbyte *pc)
* Extensions * Extensions
*/ */
#ifndef MISSING_GL_EXTS
void __glXDisp_PointParameterfARB(GLbyte *pc) void __glXDisp_PointParameterfARB(GLbyte *pc)
{ {
glPointParameterfARB( glPointParameterfARB(
@ -2249,15 +2097,6 @@ void __glXDisp_PointParameterfvARB(GLbyte *pc)
); );
} }
#ifdef __DARWIN__
#define __glPointParameterivNV_size __glPointParameteriv_size
dispatch_template_enum1_1s(PointParameteriNV, GLint)
dispatch_template_enum1_Vv(PointParameterivNV, GLint)
#else
dispatch_template_enum1_1s(PointParameteri, GLint)
dispatch_template_enum1_Vv(PointParameteriv, GLint)
#endif
void __glXDisp_ActiveStencilFaceEXT(GLbyte *pc) void __glXDisp_ActiveStencilFaceEXT(GLbyte *pc)
{ {
glActiveStencilFaceEXT( glActiveStencilFaceEXT(
@ -2273,13 +2112,3 @@ void __glXDisp_WindowPos3fARB(GLbyte *pc)
*(GLfloat *)(pc + 8) *(GLfloat *)(pc + 8)
); );
} }
#endif /* !MISSING_GL_EXTS */
void __glXDisp_SampleCoverageARB(GLbyte *pc)
{
glSampleCoverageARB(
*(GLfloat *)(pc + 0),
*(GLboolean *)(pc + 4)
);
}

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.8 2004/01/28 18:11:50 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -1570,9 +1570,7 @@ void __glXDispSwap_TexGend(GLbyte *pc)
void __glXDispSwap_TexGendv(GLbyte *pc) void __glXDispSwap_TexGendv(GLbyte *pc)
{ {
GLenum pname; GLenum pname;
#ifdef __GLX_ALIGN64
GLint cmdlen; GLint cmdlen;
#endif
GLint compsize; GLint compsize;
__GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@ -1581,9 +1579,9 @@ void __glXDispSwap_TexGendv(GLbyte *pc)
pname = *(GLenum *)(pc + 4); pname = *(GLenum *)(pc + 4);
compsize = __glTexGendv_size(pname); compsize = __glTexGendv_size(pname);
if (compsize < 0) compsize = 0; if (compsize < 0) compsize = 0;
cmdlen = __GLX_PAD(8+compsize*8);
#ifdef __GLX_ALIGN64 #ifdef __GLX_ALIGN64
cmdlen = __GLX_PAD(8+compsize*8);
if ((unsigned long)(pc) & 7) { if ((unsigned long)(pc) & 7) {
__GLX_MEM_COPY(pc-4, pc, cmdlen); __GLX_MEM_COPY(pc-4, pc, cmdlen);
pc -= 4; pc -= 4;
@ -3313,8 +3311,6 @@ void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc)
* Extensions * Extensions
*/ */
#ifndef MISSING_GL_EXTS
void __glXDispSwap_PointParameterfARB(GLbyte *pc) void __glXDispSwap_PointParameterfARB(GLbyte *pc)
{ {
__GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_VARIABLES;
@ -3368,17 +3364,3 @@ void __glXDispSwap_WindowPos3fARB(GLbyte *pc)
*(GLfloat *)(pc + 8) *(GLfloat *)(pc + 8)
); );
} }
#endif /* !MISSING_GL_EXTS */
void __glXDispSwap_SampleCoverageARB(GLbyte *pc)
{
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_FLOAT(pc + 0);
__GLX_SWAP_INT(pc + 4);
glSampleCoverageARB(
*(GLfloat *)(pc + 0),
*(GLboolean *)(pc + 4)
);
}

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.5tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -1264,6 +1264,7 @@ int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc) int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
{ {
GLsizei n;
__GLXcontext *cx; __GLXcontext *cx;
int error; int error;
@ -1272,6 +1273,7 @@ int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
return error; return error;
} }
pc += __GLX_SINGLE_HDR_SIZE; pc += __GLX_SINGLE_HDR_SIZE;
n = *(GLsizei *)(pc + 0);
glDeleteTextures( glDeleteTextures(
*(GLsizei *)(pc + 0), *(GLsizei *)(pc + 0),
@ -1715,6 +1717,7 @@ int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
{ {
GLsizei n;
__GLXcontext *cx; __GLXcontext *cx;
int error; int error;
@ -1723,6 +1726,7 @@ int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
return error; return error;
} }
pc += __GLX_VENDPRIV_HDR_SIZE; pc += __GLX_VENDPRIV_HDR_SIZE;
n = *(GLsizei *)(pc + 0);
glDeleteTexturesEXT( glDeleteTexturesEXT(
*(GLsizei *)(pc + 0), *(GLsizei *)(pc + 0),

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_singleswap.c,v 1.4tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/g_singleswap.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/global.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.c,v 1.6 2001/03/25 05:32:01 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.c,v 1.7 2001/10/31 22:50:26 tsi Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
#ifndef _glxbuf_h_ #ifndef _glxbuf_h_
#define _glxbuf_h_ #define _glxbuf_h_

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.12 2004/01/28 18:11:50 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.9 2002/12/14 01:36:09 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -747,8 +747,6 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
major = req->majorVersion; major = req->majorVersion;
minor = req->minorVersion; minor = req->minorVersion;
(void)major;
(void)minor;
/* /*
** Server should take into consideration the version numbers sent by the ** Server should take into consideration the version numbers sent by the
@ -1554,18 +1552,6 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
req = (xGLXVendorPrivateReq *) pc; req = (xGLXVendorPrivateReq *) pc;
vendorcode = req->vendorCode; vendorcode = req->vendorCode;
#ifndef __DARWIN__
switch( vendorcode ) {
case X_GLvop_SampleMaskSGIS:
glSampleMaskSGIS(*(GLfloat *)(pc + 4),
*(GLboolean *)(pc + 8));
return Success;
case X_GLvop_SamplePatternSGIS:
glSamplePatternSGIS( *(GLenum *)(pc + 4));
return Success;
}
#endif
if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) &&
(vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) {
(*__glXVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT]) (*__glXVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.10 2004/01/28 18:11:50 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.7 2002/01/14 22:47:08 tsi Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -357,7 +357,7 @@ int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc)
return __glXClientInfo(cl, pc); return __glXClientInfo(cl, pc);
} }
int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc)
{ {
xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_VARIABLES;
@ -365,7 +365,7 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length); __GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->context); __GLX_SWAP_INT(&req->context);
return __glXQueryContextInfoEXT(cl, pc); return __glXQueryContextInfoEXT(cl, (GLbyte *)pc);
} }
/************************************************************************/ /************************************************************************/
@ -791,21 +791,6 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
vendorcode = req->vendorCode; vendorcode = req->vendorCode;
#ifndef __DARWIN__
switch( vendorcode ) {
case X_GLvop_SampleMaskSGIS:
__GLX_SWAP_FLOAT(pc + 4);
__GLX_SWAP_INT(pc + 8);
glSampleMaskSGIS(*(GLfloat *)(pc + 4),
*(GLboolean *)(pc + 8));
return Success;
case X_GLvop_SamplePatternSGIS:
__GLX_SWAP_INT(pc + 4);
glSamplePatternSGIS( *(GLenum *)(pc + 4));
return Success;
}
#endif
if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) &&
(vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) {
(*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req); (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req);

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxerror.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
#ifndef _GLX_error_h_ #ifndef _GLX_error_h_
#define _GLX_error_h_ #define _GLX_error_h_

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.9 2003/09/28 20:15:43 alanh Exp $ /* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.8 2001/08/23 18:25:40 alanh Exp $
** The contents of this file are subject to the GLX Public License Version 1.0 ** The contents of this file are subject to the GLX Public License Version 1.0
** (the "License"). You may not use this file except in compliance with the ** (the "License"). You may not use this file except in compliance with the
** License. You may obtain a copy of the License at Silicon Graphics, Inc., ** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
@ -31,9 +31,6 @@
extern __GLXextensionInfo __glDDXExtensionInfo; extern __GLXextensionInfo __glDDXExtensionInfo;
void GlxWrapInitVisuals(miInitVisualsProcPtr *);
void GlxSetVisualConfigs(int nconfigs,
__GLXvisualConfig *configs, void **privates);
__GLXextensionInfo *__glXExt = &__glDDXExtensionInfo; __GLXextensionInfo *__glXExt = &__glDDXExtensionInfo;

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.7 2003/11/17 22:20:26 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.4 2001/03/21 16:29:36 dawes Exp $ */
#ifndef _glxext_h_ #ifndef _glxext_h_
#define _glxext_h_ #define _glxext_h_
@ -71,7 +71,7 @@ extern GLboolean __glXErrorOccured(void);
extern void __glXResetLargeCommandStatus(__GLXclientState*); extern void __glXResetLargeCommandStatus(__GLXclientState*);
extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc); extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc); extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc);
extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc); extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc); extern int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
@ -80,10 +80,8 @@ extern void GlxExtensionInit(void);
extern Bool __glXCoreType(void); extern Bool __glXCoreType(void);
extern const char GLServerVersion[];
extern int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap);
extern int GlxInitVisuals( extern int GlxInitVisuals(
#if NeedFunctionPrototypes
VisualPtr * visualp, VisualPtr * visualp,
DepthPtr * depthp, DepthPtr * depthp,
int * nvisualp, int * nvisualp,
@ -93,6 +91,7 @@ extern int GlxInitVisuals(
unsigned long sizes, unsigned long sizes,
int bitsPerRGB, int bitsPerRGB,
int preferredVis int preferredVis
#endif
); );
#endif /* _glxext_h_ */ #endif /* _glxext_h_ */

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxfb.c,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxfb.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
#ifndef _glxfb_h_ #ifndef _glxfb_h_
#define _glxfb_h_ #define _glxfb_h_

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.6 2001/10/31 22:50:27 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.7 2002/08/28 06:41:26 torrey Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxmem.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
#ifndef _glxmem_h_ #ifndef _glxmem_h_
#define _glxmem_h_ #define _glxmem_h_

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxpix.c,v 1.3 2000/09/26 15:57:02 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxpix.c,v 1.4 2001/03/21 16:29:36 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxpix.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
#ifndef _glxpix_h_ #ifndef _glxpix_h_
#define _glxpix_h_ #define _glxpix_h_

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.14 2004/02/09 23:46:31 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.10 2002/04/04 14:05:36 eich Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -46,13 +46,11 @@
#include "glxserver.h" #include "glxserver.h"
#include "glxutil.h" #include "glxutil.h"
const char GLServerVersion[] = "1.2";
static const char GLServerExtensions[] = static const char GLServerExtensions[] =
"GL_ARB_depth_texture " "GL_ARB_depth_texture "
"GL_ARB_imaging " "GL_ARB_imaging "
"GL_ARB_multitexture " "GL_ARB_multitexture "
"GL_ARB_point_parameters " "GL_ARB_point_parameters "
"GL_ARB_point_sprite "
"GL_ARB_shadow " "GL_ARB_shadow "
"GL_ARB_shadow_ambient " "GL_ARB_shadow_ambient "
"GL_ARB_texture_border_clamp " "GL_ARB_texture_border_clamp "
@ -110,7 +108,6 @@ static const char GLServerExtensions[] =
"GL_MESA_pack_invert " "GL_MESA_pack_invert "
"GL_MESA_ycbcr_texture " "GL_MESA_ycbcr_texture "
"GL_NV_blend_square " "GL_NV_blend_square "
"GL_NV_point_sprite "
"GL_NV_texgen_reflection " "GL_NV_texgen_reflection "
"GL_NV_texture_rectangle " "GL_NV_texture_rectangle "
"GL_SGIS_generate_mipmap " "GL_SGIS_generate_mipmap "
@ -129,14 +126,10 @@ static const char GLServerExtensions[] =
static char GLXServerVendorName[] = "SGI"; static char GLXServerVendorName[] = "SGI";
static char GLXServerVersion[] = "1.2"; static char GLXServerVersion[] = "1.2";
static char GLXServerExtensions[] = static char GLXServerExtensions[] =
"GLX_ARB_multisample "
"GLX_EXT_visual_info " "GLX_EXT_visual_info "
"GLX_EXT_visual_rating " "GLX_EXT_visual_rating "
"GLX_EXT_import_context " "GLX_EXT_import_context "
"GLX_SGI_make_current_read " "GLX_SGI_make_current_read "
#ifndef __DARWIN__
"GLX_SGIS_multisample "
#endif
; ;
/* /*

View File

@ -1,7 +1,7 @@
#ifndef _GLX_screens_h_ #ifndef _GLX_screens_h_
#define _GLX_screens_h_ #define _GLX_screens_h_
/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.4 2001/03/21 16:29:37 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.5 2002/02/22 21:45:07 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.5 2003/09/28 20:15:43 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.4 2001/08/23 18:25:40 alanh Exp $ */
#ifndef _GLX_server_h_ #ifndef _GLX_server_h_
#define _GLX_server_h_ #define _GLX_server_h_
@ -280,6 +280,5 @@ extern int __glXColorTableParameterfvSize(GLenum pname);
extern int __glXColorTableParameterivSize(GLenum pname); extern int __glXColorTableParameterivSize(GLenum pname);
extern int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap); extern int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap);
extern int __glXPointParameterivReqSize(GLbyte *pc, Bool swap);
#endif /* !__GLX_server_h__ */ #endif /* !__GLX_server_h__ */

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/impsize.h,v 1.4 2003/09/28 20:15:43 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/impsize.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
#ifndef _impsize_h_ #ifndef _impsize_h_
#define _impsize_h_ #define _impsize_h_
@ -67,7 +67,6 @@ extern int __glTexParameterfv_size(GLenum e);
extern int __glTexParameteriv_size(GLenum e); extern int __glTexParameteriv_size(GLenum e);
extern int __glEvalComputeK(GLenum target); extern int __glEvalComputeK(GLenum target);
extern int __glPointParameterfvARB_size(GLenum e); extern int __glPointParameterfvARB_size(GLenum pname);
extern int __glPointParameteriv_size(GLenum e);
#endif /* _impsize_h_ */ #endif /* _impsize_h_ */

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.8 2004/02/03 23:04:08 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -82,25 +82,18 @@ void __glXDisp_Map2f(GLbyte *pc)
void __glXDisp_Map1d(GLbyte *pc) void __glXDisp_Map1d(GLbyte *pc)
{ {
GLint order, k; GLint order, k, compsize;
#ifdef __GLX_ALIGN64
GLint compsize;
#endif
GLenum target; GLenum target;
GLdouble u1, u2, *points; GLdouble u1, u2, *points;
target = *(GLenum*) (pc + 16); target = *(GLenum*) (pc + 16);
order = *(GLint*) (pc + 20); order = *(GLint*) (pc + 20);
k = __glEvalComputeK(target); k = __glEvalComputeK(target);
#ifdef __GLX_ALIGN64
if (order < 0 || k < 0) { if (order < 0 || k < 0) {
compsize = 0; compsize = 0;
} else { } else {
compsize = order * k; compsize = order * k;
} }
#endif
__GLX_GET_DOUBLE(u1,pc); __GLX_GET_DOUBLE(u1,pc);
__GLX_GET_DOUBLE(u2,pc+8); __GLX_GET_DOUBLE(u2,pc+8);
pc += 24; pc += 24;
@ -125,25 +118,18 @@ void __glXDisp_Map1d(GLbyte *pc)
void __glXDisp_Map2d(GLbyte *pc) void __glXDisp_Map2d(GLbyte *pc)
{ {
GLdouble u1, u2, v1, v2, *points; GLdouble u1, u2, v1, v2, *points;
GLint uorder, vorder, ustride, vstride, k; GLint uorder, vorder, ustride, vstride, k, compsize;
#ifdef __GLX_ALIGN64
GLint compsize;
#endif
GLenum target; GLenum target;
target = *(GLenum *)(pc + 32); target = *(GLenum *)(pc + 32);
uorder = *(GLint *)(pc + 36); uorder = *(GLint *)(pc + 36);
vorder = *(GLint *)(pc + 40); vorder = *(GLint *)(pc + 40);
k = __glEvalComputeK(target); k = __glEvalComputeK(target);
#ifdef __GLX_ALIGN64
if (vorder < 0 || uorder < 0 || k < 0) { if (vorder < 0 || uorder < 0 || k < 0) {
compsize = 0; compsize = 0;
} else { } else {
compsize = uorder * vorder * k; compsize = uorder * vorder * k;
} }
#endif
__GLX_GET_DOUBLE(u1,pc); __GLX_GET_DOUBLE(u1,pc);
__GLX_GET_DOUBLE(u2,pc+8); __GLX_GET_DOUBLE(u2,pc+8);
__GLX_GET_DOUBLE(v1,pc+16); __GLX_GET_DOUBLE(v1,pc+16);
@ -234,16 +220,6 @@ void __glXDisp_DrawArrays(GLbyte *pc)
glEnableClientState(GL_EDGE_FLAG_ARRAY); glEnableClientState(GL_EDGE_FLAG_ARRAY);
glEdgeFlagPointer(stride, (const GLboolean *)pc); glEdgeFlagPointer(stride, (const GLboolean *)pc);
break; break;
#ifndef MISSING_GL_EXTS
case GL_SECONDARY_COLOR_ARRAY:
glEnableClientState(GL_SECONDARY_COLOR_ARRAY);
glSecondaryColorPointer(numVals, datatype, stride, pc);
break;
case GL_FOG_COORDINATE_ARRAY:
glEnableClientState(GL_FOG_COORDINATE_ARRAY);
glFogCoordPointer(datatype, stride, pc);
break;
#endif
default: default:
break; break;
} }
@ -260,11 +236,10 @@ void __glXDisp_DrawArrays(GLbyte *pc)
glDisableClientState(GL_INDEX_ARRAY); glDisableClientState(GL_INDEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_EDGE_FLAG_ARRAY); glDisableClientState(GL_EDGE_FLAG_ARRAY);
glDisableClientState(GL_SECONDARY_COLOR_ARRAY);
glDisableClientState(GL_FOG_COORDINATE_ARRAY);
} }
void __glXDisp_DrawArraysEXT(GLbyte *pc) void __glXDisp_DrawArraysEXT(GLbyte *pc)
{ {
__glXDisp_DrawArrays(pc); #ifdef XXX_STUB
#endif /*XXX_STUB*/
} }

View File

@ -386,5 +386,6 @@ void __glXDispSwap_DrawArrays(GLbyte *pc)
void __glXDispSwap_DrawArraysEXT(GLbyte *pc) void __glXDispSwap_DrawArraysEXT(GLbyte *pc)
{ {
__glXDispSwap_DrawArrays(pc); #ifdef XXX_STUB
#endif /*XXX_STUB*/
} }

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/renderpix.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/renderpixswap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.6 2003/09/28 20:15:43 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.5 2002/02/22 21:45:07 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -551,14 +551,12 @@ int __glXDrawArraysSize( GLbyte *pc, Bool swap )
case GL_COLOR_ARRAY: case GL_COLOR_ARRAY:
case GL_TEXTURE_COORD_ARRAY: case GL_TEXTURE_COORD_ARRAY:
break; break;
case GL_SECONDARY_COLOR_ARRAY:
case GL_NORMAL_ARRAY: case GL_NORMAL_ARRAY:
if (numVals != 3) { if (numVals != 3) {
/* bad size */ /* bad size */
return -1; return -1;
} }
break; break;
case GL_FOG_COORDINATE_ARRAY:
case GL_INDEX_ARRAY: case GL_INDEX_ARRAY:
if (numVals != 1) { if (numVals != 1) {
/* bad size */ /* bad size */
@ -920,9 +918,3 @@ int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap )
} }
return 4 * __glPointParameterfvARB_size( pname ); return 4 * __glPointParameterfvARB_size( pname );
} }
int __glXPointParameterivReqSize(GLbyte *pc, Bool swap )
{
/* no difference between fv and iv versions */
return __glXPointParameterfvARBReqSize(pc, swap);
}

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.5 2004/01/28 18:11:53 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -231,7 +231,7 @@ __GLXrenderSizeData __glXRenderSizeTable[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN
/* Translatef */ { 16, 0 }, /* Translatef */ { 16, 0 },
/* Viewport */ { 20, 0 }, /* Viewport */ { 20, 0 },
/* PolygonOffset */ { 12, 0 }, /* PolygonOffset */ { 12, 0 },
/* DrawArrays */ { 16, __glXDrawArraysSize }, /* no such opcode */ { 0, 0 },
/* Indexubv */ { 8, 0 }, /* Indexubv */ { 8, 0 },
/* ColorSubTable */ { 44, __glXColorSubTableReqSize }, /* ColorSubTable */ { 44, __glXColorSubTableReqSize },
/* CopyColorSubTable */ { 24, 0 }, /* CopyColorSubTable */ { 24, 0 },
@ -2342,17 +2342,17 @@ __GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX
/* CopyTexSubImage1D */ { 28, 0 }, /* CopyTexSubImage1D */ { 28, 0 },
/* CopyTexSubImage2D */ { 36, 0 }, /* CopyTexSubImage2D */ { 36, 0 },
/* CopyTexSubImage3D 4123 */ { 40, 0 }, /* CopyTexSubImage3D 4123 */ { 40, 0 },
/* FogCoordfv 4124 */ { 8, 0 }, /* no such opcode */ { 0, 0 },
/* FogCoorddv 4125 */ { 12, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3bv 4126 */ { 8, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3sv 4127 */ { 12, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3iv 4128 */ { 16, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3fv 4129 */ { 16, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3dv 4130 */ { 28, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3ubv 4131 */ { 8, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3usv 4132 */ { 12, 0 }, /* no such opcode */ { 0, 0 },
/* SecondaryColor3uiv 4133 */ { 16, 0 }, /* no such opcode */ { 0, 0 },
/* BlendFuncSeparate 4134 */ { 20, 0 }, /* no such opcode */ { 0, 0 },
/* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 },
/* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 },
/* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 },
@ -2439,6 +2439,4 @@ __GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX
/* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 },
/* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 },
/* ActiveStencilFaceEXT 4220 */ { 8, 0 }, /* ActiveStencilFaceEXT 4220 */ { 8, 0 },
/* PointParameteri 4221 */ { 12, 0 },
/* PointParameteriv 4222 */ { 8, __glXPointParameterivReqSize },
}; };

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.8 2004/02/10 22:54:15 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.6 2001/06/06 19:00:15 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -296,25 +296,16 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string)
return combo_string; return combo_string;
} }
int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc)
{ {
ClientPtr client; ClientPtr client;
__GLXcontext *cx; __GLXcontext *cx;
GLenum name; GLenum name;
const char *string; const char *string;
__GLX_DECLARE_SWAP_VARIABLES;
int error; int error;
char *buf = NULL, *buf1 = NULL; char *buf = NULL, *buf1 = NULL;
GLint length = 0; GLint length = 0;
/* If the client has the opposite byte order, swap the contextTag and
* the name.
*/
if ( need_swap ) {
__GLX_SWAP_INT(pc + 4);
__GLX_SWAP_INT(pc + __GLX_SINGLE_HDR_SIZE);
}
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
if (!cx) { if (!cx) {
return error; return error;
@ -340,32 +331,12 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
} }
string = buf; string = buf;
} }
else if ( name == GL_VERSION ) {
if ( atof( string ) > atof( GLServerVersion ) ) {
buf = __glXMalloc( __glXStrlen( string )
+ __glXStrlen( GLServerVersion )
+ 4 );
if ( buf == NULL ) {
string = GLServerVersion;
}
else {
__glXSprintf( buf, "%s (%s)", GLServerVersion, string );
string = buf;
}
}
}
if (string) { if (string) {
length = __glXStrlen((const char *) string) + 1; length = __glXStrlen((const char *) string) + 1;
} }
__GLX_BEGIN_REPLY(length); __GLX_BEGIN_REPLY(length);
__GLX_PUT_SIZE(length); __GLX_PUT_SIZE(length);
if ( need_swap ) {
__GLX_SWAP_REPLY_SIZE();
__GLX_SWAP_REPLY_HEADER();
}
__GLX_SEND_HEADER(); __GLX_SEND_HEADER();
WriteToClient(client, length, (char *) string); WriteToClient(client, length, (char *) string);
if (buf != NULL) { if (buf != NULL) {
@ -374,11 +345,6 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
return Success; return Success;
} }
int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc)
{
return DoGetString(cl, pc, GL_FALSE);
}
int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
{ {
__GLXcontext *cx; __GLXcontext *cx;

View File

@ -262,7 +262,58 @@ int __glXDispSwap_Finish(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetString(__GLXclientState *cl, GLbyte *pc) int __glXDispSwap_GetString(__GLXclientState *cl, GLbyte *pc)
{ {
return DoGetString(cl, pc, GL_TRUE); ClientPtr client;
__GLXcontext *cx;
GLenum name;
const char *string;
__GLX_DECLARE_SWAP_VARIABLES;
int error;
char *buf = NULL, *buf1 = NULL;
GLint length = 0;
__GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag);
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
__GLX_SWAP_INT(pc + 0);
name = *(GLenum *)(pc + 0);
string = (const char *)glGetString(name);
client = cl->client;
/*
** Restrict extensions to those that are supported by both the
** implementation and the connection. That is, return the
** intersection of client, server, and core extension strings.
*/
if (name == GL_EXTENSIONS) {
buf1 = __glXcombine_strings(string,
cl->GLClientextensions);
buf = __glXcombine_strings(buf1,
cx->pGlxScreen->GLextensions);
if (buf1 != NULL) {
__glXFree(buf1);
}
string = buf;
}
if (string) {
length = __glXStrlen((const char *) string) + 1;
}
__GLX_BEGIN_REPLY(length);
__GLX_PUT_SIZE(length);
__GLX_SWAP_REPLY_SIZE();
__GLX_SWAP_REPLY_HEADER();
__GLX_SEND_HEADER();
WriteToClient(client, length, (char *) string);
if (buf != NULL) {
__glXFree(buf);
}
return Success;
} }
int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc)

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/singlepix.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.6 2001/10/31 22:50:27 tsi Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.7tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.4 2002/02/22 21:45:07 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free
@ -35,7 +35,6 @@
*/ */
#include <GL/gl.h> #include <GL/gl.h>
#include "glxserver.h"
#include "singlesize.h" #include "singlesize.h"
/* /*
@ -50,48 +49,32 @@ GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h)
return __glXImage3DSize( format, type, w, h, 1, 0, 0, 0, 0, 4 ); return __glXImage3DSize( format, type, w, h, 1, 0, 0, 0, 0, 4 );
} }
/**
* Determine the number of data elements that go with the specified \c pname
* to a \c glGetTexEnvfv or \c glGetTexEnviv call.
*
* \todo
* Replace this function with a call to \c __glTexEnvfv_size. Make that there
* aren't any values of \c pname that are valid for one but not the other.
*/
GLint __glGetTexEnvfv_size(GLenum pname) GLint __glGetTexEnvfv_size(GLenum pname)
{ {
switch (pname) { switch (pname) {
case GL_TEXTURE_ENV_MODE: case GL_TEXTURE_ENV_MODE:
case GL_TEXTURE_LOD_BIAS:
case GL_COMBINE_RGB:
case GL_COMBINE_ALPHA:
case GL_SOURCE0_RGB:
case GL_SOURCE1_RGB:
case GL_SOURCE2_RGB:
case GL_SOURCE0_ALPHA:
case GL_SOURCE1_ALPHA:
case GL_SOURCE2_ALPHA:
case GL_OPERAND0_RGB:
case GL_OPERAND1_RGB:
case GL_OPERAND2_RGB:
case GL_OPERAND0_ALPHA:
case GL_OPERAND1_ALPHA:
case GL_OPERAND2_ALPHA:
case GL_RGB_SCALE:
case GL_ALPHA_SCALE:
/* GL_ARB_point_sprite / GL_NV_point_sprite */
case GL_COORD_REPLACE_NV:
/* GL_NV_texture_env_combine4 */
case GL_SOURCE3_RGB_NV:
case GL_SOURCE3_ALPHA_NV:
case GL_OPERAND3_RGB_NV:
case GL_OPERAND3_ALPHA_NV:
return 1; return 1;
case GL_TEXTURE_ENV_COLOR: case GL_TEXTURE_ENV_COLOR:
return 4; return 4;
case GL_TEXTURE_LOD_BIAS_EXT:
return 1;
case GL_COMBINE_RGB_ARB:
case GL_COMBINE_ALPHA_ARB:
case GL_SOURCE0_RGB_ARB:
case GL_SOURCE1_RGB_ARB:
case GL_SOURCE2_RGB_ARB:
case GL_SOURCE0_ALPHA_ARB:
case GL_SOURCE1_ALPHA_ARB:
case GL_SOURCE2_ALPHA_ARB:
case GL_OPERAND0_RGB_ARB:
case GL_OPERAND1_RGB_ARB:
case GL_OPERAND2_RGB_ARB:
case GL_OPERAND0_ALPHA_ARB:
case GL_OPERAND1_ALPHA_ARB:
case GL_OPERAND2_ALPHA_ARB:
case GL_RGB_SCALE_ARB:
case GL_ALPHA_SCALE:
return 1;
default: default:
return -1; return -1;
} }
@ -156,15 +139,6 @@ GLint __glGetTexParameterfv_size(GLenum pname)
case GL_TEXTURE_COMPARE_MODE: case GL_TEXTURE_COMPARE_MODE:
case GL_TEXTURE_COMPARE_FUNC: case GL_TEXTURE_COMPARE_FUNC:
/* GL_SGIS_generate_mipmap / GL 1.4 */
case GL_GENERATE_MIPMAP:
/* GL_ARB_depth_texture / GL 1.4 */
case GL_DEPTH_TEXTURE_MODE:
/* GL_EXT_texture_lod_bias / GL 1.4 */
case GL_TEXTURE_LOD_BIAS:
/* GL_SGIX_shadow_ambient / GL_ARB_shadow_ambient */ /* GL_SGIX_shadow_ambient / GL_ARB_shadow_ambient */
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
@ -176,9 +150,6 @@ GLint __glGetTexParameterfv_size(GLenum pname)
case GL_TEXTURE_MAX_CLAMP_S_SGIX: case GL_TEXTURE_MAX_CLAMP_S_SGIX:
case GL_TEXTURE_MAX_CLAMP_T_SGIX: case GL_TEXTURE_MAX_CLAMP_T_SGIX:
case GL_TEXTURE_MAX_CLAMP_R_SGIX: case GL_TEXTURE_MAX_CLAMP_R_SGIX:
/* GL_EXT_texture_filter_anisotropic */
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
return 1; return 1;
default: default:
@ -862,6 +833,10 @@ GLint __glGet_size(GLenum sq)
case GL_MAX_CONVOLUTION_WIDTH: case GL_MAX_CONVOLUTION_WIDTH:
case GL_MAX_CONVOLUTION_HEIGHT: case GL_MAX_CONVOLUTION_HEIGHT:
return 1; return 1;
case GL_TEXTURE_CUBE_MAP_ARB:
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
return 1;
case GL_OCCLUSION_TEST_RESULT_HP: case GL_OCCLUSION_TEST_RESULT_HP:
case GL_OCCLUSION_TEST_HP: case GL_OCCLUSION_TEST_HP:
return 1; return 1;
@ -871,183 +846,6 @@ GLint __glGet_size(GLenum sq)
return 1; return 1;
case GL_RASTER_POSITION_UNCLIPPED_IBM: case GL_RASTER_POSITION_UNCLIPPED_IBM:
return 1; return 1;
/* GL_ARB_texture_cube_map / GL 1.3 */
case GL_TEXTURE_CUBE_MAP:
case GL_TEXTURE_BINDING_CUBE_MAP:
case GL_MAX_CUBE_MAP_TEXTURE_SIZE:
/* GL_ARB_multisample / GL 1.3 */
case GL_MULTISAMPLE:
case GL_SAMPLE_ALPHA_TO_COVERAGE:
case GL_SAMPLE_ALPHA_TO_ONE:
case GL_SAMPLE_COVERAGE:
case GL_SAMPLE_BUFFERS:
case GL_SAMPLES:
case GL_SAMPLE_COVERAGE_VALUE:
case GL_SAMPLE_COVERAGE_INVERT:
/* GL_ARB_texture_comrpession / GL 1.3 */
case GL_TEXTURE_COMPRESSION_HINT:
case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
/* GL_EXT_blend_func_separate / GL 1.4 */
case GL_BLEND_DST_RGB:
case GL_BLEND_SRC_RGB:
case GL_BLEND_DST_ALPHA:
case GL_BLEND_SRC_ALPHA:
/* GL_EXT_fog_coord / GL 1.4 */
case GL_CURRENT_FOG_COORDINATE:
case GL_FOG_COORDINATE_ARRAY_TYPE:
case GL_FOG_COORDINATE_ARRAY_STRIDE:
case GL_FOG_COORDINATE_ARRAY:
case GL_FOG_COORDINATE_SOURCE:
/* GL_EXT_secondary_color / GL 1.4 */
case GL_COLOR_SUM:
case GL_SECONDARY_COLOR_ARRAY_SIZE:
case GL_SECONDARY_COLOR_ARRAY_TYPE:
case GL_SECONDARY_COLOR_ARRAY_STRIDE:
case GL_SECONDARY_COLOR_ARRAY:
/* GL_EXT_texture_lod_bias / GL 1.4 */
case GL_MAX_TEXTURE_LOD_BIAS:
/* GL_ARB_point_sprite */
case GL_POINT_SPRITE_NV:
/* GL_ARB_vertex_blend */
case GL_MAX_VERTEX_UNITS_ARB:
case GL_ACTIVE_VERTEX_UNITS_ARB:
case GL_WEIGHT_SUM_UNITY_ARB:
case GL_VERTEX_BLEND_ARB:
case GL_CURRENT_WEIGHT_ARB:
case GL_WEIGHT_ARRAY_ARB:
case GL_WEIGHT_ARRAY_TYPE_ARB:
case GL_WEIGHT_ARRAY_STRIDE_ARB:
case GL_WEIGHT_ARRAY_SIZE_ARB:
/* GL_ARB_matrix_palette */
case GL_MATRIX_PALETTE_ARB:
case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB:
case GL_MAX_PALETTE_MATRICES_ARB:
case GL_CURRENT_PALETTE_MATRIX_ARB:
case GL_CURRENT_MATRIX_INDEX_ARB:
case GL_MATRIX_INDEX_ARRAY_ARB:
case GL_MATRIX_INDEX_ARRAY_SIZE_ARB:
case GL_MATRIX_INDEX_ARRAY_TYPE_ARB:
case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB:
/* GL_EXT_clip_volume_hint */
case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
/* GL_EXT_stencil_two_size */
case GL_STENCIL_TEST_TWO_SIDE_EXT:
case GL_ACTIVE_STENCIL_FACE_EXT:
/* GL_EXT_vertex_weighting */
case GL_VERTEX_WEIGHTING_EXT:
case GL_MODELVIEW0_EXT:
case GL_MODELVIEW1_EXT:
case GL_CURRENT_VERTEX_WEIGHT_EXT:
case GL_VERTEX_WEIGHT_ARRAY_EXT:
case GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT:
case GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT:
case GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT:
/* case GL_MODELVIEW0_STACK_DEPTH_EXT: */ /* alias */
case GL_MODELVIEW1_STACK_DEPTH_EXT:
/* GL_ATI_vertex_streams */
case GL_MAX_VERTEX_STREAMS_ATI:
/* GL_NV_depth_clamp */
case GL_DEPTH_CLAMP_NV:
/* GL_NV_fog_distance */
case GL_FOG_DISTANCE_MODE_NV:
/* GL_NV_light_max_exponent */
case GL_MAX_SHININESS_NV:
case GL_MAX_SPOT_EXPONENT_NV:
/* GL_NV_multisample_filter_hint */
case GL_MULTISAMPLE_FILTER_HINT_NV:
/* GL_NV_point_sprite */
/* case GL_POINT_SPRITE_NV: */ /* alias */
case GL_POINT_SPRITE_R_MODE_NV:
/* GL_NV_register_combiners */
case GL_REGISTER_COMBINERS_NV:
case GL_NUM_GENERAL_COMBINERS_NV:
case GL_COLOR_SUM_CLAMP_NV:
case GL_MAX_GENERAL_COMBINERS_NV:
/* GL_NV_register_combiners2 */
case GL_PER_STAGE_CONSTANTS_NV:
/* GL_NV_texture_rectangle */
case GL_TEXTURE_RECTANGLE_NV:
case GL_TEXTURE_BINDING_RECTANGLE_NV:
case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
return 1;
/* GL_EXT_secondary_color / GL 1.4 */
case GL_CURRENT_SECONDARY_COLOR:
/* GL_NV_register_combiners */
case GL_CONSTANT_COLOR0_NV:
case GL_CONSTANT_COLOR1_NV:
return 4;
/* GL_ARB_vertex_blend */
/* case GL_MODELVIEW0_ARB: */ /* alias */
/* case GL_MODELVIEW1_ARB: */ /* alias */
case GL_MODELVIEW2_ARB:
case GL_MODELVIEW3_ARB:
case GL_MODELVIEW4_ARB:
case GL_MODELVIEW5_ARB:
case GL_MODELVIEW6_ARB:
case GL_MODELVIEW7_ARB:
case GL_MODELVIEW8_ARB:
case GL_MODELVIEW9_ARB:
case GL_MODELVIEW10_ARB:
case GL_MODELVIEW11_ARB:
case GL_MODELVIEW12_ARB:
case GL_MODELVIEW13_ARB:
case GL_MODELVIEW14_ARB:
case GL_MODELVIEW15_ARB:
case GL_MODELVIEW16_ARB:
case GL_MODELVIEW17_ARB:
case GL_MODELVIEW18_ARB:
case GL_MODELVIEW19_ARB:
case GL_MODELVIEW20_ARB:
case GL_MODELVIEW21_ARB:
case GL_MODELVIEW22_ARB:
case GL_MODELVIEW23_ARB:
case GL_MODELVIEW24_ARB:
case GL_MODELVIEW25_ARB:
case GL_MODELVIEW26_ARB:
case GL_MODELVIEW27_ARB:
case GL_MODELVIEW28_ARB:
case GL_MODELVIEW29_ARB:
case GL_MODELVIEW30_ARB:
case GL_MODELVIEW31_ARB:
/* GL_EXT_vertex_weighting */
/* case GL_MODELVIEW0_MATRIX_EXT: */ /* alias */
case GL_MODELVIEW1_MATRIX_EXT:
return 32;
/* GL_ARB_texture_comrpession / GL 1.3 */
case GL_COMPRESSED_TEXTURE_FORMATS: {
GLint temp;
glGetIntegerv( GL_NUM_COMPRESSED_TEXTURE_FORMATS, & temp );
return temp;
}
default: default:
return -1; return -1;
} }
@ -1087,15 +885,7 @@ GLint __glGetTexLevelParameterfv_size(GLenum pname)
case GL_TEXTURE_ALPHA_SIZE: case GL_TEXTURE_ALPHA_SIZE:
case GL_TEXTURE_LUMINANCE_SIZE: case GL_TEXTURE_LUMINANCE_SIZE:
case GL_TEXTURE_INTENSITY_SIZE: case GL_TEXTURE_INTENSITY_SIZE:
/* GL_ARB_texture_compression / GL 1.3 */
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
case GL_TEXTURE_COMPRESSED:
/* GL_ARB_depth_texture / GL 1.4 */
case GL_TEXTURE_DEPTH_SIZE:
return 1; return 1;
default: default:
return -1; return -1;
} }

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/singlesize.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
#ifndef _singlesize_h_ #ifndef _singlesize_h_
#define _singlesize_h_ #define _singlesize_h_

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.4 2002/01/14 22:47:08 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.5 2002/10/30 12:52:03 alanh Exp $ */
#ifndef __GLX_unpack_h__ #ifndef __GLX_unpack_h__
#define __GLX_unpack_h__ #define __GLX_unpack_h__

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/GL/glx/xfont.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,7 +1,7 @@
#ifndef _glx_ansic_h_ #ifndef _glx_ansic_h_
#define _glx_ansic_h_ #define _glx_ansic_h_
/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.5 2001/03/21 20:49:08 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.7 2002/04/04 14:05:36 eich Exp $ */
/* /*
** License Applicability. Except to the extent portions of this file are ** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free ** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/include/GL/xf86glx.h,v 1.3 1999/06/14 07:31:41 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/GL/include/GL/xf86glx.h,v 1.4 2000/02/23 04:46:54 martin Exp $ */
/************************************************************************** /**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.5 2000/02/23 04:46:55 martin Exp $ */ /* $XFree86: xc/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c,v 1.1 2002/02/25 00:45:41 dawes Exp $ */
/************************************************************************** /**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@ -42,7 +42,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING, MODULEVENDORSTRING,
MODINFOSTRING1, MODINFOSTRING1,
MODINFOSTRING2, MODINFOSTRING2,
XORG_VERSION_CURRENT, XF86_VERSION_CURRENT,
1, 0, 0, 1, 0, 0,
ABI_CLASS_EXTENSION, ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION, ABI_EXTENSION_VERSION,

View File

@ -1222,7 +1222,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING, MODULEVENDORSTRING,
MODINFOSTRING1, MODINFOSTRING1,
MODINFOSTRING2, MODINFOSTRING2,
XORG_VERSION_CURRENT, XF86_VERSION_CURRENT,
1, 0, 0, 1, 0, 0,
ABI_CLASS_EXTENSION, ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION, ABI_EXTENSION_VERSION,

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.39 2003/11/10 18:21:41 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.38 2002/11/20 18:10:24 dawes Exp $ */
/************************************************************************** /**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@ -1191,8 +1191,8 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
if (x0 < 0) x0 = 0; if (x0 < 0) x0 = 0;
if (y0 < 0) y0 = 0; if (y0 < 0) y0 = 0;
if (x1 > pScreen->width) x1 = pScreen->width; if (x1 > pScreen->width-1) x1 = pScreen->width-1;
if (y1 > pScreen->height) y1 = pScreen->height; if (y1 > pScreen->height-1) y1 = pScreen->height-1;
pDRIPriv->private_buffer_rect.x1 = x0; pDRIPriv->private_buffer_rect.x1 = x0;
pDRIPriv->private_buffer_rect.y1 = y0; pDRIPriv->private_buffer_rect.y1 = y0;
@ -1557,7 +1557,7 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
if(pDRIPriv->nrWindows > 0) { if(pDRIPriv->nrWindows > 0) {
RegionRec reg; RegionRec reg;
REGION_NULL(pScreen, &reg); REGION_INIT(pScreen, &reg, NullBox, 0);
TraverseTree(pWin, DRITreeTraversal, (pointer)(&reg)); TraverseTree(pWin, DRITreeTraversal, (pointer)(&reg));
if(REGION_NOTEMPTY(pScreen, &reg)) { if(REGION_NOTEMPTY(pScreen, &reg)) {

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.19 2002/10/30 12:52:03 alanh Exp $ */
/************************************************************************** /**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.

View File

@ -1,4 +1,3 @@
/* $XdotOrg$ */
/************************************************************************** /**************************************************************************
Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@ -25,7 +24,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/ **************************************************************************/
/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.5 2001/06/15 21:22:39 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.6 2001/12/10 19:07:19 dawes Exp $ */
/* /*
* Authors: * Authors:
@ -44,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING, MODULEVENDORSTRING,
MODINFOSTRING1, MODINFOSTRING1,
MODINFOSTRING2, MODINFOSTRING2,
XORG_VERSION_CURRENT, XF86_VERSION_CURRENT,
1, 0, 0, 1, 0, 0,
ABI_CLASS_EXTENSION, ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION, ABI_EXTENSION_VERSION,

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.12 2002/10/30 12:52:03 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.13 2002/11/20 18:10:24 dawes Exp $ */
/************************************************************************** /**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
/** /**
* \file sarea.h * \file sarea.h
* SAREA definitions. * SAREA definitions.

View File

@ -241,7 +241,7 @@ ProcXF86DRIAuthConnection(
rep.authenticated = 1; rep.authenticated = 1;
if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) { if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) {
ErrorF("Failed to authenticate %lu\n", (unsigned long)stuff->magic); ErrorF("Failed to authenticate %u\n", stuff->magic);
rep.authenticated = 0; rep.authenticated = 0;
} }
WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep); WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep);

View File

@ -497,7 +497,7 @@ xf86cos(double x)
$XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.9 2001/07/23 13:15:48 dawes Exp $ $XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.10 2001/12/17 20:00:45 dawes Exp $

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.6 2003/12/30 15:18:30 herrb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.5 2003/04/03 16:50:04 dawes Exp $ */
/* /*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org> * Copyright 1993 by David Wexelblat <dwex@goblin.org>
@ -117,13 +117,11 @@ has_bwx(void)
#endif #endif
} }
#else /* __NetBSD__ */ #else /* __NetBSD__ */
static unsigned long hae_thresh = (1UL << 24);
static unsigned long hae_mask = 0xf8000000UL; /* XXX - should use xf86AXP.c */
static struct alpha_bus_window *abw; static struct alpha_bus_window *abw;
static int abw_count = -1; static int abw_count = -1;
static void static void
init_abw(void) init_abw()
{ {
if (abw_count < 0) { if (abw_count < 0) {
abw_count = alpha_bus_getwindows(ALPHA_BUS_TYPE_PCI_MEM, &abw); abw_count = alpha_bus_getwindows(ALPHA_BUS_TYPE_PCI_MEM, &abw);
@ -144,7 +142,7 @@ has_bwx(void)
} }
static unsigned long static unsigned long
dense_base(void) dense_base()
{ {
if (abw_count < 0) if (abw_count < 0)
init_abw(); init_abw();
@ -156,7 +154,7 @@ dense_base(void)
} }
static unsigned long static unsigned long
memory_base(void) memory_base()
{ {
if (abw_count < 0) if (abw_count < 0)
init_abw(); init_abw();
@ -286,13 +284,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
xf86Msg(X_PROBED,"Machine needs sparse mapping\n"); xf86Msg(X_PROBED,"Machine needs sparse mapping\n");
pVidMem->mapMem = mapVidMemSparse; pVidMem->mapMem = mapVidMemSparse;
pVidMem->unmapMem = unmapVidMemSparse; pVidMem->unmapMem = unmapVidMemSparse;
#ifndef __NetBSD__
if (axpSystem == -1) if (axpSystem == -1)
axpSystem = bsdGetAXP(); axpSystem = bsdGetAXP();
hae_thresh = xf86AXPParams[axpSystem].hae_thresh; hae_thresh = xf86AXPParams[axpSystem].hae_thresh;
hae_mask = xf86AXPParams[axpSystem].hae_mask; hae_mask = xf86AXPParams[axpSystem].hae_mask;
sparse_size = xf86AXPParams[axpSystem].size; sparse_size = xf86AXPParams[axpSystem].size;
#endif /* __NetBSD__ */
} }
pVidMem->initialised = TRUE; pVidMem->initialised = TRUE;
} }
@ -318,7 +314,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX); MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX);
if (base == MAP_FAILED) if (base == MAP_FAILED)
{ {
FatalError("%s: could not mmap %s [s=%lx,a=%lx] (%s)\n", FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
"xf86MapVidMem", DEV_MEM, Size, Base, "xf86MapVidMem", DEV_MEM, Size, Base,
strerror(errno)); strerror(errno));
} }
@ -328,7 +324,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
/* else, mmap /dev/vga */ /* else, mmap /dev/vga */
if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000) if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000)
{ {
FatalError("%s: Address 0x%lx outside allowable range\n", FatalError("%s: Address 0x%x outside allowable range\n",
"xf86MapVidMem", Base); "xf86MapVidMem", Base);
} }
base = mmap(0, Size, base = mmap(0, Size,
@ -376,7 +372,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if ((long)ptr == -1) if ((long)ptr == -1)
{ {
xf86Msg(X_WARNING, xf86Msg(X_WARNING,
"xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n", "xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
DEV_MEM, Len, Base, Offset, strerror(errno)); DEV_MEM, Len, Base, Offset, strerror(errno));
return(-1); return(-1);
} }
@ -494,7 +490,6 @@ struct parms {
u_int64_t hae; u_int64_t hae;
}; };
#ifndef __NetBSD__
static int static int
sethae(u_int64_t hae) sethae(u_int64_t hae)
{ {
@ -510,7 +505,6 @@ sethae(u_int64_t hae)
return -1; return -1;
#endif #endif
} }
#endif /* __NetBSD__ */
static pointer static pointer
mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags) mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
@ -559,6 +553,7 @@ readSparse8(pointer Base, register unsigned long Offset)
{ {
register unsigned long result, shift; register unsigned long result, shift;
register unsigned long msb; register unsigned long msb;
mem_barrier(); mem_barrier();
Offset += (unsigned long)Base - (unsigned long)memBase; Offset += (unsigned long)Base - (unsigned long)memBase;
shift = (Offset & 0x3) << 3; shift = (Offset & 0x3) << 3;
@ -566,12 +561,11 @@ readSparse8(pointer Base, register unsigned long Offset)
msb = Offset & hae_mask; msb = Offset & hae_mask;
Offset -= msb; Offset -= msb;
if (msb_set != msb) { if (msb_set != msb) {
#ifndef __NetBSD__
sethae(msb); sethae(msb);
#endif
msb_set = msb; msb_set = msb;
} }
} }
result = *(vuip) ((unsigned long)memSBase + (Offset << 5)); result = *(vuip) ((unsigned long)memSBase + (Offset << 5));
result >>= shift; result >>= shift;
return 0xffUL & result; return 0xffUL & result;
@ -590,9 +584,7 @@ readSparse16(pointer Base, register unsigned long Offset)
msb = Offset & hae_mask; msb = Offset & hae_mask;
Offset -= msb; Offset -= msb;
if (msb_set != msb) { if (msb_set != msb) {
#ifndef __NetBSD__
sethae(msb); sethae(msb);
#endif
msb_set = msb; msb_set = msb;
} }
} }
@ -620,9 +612,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask; msb = Offset & hae_mask;
Offset -= msb; Offset -= msb;
if (msb_set != msb) { if (msb_set != msb) {
#ifndef __NetBSD__
sethae(msb); sethae(msb);
#endif
msb_set = msb; msb_set = msb;
} }
} }
@ -641,9 +631,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask; msb = Offset & hae_mask;
Offset -= msb; Offset -= msb;
if (msb_set != msb) { if (msb_set != msb) {
#ifndef __NetBSD__
sethae(msb); sethae(msb);
#endif
msb_set = msb; msb_set = msb;
} }
} }
@ -671,9 +659,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask; msb = Offset & hae_mask;
Offset -= msb; Offset -= msb;
if (msb_set != msb) { if (msb_set != msb) {
#ifndef __NetBSD__
sethae(msb); sethae(msb);
#endif
msb_set = msb; msb_set = msb;
} }
} }
@ -691,9 +677,7 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
msb = Offset & hae_mask ; msb = Offset & hae_mask ;
Offset -= msb; Offset -= msb;
if (msb_set != msb) { if (msb_set != msb) {
#ifndef __NetBSD__
sethae(msb); sethae(msb);
#endif
msb_set = msb; msb_set = msb;
} }
} }

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.1tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.2 2003/03/14 13:46:03 tsi Exp $ */
/* /*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org> * Copyright 1993 by David Wexelblat <dwex@goblin.org>

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.6 2001/02/16 14:45:10 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.8 2002/05/22 21:38:29 herrb Exp $ */
/* Resource information code */ /* Resource information code */
@ -18,7 +18,7 @@ resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
#ifdef INCLUDE_XF86_NO_DOMAIN #ifdef INCLUDE_XF86_NO_DOMAIN
#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) #if defined(__alpha__) || defined(__sparc64__)
resPtr resPtr
xf86BusAccWindowsFromOS(void) xf86BusAccWindowsFromOS(void)

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_KbdMap.c,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
/* /*
* Slightly modified xf86KbdBSD.c which is * Slightly modified xf86KbdBSD.c which is

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c,v 3.5.4.3 1998/06/05 16:23:03 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c,v 3.6 1998/07/25 16:56:33 dawes Exp $ */
/* /*
* Derived from VTsw_usl.c which is * Derived from VTsw_usl.c which is
* Copyright 1993 by David Wexelblat <dwex@goblin.org> * Copyright 1993 by David Wexelblat <dwex@goblin.org>

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_apm.c,v 1.1 2000/02/29 03:09:25 dawes Exp $ */
#include "X.h" #include "X.h"
#include "os.h" #include "os.h"

View File

@ -1,4 +1,4 @@
/* $XFree86: bsd_axp.c,v 1.2 2002/10/29 23:19:13 herrb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c,v 1.2 2002/10/29 23:19:13 herrb Exp $ */
#include "X.h" #include "X.h"
#include "os.h" #include "os.h"
@ -23,9 +23,9 @@ axpDevice bsdGetAXP(void);
typedef struct { typedef struct {
char *name; char *name;
int type; int type;
} _AXP; } AXP;
static _AXP axpList[] = { static AXP axpList[] = {
{"apecs",APECS}, {"apecs",APECS},
{"pyxis",PYXIS}, {"pyxis",PYXIS},
{"cia",CIA}, {"cia",CIA},

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_ev56.c,v 1.1 2000/03/05 16:59:17 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_ev56.c,v 1.2 2001/02/27 23:05:00 alanh Exp $ */
#include "X.h" #include "X.h"
#include "input.h" #include "input.h"

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.21 2003/09/24 02:43:34 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.20 2003/06/30 16:52:57 eich Exp $ */
/* /*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org> * Copyright 1993 by David Wexelblat <dwex@goblin.org>
@ -160,7 +160,7 @@ xf86OpenConsole()
/* check if we are run with euid==0 */ /* check if we are run with euid==0 */
if (geteuid() != 0) if (geteuid() != 0)
{ {
FatalError("xf86OpenConsole: Server must be suid root"); FatalError("xf86OpenConsole: Server must be suid root\n");
} }
if (!KeepTty) if (!KeepTty)
@ -198,7 +198,7 @@ xf86OpenConsole()
strcat(cons_drivers, supported_drivers[i]); strcat(cons_drivers, supported_drivers[i]);
} }
FatalError( FatalError(
"%s: No console driver found\n\tSupported drivers: %s\n\t%s", "%s: No console driver found\n\tSupported drivers: %s\n\t%s\n",
"xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG); "xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
} }
#if 0 /* stdin is already closed in OsInit() */ #if 0 /* stdin is already closed in OsInit() */
@ -213,7 +213,7 @@ xf86OpenConsole()
case PCCONS: case PCCONS:
if (ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0) if (ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0)
{ {
FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s", FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s\n",
"xf86OpenConsole", strerror(errno), "xf86OpenConsole", strerror(errno),
CHECK_DRIVER_MSG); CHECK_DRIVER_MSG);
} }
@ -282,18 +282,18 @@ acquire_vt:
vtmode.frsig = SIGUSR1; vtmode.frsig = SIGUSR1;
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0) if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0)
{ {
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed"); FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
} }
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) #if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0) if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
{ {
FatalError("xf86OpenConsole: KDENABIO failed (%s)", FatalError("xf86OpenConsole: KDENABIO failed (%s)\n",
strerror(errno)); strerror(errno));
} }
#endif #endif
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
{ {
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed"); FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
} }
break; break;
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
@ -337,7 +337,7 @@ xf86OpenPccons()
if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0) if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0)
{ {
FatalError( FatalError(
"%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s", "%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s\n",
"xf86OpenPccons", "xf86OpenPccons",
strerror(errno), strerror(errno),
"Was expecting pccons driver with X support", "Was expecting pccons driver with X support",
@ -427,11 +427,11 @@ xf86OpenSyscons()
{ {
if (syscons_version >= 0x100) if (syscons_version >= 0x100)
{ {
FatalError("%s: Cannot find a free VT", FatalError("%s: Cannot find a free VT\n",
"xf86OpenSyscons"); "xf86OpenSyscons");
} }
/* Should no longer reach here */ /* Should no longer reach here */
FatalError("%s: %s %s\n\t%s %s", FatalError("%s: %s %s\n\t%s %s\n",
"xf86OpenSyscons", "xf86OpenSyscons",
"syscons versions prior to 1.0 require", "syscons versions prior to 1.0 require",
"either the", "either the",
@ -450,18 +450,18 @@ xf86OpenSyscons()
#endif #endif
if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0) if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
{ {
FatalError("xf86OpenSyscons: Cannot open %s (%s)", FatalError("xf86OpenSyscons: Cannot open %s (%s)\n",
vtname, strerror(errno)); vtname, strerror(errno));
} }
if (ioctl(fd, VT_GETMODE, &vtmode) < 0) if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{ {
FatalError("xf86OpenSyscons: VT_GETMODE failed"); FatalError("xf86OpenSyscons: VT_GETMODE failed\n");
} }
xf86Info.consType = SYSCONS; xf86Info.consType = SYSCONS;
xf86Msg(X_PROBED, "Using syscons driver with X support"); xf86Msg(X_PROBED, "Using syscons driver with X support");
if (syscons_version >= 0x100) if (syscons_version >= 0x100)
{ {
xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8, xf86ErrorF(" (version %d.%d)\n", syscons_version >> 8,
syscons_version & 0xFF); syscons_version & 0xFF);
} }
else else
@ -515,7 +515,7 @@ xf86OpenPcvt()
{ {
if(ioctl(fd, VT_GETMODE, &vtmode) < 0) if(ioctl(fd, VT_GETMODE, &vtmode) < 0)
{ {
FatalError("%s: VT_GETMODE failed\n%s%s\n%s", FatalError("%s: VT_GETMODE failed\n%s%s\n%s\n",
"xf86OpenPcvt", "xf86OpenPcvt",
"Found pcvt driver but X11 seems to be", "Found pcvt driver but X11 seems to be",
" not supported.", CHECK_DRIVER_MSG); " not supported.", CHECK_DRIVER_MSG);
@ -554,7 +554,7 @@ xf86OpenPcvt()
} }
else else
{ {
FatalError("%s: Cannot find a free VT", FatalError("%s: Cannot find a free VT\n",
"xf86OpenPcvt"); "xf86OpenPcvt");
} }
} }
@ -564,12 +564,12 @@ xf86OpenPcvt()
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1); sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
{ {
FatalError("xf86OpenPcvt: Cannot open %s (%s)", FatalError("xf86OpenPcvt: Cannot open %s (%s)\n",
vtname, strerror(errno)); vtname, strerror(errno));
} }
if (ioctl(fd, VT_GETMODE, &vtmode) < 0) if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{ {
FatalError("xf86OpenPcvt: VT_GETMODE failed"); FatalError("xf86OpenPcvt: VT_GETMODE failed\n");
} }
xf86Info.consType = PCVT; xf86Info.consType = PCVT;
#ifdef WSCONS_SUPPORT #ifdef WSCONS_SUPPORT
@ -616,7 +616,7 @@ xf86OpenWScons()
} }
if (fd != -1) { if (fd != -1) {
if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) { if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) {
FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s", FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s\n",
"xf86OpenConsole", strerror(errno), "xf86OpenConsole", strerror(errno),
CHECK_DRIVER_MSG); CHECK_DRIVER_MSG);
} }
@ -654,7 +654,7 @@ xf86CloseConsole()
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) #if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0) if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
{ {
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)", xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)\n",
strerror(errno)); strerror(errno));
} }
#endif #endif
@ -678,7 +678,7 @@ xf86CloseConsole()
close(xf86Info.consoleFd); close(xf86Info.consoleFd);
if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0) if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0)
{ {
xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)", xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)\n",
strerror(errno)); strerror(errno));
} }
} }

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_io.c,v 3.22 2002/05/18 21:15:16 herrb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_io.c,v 3.23 2002/10/21 20:38:04 herrb Exp $ */
/* /*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Dawes <dawes@xfree86.org> * Copyright 1993 by David Dawes <dawes@xfree86.org>

View File

@ -23,7 +23,7 @@
/* Modified for FreeBSD by David Dawes <dawes@XFree86.org> */ /* Modified for FreeBSD by David Dawes <dawes@XFree86.org> */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_jstk.c,v 3.7 1998/07/25 16:56:34 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_jstk.c,v 3.8 2002/08/06 13:20:47 herrb Exp $ */
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.8 2003/11/04 03:16:58 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.6 2003/06/30 16:52:57 eich Exp $ */
/* /*
* Copyright (c) 2002 by The XFree86 Project, Inc. * Copyright (c) 2002 by The XFree86 Project, Inc.
@ -33,7 +33,7 @@ static KbdProtocolRec protocols[] = {
#ifdef WSCONS_SUPPORT #ifdef WSCONS_SUPPORT
{"wskbd", PROT_WSCONS }, {"wskbd", PROT_WSCONS },
#endif #endif
{ NULL, PROT_UNKNOWN_KBD } { NULL, PROT_UNKNOWN }
}; };
typedef struct { typedef struct {
@ -408,7 +408,7 @@ OpenKeyboard(InputInfoPtr pInfo)
{ {
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private; KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
int i; int i;
KbdProtocolId prot = PROT_UNKNOWN_KBD; KbdProtocolId prot = PROT_UNKNOWN;
char *s; char *s;
s = xf86SetStrOption(pInfo->options, "Protocol", NULL); s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
@ -497,7 +497,7 @@ OpenKeyboard(InputInfoPtr pInfo)
#endif #endif
default: default:
xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"", xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",
pInfo->name, pKbd->wsKbdType); pKbd->wsKbdType, pInfo->name);
close(pInfo->fd); close(pInfo->fd);
return FALSE; return FALSE;
} }

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.h,v 1.1 2002/10/11 01:40:34 dawes Exp $ */
extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms, extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap); CARD8 *pModMap);

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kmod.c,v 3.2 2002/11/29 17:47:24 tsi Exp $ */
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>

View File

@ -1,30 +1,7 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v 1.28 2004/02/06 17:15:36 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v 1.24 2003/02/15 05:37:59 paulo Exp $ */
/* /*
* Copyright (c) 1999-2003 by The XFree86 Project, Inc. * Copyright 1999 by The XFree86 Project, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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.
*
* Except as contained in this notice, the name of the copyright holder(s)
* and author(s) shall not be used in advertising or otherwise to promote
* the sale, use or other dealings in this Software without prior written
* authorization from the copyright holder(s) and author(s).
*/ */
#include "X.h" #include "X.h"
@ -68,30 +45,6 @@
static void usbSigioReadInput (int fd, void *closure); static void usbSigioReadInput (int fd, void *closure);
#endif #endif
#if defined(__FreeBSD__)
/* These are for FreeBSD */
#define DEFAULT_MOUSE_DEV "/dev/mouse"
#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse"
#define DEFAULT_PS2_DEV "/dev/psm0"
static const char *mouseDevs[] = {
DEFAULT_MOUSE_DEV,
DEFAULT_SYSMOUSE_DEV,
DEFAULT_PS2_DEV,
NULL
};
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
/* Only wsmouse mices are autoconfigured for now on OpenBSD */
#define DEFAULT_WSMOUSE_DEV "/dev/wsmouse"
#define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0"
static const char *mouseDevs[] = {
DEFAULT_WSMOUSE_DEV,
DEFAULT_WSMOUSE0_DEV,
NULL
};
#endif
static int static int
SupportedInterfaces(void) SupportedInterfaces(void)
{ {
@ -151,8 +104,6 @@ DefaultProtocol(void)
{ {
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
return "Auto"; return "Auto";
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
return "WSMouse";
#else #else
return NULL; return NULL;
#endif #endif
@ -245,142 +196,7 @@ SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
} }
#endif #endif
#if defined(__FreeBSD__) #if defined(WSCONS_SUPPORT)
#define MOUSED_PID_FILE "/var/run/moused.pid"
/*
* Try to check if moused is running. DEFAULT_SYSMOUSE_DEV is useless without
* it. There doesn't seem to be a better way of checking.
*/
static Bool
MousedRunning(void)
{
FILE *f = NULL;
unsigned int pid;
if ((f = fopen(MOUSED_PID_FILE, "r")) != NULL) {
if (fscanf(f, "%u", &pid) == 1 && pid > 0) {
if (kill(pid, 0) == 0) {
fclose(f);
return TRUE;
}
}
fclose(f);
}
return FALSE;
}
static const char *
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
{
int fd = -1;
const char **pdev, *dev = NULL;
Bool devMouse = FALSE;
struct stat devMouseStat;
struct stat sb;
for (pdev = mouseDevs; *pdev; pdev++) {
SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK));
if (fd == -1) {
#ifdef DEBUG
ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno));
#endif
} else {
/*
* /dev/mouse is held until checks for matches with other devices
* are done. This is so that when it points to /dev/sysmouse,
* the test for whether /dev/sysmouse is usable can be made.
*/
if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) {
if (fstat(fd, &devMouseStat) == 0)
devMouse = TRUE;
close(fd);
continue;
} else if (!strcmp(*pdev, DEFAULT_SYSMOUSE_DEV)) {
/* Check if /dev/mouse is the same as /dev/sysmouse. */
if (devMouse && fstat(fd, &sb) == 0 &&
devMouseStat.st_dev == sb.st_dev &&
devMouseStat.st_ino == sb.st_ino) {
/* If the same, use /dev/sysmouse. */
devMouse = FALSE;
}
close(fd);
if (MousedRunning())
break;
else {
#ifdef DEBUG
ErrorF("moused isn't running\n");
#endif
}
} else {
close(fd);
break;
}
}
}
if (*pdev)
dev = *pdev;
else if (devMouse)
dev = DEFAULT_MOUSE_DEV;
if (dev) {
/* Set the Device option. */
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", dev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, dev);
}
return *pdev;
}
#endif
#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
/* Only support wsmouse configuration for now */
static const char *
SetupAuto(InputInfoPtr pInfo, int *protoPara)
{
xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n",
pInfo->name, "wsmouse");
return "wsmouse";
}
static void
SetMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
{
xf86MsgVerb(X_INFO, 3, "%s: SetMouseRes: protocol %s rate %d res %d\n",
pInfo->name, protocol, rate, res);
}
static const char *
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
{
int fd = -1;
const char **pdev;
for (pdev = mouseDevs; *pdev; pdev++) {
SYSCALL(fd = open(*pdev, O_RDWR | O_NONBLOCK));
if (fd != -1) {
/* Set the Device option. */
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions,
"Device", *pdev);
xf86Msg(X_INFO, "%s: found Device \"%s\"\n",
pInfo->name, *pdev);
close(fd);
break;
}
}
return *pdev;
}
#endif /* __OpenBSD__ && WSCONS_SUPPORT */
#ifdef WSCONS_SUPPORT
#define NUMEVENTS 64 #define NUMEVENTS 64
static void static void
@ -686,11 +502,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
#ifdef USB_NEW_HID #ifdef USB_NEW_HID
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) { hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) {
xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name); xf86Msg(X_WARNING, "%s: no x locator\n");
} }
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) { hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) {
xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name); xf86Msg(X_WARNING, "%s: no y locator\n");
} }
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) { hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) {
@ -698,11 +514,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
#else #else
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
hid_input, &pUsbMse->loc_x) < 0) { hid_input, &pUsbMse->loc_x) < 0) {
xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name); xf86Msg(X_WARNING, "%s: no x locator\n");
} }
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
hid_input, &pUsbMse->loc_y) < 0) { hid_input, &pUsbMse->loc_y) < 0) {
xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name); xf86Msg(X_WARNING, "%s: no y locator\n");
} }
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
hid_input, &pUsbMse->loc_z) < 0) { hid_input, &pUsbMse->loc_z) < 0) {
@ -772,13 +588,6 @@ xf86OSMouseInit(int flags)
p->SetPS2Res = SetSysMouseRes; p->SetPS2Res = SetSysMouseRes;
p->SetBMRes = SetSysMouseRes; p->SetBMRes = SetSysMouseRes;
p->SetMiscRes = SetSysMouseRes; p->SetMiscRes = SetSysMouseRes;
#endif
#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
p->SetupAuto = SetupAuto;
p->SetMiscRes = SetMouseRes;
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__)
p->FindDevice = FindDevice;
#endif #endif
p->PreInit = bsdMousePreInit; p->PreInit = bsdMousePreInit;
return p; return p;

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c,v 1.4 2003/09/24 02:43:34 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c,v 1.3 2003/03/14 13:46:03 tsi Exp $ */
/* /*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org> * Copyright 1993 by David Wexelblat <dwex@goblin.org>
@ -62,11 +62,11 @@
#ifdef __OpenBSD__ #ifdef __OpenBSD__
#define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\ #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
"\tin /etc/sysctl.conf and reboot your machine\n" \ "\tin /etc/sysctl.conf and reboot your machine\n" \
"\trefer to xf86(4) for details" "\trefer to xf86(4) for details\n"
#define SYSCTL_MSG2 \ #define SYSCTL_MSG2 \
"Check that you have set 'machdep.allowaperture=2'\n" \ "Check that you have set 'machdep.allowaperture=2'\n" \
"\tin /etc/sysctl.conf and reboot your machine\n" \ "\tin /etc/sysctl.conf and reboot your machine\n" \
"\trefer to xf86(4) for details" "\trefer to xf86(4) for details\n"
#endif #endif
/***************************************************************************/ /***************************************************************************/
@ -220,7 +220,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{ {
if (devMemFd < 0) if (devMemFd < 0)
{ {
FatalError("xf86MapVidMem: failed to open %s (%s)", FatalError("xf86MapVidMem: failed to open %s (%s)\n",
DEV_MEM, strerror(errno)); DEV_MEM, strerror(errno));
} }
base = mmap((caddr_t)0, Size, base = mmap((caddr_t)0, Size,
@ -229,7 +229,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
MAP_FLAGS, devMemFd, (off_t)Base); MAP_FLAGS, devMemFd, (off_t)Base);
if (base == MAP_FAILED) if (base == MAP_FAILED)
{ {
FatalError("%s: could not mmap %s [s=%lx,a=%lx] (%s)", FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
"xf86MapVidMem", DEV_MEM, Size, Base, "xf86MapVidMem", DEV_MEM, Size, Base,
strerror(errno)); strerror(errno));
} }
@ -239,7 +239,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
/* else, mmap /dev/vga */ /* else, mmap /dev/vga */
if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000) if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000)
{ {
FatalError("%s: Address 0x%lx outside allowable range", FatalError("%s: Address 0x%x outside allowable range\n",
"xf86MapVidMem", Base); "xf86MapVidMem", Base);
} }
base = mmap(0, Size, base = mmap(0, Size,
@ -250,7 +250,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
); );
if (base == MAP_FAILED) if (base == MAP_FAILED)
{ {
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)", FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
strerror(errno)); strerror(errno));
} }
return(base); return(base);
@ -288,7 +288,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if ((long)ptr == -1) if ((long)ptr == -1)
{ {
xf86Msg(X_WARNING, xf86Msg(X_WARNING,
"xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n", "xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
DEV_MEM, Len, Base, Offset, strerror(errno)); DEV_MEM, Len, Base, Offset, strerror(errno));
#ifdef __OpenBSD__ #ifdef __OpenBSD__
if (Base < 0xa0000) { if (Base < 0xa0000) {
@ -328,7 +328,7 @@ xf86EnableIO()
if (i386_iopl(TRUE) < 0) if (i386_iopl(TRUE) < 0)
{ {
#ifndef __OpenBSD__ #ifndef __OpenBSD__
FatalError("%s: Failed to set IOPL for extended I/O", FatalError("%s: Failed to set IOPL for extended I/O\n",
"xf86EnableIO"); "xf86EnableIO");
#else #else
FatalError("%s: Failed to set IOPL for extended I/O\n%s", FatalError("%s: Failed to set IOPL for extended I/O\n%s",
@ -366,7 +366,7 @@ xf86EnableIO()
if ((IoFd = open("/dev/io", O_RDWR)) == -1) if ((IoFd = open("/dev/io", O_RDWR)) == -1)
{ {
FatalError("xf86EnableIO: " FatalError("xf86EnableIO: "
"Failed to open /dev/io for extended I/O"); "Failed to open /dev/io for extended I/O\n");
} }
return; return;
} }
@ -439,7 +439,7 @@ xf86SetTVOut(int mode)
#endif /* PCCONS_SUPPORT */ #endif /* PCCONS_SUPPORT */
default: default:
FatalError("Xf86SetTVOut: Unsupported console"); FatalError("Xf86SetTVOut: Unsupported console\n");
break; break;
} }
return; return;
@ -464,7 +464,7 @@ xf86SetRGBOut()
#endif /* PCCONS_SUPPORT */ #endif /* PCCONS_SUPPORT */
default: default:
FatalError("Xf86SetTVOut: Unsupported console"); FatalError("Xf86SetTVOut: Unsupported console\n");
break; break;
} }
return; return;

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/data.c,v 1.1.2.2 1999/12/03 10:12:41 hohndel Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/data.c,v 1.1 2000/02/11 18:06:49 dawes Exp $ */
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/descr.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/descr.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
#include <sys/types.h> #include <sys/types.h>

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/parse.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/parse.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usage.c,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usage.c,v 1.1 2000/02/11 18:06:50 dawes Exp $ */
#include <ctype.h> #include <ctype.h>
#include <err.h> #include <err.h>

View File

@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb.3,v 1.1.2.2 1999/12/03 10:12:42 hohndel Exp $ .\" $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb.3,v 1.1 2000/02/11 18:06:50 dawes Exp $
.\" .\"
.Dd May 11, 1999 .Dd May 11, 1999
.Dt USB 3 .Dt USB 3

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb.h,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb.h,v 1.1 2000/02/11 18:06:51 dawes Exp $ */
#define _DIAGASSERT(e) assert(e) #define _DIAGASSERT(e) assert(e)

View File

@ -9,7 +9,7 @@
# If the number is * then the line matches all usages and the name # If the number is * then the line matches all usages and the name
# is a printf formatting string that will be given the usage number. # is a printf formatting string that will be given the usage number.
# #
# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb_hid_usages,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ # $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb_hid_usages,v 1.1 2000/02/11 18:06:51 dawes Exp $
# #
1 Generic Desktop 1 Generic Desktop
0x00 Undefined 0x00 Undefined

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usbvar.h,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usbvar.h,v 1.1 2000/02/11 18:06:51 dawes Exp $ */
struct report_desc { struct report_desc {
unsigned int size; unsigned int size;

View File

@ -3,7 +3,7 @@
* *
* $FreeBSD: src/sys/sys/memrange.h,v 1.4 1999/12/29 04:24:44 peter Exp $ * $FreeBSD: src/sys/sys/memrange.h,v 1.4 1999/12/29 04:24:44 peter Exp $
*/ */
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/memrange.h,v 1.1 2002/08/06 13:25:36 herrb Exp $ */
#ifndef _MEMRANGE_H #ifndef _MEMRANGE_H
#define _MEMRANGE_H #define _MEMRANGE_H

View File

@ -1,4 +1,4 @@
/* $XFree86: ppc_video.c,v 1.5 2003/03/14 13:46:04 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/ppc_video.c,v 1.5 2003/03/14 13:46:04 tsi Exp $ */
/* /*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org> * Copyright 1993 by David Wexelblat <dwex@goblin.org>
@ -80,7 +80,7 @@ ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
PROT_READ : (PROT_READ | PROT_WRITE), PROT_READ : (PROT_READ | PROT_WRITE),
MAP_SHARED, fd, Base); MAP_SHARED, fd, Base);
if (base == MAP_FAILED) if (base == MAP_FAILED)
FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)", FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
"xf86MapVidMem", Size, Base, strerror(errno)); "xf86MapVidMem", Size, Base, strerror(errno));
return base; return base;
@ -102,7 +102,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if (kmem == -1) { if (kmem == -1) {
kmem = open(DEV_MEM, 2); kmem = open(DEV_MEM, 2);
if (kmem == -1) { if (kmem == -1) {
FatalError("xf86ReadBIOS: open %s", DEV_MEM); FatalError("xf86ReadBIOS: open %s\n", DEV_MEM);
} }
} }

View File

@ -1,4 +1,4 @@
/* $XFree86: sparc64_video.c,v 1.2 2003/03/14 13:46:04 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/sparc64_video.c,v 1.2 2003/03/14 13:46:04 tsi Exp $ */
/* /*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org> * Copyright 1993 by David Wexelblat <dwex@goblin.org>
@ -71,7 +71,7 @@ sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
PROT_READ : (PROT_READ | PROT_WRITE), PROT_READ : (PROT_READ | PROT_WRITE),
MAP_SHARED, fd, Base); MAP_SHARED, fd, Base);
if (base == MAP_FAILED) if (base == MAP_FAILED)
FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)", FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
"xf86MapVidMem", Size, Base, strerror(errno)); "xf86MapVidMem", Size, Base, strerror(errno));
return base; return base;
} }

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.82 2004/01/16 15:39:04 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.80 2003/08/29 20:49:03 tsi Exp $ */
/* /*
* Pci.c - New server PCI access functions * Pci.c - New server PCI access functions
* *
@ -453,9 +453,9 @@ pciHostAddrToBusAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
* to the base address register to get an accurate result. Otherwise it * to the base address register to get an accurate result. Otherwise it
* makes a conservative guess based on the alignment of the already allocated * makes a conservative guess based on the alignment of the already allocated
* address. If the result is accurate (ie, not an over-estimate), this is * address. If the result is accurate (ie, not an over-estimate), this is
* indicated by setting *min to TRUE (when min is non-NULL). This happens * indicated by setting *min to TRUE (when min is non-NULL). This currently
* when either the destructive flag is set, the information is supplied by * only happens when the destructive flag is set, but in future it may be
* the OS if the OS supports this. * possible to get the information from the OS when supported.
*/ */
int int
@ -575,7 +575,7 @@ Bool
pciMfDev(int busnum, int devnum) pciMfDev(int busnum, int devnum)
{ {
PCITAG tag0, tag1; PCITAG tag0, tag1;
CARD32 id0, id1, val; unsigned long id0, id1, val;
/* Detect a multi-function device that complies to the PCI 2.0 spec */ /* Detect a multi-function device that complies to the PCI 2.0 spec */
@ -782,7 +782,7 @@ pciGenFindNext(void)
(sub_class != PCI_SUBCLASS_BRIDGE_CARDBUS)) (sub_class != PCI_SUBCLASS_BRIDGE_CARDBUS))
xf86Msg(X_WARNING, xf86Msg(X_WARNING,
"pciGenFindNext: primary bus mismatch on PCI" "pciGenFindNext: primary bus mismatch on PCI"
" bridge 0x%08lx (0x%02x, 0x%02x)\n", " bridge 0x%08x (0x%02x, 0x%02x)\n",
pciDeviceTag, pciBusNum, pri_bus); pciDeviceTag, pciBusNum, pri_bus);
pri_bus = pciBusNum; pri_bus = pciBusNum;
} }
@ -1016,9 +1016,7 @@ xf86scanpci(int flags)
if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN)) if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN))
break; break;
pciWriteByte(tag, PCI_PCI_BRIDGE_CONTROL_REG, pciWriteByte(tag, PCI_PCI_BRIDGE_CONTROL_REG,
devp->pci_bridge_control & devp->pci_bridge_control & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN);
~(PCI_PCI_BRIDGE_MASTER_ABORT_EN |
PCI_PCI_BRIDGE_SECONDARY_RESET));
break; break;
default: default:
@ -1081,7 +1079,7 @@ xf86scanpci(int flags)
if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN)) if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN))
break; break;
pciWriteByte(devp->tag, PCI_PCI_BRIDGE_CONTROL_REG, pciWriteByte(devp->tag, PCI_PCI_BRIDGE_CONTROL_REG,
devp->pci_bridge_control & ~PCI_PCI_BRIDGE_SECONDARY_RESET); devp->pci_bridge_control);
break; break;
default: default:
@ -1139,7 +1137,7 @@ xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
base = xf86MapDomainMemory(ScreenNum, Flags, Tag, hostbase, Size); base = xf86MapDomainMemory(ScreenNum, Flags, Tag, hostbase, Size);
if (!base) { if (!base) {
FatalError("xf86MapPciMem: Could not mmap PCI memory " FatalError("xf86MapPciMem: Could not mmap PCI memory "
"[base=0x%lx,hostbase=0x%lx,size=%lx] (%s)\n", "[base=0x%x,hostbase=0x%x,size=%x] (%s)\n",
Base, hostbase, Size, strerror(errno)); Base, hostbase, Size, strerror(errno));
} }
/* /*
@ -1189,8 +1187,8 @@ handlePciBIOS(PCITAG Tag, int basereg,
savebase = pciReadLong(Tag, PCI_MAP_REG_START+(b_reg<<2)); savebase = pciReadLong(Tag, PCI_MAP_REG_START+(b_reg<<2));
xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]" xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]"
" for device %i:%i:%i\n", basereg, " for device %i:%i:%i\n", basereg,
(int)PCI_BUS_FROM_TAG(Tag), (int)PCI_DEV_FROM_TAG(Tag), PCI_BUS_FROM_TAG(Tag), PCI_DEV_FROM_TAG(Tag),
(int)PCI_FUNC_FROM_TAG(Tag)); PCI_FUNC_FROM_TAG(Tag));
pciWriteLong(Tag, PCI_MAP_REG_START + (b_reg << 2), pciWriteLong(Tag, PCI_MAP_REG_START + (b_reg << 2),
(CARD32)~0); (CARD32)~0);
} }
@ -1299,7 +1297,7 @@ readPciBios(PCITAG Tag, CARD8* tmp, ADDRESS hostbase, pointer args)
} }
if ((rd->Offset) > (image_length)) { if ((rd->Offset) > (image_length)) {
xf86Msg(X_WARNING,"xf86ReadPciBios: requesting data past " xf86Msg(X_WARNING,"xf86ReadPciBios: requesting data past "
"end of BIOS %li > %i\n",(rd->Offset) , (image_length)); "end of BIOS %i > %i\n",(rd->Offset) , (image_length));
} else { } else {
if ((rd->Offset + rd->Len) > (image_length)) { if ((rd->Offset + rd->Len) > (image_length)) {
rd->Len = (image_length) - rd->Offset; rd->Len = (image_length) - rd->Offset;

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h,v 1.45 2004/02/02 03:55:31 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h,v 1.42 2003/08/29 21:08:06 tsi Exp $ */
/* /*
* Copyright 1998 by Concurrent Computer Corporation * Copyright 1998 by Concurrent Computer Corporation
* *
@ -255,13 +255,9 @@
# define ARCH_PCI_INIT linuxPciInit # define ARCH_PCI_INIT linuxPciInit
# define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN # define INCLUDE_XF86_NO_DOMAIN
# elif defined(FreeBSD)
# define ARCH_PCI_INIT freebsdPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# endif # endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper # define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
#elif defined(__i386__) || defined(i386) #elif defined(__i386__)
# define ARCH_PCI_INIT ix86PciInit # define ARCH_PCI_INIT ix86PciInit
# define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN # define INCLUDE_XF86_NO_DOMAIN
@ -312,27 +308,21 @@
# define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN # define INCLUDE_XF86_NO_DOMAIN
# endif # endif
#elif defined(__sparc__) || defined(sparc) #elif defined(__sparc__)
# if defined(linux) # if defined(linux)
# define ARCH_PCI_INIT linuxPciInit # define ARCH_PCI_INIT linuxPciInit
# define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_MAP_PCI_MEM
# elif defined(sun) # elif defined(sun)
# define ARCH_PCI_INIT sparcPciInit # define ARCH_PCI_INIT sparcPciInit
# define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_MAP_PCI_MEM
# elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc64__) # elif defined(__OpenBSD__) && defined(__sparc64__)
# define ARCH_PCI_INIT freebsdPciInit # define ARCH_PCI_INIT freebsdPciInit
# define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN # define INCLUDE_XF86_NO_DOMAIN
# endif # endif
# if !defined(__FreeBSD__)
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge # define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
# endif #elif defined(__AMD64__)
#elif defined(__amd64__)
# if defined(__FreeBSD__)
# define ARCH_PCI_INIT freebsdPciInit
# else
# define ARCH_PCI_INIT ix86PciInit # define ARCH_PCI_INIT ix86PciInit
# endif
# define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN # define INCLUDE_XF86_NO_DOMAIN
# if defined(linux) # if defined(linux)

View File

@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.2tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.3 2003/06/10 20:48:01 tsi Exp $ */
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
@ -170,8 +170,6 @@ promIsP1275(void)
promP1275 = TRUE; promP1275 = TRUE;
else else
promP1275 = FALSE; promP1275 = FALSE;
#elif defined(__FreeBSD__)
promP1275 = TRUE;
#else #else
#error Missing promIsP1275() function for this OS #error Missing promIsP1275() function for this OS
#endif #endif

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/axpPci.c,v 1.14 2002/12/11 02:44:28 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/axpPci.c,v 1.15 2002/12/12 04:12:02 dawes Exp $ */
/* /*
* Copyright 1998 by Concurrent Computer Corporation * Copyright 1998 by Concurrent Computer Corporation
* *

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.4 2002/07/24 19:06:52 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.5 2002/08/27 22:07:07 tsi Exp $ */
/* /*
* Copyright 1998 by Concurrent Computer Corporation * Copyright 1998 by Concurrent Computer Corporation
* *
@ -84,7 +84,7 @@ static pciBusInfo_t freebsdPci0 = {
/* bridge */ NULL /* bridge */ NULL
}; };
#if !defined(__OpenBSD__) && !defined(__FreeBSD__) #if !defined(__OpenBSD__)
#if X_BYTE_ORDER == X_BIG_ENDIAN #if X_BYTE_ORDER == X_BIG_ENDIAN
#ifdef __sparc__ #ifdef __sparc__
#ifndef ASI_PL #ifndef ASI_PL

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v 1.25 2003/09/24 02:43:34 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v 1.24 2003/08/29 20:49:03 tsi Exp $ */
/* /*
* ix86Pci.c - x86 PCI driver * ix86Pci.c - x86 PCI driver
* *
@ -345,9 +345,8 @@ void ix86PciSelectCfgmech(void)
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n"); xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
xf86MsgVerb(X_INFO, 3, xf86MsgVerb(X_INFO, 3,
"PCI: stages = 0x%02x, oldVal1 = 0x%08lx, mode1Res1" "PCI: stages = 0x%02x, oldVal1 = 0x%08x, mode1Res1"
" = 0x%08lx\n", stages, (unsigned long)oldVal1, " = 0x%08x\n", stages, oldVal1, mode1Res1);
(unsigned long)mode1Res1);
return; return;
} }
@ -400,10 +399,9 @@ void ix86PciSelectCfgmech(void)
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n"); xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
xf86MsgVerb(X_INFO, 3, xf86MsgVerb(X_INFO, 3,
"PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n" "PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n", "\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
stages, (unsigned long)oldVal1, stages, oldVal1, mode1Res1, mode1Res2);
(unsigned long)mode1Res1, (unsigned long)mode1Res2);
return; return;
} }
@ -417,10 +415,9 @@ void ix86PciSelectCfgmech(void)
} }
xf86MsgVerb(X_INFO, 3, "PCI: Standard check for type 1 failed.\n"); xf86MsgVerb(X_INFO, 3, "PCI: Standard check for type 1 failed.\n");
xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n" xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n", "\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
stages, (unsigned long)oldVal1, (unsigned long)mode1Res1, stages, oldVal1, mode1Res1, mode1Res2);
(unsigned long)mode1Res2);
/* Try config type 2 */ /* Try config type 2 */
oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG); oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG);

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c,v 1.9 2002/09/24 16:14:16 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c,v 1.10 2002/11/17 18:42:01 alanh Exp $ */
/* /*
* Copyright 1998 by Concurrent Computer Corporation * Copyright 1998 by Concurrent Computer Corporation
* *

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ppcPci.c,v 1.8 2002/07/24 19:06:52 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ppcPci.c,v 1.9 2002/08/27 22:07:07 tsi Exp $ */
/* /*
* ppcPci.c - PowerPC PCI access functions * ppcPci.c - PowerPC PCI access functions
* *

View File

@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.3 2001/04/20 17:02:43 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.5 2002/05/22 21:38:30 herrb Exp $ */
#ifndef _XF86_SBUS_H #ifndef _XF86_SBUS_H
#define _XF86_SBUS_H #define _XF86_SBUS_H
@ -35,13 +35,7 @@
#elif defined(__OpenBSD__) && defined(__sparc64__) #elif defined(__OpenBSD__) && defined(__sparc64__)
/* XXX */ /* XXX */
#elif defined(CSRG_BASED) #elif defined(CSRG_BASED)
#if defined(__FreeBSD__)
#include <sys/types.h>
#include <sys/fbio.h>
#include <dev/ofw/openpromio.h>
#else
#include <machine/fbio.h> #include <machine/fbio.h>
#endif
#else #else
#include <sun/fbio.h> #include <sun/fbio.h>
#endif #endif

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c,v 1.8 2004/01/16 15:39:38 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c,v 1.3 2003/07/17 15:08:22 tsi Exp $ */
/* /*
* Copyright (C) 2002-2003 The XFree86 Project, Inc. All Rights Reserved. * Copyright (C) 2002-2003 The XFree86 Project, Inc. All Rights Reserved.
* *
@ -97,10 +97,9 @@
#define LBA_PORT5_CNTRL 0x1228U #define LBA_PORT5_CNTRL 0x1228U
#define LBA_PORT6_CNTRL 0x1230U #define LBA_PORT6_CNTRL 0x1230U
#define LBA_PORT7_CNTRL 0x1238U #define LBA_PORT7_CNTRL 0x1238U
#define LBA_RESET_FUNCTION 0x0000000001UL #define LBA_ROPE_RESET 0x01UL
#define LBA_CLEAR_ERROR 0x0000000010UL #define LBA_CLEAR_ERROR 0x10UL
#define LBA_HARD_FAIL 0x0000000040UL #define LBA_HARD_FAIL 0x40UL
#define LBA_RESET_COMPLETE 0x0100000000UL
#define ROPE_PAGE_CONTROL 0x1418U #define ROPE_PAGE_CONTROL 0x1418U
@ -118,11 +117,8 @@
#define IOA_SUBORDINATE_BUS 0x0059U #define IOA_SUBORDINATE_BUS 0x0059U
#define IOA_CONTROL 0x0108U #define IOA_CONTROL 0x0108U
#define IOA_RESET_FUNCTION 0x0000000001UL #define IOA_FORWARD_VGA 0x08UL
#define IOA_FORWARD_VGA 0x0000000008UL #define IOA_HARD_FAIL 0x40UL
#define IOA_CLEAR_ERROR 0x0000000010UL
#define IOA_HARD_FAIL 0x0000000040UL
#define IOA_RESET_COMPLETE 0x0100000000UL
#define IOA_LMMIO_BASE 0x0200U #define IOA_LMMIO_BASE 0x0200U
#define IOA_LMMIO_MASK 0x0208U #define IOA_LMMIO_MASK 0x0208U
@ -138,33 +134,12 @@
#define IOA_ELMMIO_MASK 0x0258U #define IOA_ELMMIO_MASK 0x0258U
#define IOA_EIOS_BASE 0x0260U #define IOA_EIOS_BASE 0x0260U
#define IOA_EIOS_MASK 0x0268U #define IOA_EIOS_MASK 0x0268U
#define IOA_GLOBAL_MASK 0x0270U
#define IOA_SLAVE_CONTROL 0x0278U #define IOA_SLAVE_CONTROL 0x0278U
#define IOA_VGA_PEER_ENABLE 0x2000UL #define IOA_VGA_PEER_ENABLE 0x2000UL
#define IOA_MSI_BASE 0x0280U #define IOA_MSI_BASE 0x0280U
#define IOA_MSI_MASK 0x0288U #define IOA_MSI_MASK 0x0288U
#define IOA_DMA_BASE 0x02B0U
#define IOA_DMA_MASK 0x02B8U
#define IOA_ERROR_CONFIG 0x0680U
#define IOA_ERROR_PIOWRITE 0x0001UL
#define IOA_ERROR_PIOREAD 0x0002UL
#define IOA_ERROR_DMAWRITE 0x0004UL
#define IOA_ERROR_DMAREAD 0x0008UL
#define IOA_ERROR_CONFIG_MASTER 0x0010UL
#define IOA_ERROR_SMART 0x0020UL
#define IOA_ERROR_FATAL_SERR 0x0040UL
#define IOA_ERROR_ASSERT_SERR 0x0080UL
/* ? 0x0100UL */
#define IOA_ERROR_LOOPBACK 0x0200UL
#define IOA_ERROR_CONFIG_TARGET 0x0400UL
#define IOA_ERROR_IO_MASTER 0x0800UL
#define IOA_ERROR_IO_TARGET 0x1000UL
#define IOA_ERROR_MEM_MASTER 0x2000UL
#define IOA_ERROR_MEM_TARGET 0x4000UL
#define IOA_ERROR_HF_IO_FATAL 0x8000UL
#define RANGE_ENABLE 0x01UL /* In various base registers */ #define RANGE_ENABLE 0x01UL /* In various base registers */
#define IO_MASK ((1UL << 16) - 1UL) #define IO_MASK ((1UL << 16) - 1UL)
@ -181,15 +156,10 @@
static CARD8 *pZX1mio = NULL, static CARD8 *pZX1mio = NULL,
*pZX1ioa = NULL; *pZX1ioa = NULL;
/* Per-rope data */ static INT8 zx1_ropemap[8]; /* One for each (potential) rope */
static INT8 zx1_ropemap[8]; static CARD64 zx1_lbacntl[8]; /* " " " " " */
static CARD32 zx1_pciids[8];
static CARD64 zx1_lbacntl[8];
static int zx1_busno[8], zx1_subno[8]; static int zx1_busno[8], zx1_subno[8];
/* Array of Booleans for non-empty buses */
static INT8 zx1_busnmpt[MAX_PCI_BUSES];
static pciBusFuncs_t zx1BusFuncs; static pciBusFuncs_t zx1BusFuncs;
static int zx1_fakebus = -1; static int zx1_fakebus = -1;
static Bool zx1_hasvga = FALSE; static Bool zx1_hasvga = FALSE;
@ -322,8 +292,7 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
* SLAVE_CONTROL register. * SLAVE_CONTROL register.
*/ */
tmp1 = MIO_QUAD(VGA_ROUTE); tmp1 = MIO_QUAD(VGA_ROUTE);
tmp2 = IOA_QUAD(ropenum, IOA_CONTROL) & tmp2 = IOA_QUAD(ropenum, IOA_CONTROL);
~(IOA_RESET_FUNCTION | IOA_CLEAR_ERROR);
if ((tmp1 & VGA_ENABLE) && ((tmp1 & 0x07UL) == ropenum)) { if ((tmp1 & VGA_ENABLE) && ((tmp1 & 0x07UL) == ropenum)) {
current |= PCI_PCI_BRIDGE_VGA_EN; current |= PCI_PCI_BRIDGE_VGA_EN;
if ((mask & PCI_PCI_BRIDGE_VGA_EN) && if ((mask & PCI_PCI_BRIDGE_VGA_EN) &&
@ -346,9 +315,8 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
MIO_QUAD(VGA_ROUTE) = 0UL; MIO_QUAD(VGA_ROUTE) = 0UL;
tmp3 = IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL); tmp3 = IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL);
if (tmp3 & IOA_FORWARD_VGA) if (tmp3 & IOA_FORWARD_VGA)
IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL) = tmp3 & IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL) =
~(IOA_RESET_FUNCTION | IOA_FORWARD_VGA | tmp3 & ~IOA_FORWARD_VGA;
IOA_CLEAR_ERROR);
} }
if (!(tmp2 & IOA_FORWARD_VGA)) { if (!(tmp2 & IOA_FORWARD_VGA)) {
tmp2 |= IOA_FORWARD_VGA; tmp2 |= IOA_FORWARD_VGA;
@ -361,7 +329,7 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
/* Move on to master abort failure enablement */ /* Move on to master abort failure enablement */
tmp1 = MIO_QUAD((ropenum << 3) + LBA_PORT0_CNTRL) & tmp1 = MIO_QUAD((ropenum << 3) + LBA_PORT0_CNTRL) &
~(LBA_RESET_FUNCTION | LBA_CLEAR_ERROR); ~(LBA_ROPE_RESET | LBA_CLEAR_ERROR);
if ((tmp1 & LBA_HARD_FAIL) || (tmp2 & IOA_HARD_FAIL)) { if ((tmp1 & LBA_HARD_FAIL) || (tmp2 & IOA_HARD_FAIL)) {
current |= PCI_PCI_BRIDGE_MASTER_ABORT_EN; current |= PCI_PCI_BRIDGE_MASTER_ABORT_EN;
if ((mask & PCI_PCI_BRIDGE_MASTER_ABORT_EN) && if ((mask & PCI_PCI_BRIDGE_MASTER_ABORT_EN) &&
@ -423,15 +391,14 @@ GetZX1BridgeResources(int bus,
static CARD32 static CARD32
zx1FakeReadLong(PCITAG tag, int offset) zx1FakeReadLong(PCITAG tag, int offset)
{ {
FatalError("zx1FakeReadLong(0x%lX, 0x%X) called\n", FatalError("zx1FakeReadLong(0x%X, 0x%X) called\n", tag, offset);
(unsigned long)tag, offset);
} }
static void static void
zx1FakeWriteLong(PCITAG tag, int offset, CARD32 val) zx1FakeWriteLong(PCITAG tag, int offset, CARD32 val)
{ {
FatalError("zx1FakeWriteLong(0x%lX, 0x%X, 0x%08X) called\n", FatalError("zx1FakeWriteLong(0x%X, 0x%X, 0x%08X) called\n",
(unsigned long)tag, offset, val); tag, offset, val);
} }
static void static void
@ -477,13 +444,13 @@ xf86PreScanZX1(void)
resRange range; resRange range;
unsigned long mapSize = xf86getpagesize(); unsigned long mapSize = xf86getpagesize();
unsigned long tmp, base, ioaaddr; unsigned long tmp, base, ioaaddr;
unsigned long flagsd, based, lastd, maskd, routed; unsigned long flagsd = 0, based = 0, lastd = 0, maskd = 0, routed = 0;
unsigned long flags0, base0, last0, mask0, route0; unsigned long flags0 = 0, base0 = 0, last0 = 0, mask0 = 0, route0 = 0;
unsigned long flags1, base1, last1, mask1, route1; unsigned long flags1 = 0, base1 = 0, last1 = 0, mask1 = 0, route1 = 0;
unsigned long flags2, base2, last2, mask2, route2; unsigned long flags2 = 0, base2 = 0, last2 = 0, mask2 = 0, route2 = 0;
unsigned long flags3, base3, last3, mask3, route3; unsigned long flags3 = 0, base3 = 0, last3 = 0, mask3 = 0, route3 = 0;
unsigned long flagsg, baseg, lastg, maskg, routeg; unsigned long flagsg = 0, baseg = 0, lastg = 0, maskg = 0, routeg = 0;
unsigned long flagsl, basel, lastl; unsigned long flagsl = 0, basel = 0, lastl = 0;
int i, rope; int i, rope;
/* Map mio registers (minimum 8k) */ /* Map mio registers (minimum 8k) */
@ -493,7 +460,7 @@ xf86PreScanZX1(void)
if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize))) if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize)))
return FALSE; return FALSE;
/* Look for ZX1's SBA and IOC */ /* XXX What about Dino? */ /* Look for ZX1's SBA and IOC */
if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) != if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) !=
DEVID(VENDOR_HP, CHIP_ZX1_SBA)) || DEVID(VENDOR_HP, CHIP_ZX1_SBA)) ||
(MIO_LONG(MIO_FUNCTION1 + PCI_ID_REG) != (MIO_LONG(MIO_FUNCTION1 + PCI_ID_REG) !=
@ -552,17 +519,16 @@ xf86PreScanZX1(void)
/* Prevent hard-fails */ /* Prevent hard-fails */
zx1_lbacntl[i] = MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) & zx1_lbacntl[i] = MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) &
~(LBA_RESET_FUNCTION | LBA_CLEAR_ERROR); ~(LBA_ROPE_RESET | LBA_CLEAR_ERROR);
if (zx1_lbacntl[i] & LBA_HARD_FAIL) if (zx1_lbacntl[i] & LBA_HARD_FAIL)
MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) = MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) =
zx1_lbacntl[i] & ~LBA_HARD_FAIL; zx1_lbacntl[i] & ~LBA_HARD_FAIL;
/* Poke for an ioa */ /* Poke for an ioa */
zx1_pciids[i] = IOA_LONG(i, PCI_ID_REG); tmp = IOA_LONG(i, PCI_ID_REG);
switch (zx1_pciids[i]) { switch ((CARD32)tmp) {
case DEVID(VENDOR_HP, CHIP_ELROY): case DEVID(VENDOR_HP, CHIP_ELROY):
case DEVID(VENDOR_HP, CHIP_ZX1_LBA): /* Mercury */ case DEVID(VENDOR_HP, CHIP_ZX1_LBA):
case DEVID(VENDOR_HP, CHIP_ZX1_AGP8): /* QuickSilver */
/* Expected vendor/device IDs */ /* Expected vendor/device IDs */
zx1_busno[i] = zx1_busno[i] =
(unsigned int)IOA_BYTE(i, IOA_SECONDARY_BUS); (unsigned int)IOA_BYTE(i, IOA_SECONDARY_BUS);
@ -571,10 +537,10 @@ xf86PreScanZX1(void)
break; break;
default: default:
if ((CARD16)(zx1_pciids[i] + 1U) > (CARD16)1U) if ((CARD16)(tmp + 1U) > (CARD16)1U)
xf86MsgVerb(X_NOTICE, 0, xf86MsgVerb(X_NOTICE, 0,
"HP ZX1: Unexpected vendor/device id 0x%08X" "HP ZX1: Unexpected vendor/device id 0x%08X"
" on rope %d\n", zx1_pciids[i], i); " on rope %d\n", (CARD32)tmp, i);
/* Nobody home, or not the "right" kind of rope guest */ /* Nobody home, or not the "right" kind of rope guest */
/* /*
@ -621,14 +587,6 @@ xf86PreScanZX1(void)
* ones. * ones.
*/ */
flagsd = 0; based = 0; lastd = 0; maskd = 0; routed = 0;
flags0 = 0; base0 = 0; last0 = 0; mask0 = 0; route0 = 0;
flags1 = 0; base1 = 0; last1 = 0; mask1 = 0; route1 = 0;
flags2 = 0; base2 = 0; last2 = 0; mask2 = 0; route2 = 0;
flags3 = 0; base3 = 0; last3 = 0; mask3 = 0; route3 = 0;
flagsg = 0; baseg = 0; lastg = 0; maskg = 0; routeg = 0;
flagsl = 0; basel = 0; lastl = 0;
if ((tmp = MIO_QUAD(IOS_DIST_BASE)) & RANGE_ENABLE) { if ((tmp = MIO_QUAD(IOS_DIST_BASE)) & RANGE_ENABLE) {
flagsd = RANGE_ENABLE; flagsd = RANGE_ENABLE;
maskd = MIO_QUAD(IOS_DIST_MASK); maskd = MIO_QUAD(IOS_DIST_MASK);
@ -938,9 +896,6 @@ xf86PostScanZX1(void)
if (!pZX1mio) if (!pZX1mio)
return; return;
(void)memset(zx1_busnmpt, FALSE, sizeof(zx1_busnmpt));
pBusInfo = pciBusInfo[0];
/* /*
* Certain 2.4 & 2.5 Linux kernels add fake PCI devices. Remove them to * Certain 2.4 & 2.5 Linux kernels add fake PCI devices. Remove them to
* prevent any possible interference with our PCI validation. * prevent any possible interference with our PCI validation.
@ -952,11 +907,9 @@ xf86PostScanZX1(void)
ppPCI = ppPCI2 = xf86scanpci(0); /* Recursion is only apparent */ ppPCI = ppPCI2 = xf86scanpci(0); /* Recursion is only apparent */
while ((pPCI = *ppPCI2++)) { while ((pPCI = *ppPCI2++)) {
switch (pPCI->pci_device_vendor) { switch (pPCI->pci_device_vendor) {
case DEVID(VENDOR_HP, CHIP_ELROY): case DEVID(VENDOR_HP, CHIP_ZX1_SBA):
case DEVID(VENDOR_HP, CHIP_ZX1_SBA): /* Pluto function 0 */ case DEVID(VENDOR_HP, CHIP_ZX1_IOC):
case DEVID(VENDOR_HP, CHIP_ZX1_IOC): /* Pluto function 1 */ case DEVID(VENDOR_HP, CHIP_ZX1_LBA):
case DEVID(VENDOR_HP, CHIP_ZX1_LBA): /* Mercury */
case DEVID(VENDOR_HP, CHIP_ZX1_AGP8): /* QuickSilver */
xfree(pPCI); /* Remove it */ xfree(pPCI); /* Remove it */
continue; continue;
@ -964,8 +917,6 @@ xf86PostScanZX1(void)
*ppPCI++ = pPCI; *ppPCI++ = pPCI;
idx++; idx++;
zx1_busnmpt[pPCI->busnum] = TRUE;
if (zx1_hasvga) if (zx1_hasvga)
continue; continue;
@ -990,8 +941,8 @@ xf86PostScanZX1(void)
} }
/* /*
* Restore hard-fail settings and figure out the actual secondary and * Restore hard-fail settings and figure out the actual subordinate bus
* subordinate bus numbers. * numbers.
*/ */
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (zx1_ropemap[i] != i) if (zx1_ropemap[i] != i)
@ -1005,14 +956,6 @@ xf86PostScanZX1(void)
if (zx1_fakebus <= zx1_subno[i]) if (zx1_fakebus <= zx1_subno[i])
zx1_fakebus = zx1_subno[i] + 1; zx1_fakebus = zx1_subno[i] + 1;
while (!zx1_busnmpt[zx1_busno[i]]) {
if (zx1_busno[i]) /* Info for bus zero is in static storage */
xfree(pciBusInfo[zx1_busno[i]]);
pciBusInfo[zx1_busno[i]++] = NULL;
if (zx1_busno[i] > zx1_subno[i])
break;
}
} }
if (zx1_fakebus >= pciNumBuses) { if (zx1_fakebus >= pciNumBuses) {
@ -1022,13 +965,13 @@ xf86PostScanZX1(void)
} }
/* Set up our extra bus functions */ /* Set up our extra bus functions */
zx1BusFuncs = *(pBusInfo->funcs); zx1BusFuncs = *(pciBusInfo[0]->funcs);
zx1BusFuncs.pciControlBridge = ControlZX1Bridge; zx1BusFuncs.pciControlBridge = ControlZX1Bridge;
zx1BusFuncs.pciGetBridgeResources = GetZX1BridgeResources; zx1BusFuncs.pciGetBridgeResources = GetZX1BridgeResources;
/* Set up our own fake bus to act as the root segment */ /* Set up our own fake bus to act as the root segment */
zx1FakeBus.configMech = pBusInfo->configMech; zx1FakeBus.configMech = pciBusInfo[0]->configMech;
zx1FakeBus.numDevices = pBusInfo->numDevices; zx1FakeBus.numDevices = pciBusInfo[0]->numDevices;
zx1FakeBus.primary_bus = zx1_fakebus; zx1FakeBus.primary_bus = zx1_fakebus;
pciBusInfo[zx1_fakebus] = &zx1FakeBus; pciBusInfo[zx1_fakebus] = &zx1FakeBus;
@ -1063,8 +1006,7 @@ xf86PostScanZX1(void)
/* Add a fake PCI-to-PCI bridge to represent each active rope */ /* Add a fake PCI-to-PCI bridge to represent each active rope */
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if ((zx1_ropemap[i] != i) || (zx1_busno[i] > zx1_subno[i]) || if ((zx1_ropemap[i] != i) || !(pBusInfo = pciBusInfo[zx1_busno[i]]))
!(pBusInfo = pciBusInfo[zx1_busno[i]]))
continue; continue;
if (++idx >= MAX_PCI_DEVICES) if (++idx >= MAX_PCI_DEVICES)
@ -1074,7 +1016,7 @@ xf86PostScanZX1(void)
pPCI->devnum = i | 0x10; pPCI->devnum = i | 0x10;
/* pPCI->funcnum = 0; */ /* pPCI->funcnum = 0; */
pPCI->tag = PCI_MAKE_TAG(zx1_fakebus, pPCI->devnum, 0); pPCI->tag = PCI_MAKE_TAG(zx1_fakebus, pPCI->devnum, 0);
pPCI->pci_device_vendor = zx1_pciids[i]; pPCI->pci_device_vendor = DEVID(VENDOR_HP, CHIP_ZX1_LBA);
pPCI->pci_base_class = PCI_CLASS_BRIDGE; pPCI->pci_base_class = PCI_CLASS_BRIDGE;
pPCI->pci_sub_class = PCI_SUBCLASS_BRIDGE_PCI; pPCI->pci_sub_class = PCI_SUBCLASS_BRIDGE_PCI;
pPCI->pci_header_type = 1; pPCI->pci_header_type = 1;
@ -1090,9 +1032,6 @@ xf86PostScanZX1(void)
/* Plug in chipset routines */ /* Plug in chipset routines */
pBusInfo->funcs = &zx1BusFuncs; pBusInfo->funcs = &zx1BusFuncs;
/* Set bridge control register for scanpci utility */
pPCI->pci_bridge_control = ControlZX1Bridge(zx1_busno[i], 0, 0);
#ifdef OLD_FORMAT #ifdef OLD_FORMAT
xf86MsgVerb(X_INFO, 2, "PCI: BusID 0x%.2x,0x%02x,0x%1x " xf86MsgVerb(X_INFO, 2, "PCI: BusID 0x%.2x,0x%02x,0x%1x "
"ID 0x%04x,0x%04x Rev 0x%02x Class 0x%02x,0x%02x\n", "ID 0x%04x,0x%04x Rev 0x%02x Class 0x%02x,0x%02x\n",

View File

@ -25,7 +25,7 @@
* *
* Authors: Rickard E. (Rik) Faith <faith@valinux.com> * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
* *
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.2 2000/02/23 04:47:22 martin Exp $ * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/drmmodule.c,v 1.3 2000/06/17 00:03:34 martin Exp $
* *
*/ */
@ -39,7 +39,7 @@ static XF86ModuleVersionInfo VersRec =
MODULEVENDORSTRING, MODULEVENDORSTRING,
MODINFOSTRING1, MODINFOSTRING1,
MODINFOSTRING2, MODINFOSTRING2,
XORG_VERSION_CURRENT, XF86_VERSION_CURRENT,
1, 0, 0, 1, 0, 0,
ABI_CLASS_EXTENSION, ABI_CLASS_EXTENSION,
ABI_EXTENSION_VERSION, ABI_EXTENSION_VERSION,

View File

@ -1,7 +1,7 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.32 2004/02/05 18:24:59 eich Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.30 2003/03/14 13:46:06 tsi Exp $ */
/* /*
* linux specific part of the int10 module * linux specific part of the int10 module
* Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich * Copyright 1999 Egbert Eich
*/ */
#include "xf86.h" #include "xf86.h"
#include "xf86_OSproc.h" #include "xf86_OSproc.h"
@ -212,9 +212,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
} else } else
((linuxInt10Priv*)pInt->private)->base_high = NULL; ((linuxInt10Priv*)pInt->private)->base_high = NULL;
if (!MapCurrentInt10(pInt)) MapCurrentInt10(pInt);
goto error3;
Int10Current = pInt; Int10Current = pInt;
#ifdef DEBUG #ifdef DEBUG
@ -240,7 +238,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE)
if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE) if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE)
xf86DrvMsg(screen, X_WARNING, xf86DrvMsg(screen, X_WARNING,
"Unable to retrieve all of segment 0x%06lX.\n", cs); "Unable to retrieve all of segment 0x%06X.\n", cs);
#ifdef DEBUG #ifdef DEBUG
ErrorF("done\n"); ErrorF("done\n");
#endif #endif
@ -252,13 +250,13 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
&& !(initPrimary(options))) { && !(initPrimary(options))) {
if (bios.bus == BUS_ISA && bios.location.legacy) { if (bios.bus == BUS_ISA && bios.location.legacy) {
xf86DrvMsg(screen, X_CONFIG, xf86DrvMsg(screen, X_CONFIG,
"Overriding BIOS location: 0x%x\n", "Overriding BIOS location: 0x%lx\n",
bios.location.legacy); bios.location.legacy);
cs = bios.location.legacy >> 4; cs = bios.location.legacy >> 4;
bios_base = (unsigned char *)(cs << 4); bios_base = (unsigned char *)(cs << 4);
if (!int10_check_bios(screen, cs, bios_base)) { if (!int10_check_bios(screen, cs, bios_base)) {
xf86DrvMsg(screen, X_ERROR, xf86DrvMsg(screen, X_ERROR,
"No V_BIOS at specified address 0x%lx\n",cs << 4); "No V_BIOS at specified address 0x%x\n",cs << 4);
goto error3; goto error3;
} }
} else { } else {
@ -288,7 +286,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
} }
} }
xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%lx\n", cs); xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%x\n", cs);
pInt->BIOSseg = cs; pInt->BIOSseg = cs;
set_return_trap(pInt); set_return_trap(pInt);
@ -347,7 +345,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
bios_base = (unsigned char *)(cs << 4); bios_base = (unsigned char *)(cs << 4);
if (!int10_check_bios(screen, cs, bios_base)) { if (!int10_check_bios(screen, cs, bios_base)) {
xf86DrvMsg(screen,X_ERROR,"No V_BIOS found " xf86DrvMsg(screen,X_ERROR,"No V_BIOS found "
"on override address %p\n",bios_base); "on override address 0x%x\n",bios_base);
goto error3; goto error3;
} }
} else { } else {
@ -367,7 +365,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
} }
} }
} }
xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%lx\n",cs); xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%x\n",cs);
pInt->BIOSseg = cs; pInt->BIOSseg = cs;
break; break;
default: default:
@ -389,7 +387,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
return pInt; return pInt;
error4: error4:
xf86DrvMsg(screen, X_ERROR, "shmat() call returned errno %d\n", errno); xf86DrvMsg(screen, X_ERROR, "shmat() call retruned errno %d\n", errno);
error3: error3:
if (base_high) if (base_high)
shmdt(base_high); shmdt(base_high);

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
#include "xf86.h" #include "xf86.h"
#include "xf86_OSproc.h" #include "xf86_OSproc.h"
#include "xf86_ansic.h" #include "xf86_ansic.h"
@ -175,7 +173,7 @@ vm86_GP_fault(xf86Int10InfoPtr pInt)
case 0x0f: case 0x0f:
xf86DrvMsg(pInt->scrnIndex, X_ERROR, xf86DrvMsg(pInt->scrnIndex, X_ERROR,
"CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8lx\n", X86_CS, X86_EIP); "CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8x\n", X86_CS, X86_EIP);
goto op0ferr; goto op0ferr;
default: default:

View File

@ -1,4 +1,4 @@
/* $XFree86: Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx.h,v 3.3 2002/11/25 14:05:04 eich Exp $ */
#ifndef LNX_H_ #ifndef LNX_H_
# ifdef __alpha__ # ifdef __alpha__

View File

@ -190,8 +190,7 @@ xf86AccResFromOS(resPtr ret)
defined(__s390__) || \ defined(__s390__) || \
defined(__hppa__) defined(__hppa__)
/* /* XXX this isn't exactly correct but it will get the server working
* XXX this isn't exactly correct but it will get the server working
* for now until we get something better. * for now until we get something better.
*/ */
@ -204,7 +203,7 @@ xf86BusAccWindowsFromOS(void)
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
ret = xf86AddResToList(ret, &range, -1); ret = xf86AddResToList(ret, &range, -1);
#if defined(__sparc__) || defined(__powerpc__) #ifdef __sparc__
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
#else #else
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
@ -222,7 +221,7 @@ xf86PciBusAccWindowsFromOS(void)
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
ret = xf86AddResToList(ret, &range, -1); ret = xf86AddResToList(ret, &range, -1);
#if defined(__sparc__) || defined(__powerpc__) #ifdef __sparc__
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
#else #else
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
@ -231,7 +230,7 @@ xf86PciBusAccWindowsFromOS(void)
return ret; return ret;
} }
#ifdef INCLUDE_UNUSED #ifdef INCLUDE_UNUSED */
resPtr resPtr
xf86IsaBusAccWindowsFromOS(void) xf86IsaBusAccWindowsFromOS(void)
@ -242,7 +241,7 @@ xf86IsaBusAccWindowsFromOS(void)
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
ret = xf86AddResToList(ret, &range, -1); ret = xf86AddResToList(ret, &range, -1);
#if defined(__sparc__) || defined(__powerpc__) #ifdef __sparc__
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
#else #else
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
@ -268,7 +267,7 @@ xf86AccResFromOS(resPtr ret)
ret = xf86AddResToList(ret, &range, -1); ret = xf86AddResToList(ret, &range, -1);
RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
ret = xf86AddResToList(ret, &range, -1); ret = xf86AddResToList(ret, &range, -1);
#if defined(__sparc__) || defined(__powerpc__) #ifdef __sparc__
RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock); RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock);
#else #else
RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock); RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);

View File

@ -1,4 +1,4 @@
/* $XFree86$ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c,v 1.1 2002/10/11 01:40:35 dawes Exp $ */
/* /*
* Slightly modified xf86KbdLnx.c which is * Slightly modified xf86KbdLnx.c which is

View File

@ -263,14 +263,14 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
if (offset % AGP_PAGE_SIZE != 0) { if (offset % AGP_PAGE_SIZE != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
"offset (0x%lx) is not page-aligned (%d)\n", "offset (0x%x) is not page-aligned (%d)\n",
offset, AGP_PAGE_SIZE); offset, AGP_PAGE_SIZE);
return FALSE; return FALSE;
} }
pageOffset = offset / AGP_PAGE_SIZE; pageOffset = offset / AGP_PAGE_SIZE;
xf86DrvMsgVerb(screenNum, X_INFO, 3, xf86DrvMsgVerb(screenNum, X_INFO, 3,
"xf86BindGARTMemory: bind key %d at 0x%08lx " "xf86BindGARTMemory: bind key %d at 0x%08x "
"(pgoffset %d)\n", key, offset, pageOffset); "(pgoffset %d)\n", key, offset, pageOffset);
bind.pg_start = pageOffset; bind.pg_start = pageOffset;
@ -279,7 +279,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) { if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
"binding of gart memory with key %d\n" "binding of gart memory with key %d\n"
"\tat offset 0x%lx failed (%s)\n", "\tat offset 0x%x failed (%s)\n",
key, offset, strerror(errno)); key, offset, strerror(errno));
return FALSE; return FALSE;
} }
@ -332,8 +332,8 @@ xf86EnableAGP(int screenNum, CARD32 mode)
setup.agp_mode = mode; setup.agp_mode = mode;
if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) { if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: " xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
"AGPIOC_SETUP with mode %ld failed (%s)\n", "AGPIOC_SETUP with mode %d failed (%s)\n",
(unsigned long)mode, strerror(errno)); mode, strerror(errno));
return FALSE; return FALSE;
} }

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c,v 3.12 2001/12/24 22:54:31 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c,v 3.13 2002/10/16 01:24:28 dawes Exp $ */
#include "X.h" #include "X.h"
#include "os.h" #include "os.h"

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c,v 1.3 2001/02/15 11:03:56 alanh Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_axp.c,v 1.5 2002/11/25 14:05:04 eich Exp $ */
#include <stdio.h> #include <stdio.h>
#include "X.h" #include "X.h"

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c,v 3.5 2000/02/17 13:45:49 dawes Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ev56.c,v 3.7 2002/11/25 14:05:04 eich Exp $ */
#include "X.h" #include "X.h"
#include "input.h" #include "input.h"

View File

@ -1,4 +1,3 @@
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.15 2003/12/02 20:45:13 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.14 2001/10/31 22:50:30 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_init.c,v 3.14 2001/10/31 22:50:30 tsi Exp $ */
/* /*
* Copyright 1992 by Orest Zborowski <obz@Kodak.com> * Copyright 1992 by Orest Zborowski <obz@Kodak.com>
@ -36,8 +35,6 @@
#include "xf86_OSlib.h" #include "xf86_OSlib.h"
#include "lnx.h" #include "lnx.h"
#include <sys/stat.h>
#ifdef USE_DEV_FB #ifdef USE_DEV_FB
extern char *getenv(const char *); extern char *getenv(const char *);
#include <linux/fb.h> #include <linux/fb.h>
@ -48,44 +45,13 @@ static Bool KeepTty = FALSE;
static int VTnum = -1; static int VTnum = -1;
static int activeVT = -1; static int activeVT = -1;
static int vtPermSave[4];
static char vtname[11];
static int
saveVtPerms(void)
{
/* We need to use stat to get permissions. */
struct stat svtp;
/* Do them numerically ordered, hard coded tty0 first. */
if (stat("/dev/tty0", &svtp) != 0)
return 0;
vtPermSave[0] = (int)svtp.st_uid;
vtPermSave[1] = (int)svtp.st_gid;
/* Now check the console we are dealing with. */
if (stat(vtname, &svtp) != 0)
return 0;
vtPermSave[2] = (int)svtp.st_uid;
vtPermSave[3] = (int)svtp.st_gid;
return 1;
}
static void
restoreVtPerms(void)
{
/* Set the terminal permissions back to before we started. */
chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
chown(vtname, vtPermSave[2], vtPermSave[3]);
}
void void
xf86OpenConsole(void) xf86OpenConsole(void)
{ {
int i, fd = -1; int i, fd = -1;
int result; int result;
struct vt_mode VT; struct vt_mode VT;
char vtname[11];
struct vt_stat vts; struct vt_stat vts;
MessageType from = X_PROBED; MessageType from = X_PROBED;
#ifdef USE_DEV_FB #ifdef USE_DEV_FB
@ -158,15 +124,6 @@ xf86OpenConsole(void)
xf86Info.vtno, strerror(errno)); xf86Info.vtno, strerror(errno));
} }
/*
* Grab the vt ownership before we overwrite it.
* Hard coded /dev/tty0 into this function as well for below.
*/
if (!saveVtPerms()){
xf86Msg(X_WARNING,
"xf86OpenConsole: Could not save ownership of VT\n");
}
/* change ownership of the vt */ /* change ownership of the vt */
chown(vtname, getuid(), getgid()); chown(vtname, getuid(), getgid());
@ -290,9 +247,6 @@ xf86CloseConsole()
activeVT = -1; activeVT = -1;
} }
close(xf86Info.consoleFd); /* make the vt-manager happy */ close(xf86Info.consoleFd); /* make the vt-manager happy */
restoreVtPerms(); /* restore the permissions */
return; return;
} }

View File

@ -90,9 +90,10 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
/* don't change, just test */ /* don't change, just test */
kbdrep_s.rate = -1; kbdrep_s.rate = -1;
kbdrep_s.delay = -1; kbdrep_s.delay = -1;
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
return 0; return 0;
} }
/* do the change */ /* do the change */
if (rate == 0) /* switch repeat off */ if (rate == 0) /* switch repeat off */
kbdrep_s.rate = 0; kbdrep_s.rate = 0;
@ -104,7 +105,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
if (kbdrep_s.delay < 1) if (kbdrep_s.delay < 1)
kbdrep_s.delay = 1; kbdrep_s.delay = 1;
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
return 0; return 0;
} }
@ -129,9 +130,8 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
if (kbdrate_s.rate > 50) if (kbdrate_s.rate > 50)
kbdrate_s.rate = 50; kbdrate_s.rate = 50;
if (ioctl( fd, KIOCSRATE, &kbdrate_s )) { if (ioctl( fd, KIOCSRATE, &kbdrate_s ))
return 0; return 0;
}
close( fd ); close( fd );
@ -143,7 +143,12 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
#undef rate #undef rate
#if NeedFunctionPrototypes
void xf86SetKbdRepeat(char rad) void xf86SetKbdRepeat(char rad)
#else
void xf86SetKbdRepeat(rad)
char rad;
#endif
{ {
#ifdef __sparc__ #ifdef __sparc__
int rate = 500; /* Default rate */ int rate = 500; /* Default rate */
@ -173,6 +178,7 @@ void xf86SetKbdRepeat(char rad)
if (xf86Info.kbdDelay >= 0) if (xf86Info.kbdDelay >= 0)
delay = xf86Info.kbdDelay; delay = xf86Info.kbdDelay;
if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */ if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */
return; return;

Some files were not shown because too many files have changed in this diff Show More