Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
xserver
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Trevisan
xserver
Commits
c3342c80
Commit
c3342c80
authored
Mar 12, 2006
by
Kristian Høgsberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge accel_indirect branch to HEAD.
parent
b1b731c2
Changes
52
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
2718 additions
and
3942 deletions
+2718
-3942
ChangeLog
ChangeLog
+118
-0
GL/glx/Makefile.am
GL/glx/Makefile.am
+20
-13
GL/glx/g_disptab.h
GL/glx/g_disptab.h
+6
-0
GL/glx/global.c
GL/glx/global.c
+1
-0
GL/glx/glxbuf.c
GL/glx/glxbuf.c
+0
-296
GL/glx/glxbuf.h
GL/glx/glxbuf.h
+0
-57
GL/glx/glxcmds.c
GL/glx/glxcmds.c
+251
-79
GL/glx/glxcmdsswap.c
GL/glx/glxcmdsswap.c
+78
-0
GL/glx/glxcontext.h
GL/glx/glxcontext.h
+33
-17
GL/glx/glxdrawable.h
GL/glx/glxdrawable.h
+10
-25
GL/glx/glxdri.c
GL/glx/glxdri.c
+926
-0
GL/glx/glxext.c
GL/glx/glxext.c
+104
-109
GL/glx/glxfb.c
GL/glx/glxfb.c
+0
-183
GL/glx/glxfb.h
GL/glx/glxfb.h
+0
-52
GL/glx/glximports.c
GL/glx/glximports.c
+0
-188
GL/glx/glximports.h
GL/glx/glximports.h
+0
-66
GL/glx/glxmem.c
GL/glx/glxmem.c
+0
-151
GL/glx/glxmem.h
GL/glx/glxmem.h
+0
-48
GL/glx/glxpix.c
GL/glx/glxpix.c
+0
-132
GL/glx/glxpix.h
GL/glx/glxpix.h
+0
-48
GL/glx/glxscreens.c
GL/glx/glxscreens.c
+71
-120
GL/glx/glxscreens.h
GL/glx/glxscreens.h
+13
-23
GL/glx/glxserver.h
GL/glx/glxserver.h
+25
-5
GL/glx/glxutil.c
GL/glx/glxutil.c
+31
-283
GL/glx/glxutil.h
GL/glx/glxutil.h
+15
-12
GL/glx/glxvisuals.c
GL/glx/glxvisuals.c
+517
-0
GL/mesa/X/xf86glx.c
GL/mesa/X/xf86glx.c
+217
-698
GL/mesa/X/xf86glxint.h
GL/mesa/X/xf86glxint.h
+0
-56
GL/mesa/swrast/Makefile.am
GL/mesa/swrast/Makefile.am
+1
-0
GL/symlink-mesa.sh
GL/symlink-mesa.sh
+1
-0
configure.ac
configure.ac
+12
-0
hw/dmx/glxProxy/glxext.c
hw/dmx/glxProxy/glxext.c
+7
-0
hw/xfree86/common/xf86Config.c
hw/xfree86/common/xf86Config.c
+12
-2
hw/xfree86/common/xf86Module.h
hw/xfree86/common/xf86Module.h
+4
-0
hw/xfree86/common/xf86Privstr.h
hw/xfree86/common/xf86Privstr.h
+2
-0
hw/xfree86/dixmods/Makefile.am
hw/xfree86/dixmods/Makefile.am
+5
-2
hw/xfree86/dixmods/glxmodule.c
hw/xfree86/dixmods/glxmodule.c
+70
-1189
hw/xfree86/dri/dri.c
hw/xfree86/dri/dri.c
+2
-2
hw/xfree86/loader/aoutloader.c
hw/xfree86/loader/aoutloader.c
+1
-1
hw/xfree86/loader/aoutloader.h
hw/xfree86/loader/aoutloader.h
+1
-1
hw/xfree86/loader/coffloader.c
hw/xfree86/loader/coffloader.c
+1
-1
hw/xfree86/loader/coffloader.h
hw/xfree86/loader/coffloader.h
+1
-1
hw/xfree86/loader/dlloader.c
hw/xfree86/loader/dlloader.c
+33
-26
hw/xfree86/loader/dlloader.h
hw/xfree86/loader/dlloader.h
+2
-1
hw/xfree86/loader/elfloader.c
hw/xfree86/loader/elfloader.c
+2
-2
hw/xfree86/loader/elfloader.h
hw/xfree86/loader/elfloader.h
+1
-1
hw/xfree86/loader/loader.c
hw/xfree86/loader/loader.c
+5
-4
hw/xfree86/loader/loader.h
hw/xfree86/loader/loader.h
+8
-3
hw/xfree86/loader/loaderProcs.h
hw/xfree86/loader/loaderProcs.h
+4
-0
hw/xfree86/loader/loadmod.c
hw/xfree86/loader/loadmod.c
+95
-44
include/dix-config.h.in
include/dix-config.h.in
+6
-0
mi/miinitext.c
mi/miinitext.c
+6
-1
No files found.
ChangeLog
View file @
c3342c80
2006-03-10 Kristian Høgsberg <krh@redhat.com>
* Merge accel_indirect branch to HEAD.
2006-03-05 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxcmds.c (DoGetDrawableAttributes): Add
GLX_Y_INVERTED_EXT to the drawable attributes we report.
2006-03-05 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxcmds.c (__glXCreateARGBConfig): Create the fbconfig
for the composite 32 visual after the fact here.
* GL/glx/glxdri.c (__glXDRIbindTexImage): Use 4bpp for 32 bit
visuals too, but only fill the alpha channel for 24 depth
drawables.
2006-03-03 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxdri.c (getDrawableInfo): Work around i915 driver that
tries to render to drawable even if it no longer exists.
Returning 0 cliprects (as dri_util.c does) doesn't seem to do it,
so we set the width and height to 0.
* GL/glx/g_disptab.h:
* GL/glx/glxcmdsswap.c: Fix a couple of warnings.
2006-03-03 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxdri.c (__glXDRIscreenProbe): Log full DRI driver path
when dlopen() fails.
* GL/glx/glxscreens.c (__glXInitScreens): Log the provider name
when we initialize a GLX screen.
* GL/symlink-mesa.sh:
* GL/mesa/swrast/Makefile.am: Update to work with mesa head.
2006-03-01 Kevin E. Martin <kem-at-freedesktop-dot-org>
* GL/glx/glxdri.c: (__glXDRIscreenProbe):
Pass err_msg when dev_priv allocation fails.
2006-03-01 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxdri.c (__glXDRIscreenProbe): Handle failing allocation
of dev_priv.
* GL/glx/glxdri.c (__glXDRIscreenProbe): The DRI driver
_mesa_free()'s the dev_priv passed in so we need to give it a
copy.
2006-03-01 Kevin E. Martin <kem-at-freedesktop-dot-org>
* GL/glx/glxserver.h:
Fix Xvfb, Xnest and Xprt build.
2006-02-28 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxdri.c (__glXDRIscreenProbe): Fix enter/leave confusion.
* configure.ac:
* hw/xfree86/common/xf86Config.c (configServerFlags): Enable AIGLX
by default at configure time and at runtime.
2006-02-27 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxserver.h:
* GL/glx/glxext.c:
* GL/mesa/X/xf86glx.c: Complete the prepare/finish dispatch to
enter/leave server rename.
* GL/glx/glxcmdsswap.c (__glXSwapGetDrawableAttributesSGIX): Add
byte swapping function.
* GL/mesa/swrast/Makefile.am (INCLUDES): Add -I../shader/slang.
* GL/glx/glxcmds.c: Make GLX_EXT_texture_from_pixmap entrypoints
non-static so we can get at them from glxcmdsswap.c.
2006-02-25 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxcmds.c: Add more GLX_EXT_texture_from_pixmap tokens
here as a temporary fix.
2006-02-24 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxcmds.c:
* GL/glx/glxcmdsswap.c:
* GL/glx/glxcontext.h:
* GL/glx/glxdri.c:
* GL/glx/glxscreens.c:
* GL/glx/glxserver.h: Add hooks for GLX_EXT_texture_from_pixmap
and port over naive glTexImage2D implementation. Add support for
glXQueryDrawable.
2006-02-24 Kevin E. Martin <kem-at-freedesktop-dot-org>
* GL/glx/Makefile.am:
Include from Mesa sources before any installed versions.
* GL/glx/glxdri.c: (__glXDRIleaveServer), (__glXDRIenterServer),
(createContext), (destroyContext), (createDrawable),
(destroyDrawable), (getDrawableInfo), (__glXDRIscreenProbe):
Wrap the __DRIinterfaceMethods methods with enter/leaveServer to
make sure server locks are held when calling into the card driver.
2006-02-24 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxdri.c:
* GL/glx/glxvisuals.c: Add these files.
2006-02-24 Kristian Høgsberg <krh@redhat.com>
* GL/glx/*: Land rewritten accelerated indirect rendering on
accel_indirect_branch.
2006-03-10 Alan Coopersmith <alan.coopersmith@sun.com>
* hw/xfree86/utils/xorgcfg/help.c:
...
...
GL/glx/Makefile.am
View file @
c3342c80
noinst_LTLIBRARIES
=
libglx.la
if
AIGLX
GLXDRI_LIBRARY
=
libglxdri.la
endif
noinst_LTLIBRARIES
=
libglx.la
$(GLXDRI_LIBRARY)
AM_CFLAGS
=
\
-I
@MESA_SOURCE@/include
\
@DIX_CFLAGS@
\
@GL_CFLAGS@
\
@XLIB_CFLAGS@
\
-I
@MESA_SOURCE@/include
\
@LIBDRM_CFLAGS@
\
@DRIPROTO_CFLAGS@
\
-I
@MESA_SOURCE@/src/mesa/glapi
\
-I
@MESA_SOURCE@/src/mesa/main
\
@SERVER_DEFINES@
\
...
...
@@ -15,10 +21,20 @@ AM_CFLAGS = \
# none yet
#sdk_HEADERS =
INCLUDES
=
-I
$(top_srcdir)
/GL/include
-I
$(top_srcdir)
/hw/xfree86/os-support
INCLUDES
=
\
-I
$(top_srcdir)
/GL/include
\
-I
$(top_srcdir)
/hw/xfree86/os-support
\
-I
$(top_srcdir)
/hw/xfree86/os-support/bus
\
-I
$(top_srcdir)
/hw/xfree86/common
\
-I
$(top_srcdir)
/hw/xfree86/dri
\
-I
$(top_srcdir)
/mi
nodist_libglx_la_SOURCES
=
indirect_size.h
libglxdri_la_SOURCES
=
\
glxdri.c
libglx_la_SOURCES
=
\
g_disptab.c
\
g_disptab.h
\
...
...
@@ -29,8 +45,6 @@ libglx_la_SOURCES = \
glcontextmodes.h
\
global.c
\
glthread.c
\
glxbuf.c
\
glxbuf.h
\
glxcmds.c
\
glxcmdsswap.c
\
glxcontext.h
\
...
...
@@ -38,14 +52,7 @@ libglx_la_SOURCES = \
glxerror.h
\
glxext.c
\
glxext.h
\
glxfb.c
\
glxfb.h
\
glximports.c
\
glximports.h
\
glxmem.c
\
glxmem.h
\
glxpix.c
\
glxpix.h
\
glxvisuals.c
\
glxscreens.c
\
glxscreens.h
\
glxserver.h
\
...
...
GL/glx/g_disptab.h
View file @
c3342c80
...
...
@@ -46,6 +46,9 @@ extern int __glXWaitGL(__GLXclientState*, GLbyte*);
extern
int
__glXWaitX
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXCopyContext
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXSwapBuffers
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXBindTexImageEXT
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
extern
int
__glXReleaseTexImageEXT
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
extern
int
__glXGetDrawableAttributesSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
extern
int
__glXUseXFont
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXCreateGLXPixmap
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXGetVisualConfigs
(
__GLXclientState
*
,
GLbyte
*
);
...
...
@@ -71,6 +74,9 @@ extern int __glXSwapWaitGL(__GLXclientState*, GLbyte*);
extern
int
__glXSwapWaitX
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXSwapCopyContext
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXSwapSwapBuffers
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXSwapBindTexImageEXT
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
extern
int
__glXSwapReleaseTexImageEXT
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
extern
int
__glXSwapGetDrawableAttributesSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
extern
int
__glXSwapUseXFont
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXSwapCreateGLXPixmap
(
__GLXclientState
*
,
GLbyte
*
);
extern
int
__glXSwapGetVisualConfigs
(
__GLXclientState
*
,
GLbyte
*
);
...
...
GL/glx/global.c
View file @
c3342c80
...
...
@@ -53,6 +53,7 @@ __GLXcontext *__glXLastContext;
RESTYPE
__glXContextRes
;
RESTYPE
__glXClientRes
;
RESTYPE
__glXPixmapRes
;
RESTYPE
__glXDrawableRes
;
RESTYPE
__glXSwapBarrierRes
;
/*
...
...
GL/glx/glxbuf.c
deleted
100644 → 0
View file @
b1b731c2
/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.c,v 1.6 2001/03/25 05:32:01 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
** 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.
**
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "glxserver.h"
#include "glxutil.h"
#include "glxbuf.h"
#include "glxfb.h"
#include "glxmem.h"
#include "glxpix.h"
void
__glXFBInitDrawable
(
__GLXdrawablePrivate
*
glxPriv
,
__GLcontextModes
*
modes
)
{
__GLdrawablePrivate
*
glPriv
;
GLint
rgbBits
;
GLint
accumBits
;
glPriv
=
&
glxPriv
->
glPriv
;
rgbBits
=
modes
->
rgbBits
;
accumBits
=
modes
->
accumRedBits
+
modes
->
accumGreenBits
+
modes
->
accumBlueBits
+
modes
->
accumAlphaBits
;
#if defined(__GL_ALIGNED_BUFFERS)
/* initialize pixel alignments (for more details see context.h) */
glPriv
->
xAlignment
=
1
;
glPriv
->
yAlignment
=
1
;
#endif
glxPriv
->
swapBuffers
=
__glXFBMemSwapBuffers
;
glPriv
->
yInverted
=
GL_TRUE
;
/* Y is upside-down */
if
(
modes
->
doubleBufferMode
)
{
if
(
modes
->
colorIndexMode
)
{
__glXInitFB
(
&
glPriv
->
frontBuffer
,
glPriv
,
modes
->
indexBits
);
__glXInitMem
(
&
glPriv
->
backBuffer
,
glPriv
,
modes
->
indexBits
);
}
else
{
__glXInitFB
(
&
glPriv
->
frontBuffer
,
glPriv
,
rgbBits
);
__glXInitMem
(
&
glPriv
->
backBuffer
,
glPriv
,
rgbBits
);
}
}
else
{
if
(
modes
->
colorIndexMode
)
{
__glXInitFB
(
&
glPriv
->
frontBuffer
,
glPriv
,
modes
->
indexBits
);
}
else
{
__glXInitFB
(
&
glPriv
->
frontBuffer
,
glPriv
,
rgbBits
);
}
}
#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0)
if
(
modes
->
maxAuxBuffers
>
0
)
{
GLint
i
;
for
(
i
=
0
;
i
<
modes
->
maxAuxBuffers
;
i
++
)
{
if
(
modes
->
colorIndexMode
)
{
__glXInitMem
(
&
glPriv
->
auxBuffer
[
i
],
glPriv
,
modes
->
indexBits
);
}
else
{
__glXInitMem
(
&
glPriv
->
auxBuffer
[
i
],
glPriv
,
rgbBits
);
}
}
}
#endif
if
(
modes
->
haveAccumBuffer
)
{
__glXInitMem
(
&
glPriv
->
accumBuffer
,
glPriv
,
accumBits
);
}
if
(
modes
->
haveDepthBuffer
)
{
__glXInitMem
(
&
glPriv
->
depthBuffer
,
glPriv
,
modes
->
depthBits
);
}
if
(
modes
->
haveStencilBuffer
)
{
__glXInitMem
(
&
glPriv
->
stencilBuffer
,
glPriv
,
modes
->
stencilBits
);
}
}
void
__glXPixInitDrawable
(
__GLXdrawablePrivate
*
glxPriv
,
__GLcontextModes
*
modes
)
{
__GLdrawablePrivate
*
glPriv
;
GLint
rgbBits
;
GLint
accumBits
;
assert
(
glxPriv
->
pGlxPixmap
);
glPriv
=
&
glxPriv
->
glPriv
;
rgbBits
=
modes
->
rgbBits
;
accumBits
=
modes
->
accumRedBits
+
modes
->
accumGreenBits
+
modes
->
accumBlueBits
+
modes
->
accumAlphaBits
;
#if defined(__GL_ALIGNED_BUFFERS)
/* initialize pixel alignments (for more details see context.h) */
glPriv
->
xAlignment
=
1
;
glPriv
->
yAlignment
=
1
;
#endif
glxPriv
->
swapBuffers
=
(
GLboolean
(
*
)(
__GLXdrawablePrivate
*
))
__glXNop
;
glPriv
->
yInverted
=
GL_FALSE
;
if
(
modes
->
doubleBufferMode
)
{
if
(
modes
->
colorIndexMode
)
{
__glXInitPix
(
&
glPriv
->
frontBuffer
,
glPriv
,
rgbBits
,
glxPriv
->
drawId
,
glxPriv
->
pGlxPixmap
);
__glXInitMem
(
&
glPriv
->
backBuffer
,
glPriv
,
modes
->
indexBits
);
}
else
{
__glXInitPix
(
&
glPriv
->
frontBuffer
,
glPriv
,
rgbBits
,
glxPriv
->
drawId
,
glxPriv
->
pGlxPixmap
);
__glXInitMem
(
&
glPriv
->
backBuffer
,
glPriv
,
rgbBits
);
}
}
else
{
if
(
modes
->
colorIndexMode
)
{
__glXInitPix
(
&
glPriv
->
frontBuffer
,
glPriv
,
rgbBits
,
glxPriv
->
drawId
,
glxPriv
->
pGlxPixmap
);
}
else
{
__glXInitPix
(
&
glPriv
->
frontBuffer
,
glPriv
,
rgbBits
,
glxPriv
->
drawId
,
glxPriv
->
pGlxPixmap
);
}
}
#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0)
if
(
modes
->
maxAuxBuffers
>
0
)
{
GLint
i
;
for
(
i
=
0
;
i
<
modes
->
maxAuxBuffers
;
i
++
)
{
if
(
modes
->
colorIndexMode
)
{
__glXInitMem
(
&
glPriv
->
auxBuffer
[
i
],
glPriv
,
modes
->
indexBits
);
}
else
{
__glXInitMem
(
&
glPriv
->
auxBuffer
[
i
],
glPriv
,
rgbBits
);
}
}
}
#endif
if
(
modes
->
haveAccumBuffer
)
{
__glXInitMem
(
&
glPriv
->
accumBuffer
,
glPriv
,
accumBits
);
}
if
(
modes
->
haveDepthBuffer
)
{
__glXInitMem
(
&
glPriv
->
depthBuffer
,
glPriv
,
modes
->
depthBits
);
}
if
(
modes
->
haveStencilBuffer
)
{
__glXInitMem
(
&
glPriv
->
stencilBuffer
,
glPriv
,
modes
->
stencilBits
);
}
}
#define __GLX_SET_ACCEL_BUFFER_MASK(bm) \
if (status == GL_FALSE) return GL_FALSE; \
if (status == GL_TRUE) accelBufferMask |= bm; \
/* for __GL_BUFFER_FALLBACK don't do anything */
GLboolean
__glXResizeBuffers
(
__GLdrawablePrivate
*
glPriv
,
GLint
x
,
GLint
y
,
GLuint
width
,
GLuint
height
)
{
__GLcontextModes
*
modes
;
__GLdrawableRegion
*
glRegion
;
GLboolean
status
;
GLuint
accelBufferMask
;
modes
=
glPriv
->
modes
;
accelBufferMask
=
0
;
status
=
(
*
glPriv
->
frontBuffer
.
resize
)(
&
glPriv
->
frontBuffer
,
x
,
y
,
width
,
height
,
glPriv
,
__GL_FRONT_BUFFER_MASK
);
__GLX_SET_ACCEL_BUFFER_MASK
(
__GL_FRONT_BUFFER_MASK
);
if
(
modes
->
doubleBufferMode
)
{
status
=
(
*
glPriv
->
backBuffer
.
resize
)(
&
glPriv
->
backBuffer
,
x
,
y
,
width
,
height
,
glPriv
,
__GL_BACK_BUFFER_MASK
);
__GLX_SET_ACCEL_BUFFER_MASK
(
__GL_BACK_BUFFER_MASK
);
}
#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0)
if
(
modes
->
maxAuxBuffers
>
0
)
{
GLint
i
;
for
(
i
=
0
;
i
<
modes
->
maxAuxBuffers
;
i
++
)
{
status
=
(
*
glPriv
->
auxBuffers
[
i
].
resize
)(
&
glPriv
->
auxBuffer
[
i
],
x
,
y
,
width
,
height
,
glPriv
,
__GL_AUX_BUFFER_MASK
(
i
));
__GLX_SET_ACCEL_BUFFER_MASK
(
__GL_AUX_BUFFER_MASK
(
i
));
}
}
#endif
if
(
modes
->
haveAccumBuffer
)
{
status
=
(
*
glPriv
->
accumBuffer
.
resize
)(
&
glPriv
->
accumBuffer
,
x
,
y
,
width
,
height
,
glPriv
,
__GL_ACCUM_BUFFER_MASK
);
__GLX_SET_ACCEL_BUFFER_MASK
(
__GL_ACCUM_BUFFER_MASK
);
}
if
(
modes
->
haveDepthBuffer
)
{
status
=
(
*
glPriv
->
depthBuffer
.
resize
)(
&
glPriv
->
depthBuffer
,
x
,
y
,
width
,
height
,
glPriv
,
__GL_DEPTH_BUFFER_MASK
);
__GLX_SET_ACCEL_BUFFER_MASK
(
__GL_DEPTH_BUFFER_MASK
);
}
if
(
modes
->
haveStencilBuffer
)
{
status
=
(
*
glPriv
->
stencilBuffer
.
resize
)(
&
glPriv
->
stencilBuffer
,
x
,
y
,
width
,
height
,
glPriv
,
__GL_STENCIL_BUFFER_MASK
);
__GLX_SET_ACCEL_BUFFER_MASK
(
__GL_STENCIL_BUFFER_MASK
);
}
glPriv
->
accelBufferMask
=
accelBufferMask
;
/* finally, update the ownership region */
glRegion
=
&
glPriv
->
ownershipRegion
;
glRegion
->
numRects
=
1
;
glRegion
->
rects
[
0
].
x0
=
0
;
glRegion
->
rects
[
0
].
y0
=
0
;
glRegion
->
rects
[
0
].
x1
=
width
;
glRegion
->
rects
[
0
].
y1
=
height
;
return
GL_TRUE
;
}
void
__glXFreeBuffers
(
__GLXdrawablePrivate
*
glxPriv
)
{
__GLdrawablePrivate
*
glPriv
=
&
glxPriv
->
glPriv
;
#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0)
__GLcontextModes
*
modes
=
glPriv
->
modes
;
#endif
if
(
glPriv
->
frontBuffer
.
free
)
{
(
*
glPriv
->
frontBuffer
.
free
)(
&
glPriv
->
frontBuffer
,
glPriv
);
}
if
(
glPriv
->
backBuffer
.
free
)
{
(
*
glPriv
->
backBuffer
.
free
)(
&
glPriv
->
backBuffer
,
glPriv
);
}
#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0)
if
(
modes
->
maxAuxBuffers
>
0
)
{
GLint
i
;
for
(
i
=
0
;
i
<
modes
->
maxAuxBuffers
;
i
++
)
{
if
(
glPriv
->
auxBuffer
[
i
].
free
)
{
(
*
glPriv
->
auxBuffer
[
i
].
free
)(
&
glPriv
->
auxBuffer
[
i
],
glPriv
);
}
}
}
#endif
if
(
glPriv
->
accumBuffer
.
free
)
{
(
*
glPriv
->
accumBuffer
.
free
)(
&
glPriv
->
accumBuffer
,
glPriv
);
}
if
(
glPriv
->
depthBuffer
.
free
)
{
(
*
glPriv
->
depthBuffer
.
free
)(
&
glPriv
->
depthBuffer
,
glPriv
);
}
if
(
glPriv
->
stencilBuffer
.
free
)
{
(
*
glPriv
->
stencilBuffer
.
free
)(
&
glPriv
->
stencilBuffer
,
glPriv
);
}
}
GL/glx/glxbuf.h
deleted
100644 → 0
View file @
b1b731c2
/* $XFree86$ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _glxbuf_h_
#define _glxbuf_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.
**
*/
extern
void
__glXFBInitDrawable
(
__GLXdrawablePrivate
*
glxPriv
,
__GLcontextModes
*
modes
);
extern
void
__glXPixInitDrawable
(
__GLXdrawablePrivate
*
glxPriv
,
__GLcontextModes
*
modes
);
extern
GLboolean
__glXResizeBuffers
(
__GLdrawablePrivate
*
glPriv
,
GLint
x
,
GLint
y
,
GLuint
width
,
GLuint
height
);
extern
void
__glXFreeBuffers
(
__GLXdrawablePrivate
*
glxPriv
);
extern
void
__glXUpdatePalette
(
__GLXdrawablePrivate
*
);
#endif
/* _glxbuf_h_ */
GL/glx/glxcmds.c
View file @
c3342c80
...
...
@@ -49,7 +49,6 @@
#include <pixmapstr.h>
#include <windowstr.h>
#include "g_disptab_EXT.h"
#include "glximports.h"
#include "glxutil.h"
#include "glxext.h"
#include "GL/glx_ansic.h"
...
...
@@ -61,24 +60,6 @@
/************************************************************************/
static
__GLimports
imports
=
{
__glXImpMalloc
,
__glXImpCalloc
,
__glXImpRealloc
,
__glXImpFree
,
__glXImpWarning
,
__glXImpFatal
,
__glXImpGetenv
,
__glXImpAtoi
,
__glXImpSprintf
,
__glXImpFopen
,
__glXImpFclose
,
__glXImpFprintf
,
__glXImpGetDrawablePrivate
,
__glXImpGetReadablePrivate
,
NULL
};
static
int
__glXGetFBConfigsSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
static
int
__glXCreateContextWithConfigSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
static
int
__glXCreateGLXPixmapWithConfigSGIX
(
__GLXclientState
*
cl
,
GLbyte
*
pc
);
...
...
@@ -94,6 +75,27 @@ static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
/************************************************************************/
static
void
__glXdirectContextDestroy
(
__GLXcontext
*
context
)
{
__glXFree
(
context
);
}
static
__GLXcontext
*
__glXdirectContextCreate
(
__GLXscreen
*
screen
,
__GLcontextModes
*
modes
,
__GLXcontext
*
shareContext
)
{
__GLXcontext
*
context
;
context
=
__glXMalloc
(
sizeof
(
__GLXcontext
));
if
(
context
==
NULL
)
return
NULL
;