DRI XFree86-4_3_99_12-merge import
This commit is contained in:
parent
1c133c27cc
commit
22bad9474b
|
@ -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 */
|
||||
/*
|
||||
** License Applicability. Except to the extent portions of this file are
|
||||
|
@ -425,12 +425,8 @@ __GLXdispatchRenderProcPtr __glXRenderTable[] = {
|
|||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXDisp_SampleCoverageARB,
|
||||
#ifndef MISSING_GL_EXTS
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXDisp_WindowPos3fARB /* 230 */
|
||||
#else
|
||||
__glXNoSuchRenderOpcode
|
||||
#endif
|
||||
};
|
||||
|
||||
__GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
|
||||
|
@ -826,10 +822,6 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE] = {
|
|||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXDispSwap_SampleCoverageARB,
|
||||
#ifndef MISSING_GL_EXTS
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXDispSwap_WindowPos3fARB /* 230 */
|
||||
#else
|
||||
__glXNoSuchRenderOpcode
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -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 */
|
||||
#ifndef _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_MultiTexCoord4ivARB(GLbyte*);
|
||||
extern void __glXDisp_MultiTexCoord4svARB(GLbyte*);
|
||||
extern void __glXDisp_SampleCoverageARB(GLbyte *);
|
||||
extern void __glXDisp_WindowPos3fARB(GLbyte *);
|
||||
|
||||
extern int __glXSwapRender(__GLXclientState*, GLbyte*);
|
||||
|
@ -622,7 +621,6 @@ extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte*);
|
|||
extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte*);
|
||||
extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte*);
|
||||
extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte*);
|
||||
extern void __glXDispSwap_SampleCoverageARB(GLbyte *);
|
||||
extern void __glXDispSwap_WindowPos3fARB(GLbyte *);
|
||||
|
||||
#define __GLX_MIN_GLXCMD_OPCODE 1
|
||||
|
|
|
@ -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 */
|
||||
/*
|
||||
** 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,
|
||||
#ifndef MISSING_GL_EXTS
|
||||
__glXDisp_PointParameterfARB, /* 2065 */
|
||||
__glXDisp_PointParameterfvARB, /* 2066 */
|
||||
#else
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
#endif
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
|
@ -2109,36 +2104,22 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __
|
|||
__glXDisp_CopyTexSubImage1D, /* 4121 */
|
||||
__glXDisp_CopyTexSubImage2D, /* 4122 */
|
||||
__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, /* 4125 */
|
||||
__glXNoSuchRenderOpcode, /* 4126 */
|
||||
__glXNoSuchRenderOpcode, /* 4127 */
|
||||
__glXNoSuchRenderOpcode, /* 4128 */
|
||||
__glXNoSuchRenderOpcode, /* 4129 */
|
||||
__glXNoSuchRenderOpcode, /* 4130 */
|
||||
__glXNoSuchRenderOpcode, /* 4131 */
|
||||
__glXNoSuchRenderOpcode, /* 4132 */
|
||||
__glXNoSuchRenderOpcode, /* 4133 */
|
||||
__glXNoSuchRenderOpcode, /* 4134 */
|
||||
#endif
|
||||
__glXNoSuchRenderOpcode, /* 4135 */
|
||||
__glXNoSuchRenderOpcode, /* 4136 */
|
||||
__glXNoSuchRenderOpcode, /* 4137 */
|
||||
__glXNoSuchRenderOpcode, /* 4138 */
|
||||
__glXNoSuchRenderOpcode, /* 4139 */
|
||||
__glXNoSuchRenderOpcode, /* 4124 */
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode, /* 4130 */
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode, /* 4140 */
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
|
@ -2219,20 +2200,7 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __
|
|||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode, /* 4219 */
|
||||
#ifndef MISSING_GL_EXTS
|
||||
__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] = {
|
||||
__glXDisp_AreTexturesResidentEXT, /* 11 */
|
||||
|
@ -2255,13 +2223,8 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT
|
|||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
#ifndef MISSING_GL_EXTS
|
||||
__glXDispSwap_PointParameterfARB, /* 2065 */
|
||||
__glXDispSwap_PointParameterfvARB, /* 2066 */
|
||||
#else
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
#endif
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
|
@ -4319,36 +4282,22 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT
|
|||
__glXDispSwap_CopyTexSubImage1D, /* 4121 */
|
||||
__glXDispSwap_CopyTexSubImage2D, /* 4122 */
|
||||
__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, /* 4125 */
|
||||
__glXNoSuchRenderOpcode, /* 4126 */
|
||||
__glXNoSuchRenderOpcode, /* 4127 */
|
||||
__glXNoSuchRenderOpcode, /* 4128 */
|
||||
__glXNoSuchRenderOpcode, /* 4129 */
|
||||
__glXNoSuchRenderOpcode, /* 4130 */
|
||||
__glXNoSuchRenderOpcode, /* 4131 */
|
||||
__glXNoSuchRenderOpcode, /* 4132 */
|
||||
__glXNoSuchRenderOpcode, /* 4133 */
|
||||
__glXNoSuchRenderOpcode, /* 4134 */
|
||||
#endif
|
||||
__glXNoSuchRenderOpcode, /* 4135 */
|
||||
__glXNoSuchRenderOpcode, /* 4136 */
|
||||
__glXNoSuchRenderOpcode, /* 4137 */
|
||||
__glXNoSuchRenderOpcode, /* 4138 */
|
||||
__glXNoSuchRenderOpcode, /* 4139 */
|
||||
__glXNoSuchRenderOpcode, /* 4124 */
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode, /* 4130 */
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode, /* 4140 */
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
|
@ -4429,20 +4378,7 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT
|
|||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode,
|
||||
__glXNoSuchRenderOpcode, /* 4219 */
|
||||
#ifndef MISSING_GL_EXTS
|
||||
__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] = {
|
||||
__glXDispSwap_AreTexturesResidentEXT, /* 11 */
|
||||
|
|
|
@ -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 */
|
||||
#ifndef _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_PointParameterfARB(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 int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState*, GLbyte*);
|
||||
|
@ -150,7 +112,7 @@ extern void __glXDispSwap_PointParameterfvARB(GLbyte*);
|
|||
extern void __glXDispSwap_ActiveStencilFaceEXT(GLbyte*);
|
||||
|
||||
#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_MAX_VENDPRIV_OPCODE_EXT 14
|
||||
#define __GLX_VENDPRIV_TABLE_SIZE_EXT (__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1)
|
||||
|
|
|
@ -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 */
|
||||
/*
|
||||
** 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)
|
||||
{
|
||||
glColor3bv(
|
||||
|
@ -1133,7 +982,6 @@ void __glXDisp_TexGend(GLbyte *pc)
|
|||
|
||||
void __glXDisp_TexGendv(GLbyte *pc)
|
||||
{
|
||||
#ifdef __GLX_ALIGN64
|
||||
GLenum pname;
|
||||
GLint cmdlen;
|
||||
GLint compsize;
|
||||
|
@ -1142,6 +990,8 @@ void __glXDisp_TexGendv(GLbyte *pc)
|
|||
compsize = __glTexGendv_size(pname);
|
||||
if (compsize < 0) compsize = 0;
|
||||
cmdlen = __GLX_PAD(8+compsize*8);
|
||||
|
||||
#ifdef __GLX_ALIGN64
|
||||
if ((unsigned long)(pc) & 7) {
|
||||
__GLX_MEM_COPY(pc-4, pc, cmdlen);
|
||||
pc -= 4;
|
||||
|
@ -2230,8 +2080,6 @@ void __glXDisp_MultiTexCoord4svARB(GLbyte *pc)
|
|||
* Extensions
|
||||
*/
|
||||
|
||||
#ifndef MISSING_GL_EXTS
|
||||
|
||||
void __glXDisp_PointParameterfARB(GLbyte *pc)
|
||||
{
|
||||
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)
|
||||
{
|
||||
glActiveStencilFaceEXT(
|
||||
|
@ -2273,13 +2112,3 @@ void __glXDisp_WindowPos3fARB(GLbyte *pc)
|
|||
*(GLfloat *)(pc + 8)
|
||||
);
|
||||
}
|
||||
|
||||
#endif /* !MISSING_GL_EXTS */
|
||||
|
||||
void __glXDisp_SampleCoverageARB(GLbyte *pc)
|
||||
{
|
||||
glSampleCoverageARB(
|
||||
*(GLfloat *)(pc + 0),
|
||||
*(GLboolean *)(pc + 4)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
** 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)
|
||||
{
|
||||
GLenum pname;
|
||||
#ifdef __GLX_ALIGN64
|
||||
GLint cmdlen;
|
||||
#endif
|
||||
GLint compsize;
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
||||
|
@ -1581,9 +1579,9 @@ void __glXDispSwap_TexGendv(GLbyte *pc)
|
|||
pname = *(GLenum *)(pc + 4);
|
||||
compsize = __glTexGendv_size(pname);
|
||||
if (compsize < 0) compsize = 0;
|
||||
cmdlen = __GLX_PAD(8+compsize*8);
|
||||
|
||||
#ifdef __GLX_ALIGN64
|
||||
cmdlen = __GLX_PAD(8+compsize*8);
|
||||
if ((unsigned long)(pc) & 7) {
|
||||
__GLX_MEM_COPY(pc-4, pc, cmdlen);
|
||||
pc -= 4;
|
||||
|
@ -3313,8 +3311,6 @@ void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc)
|
|||
* Extensions
|
||||
*/
|
||||
|
||||
#ifndef MISSING_GL_EXTS
|
||||
|
||||
void __glXDispSwap_PointParameterfARB(GLbyte *pc)
|
||||
{
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
@ -3368,17 +3364,3 @@ void __glXDispSwap_WindowPos3fARB(GLbyte *pc)
|
|||
*(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)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
** 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)
|
||||
{
|
||||
GLsizei n;
|
||||
__GLXcontext *cx;
|
||||
int error;
|
||||
|
||||
|
@ -1272,6 +1273,7 @@ int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
n = *(GLsizei *)(pc + 0);
|
||||
|
||||
glDeleteTextures(
|
||||
*(GLsizei *)(pc + 0),
|
||||
|
@ -1715,6 +1717,7 @@ int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
|
||||
int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
GLsizei n;
|
||||
__GLXcontext *cx;
|
||||
int error;
|
||||
|
||||
|
@ -1723,6 +1726,7 @@ int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
return error;
|
||||
}
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
n = *(GLsizei *)(pc + 0);
|
||||
|
||||
glDeleteTexturesEXT(
|
||||
*(GLsizei *)(pc + 0),
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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_
|
||||
#define _glxbuf_h_
|
||||
|
||||
|
|
|
@ -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
|
||||
** 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;
|
||||
minor = req->minorVersion;
|
||||
(void)major;
|
||||
(void)minor;
|
||||
|
||||
/*
|
||||
** Server should take into consideration the version numbers sent by the
|
||||
|
@ -1554,18 +1552,6 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
|
|||
req = (xGLXVendorPrivateReq *) pc;
|
||||
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) &&
|
||||
(vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) {
|
||||
(*__glXVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])
|
||||
|
|
|
@ -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
|
||||
** 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);
|
||||
}
|
||||
|
||||
int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
|
||||
int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc)
|
||||
{
|
||||
xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
@ -365,7 +365,7 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
|
|||
__GLX_SWAP_SHORT(&req->length);
|
||||
__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;
|
||||
|
||||
#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) &&
|
||||
(vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) {
|
||||
(*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req);
|
||||
|
|
|
@ -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_
|
||||
#define _GLX_error_h_
|
||||
|
||||
|
|
|
@ -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 "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.,
|
||||
|
@ -31,9 +31,6 @@
|
|||
|
||||
|
||||
extern __GLXextensionInfo __glDDXExtensionInfo;
|
||||
void GlxWrapInitVisuals(miInitVisualsProcPtr *);
|
||||
void GlxSetVisualConfigs(int nconfigs,
|
||||
__GLXvisualConfig *configs, void **privates);
|
||||
|
||||
__GLXextensionInfo *__glXExt = &__glDDXExtensionInfo;
|
||||
|
||||
|
|
|
@ -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_
|
||||
#define _glxext_h_
|
||||
|
||||
|
@ -71,7 +71,7 @@ extern GLboolean __glXErrorOccured(void);
|
|||
extern void __glXResetLargeCommandStatus(__GLXclientState*);
|
||||
|
||||
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 __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
|
||||
|
@ -80,10 +80,8 @@ extern void GlxExtensionInit(void);
|
|||
|
||||
extern Bool __glXCoreType(void);
|
||||
|
||||
extern const char GLServerVersion[];
|
||||
extern int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap);
|
||||
|
||||
extern int GlxInitVisuals(
|
||||
#if NeedFunctionPrototypes
|
||||
VisualPtr * visualp,
|
||||
DepthPtr * depthp,
|
||||
int * nvisualp,
|
||||
|
@ -93,6 +91,7 @@ extern int GlxInitVisuals(
|
|||
unsigned long sizes,
|
||||
int bitsPerRGB,
|
||||
int preferredVis
|
||||
#endif
|
||||
);
|
||||
|
||||
#endif /* _glxext_h_ */
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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_
|
||||
#define _glxfb_h_
|
||||
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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_
|
||||
#define _glxmem_h_
|
||||
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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_
|
||||
#define _glxpix_h_
|
||||
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -46,13 +46,11 @@
|
|||
#include "glxserver.h"
|
||||
#include "glxutil.h"
|
||||
|
||||
const char GLServerVersion[] = "1.2";
|
||||
static const char GLServerExtensions[] =
|
||||
"GL_ARB_depth_texture "
|
||||
"GL_ARB_imaging "
|
||||
"GL_ARB_multitexture "
|
||||
"GL_ARB_point_parameters "
|
||||
"GL_ARB_point_sprite "
|
||||
"GL_ARB_shadow "
|
||||
"GL_ARB_shadow_ambient "
|
||||
"GL_ARB_texture_border_clamp "
|
||||
|
@ -110,7 +108,6 @@ static const char GLServerExtensions[] =
|
|||
"GL_MESA_pack_invert "
|
||||
"GL_MESA_ycbcr_texture "
|
||||
"GL_NV_blend_square "
|
||||
"GL_NV_point_sprite "
|
||||
"GL_NV_texgen_reflection "
|
||||
"GL_NV_texture_rectangle "
|
||||
"GL_SGIS_generate_mipmap "
|
||||
|
@ -128,15 +125,11 @@ static const char GLServerExtensions[] =
|
|||
*/
|
||||
static char GLXServerVendorName[] = "SGI";
|
||||
static char GLXServerVersion[] = "1.2";
|
||||
static char GLXServerExtensions[] =
|
||||
"GLX_ARB_multisample "
|
||||
static char GLXServerExtensions[] =
|
||||
"GLX_EXT_visual_info "
|
||||
"GLX_EXT_visual_rating "
|
||||
"GLX_EXT_import_context "
|
||||
"GLX_SGI_make_current_read "
|
||||
#ifndef __DARWIN__
|
||||
"GLX_SGIS_multisample "
|
||||
#endif
|
||||
;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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_
|
||||
#define _GLX_server_h_
|
||||
|
||||
|
@ -280,6 +280,5 @@ extern int __glXColorTableParameterfvSize(GLenum pname);
|
|||
extern int __glXColorTableParameterivSize(GLenum pname);
|
||||
|
||||
extern int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap);
|
||||
extern int __glXPointParameterivReqSize(GLbyte *pc, Bool swap);
|
||||
|
||||
#endif /* !__GLX_server_h__ */
|
||||
|
|
|
@ -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_
|
||||
#define _impsize_h_
|
||||
|
||||
|
@ -67,7 +67,6 @@ extern int __glTexParameterfv_size(GLenum e);
|
|||
extern int __glTexParameteriv_size(GLenum e);
|
||||
extern int __glEvalComputeK(GLenum target);
|
||||
|
||||
extern int __glPointParameterfvARB_size(GLenum e);
|
||||
extern int __glPointParameteriv_size(GLenum e);
|
||||
extern int __glPointParameterfvARB_size(GLenum pname);
|
||||
|
||||
#endif /* _impsize_h_ */
|
||||
|
|
|
@ -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
|
||||
** 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)
|
||||
{
|
||||
GLint order, k;
|
||||
#ifdef __GLX_ALIGN64
|
||||
GLint compsize;
|
||||
#endif
|
||||
GLint order, k, compsize;
|
||||
GLenum target;
|
||||
GLdouble u1, u2, *points;
|
||||
|
||||
target = *(GLenum*) (pc + 16);
|
||||
order = *(GLint*) (pc + 20);
|
||||
k = __glEvalComputeK(target);
|
||||
|
||||
#ifdef __GLX_ALIGN64
|
||||
if (order < 0 || k < 0) {
|
||||
compsize = 0;
|
||||
} else {
|
||||
compsize = order * k;
|
||||
}
|
||||
#endif
|
||||
|
||||
__GLX_GET_DOUBLE(u1,pc);
|
||||
__GLX_GET_DOUBLE(u2,pc+8);
|
||||
pc += 24;
|
||||
|
@ -125,25 +118,18 @@ void __glXDisp_Map1d(GLbyte *pc)
|
|||
void __glXDisp_Map2d(GLbyte *pc)
|
||||
{
|
||||
GLdouble u1, u2, v1, v2, *points;
|
||||
GLint uorder, vorder, ustride, vstride, k;
|
||||
#ifdef __GLX_ALIGN64
|
||||
GLint compsize;
|
||||
#endif
|
||||
GLint uorder, vorder, ustride, vstride, k, compsize;
|
||||
GLenum target;
|
||||
|
||||
target = *(GLenum *)(pc + 32);
|
||||
uorder = *(GLint *)(pc + 36);
|
||||
vorder = *(GLint *)(pc + 40);
|
||||
k = __glEvalComputeK(target);
|
||||
|
||||
#ifdef __GLX_ALIGN64
|
||||
if (vorder < 0 || uorder < 0 || k < 0) {
|
||||
compsize = 0;
|
||||
} else {
|
||||
compsize = uorder * vorder * k;
|
||||
}
|
||||
#endif
|
||||
|
||||
__GLX_GET_DOUBLE(u1,pc);
|
||||
__GLX_GET_DOUBLE(u2,pc+8);
|
||||
__GLX_GET_DOUBLE(v1,pc+16);
|
||||
|
@ -234,16 +220,6 @@ void __glXDisp_DrawArrays(GLbyte *pc)
|
|||
glEnableClientState(GL_EDGE_FLAG_ARRAY);
|
||||
glEdgeFlagPointer(stride, (const GLboolean *)pc);
|
||||
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:
|
||||
break;
|
||||
}
|
||||
|
@ -260,11 +236,10 @@ void __glXDisp_DrawArrays(GLbyte *pc)
|
|||
glDisableClientState(GL_INDEX_ARRAY);
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glDisableClientState(GL_EDGE_FLAG_ARRAY);
|
||||
glDisableClientState(GL_SECONDARY_COLOR_ARRAY);
|
||||
glDisableClientState(GL_FOG_COORDINATE_ARRAY);
|
||||
}
|
||||
|
||||
void __glXDisp_DrawArraysEXT(GLbyte *pc)
|
||||
{
|
||||
__glXDisp_DrawArrays(pc);
|
||||
#ifdef XXX_STUB
|
||||
#endif /*XXX_STUB*/
|
||||
}
|
||||
|
|
|
@ -386,5 +386,6 @@ void __glXDispSwap_DrawArrays(GLbyte *pc)
|
|||
|
||||
void __glXDispSwap_DrawArraysEXT(GLbyte *pc)
|
||||
{
|
||||
__glXDispSwap_DrawArrays(pc);
|
||||
#ifdef XXX_STUB
|
||||
#endif /*XXX_STUB*/
|
||||
}
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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
|
||||
** 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_TEXTURE_COORD_ARRAY:
|
||||
break;
|
||||
case GL_SECONDARY_COLOR_ARRAY:
|
||||
case GL_NORMAL_ARRAY:
|
||||
if (numVals != 3) {
|
||||
/* bad size */
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case GL_FOG_COORDINATE_ARRAY:
|
||||
case GL_INDEX_ARRAY:
|
||||
if (numVals != 1) {
|
||||
/* bad size */
|
||||
|
@ -920,9 +918,3 @@ int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap )
|
|||
}
|
||||
return 4 * __glPointParameterfvARB_size( pname );
|
||||
}
|
||||
|
||||
int __glXPointParameterivReqSize(GLbyte *pc, Bool swap )
|
||||
{
|
||||
/* no difference between fv and iv versions */
|
||||
return __glXPointParameterfvARBReqSize(pc, swap);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -231,9 +231,9 @@ __GLXrenderSizeData __glXRenderSizeTable[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN
|
|||
/* Translatef */ { 16, 0 },
|
||||
/* Viewport */ { 20, 0 },
|
||||
/* PolygonOffset */ { 12, 0 },
|
||||
/* DrawArrays */ { 16, __glXDrawArraysSize },
|
||||
/* no such opcode */ { 0, 0 },
|
||||
/* Indexubv */ { 8, 0 },
|
||||
/* ColorSubTable */ { 44, __glXColorSubTableReqSize },
|
||||
/* ColorSubTable */ { 44, __glXColorSubTableReqSize },
|
||||
/* CopyColorSubTable */ { 24, 0 },
|
||||
/* ActiveTextureARB */ { 8, 0 },
|
||||
/* MultiTexCoord1dvARB */ { 16, 0 },
|
||||
|
@ -2342,17 +2342,17 @@ __GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX
|
|||
/* CopyTexSubImage1D */ { 28, 0 },
|
||||
/* CopyTexSubImage2D */ { 36, 0 },
|
||||
/* CopyTexSubImage3D 4123 */ { 40, 0 },
|
||||
/* FogCoordfv 4124 */ { 8, 0 },
|
||||
/* FogCoorddv 4125 */ { 12, 0 },
|
||||
/* SecondaryColor3bv 4126 */ { 8, 0 },
|
||||
/* SecondaryColor3sv 4127 */ { 12, 0 },
|
||||
/* SecondaryColor3iv 4128 */ { 16, 0 },
|
||||
/* SecondaryColor3fv 4129 */ { 16, 0 },
|
||||
/* SecondaryColor3dv 4130 */ { 28, 0 },
|
||||
/* SecondaryColor3ubv 4131 */ { 8, 0 },
|
||||
/* SecondaryColor3usv 4132 */ { 12, 0 },
|
||||
/* SecondaryColor3uiv 4133 */ { 16, 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 },
|
||||
/* 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 },
|
||||
/* ActiveStencilFaceEXT 4220 */ { 8, 0 },
|
||||
/* PointParameteri 4221 */ { 12, 0 },
|
||||
/* PointParameteriv 4222 */ { 8, __glXPointParameterivReqSize },
|
||||
};
|
||||
|
|
|
@ -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
|
||||
** 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;
|
||||
}
|
||||
|
||||
int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
|
||||
int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
ClientPtr client;
|
||||
__GLXcontext *cx;
|
||||
GLenum name;
|
||||
const char *string;
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
int error;
|
||||
char *buf = NULL, *buf1 = NULL;
|
||||
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);
|
||||
if (!cx) {
|
||||
return error;
|
||||
|
@ -340,32 +331,12 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
|
|||
}
|
||||
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) {
|
||||
length = __glXStrlen((const char *) string) + 1;
|
||||
}
|
||||
|
||||
__GLX_BEGIN_REPLY(length);
|
||||
__GLX_PUT_SIZE(length);
|
||||
|
||||
if ( need_swap ) {
|
||||
__GLX_SWAP_REPLY_SIZE();
|
||||
__GLX_SWAP_REPLY_HEADER();
|
||||
}
|
||||
|
||||
__GLX_SEND_HEADER();
|
||||
WriteToClient(client, length, (char *) string);
|
||||
if (buf != NULL) {
|
||||
|
@ -374,11 +345,6 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
return DoGetString(cl, pc, GL_FALSE);
|
||||
}
|
||||
|
||||
int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
|
||||
{
|
||||
__GLXcontext *cx;
|
||||
|
|
|
@ -262,7 +262,58 @@ int __glXDispSwap_Finish(__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)
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include "glxserver.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 );
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
switch (pname) {
|
||||
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;
|
||||
|
||||
case GL_TEXTURE_ENV_COLOR:
|
||||
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:
|
||||
return -1;
|
||||
}
|
||||
|
@ -156,15 +139,6 @@ GLint __glGetTexParameterfv_size(GLenum pname)
|
|||
case GL_TEXTURE_COMPARE_MODE:
|
||||
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 */
|
||||
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_T_SGIX:
|
||||
case GL_TEXTURE_MAX_CLAMP_R_SGIX:
|
||||
|
||||
/* GL_EXT_texture_filter_anisotropic */
|
||||
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
|
||||
return 1;
|
||||
|
||||
default:
|
||||
|
@ -862,6 +833,10 @@ GLint __glGet_size(GLenum sq)
|
|||
case GL_MAX_CONVOLUTION_WIDTH:
|
||||
case GL_MAX_CONVOLUTION_HEIGHT:
|
||||
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_HP:
|
||||
return 1;
|
||||
|
@ -871,183 +846,6 @@ GLint __glGet_size(GLenum sq)
|
|||
return 1;
|
||||
case GL_RASTER_POSITION_UNCLIPPED_IBM:
|
||||
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:
|
||||
return -1;
|
||||
}
|
||||
|
@ -1087,15 +885,7 @@ GLint __glGetTexLevelParameterfv_size(GLenum pname)
|
|||
case GL_TEXTURE_ALPHA_SIZE:
|
||||
case GL_TEXTURE_LUMINANCE_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;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -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_
|
||||
#define _singlesize_h_
|
||||
|
||||
|
|
|
@ -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__
|
||||
#define __GLX_unpack_h__
|
||||
|
||||
|
|
|
@ -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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _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
|
||||
** made subject to an alternative license as permitted in the SGI Free
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
@ -42,7 +42,7 @@ static XF86ModuleVersionInfo VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
@ -1222,7 +1222,7 @@ static XF86ModuleVersionInfo VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
@ -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.
|
||||
|
@ -1191,8 +1191,8 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
|
|||
|
||||
if (x0 < 0) x0 = 0;
|
||||
if (y0 < 0) y0 = 0;
|
||||
if (x1 > pScreen->width) x1 = pScreen->width;
|
||||
if (y1 > pScreen->height) y1 = pScreen->height;
|
||||
if (x1 > pScreen->width-1) x1 = pScreen->width-1;
|
||||
if (y1 > pScreen->height-1) y1 = pScreen->height-1;
|
||||
|
||||
pDRIPriv->private_buffer_rect.x1 = x0;
|
||||
pDRIPriv->private_buffer_rect.y1 = y0;
|
||||
|
@ -1557,7 +1557,7 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
|||
if(pDRIPriv->nrWindows > 0) {
|
||||
RegionRec reg;
|
||||
|
||||
REGION_NULL(pScreen, ®);
|
||||
REGION_INIT(pScreen, ®, NullBox, 0);
|
||||
TraverseTree(pWin, DRITreeTraversal, (pointer)(®));
|
||||
|
||||
if(REGION_NOTEMPTY(pScreen, ®)) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* $XdotOrg$ */
|
||||
/**************************************************************************
|
||||
|
||||
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.
|
||||
|
||||
**************************************************************************/
|
||||
/* $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:
|
||||
|
@ -44,7 +43,7 @@ static XF86ModuleVersionInfo VersRec =
|
|||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
* SAREA definitions.
|
||||
|
|
|
@ -241,7 +241,7 @@ ProcXF86DRIAuthConnection(
|
|||
rep.authenticated = 1;
|
||||
|
||||
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;
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep);
|
||||
|
|
|
@ -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 $
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
@ -117,13 +117,11 @@ has_bwx(void)
|
|||
#endif
|
||||
}
|
||||
#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 int abw_count = -1;
|
||||
|
||||
static void
|
||||
init_abw(void)
|
||||
init_abw()
|
||||
{
|
||||
if (abw_count < 0) {
|
||||
abw_count = alpha_bus_getwindows(ALPHA_BUS_TYPE_PCI_MEM, &abw);
|
||||
|
@ -144,7 +142,7 @@ has_bwx(void)
|
|||
}
|
||||
|
||||
static unsigned long
|
||||
dense_base(void)
|
||||
dense_base()
|
||||
{
|
||||
if (abw_count < 0)
|
||||
init_abw();
|
||||
|
@ -156,7 +154,7 @@ dense_base(void)
|
|||
}
|
||||
|
||||
static unsigned long
|
||||
memory_base(void)
|
||||
memory_base()
|
||||
{
|
||||
if (abw_count < 0)
|
||||
init_abw();
|
||||
|
@ -286,13 +284,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
|
|||
xf86Msg(X_PROBED,"Machine needs sparse mapping\n");
|
||||
pVidMem->mapMem = mapVidMemSparse;
|
||||
pVidMem->unmapMem = unmapVidMemSparse;
|
||||
#ifndef __NetBSD__
|
||||
if (axpSystem == -1)
|
||||
axpSystem = bsdGetAXP();
|
||||
hae_thresh = xf86AXPParams[axpSystem].hae_thresh;
|
||||
hae_mask = xf86AXPParams[axpSystem].hae_mask;
|
||||
sparse_size = xf86AXPParams[axpSystem].size;
|
||||
#endif /* __NetBSD__ */
|
||||
}
|
||||
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);
|
||||
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,
|
||||
strerror(errno));
|
||||
}
|
||||
|
@ -328,7 +324,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
/* else, mmap /dev/vga */
|
||||
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);
|
||||
}
|
||||
base = mmap(0, Size,
|
||||
|
@ -376,7 +372,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
if ((long)ptr == -1)
|
||||
{
|
||||
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));
|
||||
return(-1);
|
||||
}
|
||||
|
@ -494,7 +490,6 @@ struct parms {
|
|||
u_int64_t hae;
|
||||
};
|
||||
|
||||
#ifndef __NetBSD__
|
||||
static int
|
||||
sethae(u_int64_t hae)
|
||||
{
|
||||
|
@ -510,7 +505,6 @@ sethae(u_int64_t hae)
|
|||
return -1;
|
||||
#endif
|
||||
}
|
||||
#endif /* __NetBSD__ */
|
||||
|
||||
static pointer
|
||||
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 msb;
|
||||
|
||||
mem_barrier();
|
||||
Offset += (unsigned long)Base - (unsigned long)memBase;
|
||||
shift = (Offset & 0x3) << 3;
|
||||
|
@ -566,12 +561,11 @@ readSparse8(pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
||||
result = *(vuip) ((unsigned long)memSBase + (Offset << 5));
|
||||
result >>= shift;
|
||||
return 0xffUL & result;
|
||||
|
@ -590,9 +584,7 @@ readSparse16(pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
@ -620,9 +612,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
@ -641,9 +631,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
@ -671,9 +659,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
@ -691,9 +677,7 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset)
|
|||
msb = Offset & hae_mask ;
|
||||
Offset -= msb;
|
||||
if (msb_set != msb) {
|
||||
#ifndef __NetBSD__
|
||||
sethae(msb);
|
||||
#endif
|
||||
msb_set = msb;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
@ -18,7 +18,7 @@ resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
|
|||
|
||||
#ifdef INCLUDE_XF86_NO_DOMAIN
|
||||
|
||||
#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
|
||||
#if defined(__alpha__) || defined(__sparc64__)
|
||||
|
||||
resPtr
|
||||
xf86BusAccWindowsFromOS(void)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
|
|
@ -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 "os.h"
|
||||
|
|
|
@ -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 "os.h"
|
||||
|
@ -23,9 +23,9 @@ axpDevice bsdGetAXP(void);
|
|||
typedef struct {
|
||||
char *name;
|
||||
int type;
|
||||
} _AXP;
|
||||
} AXP;
|
||||
|
||||
static _AXP axpList[] = {
|
||||
static AXP axpList[] = {
|
||||
{"apecs",APECS},
|
||||
{"pyxis",PYXIS},
|
||||
{"cia",CIA},
|
||||
|
|
|
@ -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 "input.h"
|
||||
|
|
|
@ -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 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
@ -160,7 +160,7 @@ xf86OpenConsole()
|
|||
/* check if we are run with euid==0 */
|
||||
if (geteuid() != 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: Server must be suid root");
|
||||
FatalError("xf86OpenConsole: Server must be suid root\n");
|
||||
}
|
||||
|
||||
if (!KeepTty)
|
||||
|
@ -198,7 +198,7 @@ xf86OpenConsole()
|
|||
strcat(cons_drivers, supported_drivers[i]);
|
||||
}
|
||||
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);
|
||||
}
|
||||
#if 0 /* stdin is already closed in OsInit() */
|
||||
|
@ -213,7 +213,7 @@ xf86OpenConsole()
|
|||
case PCCONS:
|
||||
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),
|
||||
CHECK_DRIVER_MSG);
|
||||
}
|
||||
|
@ -282,18 +282,18 @@ acquire_vt:
|
|||
vtmode.frsig = SIGUSR1;
|
||||
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 (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: KDENABIO failed (%s)",
|
||||
FatalError("xf86OpenConsole: KDENABIO failed (%s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
#endif
|
||||
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
|
||||
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
|
||||
}
|
||||
break;
|
||||
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
|
||||
|
@ -337,7 +337,7 @@ xf86OpenPccons()
|
|||
if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0)
|
||||
{
|
||||
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",
|
||||
strerror(errno),
|
||||
"Was expecting pccons driver with X support",
|
||||
|
@ -427,11 +427,11 @@ xf86OpenSyscons()
|
|||
{
|
||||
if (syscons_version >= 0x100)
|
||||
{
|
||||
FatalError("%s: Cannot find a free VT",
|
||||
FatalError("%s: Cannot find a free VT\n",
|
||||
"xf86OpenSyscons");
|
||||
}
|
||||
/* Should no longer reach here */
|
||||
FatalError("%s: %s %s\n\t%s %s",
|
||||
FatalError("%s: %s %s\n\t%s %s\n",
|
||||
"xf86OpenSyscons",
|
||||
"syscons versions prior to 1.0 require",
|
||||
"either the",
|
||||
|
@ -450,18 +450,18 @@ xf86OpenSyscons()
|
|||
#endif
|
||||
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));
|
||||
}
|
||||
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
|
||||
{
|
||||
FatalError("xf86OpenSyscons: VT_GETMODE failed");
|
||||
FatalError("xf86OpenSyscons: VT_GETMODE failed\n");
|
||||
}
|
||||
xf86Info.consType = SYSCONS;
|
||||
xf86Msg(X_PROBED, "Using syscons driver with X support");
|
||||
if (syscons_version >= 0x100)
|
||||
{
|
||||
xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
|
||||
xf86ErrorF(" (version %d.%d)\n", syscons_version >> 8,
|
||||
syscons_version & 0xFF);
|
||||
}
|
||||
else
|
||||
|
@ -515,7 +515,7 @@ xf86OpenPcvt()
|
|||
{
|
||||
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",
|
||||
"Found pcvt driver but X11 seems to be",
|
||||
" not supported.", CHECK_DRIVER_MSG);
|
||||
|
@ -554,7 +554,7 @@ xf86OpenPcvt()
|
|||
}
|
||||
else
|
||||
{
|
||||
FatalError("%s: Cannot find a free VT",
|
||||
FatalError("%s: Cannot find a free VT\n",
|
||||
"xf86OpenPcvt");
|
||||
}
|
||||
}
|
||||
|
@ -564,12 +564,12 @@ xf86OpenPcvt()
|
|||
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
|
||||
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));
|
||||
}
|
||||
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
|
||||
{
|
||||
FatalError("xf86OpenPcvt: VT_GETMODE failed");
|
||||
FatalError("xf86OpenPcvt: VT_GETMODE failed\n");
|
||||
}
|
||||
xf86Info.consType = PCVT;
|
||||
#ifdef WSCONS_SUPPORT
|
||||
|
@ -616,7 +616,7 @@ xf86OpenWScons()
|
|||
}
|
||||
if (fd != -1) {
|
||||
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),
|
||||
CHECK_DRIVER_MSG);
|
||||
}
|
||||
|
@ -654,7 +654,7 @@ xf86CloseConsole()
|
|||
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
|
||||
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
|
||||
{
|
||||
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
|
||||
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
#endif
|
||||
|
@ -678,7 +678,7 @@ xf86CloseConsole()
|
|||
close(xf86Info.consoleFd);
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 1993 by David Dawes <dawes@xfree86.org>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
/* 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 <unistd.h>
|
||||
|
|
|
@ -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.
|
||||
|
@ -33,7 +33,7 @@ static KbdProtocolRec protocols[] = {
|
|||
#ifdef WSCONS_SUPPORT
|
||||
{"wskbd", PROT_WSCONS },
|
||||
#endif
|
||||
{ NULL, PROT_UNKNOWN_KBD }
|
||||
{ NULL, PROT_UNKNOWN }
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
@ -408,7 +408,7 @@ OpenKeyboard(InputInfoPtr pInfo)
|
|||
{
|
||||
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
|
||||
int i;
|
||||
KbdProtocolId prot = PROT_UNKNOWN_KBD;
|
||||
KbdProtocolId prot = PROT_UNKNOWN;
|
||||
char *s;
|
||||
|
||||
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
|
||||
|
@ -497,7 +497,7 @@ OpenKeyboard(InputInfoPtr pInfo)
|
|||
#endif
|
||||
default:
|
||||
xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"",
|
||||
pInfo->name, pKbd->wsKbdType);
|
||||
pKbd->wsKbdType, pInfo->name);
|
||||
close(pInfo->fd);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
CARD8 *pModMap);
|
||||
|
|
|
@ -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 <fcntl.h>
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* 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).
|
||||
* Copyright 1999 by The XFree86 Project, Inc.
|
||||
*/
|
||||
|
||||
#include "X.h"
|
||||
|
@ -68,30 +45,6 @@
|
|||
static void usbSigioReadInput (int fd, void *closure);
|
||||
#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
|
||||
SupportedInterfaces(void)
|
||||
{
|
||||
|
@ -151,8 +104,6 @@ DefaultProtocol(void)
|
|||
{
|
||||
#if defined(__FreeBSD__)
|
||||
return "Auto";
|
||||
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||
return "WSMouse";
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
@ -207,7 +158,7 @@ SetupAuto(InputInfoPtr pInfo, int *protoPara)
|
|||
protoPara[0] = mode.syncmask[0];
|
||||
protoPara[1] = mode.syncmask[1];
|
||||
}
|
||||
xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n",
|
||||
xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n",
|
||||
pInfo->name, devproto[i].name);
|
||||
return devproto[i].name;
|
||||
}
|
||||
|
@ -245,142 +196,7 @@ SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
|
||||
#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
|
||||
#if defined(WSCONS_SUPPORT)
|
||||
#define NUMEVENTS 64
|
||||
|
||||
static void
|
||||
|
@ -686,11 +502,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
|
|||
#ifdef USB_NEW_HID
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
|
||||
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),
|
||||
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),
|
||||
hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) {
|
||||
|
@ -698,11 +514,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
|
|||
#else
|
||||
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
|
||||
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),
|
||||
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),
|
||||
hid_input, &pUsbMse->loc_z) < 0) {
|
||||
|
@ -772,13 +588,6 @@ xf86OSMouseInit(int flags)
|
|||
p->SetPS2Res = SetSysMouseRes;
|
||||
p->SetBMRes = 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
|
||||
p->PreInit = bsdMousePreInit;
|
||||
return p;
|
||||
|
|
|
@ -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 1993 by David Wexelblat <dwex@goblin.org>
|
||||
|
@ -62,11 +62,11 @@
|
|||
#ifdef __OpenBSD__
|
||||
#define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\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 \
|
||||
"Check that you have set 'machdep.allowaperture=2'\n" \
|
||||
"\tin /etc/sysctl.conf and reboot your machine\n" \
|
||||
"\trefer to xf86(4) for details"
|
||||
"\trefer to xf86(4) for details\n"
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
|
@ -220,7 +220,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
{
|
||||
if (devMemFd < 0)
|
||||
{
|
||||
FatalError("xf86MapVidMem: failed to open %s (%s)",
|
||||
FatalError("xf86MapVidMem: failed to open %s (%s)\n",
|
||||
DEV_MEM, strerror(errno));
|
||||
}
|
||||
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);
|
||||
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,
|
||||
strerror(errno));
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
/* else, mmap /dev/vga */
|
||||
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);
|
||||
}
|
||||
base = mmap(0, Size,
|
||||
|
@ -250,7 +250,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
);
|
||||
if (base == MAP_FAILED)
|
||||
{
|
||||
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)",
|
||||
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
|
||||
strerror(errno));
|
||||
}
|
||||
return(base);
|
||||
|
@ -288,7 +288,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
if ((long)ptr == -1)
|
||||
{
|
||||
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));
|
||||
#ifdef __OpenBSD__
|
||||
if (Base < 0xa0000) {
|
||||
|
@ -328,7 +328,7 @@ xf86EnableIO()
|
|||
if (i386_iopl(TRUE) < 0)
|
||||
{
|
||||
#ifndef __OpenBSD__
|
||||
FatalError("%s: Failed to set IOPL for extended I/O",
|
||||
FatalError("%s: Failed to set IOPL for extended I/O\n",
|
||||
"xf86EnableIO");
|
||||
#else
|
||||
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)
|
||||
{
|
||||
FatalError("xf86EnableIO: "
|
||||
"Failed to open /dev/io for extended I/O");
|
||||
"Failed to open /dev/io for extended I/O\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ xf86SetTVOut(int mode)
|
|||
#endif /* PCCONS_SUPPORT */
|
||||
|
||||
default:
|
||||
FatalError("Xf86SetTVOut: Unsupported console");
|
||||
FatalError("Xf86SetTVOut: Unsupported console\n");
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
@ -464,7 +464,7 @@ xf86SetRGBOut()
|
|||
#endif /* PCCONS_SUPPORT */
|
||||
|
||||
default:
|
||||
FatalError("Xf86SetTVOut: Unsupported console");
|
||||
FatalError("Xf86SetTVOut: Unsupported console\n");
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* 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 <stdlib.h>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* 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>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* 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 <stdlib.h>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* 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 <err.h>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" 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
|
||||
.Dt USB 3
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* 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)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# 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.
|
||||
#
|
||||
# $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
|
||||
0x00 Undefined
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* 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 {
|
||||
unsigned int size;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* $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
|
||||
#define _MEMRANGE_H
|
||||
|
|
|
@ -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 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),
|
||||
MAP_SHARED, fd, Base);
|
||||
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));
|
||||
|
||||
return base;
|
||||
|
@ -102,7 +102,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
if (kmem == -1) {
|
||||
kmem = open(DEV_MEM, 2);
|
||||
if (kmem == -1) {
|
||||
FatalError("xf86ReadBIOS: open %s", DEV_MEM);
|
||||
FatalError("xf86ReadBIOS: open %s\n", DEV_MEM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 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),
|
||||
MAP_SHARED, fd, Base);
|
||||
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));
|
||||
return base;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
@ -453,9 +453,9 @@ pciHostAddrToBusAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
|
|||
* to the base address register to get an accurate result. Otherwise it
|
||||
* 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
|
||||
* indicated by setting *min to TRUE (when min is non-NULL). This happens
|
||||
* when either the destructive flag is set, the information is supplied by
|
||||
* the OS if the OS supports this.
|
||||
* indicated by setting *min to TRUE (when min is non-NULL). This currently
|
||||
* only happens when the destructive flag is set, but in future it may be
|
||||
* possible to get the information from the OS when supported.
|
||||
*/
|
||||
|
||||
int
|
||||
|
@ -575,7 +575,7 @@ Bool
|
|||
pciMfDev(int busnum, int devnum)
|
||||
{
|
||||
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 */
|
||||
|
||||
|
@ -782,7 +782,7 @@ pciGenFindNext(void)
|
|||
(sub_class != PCI_SUBCLASS_BRIDGE_CARDBUS))
|
||||
xf86Msg(X_WARNING,
|
||||
"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);
|
||||
pri_bus = pciBusNum;
|
||||
}
|
||||
|
@ -1016,9 +1016,7 @@ xf86scanpci(int flags)
|
|||
if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN))
|
||||
break;
|
||||
pciWriteByte(tag, PCI_PCI_BRIDGE_CONTROL_REG,
|
||||
devp->pci_bridge_control &
|
||||
~(PCI_PCI_BRIDGE_MASTER_ABORT_EN |
|
||||
PCI_PCI_BRIDGE_SECONDARY_RESET));
|
||||
devp->pci_bridge_control & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1081,7 +1079,7 @@ xf86scanpci(int flags)
|
|||
if (!(devp->pci_bridge_control & PCI_PCI_BRIDGE_MASTER_ABORT_EN))
|
||||
break;
|
||||
pciWriteByte(devp->tag, PCI_PCI_BRIDGE_CONTROL_REG,
|
||||
devp->pci_bridge_control & ~PCI_PCI_BRIDGE_SECONDARY_RESET);
|
||||
devp->pci_bridge_control);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1139,7 +1137,7 @@ xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
|
|||
base = xf86MapDomainMemory(ScreenNum, Flags, Tag, hostbase, Size);
|
||||
if (!base) {
|
||||
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));
|
||||
}
|
||||
/*
|
||||
|
@ -1189,8 +1187,8 @@ handlePciBIOS(PCITAG Tag, int basereg,
|
|||
savebase = pciReadLong(Tag, PCI_MAP_REG_START+(b_reg<<2));
|
||||
xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]"
|
||||
" for device %i:%i:%i\n", basereg,
|
||||
(int)PCI_BUS_FROM_TAG(Tag), (int)PCI_DEV_FROM_TAG(Tag),
|
||||
(int)PCI_FUNC_FROM_TAG(Tag));
|
||||
PCI_BUS_FROM_TAG(Tag), PCI_DEV_FROM_TAG(Tag),
|
||||
PCI_FUNC_FROM_TAG(Tag));
|
||||
pciWriteLong(Tag, PCI_MAP_REG_START + (b_reg << 2),
|
||||
(CARD32)~0);
|
||||
}
|
||||
|
@ -1299,7 +1297,7 @@ readPciBios(PCITAG Tag, CARD8* tmp, ADDRESS hostbase, pointer args)
|
|||
}
|
||||
if ((rd->Offset) > (image_length)) {
|
||||
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 {
|
||||
if ((rd->Offset + rd->Len) > (image_length)) {
|
||||
rd->Len = (image_length) - rd->Offset;
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
@ -255,13 +255,9 @@
|
|||
# define ARCH_PCI_INIT linuxPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# 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
|
||||
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
|
||||
#elif defined(__i386__) || defined(i386)
|
||||
#elif defined(__i386__)
|
||||
# define ARCH_PCI_INIT ix86PciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
|
@ -312,27 +308,21 @@
|
|||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# endif
|
||||
#elif defined(__sparc__) || defined(sparc)
|
||||
#elif defined(__sparc__)
|
||||
# if defined(linux)
|
||||
# define ARCH_PCI_INIT linuxPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# elif defined(sun)
|
||||
# define ARCH_PCI_INIT sparcPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc64__)
|
||||
# elif defined(__OpenBSD__) && defined(__sparc64__)
|
||||
# define ARCH_PCI_INIT freebsdPciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# endif
|
||||
# if !defined(__FreeBSD__)
|
||||
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
|
||||
# endif
|
||||
#elif defined(__amd64__)
|
||||
# if defined(__FreeBSD__)
|
||||
# define ARCH_PCI_INIT freebsdPciInit
|
||||
# else
|
||||
# define ARCH_PCI_INIT ix86PciInit
|
||||
# endif
|
||||
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
|
||||
#elif defined(__AMD64__)
|
||||
# define ARCH_PCI_INIT ix86PciInit
|
||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||
# define INCLUDE_XF86_NO_DOMAIN
|
||||
# if defined(linux)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* 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.
|
||||
*/
|
||||
/* $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 <stdio.h>
|
||||
|
@ -170,8 +170,6 @@ promIsP1275(void)
|
|||
promP1275 = TRUE;
|
||||
else
|
||||
promP1275 = FALSE;
|
||||
#elif defined(__FreeBSD__)
|
||||
promP1275 = TRUE;
|
||||
#else
|
||||
#error Missing promIsP1275() function for this OS
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
@ -84,7 +84,7 @@ static pciBusInfo_t freebsdPci0 = {
|
|||
/* bridge */ NULL
|
||||
};
|
||||
|
||||
#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
|
||||
#if !defined(__OpenBSD__)
|
||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
||||
#ifdef __sparc__
|
||||
#ifndef ASI_PL
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
@ -345,9 +345,8 @@ void ix86PciSelectCfgmech(void)
|
|||
|
||||
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
|
||||
xf86MsgVerb(X_INFO, 3,
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08lx, mode1Res1"
|
||||
" = 0x%08lx\n", stages, (unsigned long)oldVal1,
|
||||
(unsigned long)mode1Res1);
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08x, mode1Res1"
|
||||
" = 0x%08x\n", stages, oldVal1, mode1Res1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -400,10 +399,9 @@ void ix86PciSelectCfgmech(void)
|
|||
|
||||
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
|
||||
xf86MsgVerb(X_INFO, 3,
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
|
||||
"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
|
||||
stages, (unsigned long)oldVal1,
|
||||
(unsigned long)mode1Res1, (unsigned long)mode1Res2);
|
||||
"PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
|
||||
"\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
|
||||
stages, oldVal1, mode1Res1, mode1Res2);
|
||||
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: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
|
||||
"\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
|
||||
stages, (unsigned long)oldVal1, (unsigned long)mode1Res1,
|
||||
(unsigned long)mode1Res2);
|
||||
xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
|
||||
"\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
|
||||
stages, oldVal1, mode1Res1, mode1Res2);
|
||||
|
||||
/* Try config type 2 */
|
||||
oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG);
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* 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.
|
||||
*/
|
||||
/* $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
|
||||
#define _XF86_SBUS_H
|
||||
|
@ -35,13 +35,7 @@
|
|||
#elif defined(__OpenBSD__) && defined(__sparc64__)
|
||||
/* XXX */
|
||||
#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>
|
||||
#endif
|
||||
#else
|
||||
#include <sun/fbio.h>
|
||||
#endif
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
@ -97,10 +97,9 @@
|
|||
#define LBA_PORT5_CNTRL 0x1228U
|
||||
#define LBA_PORT6_CNTRL 0x1230U
|
||||
#define LBA_PORT7_CNTRL 0x1238U
|
||||
#define LBA_RESET_FUNCTION 0x0000000001UL
|
||||
#define LBA_CLEAR_ERROR 0x0000000010UL
|
||||
#define LBA_HARD_FAIL 0x0000000040UL
|
||||
#define LBA_RESET_COMPLETE 0x0100000000UL
|
||||
#define LBA_ROPE_RESET 0x01UL
|
||||
#define LBA_CLEAR_ERROR 0x10UL
|
||||
#define LBA_HARD_FAIL 0x40UL
|
||||
|
||||
#define ROPE_PAGE_CONTROL 0x1418U
|
||||
|
||||
|
@ -118,11 +117,8 @@
|
|||
#define IOA_SUBORDINATE_BUS 0x0059U
|
||||
|
||||
#define IOA_CONTROL 0x0108U
|
||||
#define IOA_RESET_FUNCTION 0x0000000001UL
|
||||
#define IOA_FORWARD_VGA 0x0000000008UL
|
||||
#define IOA_CLEAR_ERROR 0x0000000010UL
|
||||
#define IOA_HARD_FAIL 0x0000000040UL
|
||||
#define IOA_RESET_COMPLETE 0x0100000000UL
|
||||
#define IOA_FORWARD_VGA 0x08UL
|
||||
#define IOA_HARD_FAIL 0x40UL
|
||||
|
||||
#define IOA_LMMIO_BASE 0x0200U
|
||||
#define IOA_LMMIO_MASK 0x0208U
|
||||
|
@ -138,33 +134,12 @@
|
|||
#define IOA_ELMMIO_MASK 0x0258U
|
||||
#define IOA_EIOS_BASE 0x0260U
|
||||
#define IOA_EIOS_MASK 0x0268U
|
||||
#define IOA_GLOBAL_MASK 0x0270U
|
||||
|
||||
#define IOA_SLAVE_CONTROL 0x0278U
|
||||
#define IOA_VGA_PEER_ENABLE 0x2000UL
|
||||
#define IOA_MSI_BASE 0x0280U
|
||||
#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 IO_MASK ((1UL << 16) - 1UL)
|
||||
|
@ -181,15 +156,10 @@
|
|||
static CARD8 *pZX1mio = NULL,
|
||||
*pZX1ioa = NULL;
|
||||
|
||||
/* Per-rope data */
|
||||
static INT8 zx1_ropemap[8];
|
||||
static CARD32 zx1_pciids[8];
|
||||
static CARD64 zx1_lbacntl[8];
|
||||
static INT8 zx1_ropemap[8]; /* One for each (potential) rope */
|
||||
static CARD64 zx1_lbacntl[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 int zx1_fakebus = -1;
|
||||
static Bool zx1_hasvga = FALSE;
|
||||
|
@ -322,8 +292,7 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
|
|||
* SLAVE_CONTROL register.
|
||||
*/
|
||||
tmp1 = MIO_QUAD(VGA_ROUTE);
|
||||
tmp2 = IOA_QUAD(ropenum, IOA_CONTROL) &
|
||||
~(IOA_RESET_FUNCTION | IOA_CLEAR_ERROR);
|
||||
tmp2 = IOA_QUAD(ropenum, IOA_CONTROL);
|
||||
if ((tmp1 & VGA_ENABLE) && ((tmp1 & 0x07UL) == ropenum)) {
|
||||
current |= 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;
|
||||
tmp3 = IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL);
|
||||
if (tmp3 & IOA_FORWARD_VGA)
|
||||
IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL) = tmp3 &
|
||||
~(IOA_RESET_FUNCTION | IOA_FORWARD_VGA |
|
||||
IOA_CLEAR_ERROR);
|
||||
IOA_QUAD(tmp1 & 0x07UL, IOA_CONTROL) =
|
||||
tmp3 & ~IOA_FORWARD_VGA;
|
||||
}
|
||||
if (!(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 */
|
||||
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)) {
|
||||
current |= PCI_PCI_BRIDGE_MASTER_ABORT_EN;
|
||||
if ((mask & PCI_PCI_BRIDGE_MASTER_ABORT_EN) &&
|
||||
|
@ -423,15 +391,14 @@ GetZX1BridgeResources(int bus,
|
|||
static CARD32
|
||||
zx1FakeReadLong(PCITAG tag, int offset)
|
||||
{
|
||||
FatalError("zx1FakeReadLong(0x%lX, 0x%X) called\n",
|
||||
(unsigned long)tag, offset);
|
||||
FatalError("zx1FakeReadLong(0x%X, 0x%X) called\n", tag, offset);
|
||||
}
|
||||
|
||||
static void
|
||||
zx1FakeWriteLong(PCITAG tag, int offset, CARD32 val)
|
||||
{
|
||||
FatalError("zx1FakeWriteLong(0x%lX, 0x%X, 0x%08X) called\n",
|
||||
(unsigned long)tag, offset, val);
|
||||
FatalError("zx1FakeWriteLong(0x%X, 0x%X, 0x%08X) called\n",
|
||||
tag, offset, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -477,13 +444,13 @@ xf86PreScanZX1(void)
|
|||
resRange range;
|
||||
unsigned long mapSize = xf86getpagesize();
|
||||
unsigned long tmp, base, ioaaddr;
|
||||
unsigned long flagsd, based, lastd, maskd, routed;
|
||||
unsigned long flags0, base0, last0, mask0, route0;
|
||||
unsigned long flags1, base1, last1, mask1, route1;
|
||||
unsigned long flags2, base2, last2, mask2, route2;
|
||||
unsigned long flags3, base3, last3, mask3, route3;
|
||||
unsigned long flagsg, baseg, lastg, maskg, routeg;
|
||||
unsigned long flagsl, basel, lastl;
|
||||
unsigned long flagsd = 0, based = 0, lastd = 0, maskd = 0, routed = 0;
|
||||
unsigned long flags0 = 0, base0 = 0, last0 = 0, mask0 = 0, route0 = 0;
|
||||
unsigned long flags1 = 0, base1 = 0, last1 = 0, mask1 = 0, route1 = 0;
|
||||
unsigned long flags2 = 0, base2 = 0, last2 = 0, mask2 = 0, route2 = 0;
|
||||
unsigned long flags3 = 0, base3 = 0, last3 = 0, mask3 = 0, route3 = 0;
|
||||
unsigned long flagsg = 0, baseg = 0, lastg = 0, maskg = 0, routeg = 0;
|
||||
unsigned long flagsl = 0, basel = 0, lastl = 0;
|
||||
int i, rope;
|
||||
|
||||
/* Map mio registers (minimum 8k) */
|
||||
|
@ -493,7 +460,7 @@ xf86PreScanZX1(void)
|
|||
if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize)))
|
||||
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) !=
|
||||
DEVID(VENDOR_HP, CHIP_ZX1_SBA)) ||
|
||||
(MIO_LONG(MIO_FUNCTION1 + PCI_ID_REG) !=
|
||||
|
@ -552,17 +519,16 @@ xf86PreScanZX1(void)
|
|||
|
||||
/* Prevent hard-fails */
|
||||
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)
|
||||
MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) =
|
||||
zx1_lbacntl[i] & ~LBA_HARD_FAIL;
|
||||
|
||||
/* Poke for an ioa */
|
||||
zx1_pciids[i] = IOA_LONG(i, PCI_ID_REG);
|
||||
switch (zx1_pciids[i]) {
|
||||
tmp = IOA_LONG(i, PCI_ID_REG);
|
||||
switch ((CARD32)tmp) {
|
||||
case DEVID(VENDOR_HP, CHIP_ELROY):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA): /* Mercury */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_AGP8): /* QuickSilver */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA):
|
||||
/* Expected vendor/device IDs */
|
||||
zx1_busno[i] =
|
||||
(unsigned int)IOA_BYTE(i, IOA_SECONDARY_BUS);
|
||||
|
@ -571,10 +537,10 @@ xf86PreScanZX1(void)
|
|||
break;
|
||||
|
||||
default:
|
||||
if ((CARD16)(zx1_pciids[i] + 1U) > (CARD16)1U)
|
||||
if ((CARD16)(tmp + 1U) > (CARD16)1U)
|
||||
xf86MsgVerb(X_NOTICE, 0,
|
||||
"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 */
|
||||
|
||||
/*
|
||||
|
@ -621,14 +587,6 @@ xf86PreScanZX1(void)
|
|||
* 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) {
|
||||
flagsd = RANGE_ENABLE;
|
||||
maskd = MIO_QUAD(IOS_DIST_MASK);
|
||||
|
@ -938,9 +896,6 @@ xf86PostScanZX1(void)
|
|||
if (!pZX1mio)
|
||||
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
|
||||
* prevent any possible interference with our PCI validation.
|
||||
|
@ -952,11 +907,9 @@ xf86PostScanZX1(void)
|
|||
ppPCI = ppPCI2 = xf86scanpci(0); /* Recursion is only apparent */
|
||||
while ((pPCI = *ppPCI2++)) {
|
||||
switch (pPCI->pci_device_vendor) {
|
||||
case DEVID(VENDOR_HP, CHIP_ELROY):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_SBA): /* Pluto function 0 */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_IOC): /* Pluto function 1 */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA): /* Mercury */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_AGP8): /* QuickSilver */
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_SBA):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_IOC):
|
||||
case DEVID(VENDOR_HP, CHIP_ZX1_LBA):
|
||||
xfree(pPCI); /* Remove it */
|
||||
continue;
|
||||
|
||||
|
@ -964,8 +917,6 @@ xf86PostScanZX1(void)
|
|||
*ppPCI++ = pPCI;
|
||||
idx++;
|
||||
|
||||
zx1_busnmpt[pPCI->busnum] = TRUE;
|
||||
|
||||
if (zx1_hasvga)
|
||||
continue;
|
||||
|
||||
|
@ -990,8 +941,8 @@ xf86PostScanZX1(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Restore hard-fail settings and figure out the actual secondary and
|
||||
* subordinate bus numbers.
|
||||
* Restore hard-fail settings and figure out the actual subordinate bus
|
||||
* numbers.
|
||||
*/
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (zx1_ropemap[i] != i)
|
||||
|
@ -1005,14 +956,6 @@ xf86PostScanZX1(void)
|
|||
|
||||
if (zx1_fakebus <= zx1_subno[i])
|
||||
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) {
|
||||
|
@ -1022,13 +965,13 @@ xf86PostScanZX1(void)
|
|||
}
|
||||
|
||||
/* Set up our extra bus functions */
|
||||
zx1BusFuncs = *(pBusInfo->funcs);
|
||||
zx1BusFuncs = *(pciBusInfo[0]->funcs);
|
||||
zx1BusFuncs.pciControlBridge = ControlZX1Bridge;
|
||||
zx1BusFuncs.pciGetBridgeResources = GetZX1BridgeResources;
|
||||
|
||||
/* Set up our own fake bus to act as the root segment */
|
||||
zx1FakeBus.configMech = pBusInfo->configMech;
|
||||
zx1FakeBus.numDevices = pBusInfo->numDevices;
|
||||
zx1FakeBus.configMech = pciBusInfo[0]->configMech;
|
||||
zx1FakeBus.numDevices = pciBusInfo[0]->numDevices;
|
||||
zx1FakeBus.primary_bus = zx1_fakebus;
|
||||
pciBusInfo[zx1_fakebus] = &zx1FakeBus;
|
||||
|
||||
|
@ -1063,8 +1006,7 @@ xf86PostScanZX1(void)
|
|||
|
||||
/* Add a fake PCI-to-PCI bridge to represent each active rope */
|
||||
for (i = 0; i < 8; i++) {
|
||||
if ((zx1_ropemap[i] != i) || (zx1_busno[i] > zx1_subno[i]) ||
|
||||
!(pBusInfo = pciBusInfo[zx1_busno[i]]))
|
||||
if ((zx1_ropemap[i] != i) || !(pBusInfo = pciBusInfo[zx1_busno[i]]))
|
||||
continue;
|
||||
|
||||
if (++idx >= MAX_PCI_DEVICES)
|
||||
|
@ -1074,7 +1016,7 @@ xf86PostScanZX1(void)
|
|||
pPCI->devnum = i | 0x10;
|
||||
/* pPCI->funcnum = 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_sub_class = PCI_SUBCLASS_BRIDGE_PCI;
|
||||
pPCI->pci_header_type = 1;
|
||||
|
@ -1090,9 +1032,6 @@ xf86PostScanZX1(void)
|
|||
/* Plug in chipset routines */
|
||||
pBusInfo->funcs = &zx1BusFuncs;
|
||||
|
||||
/* Set bridge control register for scanpci utility */
|
||||
pPCI->pci_bridge_control = ControlZX1Bridge(zx1_busno[i], 0, 0);
|
||||
|
||||
#ifdef OLD_FORMAT
|
||||
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",
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* 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,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
XORG_VERSION_CURRENT,
|
||||
XF86_VERSION_CURRENT,
|
||||
1, 0, 0,
|
||||
ABI_CLASS_EXTENSION,
|
||||
ABI_EXTENSION_VERSION,
|
||||
|
|
|
@ -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
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich
|
||||
* Copyright 1999 Egbert Eich
|
||||
*/
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
|
@ -212,9 +212,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
} else
|
||||
((linuxInt10Priv*)pInt->private)->base_high = NULL;
|
||||
|
||||
if (!MapCurrentInt10(pInt))
|
||||
goto error3;
|
||||
|
||||
MapCurrentInt10(pInt);
|
||||
Int10Current = pInt;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -240,7 +238,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE)
|
||||
if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE)
|
||||
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
|
||||
ErrorF("done\n");
|
||||
#endif
|
||||
|
@ -252,13 +250,13 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
&& !(initPrimary(options))) {
|
||||
if (bios.bus == BUS_ISA && bios.location.legacy) {
|
||||
xf86DrvMsg(screen, X_CONFIG,
|
||||
"Overriding BIOS location: 0x%x\n",
|
||||
"Overriding BIOS location: 0x%lx\n",
|
||||
bios.location.legacy);
|
||||
cs = bios.location.legacy >> 4;
|
||||
bios_base = (unsigned char *)(cs << 4);
|
||||
if (!int10_check_bios(screen, cs, bios_base)) {
|
||||
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;
|
||||
}
|
||||
} 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;
|
||||
set_return_trap(pInt);
|
||||
|
@ -347,7 +345,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
bios_base = (unsigned char *)(cs << 4);
|
||||
if (!int10_check_bios(screen, cs, bios_base)) {
|
||||
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;
|
||||
}
|
||||
} 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;
|
||||
break;
|
||||
default:
|
||||
|
@ -389,7 +387,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
|
|||
return pInt;
|
||||
|
||||
error4:
|
||||
xf86DrvMsg(screen, X_ERROR, "shmat() call returned errno %d\n", errno);
|
||||
xf86DrvMsg(screen, X_ERROR, "shmat() call retruned errno %d\n", errno);
|
||||
error3:
|
||||
if (base_high)
|
||||
shmdt(base_high);
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* $XFree86$ */
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
#include "xf86_ansic.h"
|
||||
|
@ -175,7 +173,7 @@ vm86_GP_fault(xf86Int10InfoPtr pInt)
|
|||
|
||||
case 0x0f:
|
||||
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;
|
||||
|
||||
default:
|
||||
|
|
|
@ -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_
|
||||
# ifdef __alpha__
|
||||
|
|
|
@ -190,8 +190,7 @@ xf86AccResFromOS(resPtr ret)
|
|||
defined(__s390__) || \
|
||||
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.
|
||||
*/
|
||||
|
||||
|
@ -204,7 +203,7 @@ xf86BusAccWindowsFromOS(void)
|
|||
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
|
||||
|
@ -222,7 +221,7 @@ xf86PciBusAccWindowsFromOS(void)
|
|||
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
|
||||
|
@ -231,7 +230,7 @@ xf86PciBusAccWindowsFromOS(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_UNUSED
|
||||
#ifdef INCLUDE_UNUSED */
|
||||
|
||||
resPtr
|
||||
xf86IsaBusAccWindowsFromOS(void)
|
||||
|
@ -242,7 +241,7 @@ xf86IsaBusAccWindowsFromOS(void)
|
|||
RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock);
|
||||
|
@ -268,7 +267,7 @@ xf86AccResFromOS(resPtr ret)
|
|||
ret = xf86AddResToList(ret, &range, -1);
|
||||
RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock);
|
||||
ret = xf86AddResToList(ret, &range, -1);
|
||||
#if defined(__sparc__) || defined(__powerpc__)
|
||||
#ifdef __sparc__
|
||||
RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock);
|
||||
#else
|
||||
RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -263,14 +263,14 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
|
|||
|
||||
if (offset % AGP_PAGE_SIZE != 0) {
|
||||
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);
|
||||
return FALSE;
|
||||
}
|
||||
pageOffset = offset / AGP_PAGE_SIZE;
|
||||
|
||||
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);
|
||||
|
||||
bind.pg_start = pageOffset;
|
||||
|
@ -279,7 +279,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
|
|||
if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
|
||||
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
|
||||
"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));
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -332,8 +332,8 @@ xf86EnableAGP(int screenNum, CARD32 mode)
|
|||
setup.agp_mode = mode;
|
||||
if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
|
||||
xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
|
||||
"AGPIOC_SETUP with mode %ld failed (%s)\n",
|
||||
(unsigned long)mode, strerror(errno));
|
||||
"AGPIOC_SETUP with mode %d failed (%s)\n",
|
||||
mode, strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 "os.h"
|
||||
|
|
|
@ -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 "X.h"
|
||||
|
|
|
@ -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 "input.h"
|
||||
|
|
|
@ -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 $ */
|
||||
/*
|
||||
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
|
||||
|
@ -8,19 +7,19 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the names of Orest Zborowski and David Wexelblat
|
||||
* not be used in advertising or publicity pertaining to distribution of
|
||||
* documentation, and that the names of Orest Zborowski and David Wexelblat
|
||||
* not be used in advertising or publicity pertaining to distribution of
|
||||
* the software without specific, written prior permission. Orest Zborowski
|
||||
* and David Wexelblat make no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* and David Wexelblat make no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*
|
||||
* OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD
|
||||
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE
|
||||
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD
|
||||
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE
|
||||
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
@ -36,8 +35,6 @@
|
|||
#include "xf86_OSlib.h"
|
||||
#include "lnx.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef USE_DEV_FB
|
||||
extern char *getenv(const char *);
|
||||
#include <linux/fb.h>
|
||||
|
@ -48,44 +45,13 @@ static Bool KeepTty = FALSE;
|
|||
static int VTnum = -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
|
||||
xf86OpenConsole(void)
|
||||
{
|
||||
int i, fd = -1;
|
||||
int result;
|
||||
struct vt_mode VT;
|
||||
char vtname[11];
|
||||
struct vt_stat vts;
|
||||
MessageType from = X_PROBED;
|
||||
#ifdef USE_DEV_FB
|
||||
|
@ -95,7 +61,7 @@ xf86OpenConsole(void)
|
|||
char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
|
||||
char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
|
||||
|
||||
if (serverGeneration == 1)
|
||||
if (serverGeneration == 1)
|
||||
{
|
||||
/* check if we're run with euid==0 */
|
||||
if (geteuid() != 0)
|
||||
|
@ -158,15 +124,6 @@ xf86OpenConsole(void)
|
|||
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 */
|
||||
chown(vtname, getuid(), getgid());
|
||||
|
||||
|
@ -214,7 +171,7 @@ xf86OpenConsole(void)
|
|||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
|
||||
}
|
||||
SYSCALL(result = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
|
||||
if (result < 0)
|
||||
if (result < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: VT_GETMODE failed\n");
|
||||
}
|
||||
|
@ -224,7 +181,7 @@ xf86OpenConsole(void)
|
|||
VT.mode = VT_PROCESS;
|
||||
VT.relsig = SIGUSR1;
|
||||
VT.acqsig = SIGUSR1;
|
||||
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
|
||||
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
|
||||
}
|
||||
|
@ -245,7 +202,7 @@ xf86OpenConsole(void)
|
|||
close(fbfd);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* serverGeneration != 1 */
|
||||
/*
|
||||
|
@ -290,9 +247,6 @@ xf86CloseConsole()
|
|||
activeVT = -1;
|
||||
}
|
||||
close(xf86Info.consoleFd); /* make the vt-manager happy */
|
||||
|
||||
restoreVtPerms(); /* restore the permissions */
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -300,7 +254,7 @@ int
|
|||
xf86ProcessArgument(int argc, char *argv[], int i)
|
||||
{
|
||||
/*
|
||||
* Keep server from detaching from controlling tty. This is useful
|
||||
* Keep server from detaching from controlling tty. This is useful
|
||||
* when debugging (so the server can receive keyboard signals.
|
||||
*/
|
||||
if (!strcmp(argv[i], "-keeptty"))
|
||||
|
|
|
@ -90,9 +90,10 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
|
|||
/* don't change, just test */
|
||||
kbdrep_s.rate = -1;
|
||||
kbdrep_s.delay = -1;
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* do the change */
|
||||
if (rate == 0) /* switch repeat off */
|
||||
kbdrep_s.rate = 0;
|
||||
|
@ -104,7 +105,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
|
|||
if (kbdrep_s.delay < 1)
|
||||
kbdrep_s.delay = 1;
|
||||
|
||||
if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) {
|
||||
if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -129,9 +130,8 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
|
|||
if (kbdrate_s.rate > 50)
|
||||
kbdrate_s.rate = 50;
|
||||
|
||||
if (ioctl( fd, KIOCSRATE, &kbdrate_s )) {
|
||||
return 0;
|
||||
}
|
||||
if (ioctl( fd, KIOCSRATE, &kbdrate_s ))
|
||||
return 0;
|
||||
|
||||
close( fd );
|
||||
|
||||
|
@ -143,7 +143,12 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
|
|||
|
||||
#undef rate
|
||||
|
||||
#if NeedFunctionPrototypes
|
||||
void xf86SetKbdRepeat(char rad)
|
||||
#else
|
||||
void xf86SetKbdRepeat(rad)
|
||||
char rad;
|
||||
#endif
|
||||
{
|
||||
#ifdef __sparc__
|
||||
int rate = 500; /* Default rate */
|
||||
|
@ -173,6 +178,7 @@ void xf86SetKbdRepeat(char rad)
|
|||
if (xf86Info.kbdDelay >= 0)
|
||||
delay = xf86Info.kbdDelay;
|
||||
|
||||
|
||||
if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */
|
||||
return;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user