Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
c893ad65
Unverified
Commit
c893ad65
authored
Dec 04, 2016
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sunweaver-pr/drop-glx-ansic' into 3.6.x
Attributes GH PR #270:
https://github.com/ArcticaProject/nx-libs/pull/270
parents
b38d5b97
4e33fd4b
Show whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
162 additions
and
406 deletions
+162
-406
glcontextmodes.c
.../extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
+6
-20
glxheader.h
nx-X11/extras/Mesa/src/mesa/drivers/x11/glxheader.h
+0
-1
xmesaP.h
nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h
+0
-1
hint.c
nx-X11/extras/Mesa/src/mesa/main/hint.c
+0
-0
shaderobjects.h
nx-X11/extras/Mesa/src/mesa/shader/shaderobjects.h
+0
-0
shaderobjects_3dlabs.c
nx-X11/extras/Mesa/src/mesa/shader/shaderobjects_3dlabs.c
+0
-0
shaderobjects_3dlabs.h
nx-X11/extras/Mesa/src/mesa/shader/shaderobjects_3dlabs.h
+0
-0
slang_core_gc.h
...extras/Mesa/src/mesa/shader/slang/library/slang_core_gc.h
+0
-0
slang_shader_syn.h
...ras/Mesa/src/mesa/shader/slang/library/slang_shader_syn.h
+0
-0
slang_version_syn.h
...as/Mesa/src/mesa/shader/slang/library/slang_version_syn.h
+0
-0
slang_assemble.c
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble.c
+0
-0
slang_assemble.h
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble.h
+0
-0
slang_assemble_assignment.c
...as/Mesa/src/mesa/shader/slang/slang_assemble_assignment.c
+0
-0
slang_assemble_assignment.h
...as/Mesa/src/mesa/shader/slang/slang_assemble_assignment.h
+0
-0
slang_assemble_conditional.c
...s/Mesa/src/mesa/shader/slang/slang_assemble_conditional.c
+0
-0
slang_assemble_conditional.h
...s/Mesa/src/mesa/shader/slang/slang_assemble_conditional.h
+0
-0
slang_assemble_constructor.c
...s/Mesa/src/mesa/shader/slang/slang_assemble_constructor.c
+0
-0
slang_assemble_constructor.h
...s/Mesa/src/mesa/shader/slang/slang_assemble_constructor.h
+0
-0
slang_assemble_typeinfo.c
...tras/Mesa/src/mesa/shader/slang/slang_assemble_typeinfo.c
+0
-0
slang_assemble_typeinfo.h
...tras/Mesa/src/mesa/shader/slang/slang_assemble_typeinfo.h
+0
-0
slang_compile.h
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_compile.h
+0
-0
slang_execute.c
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c
+4
-4
slang_execute.h
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.h
+0
-0
slang_preprocess.c
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_preprocess.c
+0
-0
slang_preprocess.h
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_preprocess.h
+0
-0
slang_utility.c
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.c
+0
-0
slang_utility.h
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h
+1
-1
traverse_wrap.h
nx-X11/extras/Mesa/src/mesa/shader/slang/traverse_wrap.h
+0
-0
glxcmds.c
nx-X11/programs/Xserver/GL/glx/glxcmds.c
+28
-26
glxcmdsswap.c
nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c
+4
-5
glxext.c
nx-X11/programs/Xserver/GL/glx/glxext.c
+14
-13
glxfb.c
nx-X11/programs/Xserver/GL/glx/glxfb.c
+2
-2
glximports.c
nx-X11/programs/Xserver/GL/glx/glximports.c
+8
-9
glxpix.c
nx-X11/programs/Xserver/GL/glx/glxpix.c
+2
-2
glxscreens.c
nx-X11/programs/Xserver/GL/glx/glxscreens.c
+11
-11
glxserver.h
nx-X11/programs/Xserver/GL/glx/glxserver.h
+0
-1
glxutil.c
nx-X11/programs/Xserver/GL/glx/glxutil.c
+12
-86
glxutil.h
nx-X11/programs/Xserver/GL/glx/glxutil.h
+0
-6
single2.c
nx-X11/programs/Xserver/GL/glx/single2.c
+28
-25
single2swap.c
nx-X11/programs/Xserver/GL/glx/single2swap.c
+2
-3
xfont.c
nx-X11/programs/Xserver/GL/glx/xfont.c
+2
-2
glx_ansic.h
nx-X11/programs/Xserver/GL/include/GL/glx_ansic.h
+0
-110
xf86glx.h
nx-X11/programs/Xserver/GL/include/GL/xf86glx.h
+0
-38
xf86glx.c
nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c
+34
-35
xf86glx_util.c
nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c
+0
-1
NXglxext.c
nx-X11/programs/Xserver/hw/nxagent/NXglxext.c
+4
-4
No files found.
nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
View file @
c893ad65
...
@@ -31,31 +31,17 @@
...
@@ -31,31 +31,17 @@
* \author Ian Romanick <idr@us.ibm.com>
* \author Ian Romanick <idr@us.ibm.com>
*/
*/
#if defined(IN_MINI_GLX)
# include <stdlib.h>
# include <stdlib.h>
# include <string.h>
# include <string.h>
#if defined(IN_MINI_GLX)
# include <GL/gl.h>
# include <GL/gl.h>
# include "GL/internal/dri_interface.h"
# include "GL/internal/dri_interface.h"
# include "imports.h"
# include "imports.h"
# define __glXMemset memset
#else
#else
# include <nx-X11/X.h>
# include <nx-X11/X.h>
# include <GL/glx.h>
# include <GL/glx.h>
# include "GL/glxint.h"
# include "GL/glxint.h"
# ifdef XFree86Server
void
*
memset
(
void
*
ptr
,
int
val
,
size_t
size
);
# include "GL/glx_ansic.h"
extern
void
*
__glXMalloc
(
size_t
size
);
extern
void
__glXFree
(
void
*
ptr
);
# define _mesa_malloc(b) __glXMalloc(b)
# define _mesa_free(m) __glXFree(m)
# else
# include <nx-X11/Xlibint.h>
# define __glXMemset memset
# define _mesa_malloc(b) Xmalloc(b)
# define _mesa_free(m) Xfree(m)
# endif
/* XFree86Server */
#endif
/* !defined(IN_MINI_GLX) */
#endif
/* !defined(IN_MINI_GLX) */
#include "glcontextmodes.h"
#include "glcontextmodes.h"
...
@@ -127,7 +113,7 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
...
@@ -127,7 +113,7 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
{
{
__GLcontextModes
*
const
next
=
mode
->
next
;
__GLcontextModes
*
const
next
=
mode
->
next
;
(
void
)
__glXM
emset
(
mode
,
0
,
sizeof
(
__GLcontextModes
)
);
(
void
)
m
emset
(
mode
,
0
,
sizeof
(
__GLcontextModes
)
);
mode
->
next
=
next
;
mode
->
next
=
next
;
mode
->
visualID
=
config
->
vid
;
mode
->
visualID
=
config
->
vid
;
...
@@ -361,14 +347,14 @@ _gl_context_modes_create( unsigned count, size_t minimum_size )
...
@@ -361,14 +347,14 @@ _gl_context_modes_create( unsigned count, size_t minimum_size )
next
=
&
base
;
next
=
&
base
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
*
next
=
(
__GLcontextModes
*
)
_mesa_
malloc
(
size
);
*
next
=
(
__GLcontextModes
*
)
malloc
(
size
);
if
(
*
next
==
NULL
)
{
if
(
*
next
==
NULL
)
{
_gl_context_modes_destroy
(
base
);
_gl_context_modes_destroy
(
base
);
base
=
NULL
;
base
=
NULL
;
break
;
break
;
}
}
(
void
)
__glXM
emset
(
*
next
,
0
,
size
);
(
void
)
m
emset
(
*
next
,
0
,
size
);
(
*
next
)
->
visualID
=
GLX_DONT_CARE
;
(
*
next
)
->
visualID
=
GLX_DONT_CARE
;
(
*
next
)
->
visualType
=
GLX_DONT_CARE
;
(
*
next
)
->
visualType
=
GLX_DONT_CARE
;
(
*
next
)
->
visualRating
=
GLX_NONE
;
(
*
next
)
->
visualRating
=
GLX_NONE
;
...
@@ -402,7 +388,7 @@ _gl_context_modes_destroy( __GLcontextModes * modes )
...
@@ -402,7 +388,7 @@ _gl_context_modes_destroy( __GLcontextModes * modes )
while
(
modes
!=
NULL
)
{
while
(
modes
!=
NULL
)
{
__GLcontextModes
*
const
next
=
modes
->
next
;
__GLcontextModes
*
const
next
=
modes
->
next
;
_mesa_
free
(
modes
);
free
(
modes
);
modes
=
next
;
modes
=
next
;
}
}
}
}
...
...
nx-X11/extras/Mesa/src/mesa/drivers/x11/glxheader.h
View file @
c893ad65
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
# include "resource.h"
# include "resource.h"
# include "windowstr.h"
# include "windowstr.h"
# include "gcstruct.h"
# include "gcstruct.h"
# include "GL/xf86glx.h"
# include "xf86glx_util.h"
# include "xf86glx_util.h"
#else
#else
...
...
nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h
View file @
c893ad65
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
#ifdef XFree86Server
#ifdef XFree86Server
# include "GL/xf86glx.h"
# include "xf86glx_util.h"
# include "xf86glx_util.h"
#elif defined(USE_XSHM)
#elif defined(USE_XSHM)
# include <X11/extensions/XShm.h>
# include <X11/extensions/XShm.h>
...
...
nx-X11/extras/Mesa/src/mesa/main/hint.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/shaderobjects.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/shaderobjects_3dlabs.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/shaderobjects_3dlabs.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_core_gc.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_shader_syn.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/library/slang_version_syn.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_assignment.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_assignment.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_conditional.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_conditional.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_constructor.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_constructor.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_typeinfo.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_assemble_typeinfo.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_compile.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c
View file @
c893ad65
...
@@ -195,10 +195,10 @@ int _slang_execute (const slang_assembly_file *file)
...
@@ -195,10 +195,10 @@ int _slang_execute (const slang_assembly_file *file)
/* XXX why???, disabling the pointer size assertions here.
/* XXX why???, disabling the pointer size assertions here.
* See bug 4021.
* See bug 4021.
*/
*/
static_assert
(
sizeof
(
GLfloat
)
==
4
);
_static_assert
(
sizeof
(
GLfloat
)
==
4
);
/*
static_assert(sizeof (GLfloat *) == 4);*/
/*
_static_assert(sizeof (GLfloat *) == 4);*/
static_assert
(
sizeof
(
GLuint
)
==
4
);
_static_assert
(
sizeof
(
GLuint
)
==
4
);
/*
static_assert(sizeof (GLuint *) == 4);*/
/*
_static_assert(sizeof (GLuint *) == 4);*/
dump
(
file
);
dump
(
file
);
...
...
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_preprocess.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_preprocess.h
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.c
View file @
c893ad65
nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h
View file @
c893ad65
...
@@ -32,7 +32,7 @@ extern "C" {
...
@@ -32,7 +32,7 @@ extern "C" {
/* Compile-time assertions. If the expression is zero, try to declare an
/* Compile-time assertions. If the expression is zero, try to declare an
* array of size [-1] to cause compilation error.
* array of size [-1] to cause compilation error.
*/
*/
#define
static_assert(expr) do { int _array[(expr) ? 1 : -1]; _array[0]; } while (0)
#define
_static_assert(expr) do { int _array[(expr) ? 1 : -1]; _array[0]; } while (0)
void
slang_alloc_free
(
void
*
);
void
slang_alloc_free
(
void
*
);
void
*
slang_alloc_malloc
(
unsigned
int
);
void
*
slang_alloc_malloc
(
unsigned
int
);
...
...
nx-X11/extras/Mesa/src/mesa/shader/slang/traverse_wrap.h
View file @
c893ad65
nx-X11/programs/Xserver/GL/glx/glxcmds.c
View file @
c893ad65
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#endif
#endif
#include <string.h>
#include <string.h>
#include <assert.h>
#include "glxserver.h"
#include "glxserver.h"
#include <GL/glxtokens.h>
#include <GL/glxtokens.h>
...
@@ -50,7 +51,6 @@
...
@@ -50,7 +51,6 @@
#include "glximports.h"
#include "glximports.h"
#include "glxutil.h"
#include "glxutil.h"
#include "glxext.h"
#include "glxext.h"
#include "GL/glx_ansic.h"
#include "glcontextmodes.h"
#include "glcontextmodes.h"
/************************************************************************/
/************************************************************************/
...
@@ -193,11 +193,11 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
...
@@ -193,11 +193,11 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
/*
/*
** Allocate memory for the new context
** Allocate memory for the new context
*/
*/
glxc
=
(
__GLXcontext
*
)
__glXM
alloc
(
sizeof
(
__GLXcontext
));
glxc
=
(
__GLXcontext
*
)
m
alloc
(
sizeof
(
__GLXcontext
));
if
(
!
glxc
)
{
if
(
!
glxc
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
__glXM
emset
(
glxc
,
0
,
sizeof
(
__GLXcontext
));
m
emset
(
glxc
,
0
,
sizeof
(
__GLXcontext
));
/*
/*
** Initially, setup the part of the context that could be used by
** Initially, setup the part of the context that could be used by
...
@@ -216,7 +216,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
...
@@ -216,7 +216,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
imports
.
other
=
(
void
*
)
glxc
;
imports
.
other
=
(
void
*
)
glxc
;
glxc
->
gc
=
(
*
pGlxScreen
->
createContext
)(
&
imports
,
glxc
->
modes
,
shareGC
);
glxc
->
gc
=
(
*
pGlxScreen
->
createContext
)(
&
imports
,
glxc
->
modes
,
shareGC
);
if
(
!
glxc
->
gc
)
{
if
(
!
glxc
->
gc
)
{
__glXF
ree
(
glxc
);
f
ree
(
glxc
);
client
->
errorValue
=
gcId
;
client
->
errorValue
=
gcId
;
return
BadAlloc
;
return
BadAlloc
;
}
}
...
@@ -233,7 +233,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
...
@@ -233,7 +233,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
if
(
!
isDirect
)
{
if
(
!
isDirect
)
{
(
*
glxc
->
gc
->
exports
.
destroyContext
)((
__GLcontext
*
)
glxc
->
gc
);
(
*
glxc
->
gc
->
exports
.
destroyContext
)((
__GLcontext
*
)
glxc
->
gc
);
}
}
__glXF
ree
(
glxc
);
f
ree
(
glxc
);
client
->
errorValue
=
gcId
;
client
->
errorValue
=
gcId
;
return
BadAlloc
;
return
BadAlloc
;
}
}
...
@@ -335,9 +335,9 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc)
...
@@ -335,9 +335,9 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc)
** Didn't find a free slot, so we'll have to grow the table.
** Didn't find a free slot, so we'll have to grow the table.
*/
*/
if
(
!
num
)
{
if
(
!
num
)
{
table
=
(
__GLXcontext
**
)
__glXM
alloc
(
sizeof
(
__GLXcontext
*
));
table
=
(
__GLXcontext
**
)
m
alloc
(
sizeof
(
__GLXcontext
*
));
}
else
{
}
else
{
table
=
(
__GLXcontext
**
)
__glXR
ealloc
(
table
,
table
=
(
__GLXcontext
**
)
r
ealloc
(
table
,
(
num
+
1
)
*
sizeof
(
__GLXcontext
*
));
(
num
+
1
)
*
sizeof
(
__GLXcontext
*
));
}
}
table
[
num
]
=
glxc
;
table
[
num
]
=
glxc
;
...
@@ -685,7 +685,7 @@ int DoMakeCurrent( __GLXclientState *cl,
...
@@ -685,7 +685,7 @@ int DoMakeCurrent( __GLXclientState *cl,
** refcount of the X pixmap and free only if it's zero.
** refcount of the X pixmap and free only if it's zero.
*/
*/
(
*
prevglxc
->
readPixmap
->
pScreen
->
DestroyPixmap
)(
pPixmap
);
(
*
prevglxc
->
readPixmap
->
pScreen
->
DestroyPixmap
)(
pPixmap
);
__glXF
ree
(
prevglxc
->
readPixmap
);
f
ree
(
prevglxc
->
readPixmap
);
}
}
}
}
...
@@ -701,7 +701,7 @@ int DoMakeCurrent( __GLXclientState *cl,
...
@@ -701,7 +701,7 @@ int DoMakeCurrent( __GLXclientState *cl,
** refcount of the X pixmap and free only if it's zero.
** refcount of the X pixmap and free only if it's zero.
*/
*/
(
*
prevglxc
->
drawPixmap
->
pScreen
->
DestroyPixmap
)(
pPixmap
);
(
*
prevglxc
->
drawPixmap
->
pScreen
->
DestroyPixmap
)(
pPixmap
);
__glXF
ree
(
prevglxc
->
drawPixmap
);
f
ree
(
prevglxc
->
drawPixmap
);
}
}
prevglxc
->
drawPixmap
=
NULL
;
prevglxc
->
drawPixmap
=
NULL
;
...
@@ -1192,7 +1192,7 @@ int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual,
...
@@ -1192,7 +1192,7 @@ int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual,
return
BadValue
;
return
BadValue
;
}
}
pGlxPixmap
=
(
__GLXpixmap
*
)
__glXM
alloc
(
sizeof
(
__GLXpixmap
));
pGlxPixmap
=
(
__GLXpixmap
*
)
m
alloc
(
sizeof
(
__GLXpixmap
));
if
(
!
pGlxPixmap
)
{
if
(
!
pGlxPixmap
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
...
@@ -1382,7 +1382,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
...
@@ -1382,7 +1382,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
reply
.
n
=
nProps
;
reply
.
n
=
nProps
;
nReplyBytes
=
reply
.
length
<<
2
;
nReplyBytes
=
reply
.
length
<<
2
;
sendBuf
=
(
int
*
)
__glXM
alloc
((
size_t
)
nReplyBytes
);
sendBuf
=
(
int
*
)
m
alloc
((
size_t
)
nReplyBytes
);
if
(
sendBuf
==
NULL
)
{
if
(
sendBuf
==
NULL
)
{
return
__glXBadContext
;
/* XXX: Is this correct? */
return
__glXBadContext
;
/* XXX: Is this correct? */
}
}
...
@@ -1400,7 +1400,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
...
@@ -1400,7 +1400,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
WriteToClient
(
client
,
sz_xGLXQueryContextInfoEXTReply
,
&
reply
);
WriteToClient
(
client
,
sz_xGLXQueryContextInfoEXTReply
,
&
reply
);
WriteToClient
(
client
,
nReplyBytes
,
sendBuf
);
WriteToClient
(
client
,
nReplyBytes
,
sendBuf
);
}
}
__glXF
ree
((
char
*
)
sendBuf
);
f
ree
((
char
*
)
sendBuf
);
return
Success
;
return
Success
;
}
}
...
@@ -1626,9 +1626,9 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
...
@@ -1626,9 +1626,9 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
*/
*/
if
(
cl
->
largeCmdBufSize
<
cmdlen
)
{
if
(
cl
->
largeCmdBufSize
<
cmdlen
)
{
if
(
!
cl
->
largeCmdBuf
)
{
if
(
!
cl
->
largeCmdBuf
)
{
cl
->
largeCmdBuf
=
(
GLbyte
*
)
__glXM
alloc
((
size_t
)
cmdlen
);
cl
->
largeCmdBuf
=
(
GLbyte
*
)
m
alloc
((
size_t
)
cmdlen
);
}
else
{
}
else
{
cl
->
largeCmdBuf
=
(
GLbyte
*
)
__glXR
ealloc
(
cl
->
largeCmdBuf
,
cl
->
largeCmdBuf
=
(
GLbyte
*
)
r
ealloc
(
cl
->
largeCmdBuf
,
(
size_t
)
cmdlen
);
(
size_t
)
cmdlen
);
}
}
if
(
!
cl
->
largeCmdBuf
)
{
if
(
!
cl
->
largeCmdBuf
)
{
...
@@ -1636,7 +1636,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
...
@@ -1636,7 +1636,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
}
}
cl
->
largeCmdBufSize
=
cmdlen
;
cl
->
largeCmdBufSize
=
cmdlen
;
}
}
__glXM
emcpy
(
cl
->
largeCmdBuf
,
pc
,
dataBytes
);
m
emcpy
(
cl
->
largeCmdBuf
,
pc
,
dataBytes
);
cl
->
largeCmdBytesSoFar
=
dataBytes
;
cl
->
largeCmdBytesSoFar
=
dataBytes
;
cl
->
largeCmdBytesTotal
=
cmdlen
;
cl
->
largeCmdBytesTotal
=
cmdlen
;
...
@@ -1679,7 +1679,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
...
@@ -1679,7 +1679,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
__glXResetLargeCommandStatus
(
cl
);
__glXResetLargeCommandStatus
(
cl
);
return
__glXBadLargeRequest
;
return
__glXBadLargeRequest
;
}
}
__glXM
emcpy
(
cl
->
largeCmdBuf
+
cl
->
largeCmdBytesSoFar
,
pc
,
dataBytes
);
m
emcpy
(
cl
->
largeCmdBuf
+
cl
->
largeCmdBytesSoFar
,
pc
,
dataBytes
);
cl
->
largeCmdBytesSoFar
+=
dataBytes
;
cl
->
largeCmdBytesSoFar
+=
dataBytes
;
cl
->
largeCmdRequestsSoFar
++
;
cl
->
largeCmdRequestsSoFar
++
;
...
@@ -2074,17 +2074,18 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
...
@@ -2074,17 +2074,18 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
ptr
=
__glXActiveScreens
[
screen
].
GLXextensions
;
ptr
=
__glXActiveScreens
[
screen
].
GLXextensions
;
n
=
__glXS
trlen
(
ptr
)
+
1
;
n
=
s
trlen
(
ptr
)
+
1
;
length
=
__GLX_PAD
(
n
)
>>
2
;
length
=
__GLX_PAD
(
n
)
>>
2
;
reply
.
type
=
X_Reply
;
reply
.
type
=
X_Reply
;
reply
.
sequenceNumber
=
client
->
sequence
;
reply
.
sequenceNumber
=
client
->
sequence
;
reply
.
length
=
length
;
reply
.
length
=
length
;
reply
.
n
=
n
;
reply
.
n
=
n
;
if
((
buf
=
(
char
*
)
__glXMalloc
(
length
<<
2
))
==
NULL
)
{
/* Allocate buffer to make sure it's a multiple of 4 bytes big.*/
buf
=
(
char
*
)
malloc
(
length
<<
2
);
if
(
buf
==
NULL
)
return
BadAlloc
;
return
BadAlloc
;
}
memcpy
(
buf
,
ptr
,
n
);
__glXStrncpy
(
buf
,
ptr
,
n
);
if
(
client
->
swapped
)
{
if
(
client
->
swapped
)
{
glxSwapQueryExtensionsStringReply
(
client
,
&
reply
,
buf
);
glxSwapQueryExtensionsStringReply
(
client
,
&
reply
,
buf
);
...
@@ -2093,7 +2094,7 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
...
@@ -2093,7 +2094,7 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
WriteToClient
(
client
,
(
int
)(
length
<<
2
),
buf
);
WriteToClient
(
client
,
(
int
)(
length
<<
2
),
buf
);
}
}
__glXF
ree
(
buf
);
f
ree
(
buf
);
return
Success
;
return
Success
;
}
}
...
@@ -2131,7 +2132,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
...
@@ -2131,7 +2132,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
return
BadValue
;
return
BadValue
;
}
}
n
=
__glXS
trlen
(
ptr
)
+
1
;
n
=
s
trlen
(
ptr
)
+
1
;
length
=
__GLX_PAD
(
n
)
>>
2
;
length
=
__GLX_PAD
(
n
)
>>
2
;
reply
.
type
=
X_Reply
;
reply
.
type
=
X_Reply
;
reply
.
sequenceNumber
=
client
->
sequence
;
reply
.
sequenceNumber
=
client
->
sequence
;
...
@@ -2141,7 +2142,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
...
@@ -2141,7 +2142,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
if
((
buf
=
(
char
*
)
malloc
(
length
<<
2
))
==
NULL
)
{
if
((
buf
=
(
char
*
)
malloc
(
length
<<
2
))
==
NULL
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
__glXStrn
cpy
(
buf
,
ptr
,
n
);
mem
cpy
(
buf
,
ptr
,
n
);
if
(
client
->
swapped
)
{
if
(
client
->
swapped
)
{
glxSwapQueryServerStringReply
(
client
,
&
reply
,
buf
);
glxSwapQueryServerStringReply
(
client
,
&
reply
,
buf
);
...
@@ -2150,7 +2151,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
...
@@ -2150,7 +2151,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
WriteToClient
(
client
,
(
int
)(
length
<<
2
),
buf
);
WriteToClient
(
client
,
(
int
)(
length
<<
2
),
buf
);
}
}
__glXF
ree
(
buf
);
f
ree
(
buf
);
return
Success
;
return
Success
;
}
}
...
@@ -2161,9 +2162,10 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
...
@@ -2161,9 +2162,10 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
cl
->
GLClientmajorVersion
=
req
->
major
;
cl
->
GLClientmajorVersion
=
req
->
major
;
cl
->
GLClientminorVersion
=
req
->
minor
;
cl
->
GLClientminorVersion
=
req
->
minor
;
if
(
cl
->
GLClientextensions
)
__glXFree
(
cl
->
GLClientextensions
);
if
(
cl
->
GLClientextensions
)
free
(
cl
->
GLClientextensions
);
buf
=
(
const
char
*
)(
req
+
1
);
buf
=
(
const
char
*
)(
req
+
1
);
cl
->
GLClientextensions
=
__glXS
trdup
(
buf
);
cl
->
GLClientextensions
=
xs
trdup
(
buf
);
return
Success
;
return
Success
;
}
}
...
...
nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c
View file @
c893ad65
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
#include <pixmapstr.h>
#include <pixmapstr.h>
#include <windowstr.h>
#include <windowstr.h>
#include "glxext.h"
#include "glxext.h"
#include "GL/glx_ansic.h"
static
int
__glXSwapGetFBConfigsSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
static
int
__glXSwapGetFBConfigsSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
static
int
__glXSwapCreateContextWithConfigSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
static
int
__glXSwapCreateContextWithConfigSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
...
@@ -683,16 +682,16 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
...
@@ -683,16 +682,16 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
*/
*/
if
(
cl
->
largeCmdBufSize
<
cmdlen
)
{
if
(
cl
->
largeCmdBufSize
<
cmdlen
)
{
if
(
!
cl
->
largeCmdBuf
)
{
if
(
!
cl
->
largeCmdBuf
)
{
cl
->
largeCmdBuf
=
(
GLbyte
*
)
__glXM
alloc
(
cmdlen
);
cl
->
largeCmdBuf
=
(
GLbyte
*
)
m
alloc
(
cmdlen
);
}
else
{
}
else
{
cl
->
largeCmdBuf
=
(
GLbyte
*
)
__glXR
ealloc
(
cl
->
largeCmdBuf
,
cmdlen
);
cl
->
largeCmdBuf
=
(
GLbyte
*
)
r
ealloc
(
cl
->
largeCmdBuf
,
cmdlen
);
}
}
if
(
!
cl
->
largeCmdBuf
)
{
if
(
!
cl
->
largeCmdBuf
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
cl
->
largeCmdBufSize
=
cmdlen
;
cl
->
largeCmdBufSize
=
cmdlen
;
}
}
__glXM
emcpy
(
cl
->
largeCmdBuf
,
pc
,
dataBytes
);
m
emcpy
(
cl
->
largeCmdBuf
,
pc
,
dataBytes
);
cl
->
largeCmdBytesSoFar
=
dataBytes
;
cl
->
largeCmdBytesSoFar
=
dataBytes
;
cl
->
largeCmdBytesTotal
=
cmdlen
;
cl
->
largeCmdBytesTotal
=
cmdlen
;
...
@@ -735,7 +734,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
...
@@ -735,7 +734,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
__glXResetLargeCommandStatus
(
cl
);
__glXResetLargeCommandStatus
(
cl
);
return
__glXBadLargeRequest
;
return
__glXBadLargeRequest
;
}
}
__glXM
emcpy
(
cl
->
largeCmdBuf
+
cl
->
largeCmdBytesSoFar
,
pc
,
dataBytes
);
m
emcpy
(
cl
->
largeCmdBuf
+
cl
->
largeCmdBytesSoFar
,
pc
,
dataBytes
);
cl
->
largeCmdBytesSoFar
+=
dataBytes
;
cl
->
largeCmdBytesSoFar
+=
dataBytes
;
cl
->
largeCmdRequestsSoFar
++
;
cl
->
largeCmdRequestsSoFar
++
;
...
...
nx-X11/programs/Xserver/GL/glx/glxext.c
View file @
c893ad65
...
@@ -62,17 +62,18 @@ static void ResetClientState(int clientIndex)
...
@@ -62,17 +62,18 @@ static void ResetClientState(int clientIndex)
{
{
__GLXclientState
*
cl
=
__glXClients
[
clientIndex
];
__GLXclientState
*
cl
=
__glXClients
[
clientIndex
];
if
(
cl
->
returnBuf
)
__glXF
ree
(
cl
->
returnBuf
);
if
(
cl
->
returnBuf
)
f
ree
(
cl
->
returnBuf
);
if
(
cl
->
largeCmdBuf
)
__glXF
ree
(
cl
->
largeCmdBuf
);
if
(
cl
->
largeCmdBuf
)
f
ree
(
cl
->
largeCmdBuf
);
if
(
cl
->
currentContexts
)
__glXF
ree
(
cl
->
currentContexts
);
if
(
cl
->
currentContexts
)
f
ree
(
cl
->
currentContexts
);
__glXM
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
m
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
/*
/*
** By default, assume that the client supports
** By default, assume that the client supports
** GLX major version 1 minor version 0 protocol.
** GLX major version 1 minor version 0 protocol.
*/
*/
cl
->
GLClientmajorVersion
=
1
;
cl
->
GLClientmajorVersion
=
1
;
cl
->
GLClientminorVersion
=
0
;
cl
->
GLClientminorVersion
=
0
;
if
(
cl
->
GLClientextensions
)
__glXFree
(
cl
->
GLClientextensions
);
if
(
cl
->
GLClientextensions
)
free
(
cl
->
GLClientextensions
);
}
}
...
@@ -151,7 +152,7 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
...
@@ -151,7 +152,7 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
** only if it's zero.
** only if it's zero.
*/
*/
(
*
pGlxPixmap
->
pScreen
->
DestroyPixmap
)(
pPixmap
);
(
*
pGlxPixmap
->
pScreen
->
DestroyPixmap
)(
pPixmap
);
__glXF
ree
(
pGlxPixmap
);
f
ree
(
pGlxPixmap
);
}
}
return
True
;
return
True
;
...
@@ -169,9 +170,9 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
...
@@ -169,9 +170,9 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
return
GL_FALSE
;
return
GL_FALSE
;
}
}
}
}
if
(
cx
->
feedbackBuf
)
__glXF
ree
(
cx
->
feedbackBuf
);
if
(
cx
->
feedbackBuf
)
f
ree
(
cx
->
feedbackBuf
);
if
(
cx
->
selectBuf
)
__glXF
ree
(
cx
->
selectBuf
);
if
(
cx
->
selectBuf
)
f
ree
(
cx
->
selectBuf
);
__glXF
ree
(
cx
);
f
ree
(
cx
);
if
(
cx
==
__glXLastContext
)
{
if
(
cx
==
__glXLastContext
)
{
__glXFlushContextCache
();
__glXFlushContextCache
();
}
}
...
@@ -404,12 +405,12 @@ static int __glXDispatch(ClientPtr client)
...
@@ -404,12 +405,12 @@ static int __glXDispatch(ClientPtr client)
opcode
=
stuff
->
glxCode
;
opcode
=
stuff
->
glxCode
;
cl
=
__glXClients
[
client
->
index
];
cl
=
__glXClients
[
client
->
index
];
if
(
!
cl
)
{
if
(
!
cl
)
{
cl
=
(
__GLXclientState
*
)
__glXM
alloc
(
sizeof
(
__GLXclientState
));
cl
=
(
__GLXclientState
*
)
m
alloc
(
sizeof
(
__GLXclientState
));
__glXClients
[
client
->
index
]
=
cl
;
__glXClients
[
client
->
index
]
=
cl
;
if
(
!
cl
)
{
if
(
!
cl
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
__glXM
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
m
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
}
}
if
(
!
cl
->
inUse
)
{
if
(
!
cl
->
inUse
)
{
...
@@ -458,12 +459,12 @@ static int __glXSwapDispatch(ClientPtr client)
...
@@ -458,12 +459,12 @@ static int __glXSwapDispatch(ClientPtr client)
opcode
=
stuff
->
glxCode
;
opcode
=
stuff
->
glxCode
;
cl
=
__glXClients
[
client
->
index
];
cl
=
__glXClients
[
client
->
index
];
if
(
!
cl
)
{
if
(
!
cl
)
{
cl
=
(
__GLXclientState
*
)
__glXM
alloc
(
sizeof
(
__GLXclientState
));
cl
=
(
__GLXclientState
*
)
m
alloc
(
sizeof
(
__GLXclientState
));
__glXClients
[
client
->
index
]
=
cl
;
__glXClients
[
client
->
index
]
=
cl
;
if
(
!
cl
)
{
if
(
!
cl
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
__glXM
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
m
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
}
}
if
(
!
cl
->
inUse
)
{
if
(
!
cl
->
inUse
)
{
...
...
nx-X11/programs/Xserver/GL/glx/glxfb.c
View file @
c893ad65
...
@@ -130,7 +130,7 @@ Free(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv)
...
@@ -130,7 +130,7 @@ Free(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv)
FreeScratchGC
(
bufferInfo
->
pGC
);
FreeScratchGC
(
bufferInfo
->
pGC
);
}
}
__glXF
ree
(
bufferInfo
);
f
ree
(
bufferInfo
);
buf
->
other
=
NULL
;
buf
->
other
=
NULL
;
}
}
...
@@ -173,7 +173,7 @@ __glXInitFB(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, GLint bits)
...
@@ -173,7 +173,7 @@ __glXInitFB(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, GLint bits)
buf
->
free
=
Free
;
buf
->
free
=
Free
;
/* allocate local information */
/* allocate local information */
bufferInfo
=
(
__GLFBbufferInfo
*
)
__glXM
alloc
(
sizeof
(
__GLFBbufferInfo
));
bufferInfo
=
(
__GLFBbufferInfo
*
)
m
alloc
(
sizeof
(
__GLFBbufferInfo
));
buf
->
other
=
(
void
*
)
bufferInfo
;
buf
->
other
=
(
void
*
)
bufferInfo
;
pGC
=
CreateScratchGC
(
glxPriv
->
pDraw
->
pScreen
,
pGC
=
CreateScratchGC
(
glxPriv
->
pDraw
->
pScreen
,
...
...
nx-X11/programs/Xserver/GL/glx/glximports.c
View file @
c893ad65
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
#include "glxserver.h"
#include "glxserver.h"
#include "glxcontext.h"
#include "glxcontext.h"
#include "glximports.h"
#include "glximports.h"
#include "GL/glx_ansic.h"
void
*
__glXImpMalloc
(
__GLcontext
*
gc
,
size_t
size
)
void
*
__glXImpMalloc
(
__GLcontext
*
gc
,
size_t
size
)
{
{
...
@@ -76,7 +75,7 @@ void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize)
...
@@ -76,7 +75,7 @@ void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize)
return
NULL
;
return
NULL
;
}
}
/* zero out memory */
/* zero out memory */
__glXM
emset
(
addr
,
0
,
size
);
m
emset
(
addr
,
0
,
size
);
return
addr
;
return
addr
;
}
}
...
@@ -119,17 +118,17 @@ void __glXImpWarning(__GLcontext *gc, char *msg)
...
@@ -119,17 +118,17 @@ void __glXImpWarning(__GLcontext *gc, char *msg)
void
__glXImpFatal
(
__GLcontext
*
gc
,
char
*
msg
)
void
__glXImpFatal
(
__GLcontext
*
gc
,
char
*
msg
)
{
{
ErrorF
(
"%s"
,(
char
*
)
msg
);
ErrorF
(
"%s"
,(
char
*
)
msg
);
__glXA
bort
();
a
bort
();
}
}
char
*
__glXImpGetenv
(
__GLcontext
*
gc
,
const
char
*
var
)
char
*
__glXImpGetenv
(
__GLcontext
*
gc
,
const
char
*
var
)
{
{
return
__glXG
etenv
(
var
);
return
g
etenv
(
var
);
}
}
int
__glXImpAtoi
(
__GLcontext
*
gc
,
const
char
*
str
)
int
__glXImpAtoi
(
__GLcontext
*
gc
,
const
char
*
str
)
{
{
return
__glXA
toi
(
str
);
return
a
toi
(
str
);
}
}
int
__glXImpSprintf
(
__GLcontext
*
gc
,
char
*
str
,
const
char
*
fmt
,
...)
int
__glXImpSprintf
(
__GLcontext
*
gc
,
char
*
str
,
const
char
*
fmt
,
...)
...
@@ -139,7 +138,7 @@ int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...)
...
@@ -139,7 +138,7 @@ int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...)
/* have to deal with var args */
/* have to deal with var args */
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
ret
=
__glXV
sprintf
(
str
,
fmt
,
ap
);
ret
=
v
sprintf
(
str
,
fmt
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
return
ret
;
return
ret
;
...
@@ -147,12 +146,12 @@ int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...)
...
@@ -147,12 +146,12 @@ int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...)
void
*
__glXImpFopen
(
__GLcontext
*
gc
,
const
char
*
path
,
const
char
*
mode
)
void
*
__glXImpFopen
(
__GLcontext
*
gc
,
const
char
*
path
,
const
char
*
mode
)
{
{
return
(
void
*
)
__glXF
open
(
path
,
mode
);
return
(
void
*
)
f
open
(
path
,
mode
);
}
}
int
__glXImpFclose
(
__GLcontext
*
gc
,
void
*
stream
)
int
__glXImpFclose
(
__GLcontext
*
gc
,
void
*
stream
)
{
{
return
__glXF
close
((
FILE
*
)
stream
);
return
f
close
((
FILE
*
)
stream
);
}
}
int
__glXImpFprintf
(
__GLcontext
*
gc
,
void
*
stream
,
const
char
*
fmt
,
...)
int
__glXImpFprintf
(
__GLcontext
*
gc
,
void
*
stream
,
const
char
*
fmt
,
...)
...
@@ -162,7 +161,7 @@ int __glXImpFprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
...
@@ -162,7 +161,7 @@ int __glXImpFprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
/* have to deal with var args */
/* have to deal with var args */
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
ret
=
__glXV
fprintf
((
FILE
*
)
stream
,
fmt
,
ap
);
ret
=
v
fprintf
((
FILE
*
)
stream
,
fmt
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
return
ret
;
return
ret
;
...
...
nx-X11/programs/Xserver/GL/glx/glxpix.c
View file @
c893ad65
...
@@ -95,7 +95,7 @@ Free(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv)
...
@@ -95,7 +95,7 @@ Free(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv)
FreeScratchGC
(
bufferInfo
->
pGC
);
FreeScratchGC
(
bufferInfo
->
pGC
);
}
}
__glXF
ree
(
bufferInfo
);
f
ree
(
bufferInfo
);
buf
->
other
=
NULL
;
buf
->
other
=
NULL
;
}
}
...
@@ -123,7 +123,7 @@ __glXInitPix(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
...
@@ -123,7 +123,7 @@ __glXInitPix(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
buf
->
free
=
Free
;
buf
->
free
=
Free
;
/* allocate local information */
/* allocate local information */
bufferInfo
=
(
__GLPixBufferInfo
*
)
__glXM
alloc
(
sizeof
(
__GLPixBufferInfo
));
bufferInfo
=
(
__GLPixBufferInfo
*
)
m
alloc
(
sizeof
(
__GLPixBufferInfo
));
buf
->
other
=
(
void
*
)
bufferInfo
;
buf
->
other
=
(
void
*
)
bufferInfo
;
bufferInfo
->
pGC
=
CreateScratchGC
(
pGlxPixmap
->
pDraw
->
pScreen
,
bufferInfo
->
pGC
=
CreateScratchGC
(
pGlxPixmap
->
pDraw
->
pScreen
,
...
...
nx-X11/programs/Xserver/GL/glx/glxscreens.c
View file @
c893ad65
...
@@ -288,7 +288,7 @@ static void wrapPositionWindow(int screen)
...
@@ -288,7 +288,7 @@ static void wrapPositionWindow(int screen)
void
__glXHyperpipeInit
(
int
screen
,
__GLXHyperpipeExtensionFuncs
*
funcs
)
void
__glXHyperpipeInit
(
int
screen
,
__GLXHyperpipeExtensionFuncs
*
funcs
)
{
{
if
(
__glXNumHyperpipeFuncs
<
screen
+
1
)
{
if
(
__glXNumHyperpipeFuncs
<
screen
+
1
)
{
__glXHyperpipeFuncs
=
__glXR
ealloc
(
__glXHyperpipeFuncs
,
__glXHyperpipeFuncs
=
r
ealloc
(
__glXHyperpipeFuncs
,
(
screen
+
1
)
*
sizeof
(
__GLXHyperpipeExtensionFuncs
));
(
screen
+
1
)
*
sizeof
(
__GLXHyperpipeExtensionFuncs
));
__glXNumHyperpipeFuncs
=
screen
+
1
;
__glXNumHyperpipeFuncs
=
screen
+
1
;
}
}
...
@@ -306,7 +306,7 @@ void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs)
...
@@ -306,7 +306,7 @@ void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs)
void
__glXSwapBarrierInit
(
int
screen
,
__GLXSwapBarrierExtensionFuncs
*
funcs
)
void
__glXSwapBarrierInit
(
int
screen
,
__GLXSwapBarrierExtensionFuncs
*
funcs
)
{
{
if
(
__glXNumSwapBarrierFuncs
<
screen
+
1
)
{
if
(
__glXNumSwapBarrierFuncs
<
screen
+
1
)
{
__glXSwapBarrierFuncs
=
__glXR
ealloc
(
__glXSwapBarrierFuncs
,
__glXSwapBarrierFuncs
=
r
ealloc
(
__glXSwapBarrierFuncs
,
(
screen
+
1
)
*
sizeof
(
__GLXSwapBarrierExtensionFuncs
));
(
screen
+
1
)
*
sizeof
(
__GLXSwapBarrierExtensionFuncs
));
__glXNumSwapBarrierFuncs
=
screen
+
1
;
__glXNumSwapBarrierFuncs
=
screen
+
1
;
}
}
...
@@ -327,7 +327,7 @@ void __glXScreenInit(GLint numscreens)
...
@@ -327,7 +327,7 @@ void __glXScreenInit(GLint numscreens)
** This alloc has to work or else the server might as well core dump.
** This alloc has to work or else the server might as well core dump.
*/
*/
__glXActiveScreens
=
__glXActiveScreens
=
(
__GLXscreenInfo
*
)
__glXM
alloc
(
sizeof
(
__GLXscreenInfo
)
*
numscreens
);
(
__GLXscreenInfo
*
)
m
alloc
(
sizeof
(
__GLXscreenInfo
)
*
numscreens
);
for
(
i
=
0
;
i
<
numscreens
;
i
++
)
{
for
(
i
=
0
;
i
<
numscreens
;
i
++
)
{
/*
/*
...
@@ -338,10 +338,10 @@ void __glXScreenInit(GLint numscreens)
...
@@ -338,10 +338,10 @@ void __glXScreenInit(GLint numscreens)
__glXActiveScreens
[
i
]
=
*
__glXScreens
[
j
];
__glXActiveScreens
[
i
]
=
*
__glXScreens
[
j
];
__glXActiveScreens
[
i
].
numUsableVisuals
=
__glXActiveScreens
[
i
].
numVisuals
;
__glXActiveScreens
[
i
].
numUsableVisuals
=
__glXActiveScreens
[
i
].
numVisuals
;
__glXActiveScreens
[
i
].
GLextensions
=
__glXS
trdup
(
GLServerExtensions
);
__glXActiveScreens
[
i
].
GLextensions
=
s
trdup
(
GLServerExtensions
);
__glXActiveScreens
[
i
].
GLXvendor
=
__glXS
trdup
(
GLXServerVendorName
);
__glXActiveScreens
[
i
].
GLXvendor
=
s
trdup
(
GLXServerVendorName
);
__glXActiveScreens
[
i
].
GLXversion
=
__glXS
trdup
(
GLXServerVersion
);
__glXActiveScreens
[
i
].
GLXversion
=
s
trdup
(
GLXServerVersion
);
__glXActiveScreens
[
i
].
GLXextensions
=
__glXS
trdup
(
GLXServerExtensions
);
__glXActiveScreens
[
i
].
GLXextensions
=
s
trdup
(
GLXServerExtensions
);
__glXDrawableRes
=
CreateNewResourceType
((
DeleteType
)
DrawableGone
);
__glXDrawableRes
=
CreateNewResourceType
((
DeleteType
)
DrawableGone
);
wrapPositionWindow
(
i
);
wrapPositionWindow
(
i
);
...
@@ -356,10 +356,10 @@ void __glXScreenReset(void)
...
@@ -356,10 +356,10 @@ void __glXScreenReset(void)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
__glXNumActiveScreens
;
i
++
)
{
for
(
i
=
0
;
i
<
__glXNumActiveScreens
;
i
++
)
{
__glXF
ree
(
__glXActiveScreens
[
i
].
GLXvendor
);
f
ree
(
__glXActiveScreens
[
i
].
GLXvendor
);
__glXF
ree
(
__glXActiveScreens
[
i
].
GLXversion
);
f
ree
(
__glXActiveScreens
[
i
].
GLXversion
);
__glXF
ree
(
__glXActiveScreens
[
i
].
GLXextensions
);
f
ree
(
__glXActiveScreens
[
i
].
GLXextensions
);
__glXF
ree
(
__glXActiveScreens
[
i
].
GLextensions
);
f
ree
(
__glXActiveScreens
[
i
].
GLextensions
);
}
}
free
(
__glXActiveScreens
);
free
(
__glXActiveScreens
);
free
(
__glXHyperpipeFuncs
);
free
(
__glXHyperpipeFuncs
);
...
...
nx-X11/programs/Xserver/GL/glx/glxserver.h
View file @
c893ad65
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
#include <extnsionst.h>
#include <extnsionst.h>
#include <resource.h>
#include <resource.h>
#include <scrnintstr.h>
#include <scrnintstr.h>
#include "GL/glx_ansic.h"
#include "protocol-versions.h"
#include "protocol-versions.h"
#include <limits.h>
#include <limits.h>
...
...
nx-X11/programs/Xserver/GL/glx/glxutil.c
View file @
c893ad65
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
#include <windowstr.h>
#include <windowstr.h>
#include "glxutil.h"
#include "glxutil.h"
#include "glxbuf.h"
#include "glxbuf.h"
#include "GL/glx_ansic.h"
#include "GL/internal/glcore.h"
#include "GL/internal/glcore.h"
#include "GL/glxint.h"
#include "GL/glxint.h"
#include "glcontextmodes.h"
#include "glcontextmodes.h"
...
@@ -58,81 +57,8 @@ void __glXNop(void) {}
...
@@ -58,81 +57,8 @@ void __glXNop(void) {}
/************************************************************************/
/************************************************************************/
/* Memory Allocation for GLX */
void
*
__glXMalloc
(
size_t
size
)
{
void
*
addr
;
if
(
size
==
0
)
{
return
NULL
;
}
addr
=
(
void
*
)
malloc
(
size
);
if
(
addr
==
NULL
)
{
/* XXX: handle out of memory error */
return
NULL
;
}
return
addr
;
}
void
*
__glXCalloc
(
size_t
numElements
,
size_t
elementSize
)
{
void
*
addr
;
size_t
size
;
if
((
numElements
==
0
)
||
(
elementSize
==
0
))
{
return
NULL
;
}
size
=
numElements
*
elementSize
;
addr
=
(
void
*
)
malloc
(
size
);
if
(
addr
==
NULL
)
{
/* XXX: handle out of memory error */
return
NULL
;
}
__glXMemset
(
addr
,
0
,
size
);
return
addr
;
}
void
*
__glXRealloc
(
void
*
addr
,
size_t
newSize
)
{
void
*
newAddr
;
if
(
addr
)
{
if
(
newSize
==
0
)
{
free
(
addr
);
return
NULL
;
}
else
{
newAddr
=
realloc
(
addr
,
newSize
);
}
}
else
{
if
(
newSize
==
0
)
{
return
NULL
;
}
else
{
newAddr
=
malloc
(
newSize
);
}
}
if
(
newAddr
==
NULL
)
{
return
NULL
;
/* XXX: out of memory */
}
return
newAddr
;
}
void
__glXFree
(
void
*
addr
)
{
if
(
addr
)
{
free
(
addr
);
}
}
/************************************************************************/
/* Context stuff */
/* Context stuff */
/*
/*
** associate a context with a drawable
** associate a context with a drawable
*/
*/
...
@@ -299,8 +225,8 @@ __glXCreateDrawablePrivate(DrawablePtr pDraw, XID drawId,
...
@@ -299,8 +225,8 @@ __glXCreateDrawablePrivate(DrawablePtr pDraw, XID drawId,
__GLdrawablePrivate
*
glPriv
;
__GLdrawablePrivate
*
glPriv
;
__GLXscreenInfo
*
pGlxScreen
;
__GLXscreenInfo
*
pGlxScreen
;
glxPriv
=
(
__GLXdrawablePrivate
*
)
__glXM
alloc
(
sizeof
(
*
glxPriv
));
glxPriv
=
(
__GLXdrawablePrivate
*
)
m
alloc
(
sizeof
(
*
glxPriv
));
__glXM
emset
(
glxPriv
,
0
,
sizeof
(
__GLXdrawablePrivate
));
m
emset
(
glxPriv
,
0
,
sizeof
(
__GLXdrawablePrivate
));
glxPriv
->
type
=
pDraw
->
type
;
glxPriv
->
type
=
pDraw
->
type
;
glxPriv
->
pDraw
=
pDraw
;
glxPriv
->
pDraw
=
pDraw
;
...
@@ -312,18 +238,18 @@ __glXCreateDrawablePrivate(DrawablePtr pDraw, XID drawId,
...
@@ -312,18 +238,18 @@ __glXCreateDrawablePrivate(DrawablePtr pDraw, XID drawId,
/* since we are creating the drawablePrivate, drawId should be new */
/* since we are creating the drawablePrivate, drawId should be new */
if
(
!
AddResource
(
drawId
,
__glXDrawableRes
,
glxPriv
))
{
if
(
!
AddResource
(
drawId
,
__glXDrawableRes
,
glxPriv
))
{
/* oops! */
/* oops! */
__glXF
ree
(
glxPriv
);
f
ree
(
glxPriv
);
return
NULL
;
return
NULL
;
}
}
/* fill up glPriv */
/* fill up glPriv */
glPriv
=
&
glxPriv
->
glPriv
;
glPriv
=
&
glxPriv
->
glPriv
;
glPriv
->
modes
=
(
__GLcontextModes
*
)
__glXM
alloc
(
sizeof
(
__GLcontextModes
));
glPriv
->
modes
=
(
__GLcontextModes
*
)
m
alloc
(
sizeof
(
__GLcontextModes
));
*
glPriv
->
modes
=
*
modes
;
*
glPriv
->
modes
=
*
modes
;
glPriv
->
malloc
=
__glXM
alloc
;
glPriv
->
malloc
=
m
alloc
;
glPriv
->
calloc
=
__glXC
alloc
;
glPriv
->
calloc
=
c
alloc
;
glPriv
->
realloc
=
__glXR
ealloc
;
glPriv
->
realloc
=
r
ealloc
;
glPriv
->
free
=
__glXF
ree
;
glPriv
->
free
=
f
ree
;
glPriv
->
addSwapRect
=
NULL
;
glPriv
->
addSwapRect
=
NULL
;
glPriv
->
setClipRect
=
(
void
(
*
)(
__GLdrawablePrivate
*
,
GLint
,
GLint
,
GLsizei
,
GLsizei
))
__glXNop
;
glPriv
->
setClipRect
=
(
void
(
*
)(
__GLdrawablePrivate
*
,
GLint
,
GLint
,
GLsizei
,
GLsizei
))
__glXNop
;
glPriv
->
lockDP
=
LockDP
;
glPriv
->
lockDP
=
LockDP
;
...
@@ -334,7 +260,7 @@ __glXCreateDrawablePrivate(DrawablePtr pDraw, XID drawId,
...
@@ -334,7 +260,7 @@ __glXCreateDrawablePrivate(DrawablePtr pDraw, XID drawId,
/* allocate a one-rect ownership region */
/* allocate a one-rect ownership region */
glPriv
->
ownershipRegion
.
rects
=
glPriv
->
ownershipRegion
.
rects
=
(
__GLregionRect
*
)
__glXC
alloc
(
1
,
sizeof
(
__GLregionRect
));
(
__GLregionRect
*
)
c
alloc
(
1
,
sizeof
(
__GLregionRect
));
glPriv
->
ownershipRegion
.
numRects
=
1
;
glPriv
->
ownershipRegion
.
numRects
=
1
;
glxPriv
->
freeBuffers
=
__glXFreeBuffers
;
glxPriv
->
freeBuffers
=
__glXFreeBuffers
;
...
@@ -377,9 +303,9 @@ __glXDestroyDrawablePrivate(__GLXdrawablePrivate *glxPriv)
...
@@ -377,9 +303,9 @@ __glXDestroyDrawablePrivate(__GLXdrawablePrivate *glxPriv)
}
}
/* Free the drawable Private */
/* Free the drawable Private */
__glXF
ree
(
glxPriv
->
glPriv
.
modes
);
f
ree
(
glxPriv
->
glPriv
.
modes
);
__glXF
ree
(
glxPriv
->
glPriv
.
ownershipRegion
.
rects
);
f
ree
(
glxPriv
->
glPriv
.
ownershipRegion
.
rects
);
__glXF
ree
(
glxPriv
);
f
ree
(
glxPriv
);
return
GL_TRUE
;
return
GL_TRUE
;
}
}
...
...
nx-X11/programs/Xserver/GL/glx/glxutil.h
View file @
c893ad65
...
@@ -42,12 +42,6 @@
...
@@ -42,12 +42,6 @@
extern
void
__glXNop
(
void
);
extern
void
__glXNop
(
void
);
/* memory management */
extern
void
*
__glXMalloc
(
size_t
size
);
extern
void
*
__glXCalloc
(
size_t
numElements
,
size_t
elementSize
);
extern
void
*
__glXRealloc
(
void
*
addr
,
size_t
newSize
);
extern
void
__glXFree
(
void
*
ptr
);
/* relate contexts with drawables */
/* relate contexts with drawables */
extern
void
__glXAssociateContext
(
__GLXcontext
*
glxc
);
extern
void
__glXAssociateContext
(
__GLXcontext
*
glxc
);
extern
void
__glXDeassociateContext
(
__GLXcontext
*
glxc
);
extern
void
__glXDeassociateContext
(
__GLXcontext
*
glxc
);
...
...
nx-X11/programs/Xserver/GL/glx/single2.c
View file @
c893ad65
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
#include "glxext.h"
#include "glxext.h"
#include "unpack.h"
#include "unpack.h"
#include "g_disptab.h"
#include "g_disptab.h"
#include "GL/glx_ansic.h"
int
__glXDisp_FeedbackBuffer
(
__GLXclientState
*
cl
,
GLbyte
*
pc
)
int
__glXDisp_FeedbackBuffer
(
__GLXclientState
*
cl
,
GLbyte
*
pc
)
{
{
...
@@ -67,7 +66,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
...
@@ -67,7 +66,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
size
=
*
(
GLsizei
*
)(
pc
+
0
);
size
=
*
(
GLsizei
*
)(
pc
+
0
);
type
=
*
(
GLenum
*
)(
pc
+
4
);
type
=
*
(
GLenum
*
)(
pc
+
4
);
if
(
cx
->
feedbackBufSize
<
size
)
{
if
(
cx
->
feedbackBufSize
<
size
)
{
cx
->
feedbackBuf
=
(
GLfloat
*
)
__glXR
ealloc
(
cx
->
feedbackBuf
,
cx
->
feedbackBuf
=
(
GLfloat
*
)
r
ealloc
(
cx
->
feedbackBuf
,
(
size_t
)
size
(
size_t
)
size
*
__GLX_SIZE_FLOAT32
);
*
__GLX_SIZE_FLOAT32
);
if
(
!
cx
->
feedbackBuf
)
{
if
(
!
cx
->
feedbackBuf
)
{
...
@@ -97,7 +96,7 @@ int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc)
...
@@ -97,7 +96,7 @@ int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc)
pc
+=
__GLX_SINGLE_HDR_SIZE
;
pc
+=
__GLX_SINGLE_HDR_SIZE
;
size
=
*
(
GLsizei
*
)(
pc
+
0
);
size
=
*
(
GLsizei
*
)(
pc
+
0
);
if
(
cx
->
selectBufSize
<
size
)
{
if
(
cx
->
selectBufSize
<
size
)
{
cx
->
selectBuf
=
(
GLuint
*
)
__glXR
ealloc
(
cx
->
selectBuf
,
cx
->
selectBuf
=
(
GLuint
*
)
r
ealloc
(
cx
->
selectBuf
,
(
size_t
)
size
(
size_t
)
size
*
__GLX_SIZE_CARD32
);
*
__GLX_SIZE_CARD32
);
if
(
!
cx
->
selectBuf
)
{
if
(
!
cx
->
selectBuf
)
{
...
@@ -268,24 +267,30 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string)
...
@@ -268,24 +267,30 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string)
** pull tokens out of shortest string
** pull tokens out of shortest string
** include space in combo_string for final separator and null terminator
** include space in combo_string for final separator and null terminator
*/
*/
if
(
(
clen
=
__glXStrlen
(
cext_string
))
>
(
slen
=
__glXStrlen
(
sext_string
))
)
{
clen
=
strlen
(
cext_string
);
combo_string
=
(
char
*
)
__glXMalloc
(
slen
+
2
);
slen
=
strlen
(
sext_string
);
s1
=
(
char
*
)
__glXMalloc
(
slen
+
2
);
__glXStrcpy
(
s1
,
sext_string
);
if
(
clen
>
slen
)
{
combo_string
=
(
char
*
)
malloc
(
slen
+
2
);
s1
=
(
char
*
)
malloc
(
slen
+
2
);
strcpy
(
s1
,
sext_string
);
s2
=
cext_string
;
s2
=
cext_string
;
}
else
{
}
else
{
combo_string
=
(
char
*
)
__glXMalloc
(
clen
+
2
);
combo_string
=
(
char
*
)
malloc
(
clen
+
2
);
s1
=
(
char
*
)
__glXMalloc
(
clen
+
2
);
__glXStrcpy
(
s1
,
cext_string
);
s1
=
(
char
*
)
malloc
(
clen
+
2
);
strcpy
(
s1
,
cext_string
);
s2
=
sext_string
;
s2
=
sext_string
;
}
}
if
(
!
combo_string
||
!
s1
)
{
if
(
!
combo_string
||
!
s1
)
{
if
(
combo_string
)
__glXFree
(
combo_string
);
if
(
combo_string
)
if
(
s1
)
__glXFree
(
s1
);
free
(
combo_string
);
if
(
s1
)
free
(
s1
);
return
NULL
;
return
NULL
;
}
}
combo_string
[
0
]
=
'\0'
;
combo_string
[
0
]
=
'\0'
;
/* Get first extension token */
/* Get first extension token */
token
=
__glXS
trtok
(
s1
,
SEPARATOR
);
token
=
s
trtok
(
s1
,
SEPARATOR
);
while
(
token
!=
NULL
)
{
while
(
token
!=
NULL
)
{
/*
/*
...
@@ -293,20 +298,20 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string)
...
@@ -293,20 +298,20 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string)
** beware of extension names which are prefixes of other extension names
** beware of extension names which are prefixes of other extension names
*/
*/
const
char
*
p
=
s2
;
const
char
*
p
=
s2
;
end
=
p
+
__glXS
trlen
(
p
);
end
=
p
+
s
trlen
(
p
);
while
(
p
<
end
)
{
while
(
p
<
end
)
{
size_t
n
=
__glXS
trcspn
(
p
,
SEPARATOR
);
size_t
n
=
s
trcspn
(
p
,
SEPARATOR
);
if
((
__glXStrlen
(
token
)
==
n
)
&&
(
__glXS
trncmp
(
token
,
p
,
n
)
==
0
))
{
if
((
strlen
(
token
)
==
n
)
&&
(
s
trncmp
(
token
,
p
,
n
)
==
0
))
{
combo_string
=
__glXStrcat
(
combo_string
,
token
);
combo_string
=
strcat
(
combo_string
,
token
);
combo_string
=
__glXStrcat
(
combo_string
,
SEPARATOR
);
combo_string
=
strcat
(
combo_string
,
SEPARATOR
);
}
}
p
+=
(
n
+
1
);
p
+=
(
n
+
1
);
}
}
/* Get next extension token */
/* Get next extension token */
token
=
__glXS
trtok
(
NULL
,
SEPARATOR
);
token
=
s
trtok
(
NULL
,
SEPARATOR
);
}
}
__glXF
ree
(
s1
);
f
ree
(
s1
);
return
combo_string
;
return
combo_string
;
}
}
...
@@ -351,26 +356,24 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
...
@@ -351,26 +356,24 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
buf
=
__glXcombine_strings
(
buf1
,
buf
=
__glXcombine_strings
(
buf1
,
cx
->
pGlxScreen
->
GLextensions
);
cx
->
pGlxScreen
->
GLextensions
);
if
(
buf1
!=
NULL
)
{
if
(
buf1
!=
NULL
)
{
__glXF
ree
(
buf1
);
f
ree
(
buf1
);
}
}
string
=
buf
;
string
=
buf
;
}
}
else
if
(
name
==
GL_VERSION
)
{
else
if
(
name
==
GL_VERSION
)
{
if
(
atof
(
string
)
>
atof
(
GLServerVersion
)
)
{
if
(
atof
(
string
)
>
atof
(
GLServerVersion
)
)
{
buf
=
__glXMalloc
(
__glXStrlen
(
string
)
buf
=
malloc
(
strlen
(
string
)
+
strlen
(
GLServerVersion
)
+
4
);
+
__glXStrlen
(
GLServerVersion
)
+
4
);
if
(
buf
==
NULL
)
{
if
(
buf
==
NULL
)
{
string
=
GLServerVersion
;
string
=
GLServerVersion
;
}
}
else
{
else
{
__glXS
printf
(
buf
,
"%s (%s)"
,
GLServerVersion
,
string
);
s
printf
(
buf
,
"%s (%s)"
,
GLServerVersion
,
string
);
string
=
buf
;
string
=
buf
;
}
}
}
}
}
}
if
(
string
)
{
if
(
string
)
{
length
=
__glXS
trlen
((
const
char
*
)
string
)
+
1
;
length
=
s
trlen
((
const
char
*
)
string
)
+
1
;
}
}
__GLX_BEGIN_REPLY
(
length
);
__GLX_BEGIN_REPLY
(
length
);
...
@@ -384,7 +387,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
...
@@ -384,7 +387,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
__GLX_SEND_HEADER
();
__GLX_SEND_HEADER
();
WriteToClient
(
client
,
length
,
string
);
WriteToClient
(
client
,
length
,
string
);
if
(
buf
!=
NULL
)
{
if
(
buf
!=
NULL
)
{
__glXF
ree
(
buf
);
f
ree
(
buf
);
}
}
return
Success
;
return
Success
;
}
}
...
...
nx-X11/programs/Xserver/GL/glx/single2swap.c
View file @
c893ad65
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#include "glxext.h"
#include "glxext.h"
#include "unpack.h"
#include "unpack.h"
#include "g_disptab.h"
#include "g_disptab.h"
#include "GL/glx_ansic.h"
int
__glXDispSwap_FeedbackBuffer
(
__GLXclientState
*
cl
,
GLbyte
*
pc
)
int
__glXDispSwap_FeedbackBuffer
(
__GLXclientState
*
cl
,
GLbyte
*
pc
)
{
{
...
@@ -66,7 +65,7 @@ int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
...
@@ -66,7 +65,7 @@ int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc)
size
=
*
(
GLsizei
*
)(
pc
+
0
);
size
=
*
(
GLsizei
*
)(
pc
+
0
);
type
=
*
(
GLenum
*
)(
pc
+
4
);
type
=
*
(
GLenum
*
)(
pc
+
4
);
if
(
cx
->
feedbackBufSize
<
size
)
{
if
(
cx
->
feedbackBufSize
<
size
)
{
cx
->
feedbackBuf
=
(
GLfloat
*
)
__glXR
ealloc
(
cx
->
feedbackBuf
,
cx
->
feedbackBuf
=
(
GLfloat
*
)
r
ealloc
(
cx
->
feedbackBuf
,
(
size_t
)
size
(
size_t
)
size
*
__GLX_SIZE_FLOAT32
);
*
__GLX_SIZE_FLOAT32
);
if
(
!
cx
->
feedbackBuf
)
{
if
(
!
cx
->
feedbackBuf
)
{
...
@@ -99,7 +98,7 @@ int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc)
...
@@ -99,7 +98,7 @@ int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT
(
pc
+
0
);
__GLX_SWAP_INT
(
pc
+
0
);
size
=
*
(
GLsizei
*
)(
pc
+
0
);
size
=
*
(
GLsizei
*
)(
pc
+
0
);
if
(
cx
->
selectBufSize
<
size
)
{
if
(
cx
->
selectBufSize
<
size
)
{
cx
->
selectBuf
=
(
GLuint
*
)
__glXR
ealloc
(
cx
->
selectBuf
,
cx
->
selectBuf
=
(
GLuint
*
)
r
ealloc
(
cx
->
selectBuf
,
(
size_t
)
size
(
size_t
)
size
*
__GLX_SIZE_CARD32
);
*
__GLX_SIZE_CARD32
);
if
(
!
cx
->
selectBuf
)
{
if
(
!
cx
->
selectBuf
)
{
...
...
nx-X11/programs/Xserver/GL/glx/xfont.c
View file @
c893ad65
...
@@ -77,7 +77,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci)
...
@@ -77,7 +77,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci)
p
=
buf
;
p
=
buf
;
allocbuf
=
0
;
allocbuf
=
0
;
}
else
{
}
else
{
p
=
(
unsigned
char
*
)
__glXM
alloc
(
allocBytes
);
p
=
(
unsigned
char
*
)
m
alloc
(
allocBytes
);
if
(
!
p
)
if
(
!
p
)
return
BadAlloc
;
return
BadAlloc
;
allocbuf
=
p
;
allocbuf
=
p
;
...
@@ -99,7 +99,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci)
...
@@ -99,7 +99,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci)
pci
->
metrics
.
characterWidth
,
0
,
allocbuf
?
allocbuf
:
buf
);
pci
->
metrics
.
characterWidth
,
0
,
allocbuf
?
allocbuf
:
buf
);
if
(
allocbuf
)
{
if
(
allocbuf
)
{
__glXF
ree
(
allocbuf
);
f
ree
(
allocbuf
);
}
}
return
Success
;
return
Success
;
#undef __GL_CHAR_BUF_SIZE
#undef __GL_CHAR_BUF_SIZE
...
...
nx-X11/programs/Xserver/GL/include/GL/glx_ansic.h
deleted
100644 → 0
View file @
b38d5b97
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _glx_ansic_h_
#define _glx_ansic_h_
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of 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., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
*/
/*
** this needs to check whether we're using XFree86 at all, and then
** which version we're using. Use these macros if version is 3.9+, else
** use normal commands below.
*/
/*
** turns out this include file only exists for XFree86 3.9+
** I notice that not having it is not an error and does not stop the build,
** but having it will allow opengl and glx to be built for 3.9+. We no longer
** need an explicit define in the Makefile, just point to the correct X source
** tree and all should be taken care of.
*/
#ifdef XFree86Server
#ifndef assert
#define assert(a)
#endif
#else
#if defined(Lynx) && defined(__assert_h)
#undef __assert_h
#endif
#ifdef assert
#undef assert
#endif
#include <assert.h>
#endif
#define GLX_STDOUT stdout
#define GLX_STDERR stderr
#define __glXPrintf printf
#define __glXFprintf fprintf
#define __glXSprintf sprintf
#define __glXVfprintf vfprintf
#define __glXVsprintf vsprintf
#define __glXFopen fopen
#define __glXFclose fclose
#define __glXCos(x) cos(x)
#define __glXSin(x) sin(x)
#define __glXAtan(x) atan(x)
#define __glXAbs(x) abs(x)
#define __glXLog(x) log(x)
#define __glXCeil(x) ceil(x)
#define __glXFloor(x) floor(x)
#define __glXSqrt(x) sqrt(x)
#define __glXPow(x, y) pow(x, y)
#define __glXMemmove(dest, src, n) memmove(dest, src, n)
#define __glXMemcpy(dest, src, n) memcpy(dest, src, n)
#define __glXMemset(s, c, n) memset(s, c, n)
#define __glXStrdup(str) xstrdup(str)
#define __glXStrcpy(dest, src) strcpy(dest, src)
#define __glXStrncpy(dest, src, n) strncpy(dest, src, n)
#define __glXStrcat(dest, src) strcat(dest, src)
#define __glXStrncat(dest, src, n) strncat(dest, src, n)
#define __glXStrcmp(s1, s2) strcmp(s1, s2)
#define __glXStrncmp(s1, s2, n) strncmp(s1, s2, n)
#define __glXStrlen(str) strlen(str)
#define __glXAbort() abort()
#define __glXStrtok(s, delim) strtok(s, delim)
#define __glXStrcspn(s, reject) strcspn(s, reject)
#define __glXGetenv(a) getenv(a)
#define __glXAtoi(a) atoi(a)
#endif
/* _glx_ansic_h_ */
nx-X11/programs/Xserver/GL/include/GL/xf86glx.h
deleted
100644 → 0
View file @
b38d5b97
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/*
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "miscstruct.h"
nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c
View file @
c893ad65
...
@@ -52,7 +52,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
@@ -52,7 +52,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86glxint.h"
#include "xf86glxint.h"
#include "context.h"
#include "context.h"
#include "xmesaP.h"
#include "xmesaP.h"
#include <GL/xf86glx.h>
#include "context.h"
#include "context.h"
/*
/*
...
@@ -319,15 +318,15 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
...
@@ -319,15 +318,15 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
/* Alloc space for the list of new GLX visuals */
/* Alloc space for the list of new GLX visuals */
pNewVisualConfigs
=
(
__GLXvisualConfig
*
)
pNewVisualConfigs
=
(
__GLXvisualConfig
*
)
__glXM
alloc
(
numNewConfigs
*
sizeof
(
__GLXvisualConfig
));
m
alloc
(
numNewConfigs
*
sizeof
(
__GLXvisualConfig
));
if
(
!
pNewVisualConfigs
)
{
if
(
!
pNewVisualConfigs
)
{
return
FALSE
;
return
FALSE
;
}
}
/* Alloc space for the list of new GLX visual privates */
/* Alloc space for the list of new GLX visual privates */
pNewVisualPriv
=
(
void
**
)
__glXM
alloc
(
numNewConfigs
*
sizeof
(
void
*
));
pNewVisualPriv
=
(
void
**
)
m
alloc
(
numNewConfigs
*
sizeof
(
void
*
));
if
(
!
pNewVisualPriv
)
{
if
(
!
pNewVisualPriv
)
{
__glXF
ree
(
pNewVisualConfigs
);
f
ree
(
pNewVisualConfigs
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -371,40 +370,40 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
...
@@ -371,40 +370,40 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
numConfigs
=
0
;
numConfigs
=
0
;
/* Alloc temp space for the list of orig VisualIDs for each new visual */
/* Alloc temp space for the list of orig VisualIDs for each new visual */
orig_vid
=
(
VisualID
*
)
__glXM
alloc
(
numNewVisuals
*
sizeof
(
VisualID
));
orig_vid
=
(
VisualID
*
)
m
alloc
(
numNewVisuals
*
sizeof
(
VisualID
));
if
(
!
orig_vid
)
{
if
(
!
orig_vid
)
{
__glXF
ree
(
pNewVisualPriv
);
f
ree
(
pNewVisualPriv
);
__glXF
ree
(
pNewVisualConfigs
);
f
ree
(
pNewVisualConfigs
);
return
FALSE
;
return
FALSE
;
}
}
/* Alloc space for the list of glXVisuals */
/* Alloc space for the list of glXVisuals */
modes
=
_gl_context_modes_create
(
numNewVisuals
,
sizeof
(
__GLcontextModes
));
modes
=
_gl_context_modes_create
(
numNewVisuals
,
sizeof
(
__GLcontextModes
));
if
(
modes
==
NULL
)
{
if
(
modes
==
NULL
)
{
__glXF
ree
(
orig_vid
);
f
ree
(
orig_vid
);
__glXF
ree
(
pNewVisualPriv
);
f
ree
(
pNewVisualPriv
);
__glXF
ree
(
pNewVisualConfigs
);
f
ree
(
pNewVisualConfigs
);
return
FALSE
;
return
FALSE
;
}
}
/* Alloc space for the list of glXVisualPrivates */
/* Alloc space for the list of glXVisualPrivates */
glXVisualPriv
=
(
void
**
)
__glXM
alloc
(
numNewVisuals
*
sizeof
(
void
*
));
glXVisualPriv
=
(
void
**
)
m
alloc
(
numNewVisuals
*
sizeof
(
void
*
));
if
(
!
glXVisualPriv
)
{
if
(
!
glXVisualPriv
)
{
_gl_context_modes_destroy
(
modes
);
_gl_context_modes_destroy
(
modes
);
__glXF
ree
(
orig_vid
);
f
ree
(
orig_vid
);
__glXF
ree
(
pNewVisualPriv
);
f
ree
(
pNewVisualPriv
);
__glXF
ree
(
pNewVisualConfigs
);
f
ree
(
pNewVisualConfigs
);
return
FALSE
;
return
FALSE
;
}
}
/* Alloc space for the new list of the X server's visuals */
/* Alloc space for the new list of the X server's visuals */
pVisualNew
=
(
VisualPtr
)
__glXM
alloc
(
numNewVisuals
*
sizeof
(
VisualRec
));
pVisualNew
=
(
VisualPtr
)
m
alloc
(
numNewVisuals
*
sizeof
(
VisualRec
));
if
(
!
pVisualNew
)
{
if
(
!
pVisualNew
)
{
__glXF
ree
(
glXVisualPriv
);
f
ree
(
glXVisualPriv
);
_gl_context_modes_destroy
(
modes
);
_gl_context_modes_destroy
(
modes
);
__glXF
ree
(
orig_vid
);
f
ree
(
orig_vid
);
__glXF
ree
(
pNewVisualPriv
);
f
ree
(
pNewVisualPriv
);
__glXF
ree
(
pNewVisualConfigs
);
f
ree
(
pNewVisualConfigs
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -487,7 +486,7 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
...
@@ -487,7 +486,7 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
numVids
++
;
numVids
++
;
/* Allocate a new list of VisualIDs for this depth */
/* Allocate a new list of VisualIDs for this depth */
pVids
=
(
VisualID
*
)
__glXM
alloc
(
numVids
*
sizeof
(
VisualID
));
pVids
=
(
VisualID
*
)
m
alloc
(
numVids
*
sizeof
(
VisualID
));
/* Initialize the new list of VisualIDs for this depth */
/* Initialize the new list of VisualIDs for this depth */
for
(
j
=
0
;
j
<
pdepth
[
i
].
numVids
;
j
++
)
for
(
j
=
0
;
j
<
pdepth
[
i
].
numVids
;
j
++
)
...
@@ -496,7 +495,7 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
...
@@ -496,7 +495,7 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
pVids
[
n
++
]
=
pVisualNew
[
k
].
vid
;
pVids
[
n
++
]
=
pVisualNew
[
k
].
vid
;
/* Update this depth's list of VisualIDs */
/* Update this depth's list of VisualIDs */
__glXF
ree
(
pdepth
[
i
].
vids
);
f
ree
(
pdepth
[
i
].
vids
);
pdepth
[
i
].
vids
=
pVids
;
pdepth
[
i
].
vids
=
pVids
;
pdepth
[
i
].
numVids
=
numVids
;
pdepth
[
i
].
numVids
=
numVids
;
}
}
...
@@ -506,12 +505,12 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
...
@@ -506,12 +505,12 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
*
visualp
=
pVisualNew
;
*
visualp
=
pVisualNew
;
/* Free the old list of the X server's visuals */
/* Free the old list of the X server's visuals */
__glXF
ree
(
pVisual
);
f
ree
(
pVisual
);
/* Clean up temporary allocations */
/* Clean up temporary allocations */
__glXF
ree
(
orig_vid
);
f
ree
(
orig_vid
);
__glXF
ree
(
pNewVisualPriv
);
f
ree
(
pNewVisualPriv
);
__glXF
ree
(
pNewVisualConfigs
);
f
ree
(
pNewVisualConfigs
);
/* Free the private list created by DDX HW driver */
/* Free the private list created by DDX HW driver */
if
(
visualPrivates
)
if
(
visualPrivates
)
...
@@ -581,19 +580,19 @@ static void init_screen_visuals(int screen)
...
@@ -581,19 +580,19 @@ static void init_screen_visuals(int screen)
int
i
,
j
;
int
i
,
j
;
/* Alloc space for the list of XMesa visuals */
/* Alloc space for the list of XMesa visuals */
pXMesaVisual
=
(
XMesaVisual
*
)
__glXM
alloc
(
MESAScreens
[
screen
].
num_vis
*
pXMesaVisual
=
(
XMesaVisual
*
)
m
alloc
(
MESAScreens
[
screen
].
num_vis
*
sizeof
(
XMesaVisual
));
sizeof
(
XMesaVisual
));
__glXM
emset
(
pXMesaVisual
,
0
,
m
emset
(
pXMesaVisual
,
0
,
MESAScreens
[
screen
].
num_vis
*
sizeof
(
XMesaVisual
));
MESAScreens
[
screen
].
num_vis
*
sizeof
(
XMesaVisual
));
/* FIXME: Change 'used' to be a array of bits (rather than of ints),
/* FIXME: Change 'used' to be a array of bits (rather than of ints),
* FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less
* FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less
* FIXME: than 64 or 128 the stack array can be used instead of calling
* FIXME: than 64 or 128 the stack array can be used instead of calling
* FIXME:
__glXMalloc / __glXF
ree. If nothing else, convert 'used' to
* FIXME:
malloc / f
ree. If nothing else, convert 'used' to
* FIXME: array of bytes instead of ints!
* FIXME: array of bytes instead of ints!
*/
*/
used
=
(
int
*
)
__glXM
alloc
(
pScreen
->
numVisuals
*
sizeof
(
int
));
used
=
(
int
*
)
m
alloc
(
pScreen
->
numVisuals
*
sizeof
(
int
));
__glXM
emset
(
used
,
0
,
pScreen
->
numVisuals
*
sizeof
(
int
));
m
emset
(
used
,
0
,
pScreen
->
numVisuals
*
sizeof
(
int
));
i
=
0
;
i
=
0
;
for
(
modes
=
MESAScreens
[
screen
].
modes
for
(
modes
=
MESAScreens
[
screen
].
modes
...
@@ -652,7 +651,7 @@ static void init_screen_visuals(int screen)
...
@@ -652,7 +651,7 @@ static void init_screen_visuals(int screen)
i
++
;
i
++
;
}
}
__glXF
ree
(
used
);
f
ree
(
used
);
MESAScreens
[
screen
].
xm_vis
=
pXMesaVisual
;
MESAScreens
[
screen
].
xm_vis
=
pXMesaVisual
;
}
}
...
@@ -703,9 +702,9 @@ extern void __MESA_resetExtension(void)
...
@@ -703,9 +702,9 @@ extern void __MESA_resetExtension(void)
}
}
_gl_context_modes_destroy
(
MESAScreens
[
i
].
modes
);
_gl_context_modes_destroy
(
MESAScreens
[
i
].
modes
);
MESAScreens
[
i
].
modes
=
NULL
;
MESAScreens
[
i
].
modes
=
NULL
;
__glXF
ree
(
MESAScreens
[
i
].
private
);
f
ree
(
MESAScreens
[
i
].
private
);
MESAScreens
[
i
].
private
=
NULL
;
MESAScreens
[
i
].
private
=
NULL
;
__glXF
ree
(
MESAScreens
[
i
].
xm_vis
);
f
ree
(
MESAScreens
[
i
].
xm_vis
);
MESAScreens
[
i
].
xm_vis
=
NULL
;
MESAScreens
[
i
].
xm_vis
=
NULL
;
MESAScreens
[
i
].
num_vis
=
0
;
MESAScreens
[
i
].
num_vis
=
0
;
}
}
...
@@ -725,7 +724,7 @@ void __MESA_createBuffer(__GLXdrawablePrivate *glxPriv)
...
@@ -725,7 +724,7 @@ void __MESA_createBuffer(__GLXdrawablePrivate *glxPriv)
ErrorF
(
"find_mesa_visual returned NULL for visualID = 0x%04x
\n
"
,
ErrorF
(
"find_mesa_visual returned NULL for visualID = 0x%04x
\n
"
,
glxPriv
->
modes
->
visualID
);
glxPriv
->
modes
->
visualID
);
}
}
buf
=
(
__MESA_buffer
)
__glXM
alloc
(
sizeof
(
struct
__MESA_bufferRec
));
buf
=
(
__MESA_buffer
)
m
alloc
(
sizeof
(
struct
__MESA_bufferRec
));
/* Create Mesa's buffers */
/* Create Mesa's buffers */
if
(
glxPriv
->
type
==
DRAWABLE_WINDOW
)
{
if
(
glxPriv
->
type
==
DRAWABLE_WINDOW
)
{
...
@@ -793,7 +792,7 @@ void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv)
...
@@ -793,7 +792,7 @@ void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv)
glxPriv
->
swapBuffers
=
buf
->
fbswap
;
glxPriv
->
swapBuffers
=
buf
->
fbswap
;
glPriv
->
frontBuffer
.
resize
=
buf
->
fbresize
;
glPriv
->
frontBuffer
.
resize
=
buf
->
fbresize
;
__glXF
ree
(
glPriv
->
private
);
f
ree
(
glPriv
->
private
);
glPriv
->
private
=
NULL
;
glPriv
->
private
=
NULL
;
}
}
...
...
nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c
View file @
c893ad65
...
@@ -41,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
...
@@ -41,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "pixmapstr.h"
#include "pixmapstr.h"
#include "xf86glx_util.h"
#include "xf86glx_util.h"
#include <nx-X11/Xmd.h>
#include <nx-X11/Xmd.h>
#include "GL/xf86glx.h"
#ifdef ROUNDUP
#ifdef ROUNDUP
#undef ROUNDUP
#undef ROUNDUP
...
...
nx-X11/programs/Xserver/hw/nxagent/NXglxext.c
View file @
c893ad65
...
@@ -67,12 +67,12 @@ static int __glXDispatch(ClientPtr client)
...
@@ -67,12 +67,12 @@ static int __glXDispatch(ClientPtr client)
opcode
=
stuff
->
glxCode
;
opcode
=
stuff
->
glxCode
;
cl
=
__glXClients
[
client
->
index
];
cl
=
__glXClients
[
client
->
index
];
if
(
!
cl
)
{
if
(
!
cl
)
{
cl
=
(
__GLXclientState
*
)
__glXM
alloc
(
sizeof
(
__GLXclientState
));
cl
=
(
__GLXclientState
*
)
m
alloc
(
sizeof
(
__GLXclientState
));
__glXClients
[
client
->
index
]
=
cl
;
__glXClients
[
client
->
index
]
=
cl
;
if
(
!
cl
)
{
if
(
!
cl
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
__glXM
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
m
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
}
}
if
(
!
cl
->
inUse
)
{
if
(
!
cl
->
inUse
)
{
...
@@ -145,12 +145,12 @@ static int __glXSwapDispatch(ClientPtr client)
...
@@ -145,12 +145,12 @@ static int __glXSwapDispatch(ClientPtr client)
opcode
=
stuff
->
glxCode
;
opcode
=
stuff
->
glxCode
;
cl
=
__glXClients
[
client
->
index
];
cl
=
__glXClients
[
client
->
index
];
if
(
!
cl
)
{
if
(
!
cl
)
{
cl
=
(
__GLXclientState
*
)
__glXM
alloc
(
sizeof
(
__GLXclientState
));
cl
=
(
__GLXclientState
*
)
m
alloc
(
sizeof
(
__GLXclientState
));
__glXClients
[
client
->
index
]
=
cl
;
__glXClients
[
client
->
index
]
=
cl
;
if
(
!
cl
)
{
if
(
!
cl
)
{
return
BadAlloc
;
return
BadAlloc
;
}
}
__glXM
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
m
emset
(
cl
,
0
,
sizeof
(
__GLXclientState
));
}
}
if
(
!
cl
->
inUse
)
{
if
(
!
cl
->
inUse
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment