Compare commits
47 Commits
mesa-7.0.3
...
mesa-7.0.3
Author | SHA1 | Date | |
---|---|---|---|
|
59c9c40c01 | ||
|
666e0635da | ||
|
f9968a0346 | ||
|
48616e71d2 | ||
|
70d227ac62 | ||
|
7f2c4f96f5 | ||
|
667f0f60fc | ||
|
7592b8cc10 | ||
|
f55b831859 | ||
|
217f7f7e5d | ||
|
2e5a63f365 | ||
|
7c614b4666 | ||
|
b23d908829 | ||
|
5379b84e63 | ||
|
32c913308e | ||
|
1e83d70b6d | ||
|
767dfa5b9c | ||
|
7ff5b38126 | ||
|
e209f5300d | ||
|
3c4b50c352 | ||
|
4e7c2fcf18 | ||
|
22534f94f5 | ||
|
1a6928fdbe | ||
|
325dbbac47 | ||
|
39ac6b0481 | ||
|
46cc4854e9 | ||
|
f93882512e | ||
|
0dee2a4f6f | ||
|
3cebc35669 | ||
|
e75a204fb9 | ||
|
ac06a5c16a | ||
|
ed758fee0c | ||
|
a21c61ee8b | ||
|
24697da20e | ||
|
7120c0089d | ||
|
88a436a8f7 | ||
|
2fdb5a245d | ||
|
8441b53538 | ||
|
d336df8b73 | ||
|
8aaf805b8a | ||
|
8161fd2785 | ||
|
2f23025dfe | ||
|
1867eac230 | ||
|
096e35d05f | ||
|
8998f52b97 | ||
|
0fd38dcc83 | ||
|
ff63cf8068 |
11
Makefile
11
Makefile
@@ -71,9 +71,10 @@ bluegene-osmesa \
|
||||
bluegene-xlc-osmesa \
|
||||
catamount-osmesa-pgi \
|
||||
darwin \
|
||||
darwin-fat-32bit \
|
||||
darwin-fat-all \
|
||||
darwin-static \
|
||||
darwin-static-x86ppc \
|
||||
darwin-x86ppc \
|
||||
freebsd \
|
||||
freebsd-dri \
|
||||
freebsd-dri-amd64 \
|
||||
@@ -166,10 +167,10 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-7.0.3-rc2
|
||||
LIB_NAME = MesaLib-7.0.3-rc2
|
||||
DEMO_NAME = MesaDemos-7.0.3-rc2
|
||||
GLUT_NAME = MesaGLUT-7.0.3-rc2
|
||||
DIRECTORY = Mesa-7.0.3
|
||||
LIB_NAME = MesaLib-7.0.3
|
||||
DEMO_NAME = MesaDemos-7.0.3
|
||||
GLUT_NAME = MesaGLUT-7.0.3
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
|
@@ -4,10 +4,9 @@ include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = darwin
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DGLX_INDIRECT_RENDERING \
|
||||
-DPTHREADS -DGLX_ALIAS_UNSUPPORTED -DHAVE_POSIX_MEMALIGN
|
||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||
-D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
@@ -37,4 +36,5 @@ GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = glx/x11 glu glut/glx
|
||||
SRC_DIRS = glx/x11 glu glut/glx mesa
|
||||
DRIVER_DIRS = osmesa
|
||||
|
7
configs/darwin-fat-32bit
Normal file
7
configs/darwin-fat-32bit
Normal file
@@ -0,0 +1,7 @@
|
||||
# Configuration for Darwin / MacOS X, making 32bit fat dynamic libs
|
||||
|
||||
RC_CFLAGS=-arch ppc -arch i386
|
||||
|
||||
include $(TOP)/configs/darwin
|
||||
|
||||
CONFIG_NAME = darwin-fat-32bit
|
7
configs/darwin-fat-all
Normal file
7
configs/darwin-fat-all
Normal file
@@ -0,0 +1,7 @@
|
||||
# Configuration for Darwin / MacOS X, making 32bit and 64bit fat dynamic libs
|
||||
|
||||
RC_CFLAGS=-arch ppc -arch i386 -arch ppc64 -arch x86_64
|
||||
|
||||
include $(TOP)/configs/darwin
|
||||
|
||||
CONFIG_NAME = darwin-fat-all
|
@@ -1,37 +0,0 @@
|
||||
# Configuration for Darwin / MacOS X, making dynamic libs
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = darwin
|
||||
|
||||
# Compiler and flags
|
||||
CC = cc
|
||||
CXX = cc
|
||||
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
|
||||
MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.dylib
|
||||
GLU_LIB_NAME = libGLU.dylib
|
||||
GLUT_LIB_NAME = libglut.dylib
|
||||
GLW_LIB_NAME = libGLw.dylib
|
||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = mesa glu glut/glx
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=0
|
||||
MESA_TINY=2
|
||||
MESA_TINY=3
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
@@ -30,9 +30,11 @@ MKDEP_OPTIONS = -fdepend
|
||||
MAKE = make
|
||||
INSTALL = $(TOP)/bin/minstall
|
||||
|
||||
# Python and flags (generally only needed by the developers)
|
||||
# Tools for regenerating glapi (generally only needed by the developers)
|
||||
PYTHON2 = python
|
||||
PYTHON_FLAGS = -t -O -O
|
||||
INDENT = indent
|
||||
INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
|
||||
|
||||
# Library names (base name)
|
||||
GL_LIB = GL
|
||||
|
18
debian/changelog
vendored
18
debian/changelog
vendored
@@ -1,3 +1,21 @@
|
||||
mesa (7.0.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Only call ProgramStringNotify if program parsing succeeded,
|
||||
closes: #473551.
|
||||
|
||||
-- Brice Goglin <bgoglin@debian.org> Fri, 11 Apr 2008 08:42:37 +0200
|
||||
|
||||
mesa (7.0.3~rc2-2) unstable; urgency=low
|
||||
|
||||
* Pull from mesa_7_0_branch (1e83d70b).
|
||||
* Fixes regression in the i965 dri driver (closes: #470984, #470084)
|
||||
* Update 02_use-ieee-fp-on-s390-and-m68k.patch.
|
||||
* Change libgl1-mesa-swx11-i686's pre-dependency on libgl1-mesa-swx11 to a
|
||||
regular versioned dependency, and add ${shlibs:Depends}.
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Mon, 31 Mar 2008 16:47:31 +0200
|
||||
|
||||
mesa (7.0.3~rc2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release candidate.
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@@ -60,7 +60,7 @@ Package: libgl1-mesa-swx11-i686
|
||||
Section: libs
|
||||
Priority: extra
|
||||
Architecture: i386
|
||||
Pre-Depends: libgl1-mesa-swx11
|
||||
Depends: libgl1-mesa-swx11 (= ${binary:Version}), ${shlibs:Depends}
|
||||
Description: Mesa OpenGL runtime [i686 optimized]
|
||||
Mesa is a 3-D graphics library with an API which is very similar to
|
||||
that of OpenGL. To the extent that Mesa utilizes the OpenGL command
|
||||
|
@@ -12,7 +12,7 @@ Index: mesa/src/mesa/main/imports.h
|
||||
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
|
||||
- defined(__s390x__) || defined(__powerpc__) || \
|
||||
+ defined(__s390__) || defined(__s390x__) || defined(__powerpc__) || \
|
||||
defined(__amd64__) || \
|
||||
defined(__amd64__) || defined(__x86_64__) || \
|
||||
+ defined(__m68k__) || \
|
||||
defined(ia64) || defined(__ia64__) || \
|
||||
defined(__hppa__) || defined(hpux) || \
|
||||
|
@@ -11,6 +11,13 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>April 4, 2008</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>November 13, 2007</h2>
|
||||
|
||||
<p>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.0.3 Release Notes / February TBD, 2008</H1>
|
||||
<H1>Mesa 7.0.3 Release Notes / April 4, 2008</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
|
||||
@@ -39,8 +39,18 @@ Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
|
||||
<li>Fixed potential crash in glDrawPixels(GL_DEPTH_COMPONENT) (bug 13915)
|
||||
<li>Bad strings given to glProgramStringARB() didn't generate GL_INVALID_OPERATION
|
||||
<li>Fixed minor point rasterization regression (bug 11016)
|
||||
<li>state.texenv.color state var didn't work in GL_ARB_fragment_program (bug 14931)
|
||||
<li>glBitmap from a PBO didn't always work
|
||||
<li>glGetTexImage into a PBO didn't always work
|
||||
<li>Comments at the end of ARB vertex/fragment programs crashed the parser
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Updated glext.h to version 40
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
|
@@ -46,9 +46,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2007/02/12 */
|
||||
/* glext.h last updated 2008/03/24 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 39
|
||||
#define GL_GLEXT_VERSION 40
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
@@ -3091,8 +3091,8 @@ extern "C" {
|
||||
#ifndef GL_EXT_framebuffer_blit
|
||||
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
|
||||
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_multisample
|
||||
@@ -3379,6 +3379,9 @@ extern "C" {
|
||||
#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
|
||||
#endif
|
||||
|
||||
#ifndef GL_GREMEDY_frame_terminator
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -7252,6 +7255,14 @@ typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint
|
||||
typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
|
||||
#endif
|
||||
|
||||
#ifndef GL_GREMEDY_frame_terminator
|
||||
#define GL_GREMEDY_frame_terminator 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -505,7 +505,7 @@ main(int argc, char *argv[])
|
||||
for (i = 0; i < numThreads; i++) {
|
||||
pthread_create(&WinThreads[i].Thread, NULL, thread_function,
|
||||
(void*) &WinThreads[i]);
|
||||
printf("glthreads: Created thread %u\n", (unsigned int) WinThreads[i].Thread);
|
||||
printf("glthreads: Created thread %p\n", WinThreads[i].Thread);
|
||||
}
|
||||
|
||||
if (MultiDisplays)
|
||||
|
5914
src/glx/x11/indirect_dispatch.c
Normal file
5914
src/glx/x11/indirect_dispatch.c
Normal file
File diff suppressed because it is too large
Load Diff
1043
src/glx/x11/indirect_dispatch.h
Normal file
1043
src/glx/x11/indirect_dispatch.h
Normal file
File diff suppressed because it is too large
Load Diff
6076
src/glx/x11/indirect_dispatch_swap.c
Normal file
6076
src/glx/x11/indirect_dispatch_swap.c
Normal file
File diff suppressed because it is too large
Load Diff
832
src/glx/x11/indirect_reqsize.c
Normal file
832
src/glx/x11/indirect_reqsize.c
Normal file
@@ -0,0 +1,832 @@
|
||||
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
|
||||
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2005
|
||||
* 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
|
||||
* IBM,
|
||||
* AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include "glxserver.h"
|
||||
#include "glxbyteorder.h"
|
||||
#include "indirect_size.h"
|
||||
#include "indirect_reqsize.h"
|
||||
|
||||
#define __GLX_PAD(x) (((x) + 3) & ~3)
|
||||
|
||||
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
# undef HAVE_ALIAS
|
||||
#endif
|
||||
#ifdef HAVE_ALIAS
|
||||
# define ALIAS2(from,to) \
|
||||
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
|
||||
__attribute__ ((alias( # to )));
|
||||
# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
|
||||
#else
|
||||
# define ALIAS(from,to) \
|
||||
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
|
||||
{ return __glX ## to ## ReqSize( pc, swap ); }
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
__glXCallListsReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
GLenum type = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
compsize = __glCallLists_size(type);
|
||||
return __GLX_PAD((compsize * n));
|
||||
}
|
||||
|
||||
int
|
||||
__glXBitmapReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLsizei width = *(GLsizei *) (pc + 20);
|
||||
GLsizei height = *(GLsizei *) (pc + 24);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
}
|
||||
|
||||
return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXFogfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glFogfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXLightfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glLightfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glLightModelfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glMaterialfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
}
|
||||
|
||||
return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexParameterfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 32);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 32);
|
||||
GLsizei height = *(GLsizei *) (pc + 36);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexEnvfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexGendvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexGendv_size(pname);
|
||||
return __GLX_PAD((compsize * 8));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glTexGenfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei mapsize = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
mapsize = bswap_32(mapsize);
|
||||
}
|
||||
|
||||
return __GLX_PAD((mapsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei mapsize = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
mapsize = bswap_32(mapsize);
|
||||
}
|
||||
|
||||
return __GLX_PAD((mapsize * 2));
|
||||
}
|
||||
|
||||
int
|
||||
__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLsizei width = *(GLsizei *) (pc + 20);
|
||||
GLsizei height = *(GLsizei *) (pc + 24);
|
||||
GLenum format = *(GLenum *) (pc + 28);
|
||||
GLenum type = *(GLenum *) (pc + 32);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, 0, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 4) + (n * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 36);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 36);
|
||||
GLsizei height = *(GLsizei *) (pc + 40);
|
||||
GLenum format = *(GLenum *) (pc + 44);
|
||||
GLenum type = *(GLenum *) (pc + 48);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXColorTableReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 28);
|
||||
GLenum format = *(GLenum *) (pc + 32);
|
||||
GLenum type = *(GLenum *) (pc + 36);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glColorTableParameterfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei count = *(GLsizei *) (pc + 28);
|
||||
GLenum format = *(GLenum *) (pc + 32);
|
||||
GLenum type = *(GLenum *) (pc + 36);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
count = bswap_32(count);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, count, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 28);
|
||||
GLenum format = *(GLenum *) (pc + 36);
|
||||
GLenum type = *(GLenum *) (pc + 40);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, 1, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
GLint skip_images = 0;
|
||||
GLint skip_rows = *(GLint *) (pc + 8);
|
||||
GLint alignment = *(GLint *) (pc + 16);
|
||||
GLenum target = *(GLenum *) (pc + 20);
|
||||
GLsizei width = *(GLsizei *) (pc + 28);
|
||||
GLsizei height = *(GLsizei *) (pc + 32);
|
||||
GLenum format = *(GLenum *) (pc + 36);
|
||||
GLenum type = *(GLenum *) (pc + 40);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, 1,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glConvolutionParameterfv_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = *(GLint *) (pc + 8);
|
||||
GLint skip_rows = *(GLint *) (pc + 16);
|
||||
GLint skip_images = *(GLint *) (pc + 20);
|
||||
GLint alignment = *(GLint *) (pc + 32);
|
||||
GLenum target = *(GLenum *) (pc + 36);
|
||||
GLsizei width = *(GLsizei *) (pc + 48);
|
||||
GLsizei height = *(GLsizei *) (pc + 52);
|
||||
GLsizei depth = *(GLsizei *) (pc + 56);
|
||||
GLenum format = *(GLenum *) (pc + 68);
|
||||
GLenum type = *(GLenum *) (pc + 72);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
image_height = bswap_32(image_height);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
skip_images = bswap_32(skip_images);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
depth = bswap_32(depth);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, depth,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = *(GLint *) (pc + 8);
|
||||
GLint skip_rows = *(GLint *) (pc + 16);
|
||||
GLint skip_images = *(GLint *) (pc + 20);
|
||||
GLint alignment = *(GLint *) (pc + 32);
|
||||
GLenum target = *(GLenum *) (pc + 36);
|
||||
GLsizei width = *(GLsizei *) (pc + 60);
|
||||
GLsizei height = *(GLsizei *) (pc + 64);
|
||||
GLsizei depth = *(GLsizei *) (pc + 68);
|
||||
GLenum format = *(GLenum *) (pc + 76);
|
||||
GLenum type = *(GLenum *) (pc + 80);
|
||||
|
||||
if (swap) {
|
||||
row_length = bswap_32(row_length);
|
||||
image_height = bswap_32(image_height);
|
||||
skip_rows = bswap_32(skip_rows);
|
||||
skip_images = bswap_32(skip_images);
|
||||
alignment = bswap_32(alignment);
|
||||
target = bswap_32(target);
|
||||
width = bswap_32(width);
|
||||
height = bswap_32(height);
|
||||
depth = bswap_32(depth);
|
||||
format = bswap_32(format);
|
||||
type = bswap_32(type);
|
||||
}
|
||||
|
||||
return __glXImageSize(format, type, target, width, height, depth,
|
||||
image_height, row_length, skip_images,
|
||||
skip_rows, alignment);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 20);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 24);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 28);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 36);
|
||||
|
||||
if (swap) {
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
return __GLX_PAD(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei len = *(GLsizei *) (pc + 8);
|
||||
|
||||
if (swap) {
|
||||
len = bswap_32(len);
|
||||
}
|
||||
|
||||
return __GLX_PAD(len);
|
||||
}
|
||||
|
||||
int
|
||||
__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
|
||||
if (swap) {
|
||||
pname = bswap_32(pname);
|
||||
}
|
||||
|
||||
compsize = __glPointParameterfvEXT_size(pname);
|
||||
return __GLX_PAD((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLuint num = *(GLuint *) (pc + 8);
|
||||
|
||||
if (swap) {
|
||||
num = bswap_32(num);
|
||||
}
|
||||
|
||||
return __GLX_PAD((num * 32));
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLuint num = *(GLuint *) (pc + 8);
|
||||
|
||||
if (swap) {
|
||||
num = bswap_32(num);
|
||||
}
|
||||
|
||||
return __GLX_PAD((num * 16));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 8));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 16));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 24));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 12));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 6));
|
||||
}
|
||||
|
||||
int
|
||||
__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
return __GLX_PAD((n * 32));
|
||||
}
|
||||
|
||||
int
|
||||
__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
|
||||
{
|
||||
GLsizei len = *(GLsizei *) (pc + 4);
|
||||
|
||||
if (swap) {
|
||||
len = bswap_32(len);
|
||||
}
|
||||
|
||||
return __GLX_PAD(len);
|
||||
}
|
||||
|
||||
ALIAS(Fogiv, Fogfv)
|
||||
ALIAS(Lightiv, Lightfv)
|
||||
ALIAS(LightModeliv, LightModelfv)
|
||||
ALIAS(Materialiv, Materialfv)
|
||||
ALIAS(TexParameteriv, TexParameterfv)
|
||||
ALIAS(TexEnviv, TexEnvfv)
|
||||
ALIAS(TexGeniv, TexGenfv)
|
||||
ALIAS(PixelMapuiv, PixelMapfv)
|
||||
ALIAS(ColorTableParameteriv, ColorTableParameterfv)
|
||||
ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
|
||||
ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB)
|
||||
ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB)
|
||||
ALIAS(LoadProgramNV, ProgramStringARB)
|
||||
ALIAS(RequestResidentProgramsNV, DrawBuffersARB)
|
||||
ALIAS(VertexAttribs1fvNV, PixelMapfv)
|
||||
ALIAS(VertexAttribs1svNV, PixelMapusv)
|
||||
ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
|
||||
ALIAS(VertexAttribs2svNV, PixelMapfv)
|
||||
ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
|
||||
ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
|
||||
ALIAS(VertexAttribs4ubvNV, PixelMapfv)
|
||||
ALIAS(PointParameterivNV, PointParameterfvEXT)
|
||||
ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB)
|
||||
ALIAS(DeleteFramebuffersEXT, DrawBuffersARB)
|
||||
ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB)
|
121
src/glx/x11/indirect_reqsize.h
Normal file
121
src/glx/x11/indirect_reqsize.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
|
||||
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2005
|
||||
* 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
|
||||
* IBM,
|
||||
* AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
#if !defined( _INDIRECT_REQSIZE_H_ )
|
||||
# define _INDIRECT_REQSIZE_H_
|
||||
|
||||
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
|
||||
# define HIDDEN __attribute__((visibility("hidden")))
|
||||
# else
|
||||
# define HIDDEN
|
||||
# endif
|
||||
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
# define PURE __attribute__((pure))
|
||||
# else
|
||||
# define PURE
|
||||
# endif
|
||||
|
||||
extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap);
|
||||
extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap);
|
||||
|
||||
# undef HIDDEN
|
||||
# undef PURE
|
||||
|
||||
#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */
|
1206
src/glx/x11/indirect_size_get.c
Normal file
1206
src/glx/x11/indirect_size_get.c
Normal file
File diff suppressed because it is too large
Load Diff
102
src/glx/x11/indirect_size_get.h
Normal file
102
src/glx/x11/indirect_size_get.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
|
||||
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2004
|
||||
* 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
|
||||
* IBM,
|
||||
* AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
#if !defined( _INDIRECT_SIZE_GET_H_ )
|
||||
# define _INDIRECT_SIZE_GET_H_
|
||||
|
||||
/**
|
||||
* \file
|
||||
* Prototypes for functions used to determine the number of data elements in
|
||||
* various GLX protocol messages.
|
||||
*
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
# define PURE __attribute__((pure))
|
||||
# else
|
||||
# define PURE
|
||||
# endif
|
||||
|
||||
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define FASTCALL __attribute__((fastcall))
|
||||
# else
|
||||
# define FASTCALL
|
||||
# endif
|
||||
|
||||
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
|
||||
# define INTERNAL __attribute__((visibility("internal")))
|
||||
# else
|
||||
# define INTERNAL
|
||||
# endif
|
||||
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetConvolutionParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetConvolutionParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
|
||||
extern INTERNAL PURE FASTCALL GLint
|
||||
__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
|
||||
|
||||
# undef PURE
|
||||
# undef FASTCALL
|
||||
# undef INTERNAL
|
||||
|
||||
#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */
|
1593
src/glx/x11/indirect_table.c
Normal file
1593
src/glx/x11/indirect_table.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -486,6 +486,9 @@ static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate )
|
||||
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
|
||||
drm_clip_rect_t rect;
|
||||
|
||||
if (!dPriv->numClipRects)
|
||||
return;
|
||||
|
||||
dPriv->swapBuffers(dPriv);
|
||||
|
||||
/* Check that we actually have the new damage report method */
|
||||
|
@@ -343,7 +343,7 @@ void brw_clip_init_clipmask( struct brw_clip_compile *c )
|
||||
release_tmp(c, tmp);
|
||||
}
|
||||
|
||||
if (BRW_IS_IGD(p->brw)) {
|
||||
if (!BRW_IS_IGD(p->brw)) {
|
||||
/* Test for -ve rhw workaround
|
||||
*/
|
||||
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
|
||||
|
@@ -795,6 +795,11 @@ glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share )
|
||||
}
|
||||
|
||||
_mesa_enable_sw_extensions(glctx);
|
||||
_mesa_enable_1_3_extensions(glctx);
|
||||
_mesa_enable_1_4_extensions(glctx);
|
||||
_mesa_enable_1_5_extensions(glctx);
|
||||
_mesa_enable_2_0_extensions(glctx);
|
||||
_mesa_enable_2_1_extensions(glctx);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
@@ -7,23 +7,20 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
GLX_DIR = ../../glx/x11
|
||||
|
||||
OUTPUTS = glprocs.h glapitemp.h glapioffsets.h glapitable.h dispatch.h \
|
||||
../main/enums.c \
|
||||
../x86/glapi_x86.S \
|
||||
../x86-64/glapi_x86-64.S \
|
||||
../sparc/glapi_sparc.S \
|
||||
../drivers/dri/common/extension_helper.h \
|
||||
../../glx/x11/indirect.c \
|
||||
../../glx/x11/indirect.h \
|
||||
../../glx/x11/indirect_init.c \
|
||||
../../glx/x11/indirect_size.h \
|
||||
../../glx/x11/indirect_size.c
|
||||
|
||||
|
||||
#XORG_BASE = /home/idr/devel/graphics/Xorg/xserver/xorg
|
||||
GLX_DIR = $(XORG_BASE)/GL/glx
|
||||
|
||||
SERVER_OUTPUTS = $(GLX_DIR)/indirect_dispatch.c \
|
||||
$(GLX_DIR)/indirect.c \
|
||||
$(GLX_DIR)/indirect.h \
|
||||
$(GLX_DIR)/indirect_init.c \
|
||||
$(GLX_DIR)/indirect_size.h \
|
||||
$(GLX_DIR)/indirect_size.c \
|
||||
$(GLX_DIR)/indirect_dispatch.c \
|
||||
$(GLX_DIR)/indirect_dispatch_swap.c \
|
||||
$(GLX_DIR)/indirect_dispatch.h \
|
||||
$(GLX_DIR)/indirect_reqsize.c \
|
||||
@@ -39,81 +36,81 @@ API_XML = gl_API.xml \
|
||||
COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py
|
||||
COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
|
||||
|
||||
INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
|
||||
|
||||
all: $(OUTPUTS)
|
||||
|
||||
server: $(SERVER_OUTPUTS)
|
||||
glprocs.h: gl_procs.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glprocs.h: $(COMMON) gl_procs.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_procs.py > glprocs.h
|
||||
glapitemp.h: gl_apitemp.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glapitemp.h: $(COMMON) gl_apitemp.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_apitemp.py > glapitemp.h
|
||||
glapioffsets.h: gl_offsets.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glapioffsets.h: $(COMMON) gl_offsets.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_offsets.py > glapioffsets.h
|
||||
glapitable.h: gl_table.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
glapitable.h: $(COMMON) gl_table.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_table.py > glapitable.h
|
||||
dispatch.h: gl_table.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
|
||||
|
||||
dispatch.h: $(COMMON) gl_table.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_table.py -m remap_table > dispatch.h
|
||||
../main/enums.c: gl_enums.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../main/enums.c: $(COMMON) gl_enums.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_enums.py > ../main/enums.c
|
||||
../x86/glapi_x86.S: gl_x86_asm.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../x86/glapi_x86.S: $(COMMON) gl_x86_asm.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_x86_asm.py > ../x86/glapi_x86.S
|
||||
../x86-64/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../x86-64/glapi_x86-64.S: $(COMMON) gl_x86-64_asm.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_x86-64_asm.py > ../x86-64/glapi_x86-64.S
|
||||
|
||||
../sparc/glapi_sparc.S: $(COMMON) gl_SPARC_asm.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) gl_SPARC_asm.py > ../sparc/glapi_sparc.S
|
||||
../sparc/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
|
||||
../drivers/dri/common/extension_helper.h: $(COMMON) extension_helper.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) extension_helper.py > ../drivers/dri/common/extension_helper.h
|
||||
../drivers/dri/common/extension_helper.h: extension_helper.py $(COMMON)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
|
||||
|
||||
../../glx/x11/indirect.c: $(COMMON_GLX) glX_proto_send.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m proto | indent $(INDENT_FLAGS) > ../../glx/x11/indirect.c
|
||||
$(GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
../../glx/x11/indirect.h: $(COMMON_GLX) glX_proto_send.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m init_h > ../../glx/x11/indirect.h
|
||||
$(GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@
|
||||
|
||||
../../glx/x11/indirect_init.c: $(COMMON_GLX) glX_proto_send.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m init_c > ../../glx/x11/indirect_init.c
|
||||
$(GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@
|
||||
|
||||
../../glx/x11/indirect_size.h: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-set -h _INDIRECT_SIZE_H_ | indent $(INDENT_FLAGS) > ../../glx/x11/indirect_size.h
|
||||
$(GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
|
||||
| $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
../../glx/x11/indirect_size.c: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c --only-set | indent $(INDENT_FLAGS) > ../../glx/x11/indirect_size.c
|
||||
$(GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \
|
||||
| $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_dispatch.c: $(COMMON_GLX) glX_proto_recv.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_c > $@
|
||||
$(GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c > $@
|
||||
|
||||
$(GLX_DIR)/indirect_dispatch_swap.c: $(COMMON_GLX) glX_proto_recv.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_c -s > $@
|
||||
$(GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c -s > $@
|
||||
|
||||
$(GLX_DIR)/indirect_dispatch.h: $(COMMON_GLX) glX_proto_recv.py glX_API.xml
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_recv.py -m dispatch_h -f gl_and_glX_API.xml -s > $@
|
||||
$(GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
|
||||
|
||||
$(GLX_DIR)/indirect_size_get.h: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) > $@
|
||||
$(GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
|
||||
| $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_size_get.c: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c | indent $(INDENT_FLAGS) > $@
|
||||
$(GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_reqsize.h: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) -l200 > $@
|
||||
$(GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
|
||||
| $(INDENT) $(INDENT_FLAGS) -l200 > $@
|
||||
|
||||
$(GLX_DIR)/indirect_reqsize.c: $(COMMON_GLX) glX_proto_size.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_c | indent $(INDENT_FLAGS) > $@
|
||||
$(GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@
|
||||
|
||||
$(GLX_DIR)/indirect_table.c: $(COMMON_GLX) glX_server_table.py glX_API.xml
|
||||
$(PYTHON2) $(PYTHON_FLAGS) glX_server_table.py -f gl_and_glX_API.xml > $@
|
||||
$(GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX)
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@
|
||||
|
||||
clean:
|
||||
rm -f *~ *.pyo
|
||||
|
@@ -687,10 +687,10 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
|
||||
_mesa_DeleteHashTable(ss->Programs);
|
||||
#endif
|
||||
#if FEATURE_ARB_vertex_program
|
||||
_mesa_delete_program(ctx, ss->DefaultVertexProgram);
|
||||
ctx->Driver.DeleteProgram(ctx, ss->DefaultVertexProgram);
|
||||
#endif
|
||||
#if FEATURE_ARB_fragment_program
|
||||
_mesa_delete_program(ctx, ss->DefaultFragmentProgram);
|
||||
ctx->Driver.DeleteProgram(ctx, ss->DefaultFragmentProgram);
|
||||
#endif
|
||||
|
||||
#if FEATURE_ATI_fragment_shader
|
||||
@@ -754,7 +754,7 @@ _mesa_init_current(GLcontext *ctx)
|
||||
}
|
||||
|
||||
/* redo special cases: */
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 1.0, 0.0, 0.0, 1.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 1.0, 0.0, 0.0, 0.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 );
|
||||
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 );
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5
|
||||
* Version: 7.0.3
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2008 Brian Paul 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"),
|
||||
@@ -341,12 +341,10 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
|
||||
}
|
||||
|
||||
if (ctx->RenderMode == GL_RENDER) {
|
||||
if (bitmap) {
|
||||
/* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
|
||||
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
|
||||
}
|
||||
/* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
|
||||
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
|
||||
}
|
||||
#if _HAVE_FULL_GL
|
||||
else if (ctx->RenderMode == GL_FEEDBACK) {
|
||||
|
@@ -302,7 +302,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
|
||||
/* OK */
|
||||
}
|
||||
else if (ctx->Extensions.EXT_packed_depth_stencil &&
|
||||
att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
|
||||
/* OK */
|
||||
}
|
||||
else {
|
||||
|
@@ -1864,6 +1864,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
CHECK_EXT1(EXT_framebuffer_object, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Const.MaxRenderbufferSize);
|
||||
break;
|
||||
case GL_READ_FRAMEBUFFER_BINDING_EXT:
|
||||
CHECK_EXT1(EXT_framebuffer_blit, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->ReadBuffer->Name);
|
||||
break;
|
||||
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
|
||||
CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Const.FragmentProgram.MaxUniformComponents);
|
||||
@@ -3695,6 +3699,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
CHECK_EXT1(EXT_framebuffer_object, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Const.MaxRenderbufferSize);
|
||||
break;
|
||||
case GL_READ_FRAMEBUFFER_BINDING_EXT:
|
||||
CHECK_EXT1(EXT_framebuffer_blit, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->ReadBuffer->Name);
|
||||
break;
|
||||
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
|
||||
CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Const.FragmentProgram.MaxUniformComponents);
|
||||
@@ -5526,6 +5534,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
CHECK_EXT1(EXT_framebuffer_object, "GetIntegerv");
|
||||
params[0] = ctx->Const.MaxRenderbufferSize;
|
||||
break;
|
||||
case GL_READ_FRAMEBUFFER_BINDING_EXT:
|
||||
CHECK_EXT1(EXT_framebuffer_blit, "GetIntegerv");
|
||||
params[0] = ctx->ReadBuffer->Name;
|
||||
break;
|
||||
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
|
||||
CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
|
||||
params[0] = ctx->Const.FragmentProgram.MaxUniformComponents;
|
||||
|
@@ -977,6 +977,11 @@ StateVars = [
|
||||
["ctx->Const.MaxRenderbufferSize"], "",
|
||||
["EXT_framebuffer_object"] ),
|
||||
|
||||
# GL_EXT_framebuffer_blit
|
||||
# NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT
|
||||
( "GL_READ_FRAMEBUFFER_BINDING_EXT", GLint, ["ctx->ReadBuffer->Name"], "",
|
||||
["EXT_framebuffer_blit"] ),
|
||||
|
||||
# GL_ARB_fragment_shader
|
||||
( "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB", GLint,
|
||||
["ctx->Const.FragmentProgram.MaxUniformComponents"], "",
|
||||
|
@@ -237,7 +237,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if (!defined(__GNUC__) || __GNUC__ < 3) && !defined(__IBMC__)
|
||||
#if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900)
|
||||
# define __builtin_expect(x, y) x
|
||||
#endif
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.2
|
||||
* Version: 7.0.3
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2008 Brian Paul 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"),
|
||||
@@ -159,7 +159,7 @@ typedef union { GLfloat f; GLint i; } fi_type;
|
||||
***/
|
||||
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
|
||||
defined(__s390x__) || defined(__powerpc__) || \
|
||||
defined(__amd64__) || \
|
||||
defined(__amd64__) || defined(__x86_64__) || \
|
||||
defined(ia64) || defined(__ia64__) || \
|
||||
defined(__hppa__) || defined(hpux) || \
|
||||
defined(__mips) || defined(_MIPS_ARCH) || \
|
||||
|
@@ -960,7 +960,7 @@ update_program(GLcontext *ctx)
|
||||
ctx->FragmentProgram._Enabled = ctx->FragmentProgram.Enabled
|
||||
&& ctx->FragmentProgram.Current->Base.Instructions;
|
||||
ctx->ATIFragmentShader._Enabled = ctx->ATIFragmentShader.Enabled
|
||||
&& ctx->ATIFragmentShader.Current->Instructions;
|
||||
&& ctx->ATIFragmentShader.Current->Instructions[0];
|
||||
|
||||
/*
|
||||
* Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current
|
||||
|
@@ -2177,9 +2177,6 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pixels)
|
||||
return;
|
||||
|
||||
_mesa_lock_texture(ctx, texObj);
|
||||
{
|
||||
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
|
||||
|
@@ -443,7 +443,7 @@ void GLAPIENTRY
|
||||
_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
|
||||
GLsizei stride, const GLvoid *ptr)
|
||||
{
|
||||
const GLboolean normalized = GL_FALSE;
|
||||
GLboolean normalized = GL_FALSE;
|
||||
GLsizei elementSize;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
@@ -471,6 +471,7 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
|
||||
/* check for valid 'type' and compute StrideB right away */
|
||||
switch (type) {
|
||||
case GL_UNSIGNED_BYTE:
|
||||
normalized = GL_TRUE;
|
||||
elementSize = size * sizeof(GLubyte);
|
||||
break;
|
||||
case GL_SHORT:
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 0
|
||||
#define MESA_PATCH 3
|
||||
#define MESA_VERSION_STRING "7.0.3-rc2"
|
||||
#define MESA_VERSION_STRING "7.0.3"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@@ -1609,8 +1609,6 @@ parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst,
|
||||
program_error(ctx, Program->Position, "Bad attribute binding");
|
||||
}
|
||||
|
||||
Program->Base.InputsRead |= (1 << *inputReg);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -2565,6 +2563,11 @@ parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Add attributes to InputsRead only if they are used the program.
|
||||
* This avoids the handling of unused ATTRIB declarations in the drivers. */
|
||||
if (*File == PROGRAM_INPUT)
|
||||
Program->Base.InputsRead |= (1 << *Index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -229,7 +229,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
||||
struct gl_vertex_program *prog = ctx->VertexProgram.Current;
|
||||
_mesa_parse_arb_vertex_program(ctx, target, string, len, prog);
|
||||
|
||||
if (ctx->Driver.ProgramStringNotify)
|
||||
if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
|
||||
ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
|
||||
}
|
||||
else if (target == GL_FRAGMENT_PROGRAM_ARB
|
||||
@@ -237,7 +237,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
|
||||
struct gl_fragment_program *prog = ctx->FragmentProgram.Current;
|
||||
_mesa_parse_arb_fragment_program(ctx, target, string, len, prog);
|
||||
|
||||
if (ctx->Driver.ProgramStringNotify)
|
||||
if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
|
||||
ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
|
||||
}
|
||||
else {
|
||||
|
@@ -1904,10 +1904,10 @@ stateTexEnvProperty
|
||||
fragment program
|
||||
<optLegacyTexUnitNum> ::= ""
|
||||
| "[" <legacyTexUnitNum> "]"
|
||||
|
||||
NOTE: <optLegaceTexUnitNum> is not optional.
|
||||
*/
|
||||
optLegacyTexUnitNum
|
||||
optLegacyTexUnitNum_1 .or .true .emit 0x00;
|
||||
optLegacyTexUnitNum_1
|
||||
lbracket_ne .and legacyTexUnitNum .and rbracket;
|
||||
|
||||
/*
|
||||
@@ -2605,14 +2605,14 @@ white_char
|
||||
' ' .or '\t' .or '\n' .or '\r';
|
||||
|
||||
comment_block
|
||||
'#' .and .loop comment_char .and new_line;
|
||||
'#' .and .loop comment_char .and optional_new_line;
|
||||
|
||||
/* All ASCII characters except '\r', '\n' and '\0' */
|
||||
comment_char
|
||||
'\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
|
||||
|
||||
new_line
|
||||
'\n' .or crlf .or '\0';
|
||||
optional_new_line
|
||||
'\n' .or crlf .or .true;
|
||||
|
||||
crlf
|
||||
'\r' .and '\n';
|
||||
|
@@ -905,6 +905,8 @@
|
||||
"stateTexEnvProperty\n"
|
||||
" \"color\" .emit TEX_ENV_COLOR;\n"
|
||||
"optLegacyTexUnitNum\n"
|
||||
" optLegacyTexUnitNum_1 .or .true .emit 0x00;\n"
|
||||
"optLegacyTexUnitNum_1\n"
|
||||
" lbracket_ne .and legacyTexUnitNum .and rbracket;\n"
|
||||
"legacyTexUnitNum\n"
|
||||
" integer;\n"
|
||||
@@ -1221,11 +1223,11 @@
|
||||
"white_char\n"
|
||||
" ' ' .or '\\t' .or '\\n' .or '\\r';\n"
|
||||
"comment_block\n"
|
||||
" '#' .and .loop comment_char .and new_line;\n"
|
||||
" '#' .and .loop comment_char .and optional_new_line;\n"
|
||||
"comment_char\n"
|
||||
" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
|
||||
"new_line\n"
|
||||
" '\\n' .or crlf .or '\\0';\n"
|
||||
"optional_new_line\n"
|
||||
" '\\n' .or crlf .or .true;\n"
|
||||
"crlf\n"
|
||||
" '\\r' .and '\\n';\n"
|
||||
"semicolon\n"
|
||||
|
@@ -181,7 +181,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
||||
ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][i];
|
||||
}
|
||||
/* [3] = material alpha */
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3];
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_AMBIENT+face][3];
|
||||
return;
|
||||
case STATE_DIFFUSE:
|
||||
for (i = 0; i < 3; i++) {
|
||||
@@ -197,7 +197,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
||||
ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][i];
|
||||
}
|
||||
/* [3] = material alpha */
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE+face][3];
|
||||
value[3] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SPECULAR+face][3];
|
||||
return;
|
||||
default:
|
||||
_mesa_problem(ctx, "Invalid lightprod state in fetch_state");
|
||||
@@ -349,7 +349,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
|
||||
value[0] = ctx->Viewport.Near; /* near */
|
||||
value[1] = ctx->Viewport.Far; /* far */
|
||||
value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */
|
||||
value[3] = 0;
|
||||
value[3] = 1.0;
|
||||
return;
|
||||
case STATE_FRAGMENT_PROGRAM:
|
||||
{
|
||||
|
@@ -343,7 +343,7 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
|
||||
clone->Format = prog->Format;
|
||||
clone->Instructions = _mesa_alloc_instructions(prog->NumInstructions);
|
||||
if (!clone->Instructions) {
|
||||
_mesa_delete_program(ctx, clone);
|
||||
ctx->Driver.DeleteProgram(ctx, clone);
|
||||
return NULL;
|
||||
}
|
||||
_mesa_copy_instructions(clone->Instructions, prog->Instructions,
|
||||
|
@@ -80,7 +80,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx,
|
||||
/* to prevent a double-free in the next call */
|
||||
shProg->VertexProgram->Base.Parameters = NULL;
|
||||
}
|
||||
_mesa_delete_program(ctx, &shProg->VertexProgram->Base);
|
||||
ctx->Driver.DeleteProgram(ctx, &shProg->VertexProgram->Base);
|
||||
shProg->VertexProgram = NULL;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx,
|
||||
/* to prevent a double-free in the next call */
|
||||
shProg->FragmentProgram->Base.Parameters = NULL;
|
||||
}
|
||||
_mesa_delete_program(ctx, &shProg->FragmentProgram->Base);
|
||||
ctx->Driver.DeleteProgram(ctx, &shProg->FragmentProgram->Base);
|
||||
shProg->FragmentProgram = NULL;
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ _mesa_free_shader(GLcontext *ctx, struct gl_shader *sh)
|
||||
_mesa_free(sh->InfoLog);
|
||||
for (i = 0; i < sh->NumPrograms; i++) {
|
||||
assert(sh->Programs[i]);
|
||||
_mesa_delete_program(ctx, sh->Programs[i]);
|
||||
ctx->Driver.DeleteProgram(ctx, sh->Programs[i]);
|
||||
}
|
||||
if (sh->Programs)
|
||||
_mesa_free(sh->Programs);
|
||||
|
@@ -677,6 +677,7 @@ static struct prog_instruction *
|
||||
emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
{
|
||||
struct prog_instruction *inst;
|
||||
slang_ir_node tmpNode;
|
||||
|
||||
assert(n->Opcode == IR_CLAMP);
|
||||
/* ch[0] = value
|
||||
@@ -722,18 +723,27 @@ emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
emit(emitInfo, n->Children[1]);
|
||||
emit(emitInfo, n->Children[2]);
|
||||
|
||||
/* Some GPUs don't allow reading from output registers. So if the
|
||||
* dest for this clamp() is an output reg, we can't use that reg for
|
||||
* the intermediate result. Use a temp register instead.
|
||||
*/
|
||||
_mesa_bzero(&tmpNode, sizeof(tmpNode));
|
||||
alloc_temp_storage(emitInfo, &tmpNode, n->Store->Size);
|
||||
|
||||
/* tmp = max(ch[0], ch[1]) */
|
||||
inst = new_instruction(emitInfo, OPCODE_MAX);
|
||||
storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
|
||||
storage_to_dst_reg(&inst->DstReg, tmpNode.Store, n->Writemask);
|
||||
storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store);
|
||||
storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store);
|
||||
|
||||
/* tmp = min(tmp, ch[2]) */
|
||||
/* n->dest = min(tmp, ch[2]) */
|
||||
inst = new_instruction(emitInfo, OPCODE_MIN);
|
||||
storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
|
||||
storage_to_src_reg(&inst->SrcReg[0], n->Store);
|
||||
storage_to_src_reg(&inst->SrcReg[0], tmpNode.Store);
|
||||
storage_to_src_reg(&inst->SrcReg[1], n->Children[2]->Store);
|
||||
|
||||
free_temp_storage(emitInfo->vt, &tmpNode);
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
|
@@ -648,12 +648,12 @@ void _tnl_generate_sse_emit( GLcontext *ctx )
|
||||
|
||||
p.ctx = ctx;
|
||||
p.inputs_safe = 0; /* for now */
|
||||
p.outputs_safe = 1; /* for now */
|
||||
p.outputs_safe = 0; /* for now */
|
||||
p.have_sse2 = cpu_has_xmm2;
|
||||
p.identity = x86_make_reg(file_XMM, 6);
|
||||
p.chan0 = x86_make_reg(file_XMM, 7);
|
||||
|
||||
if (!x86_init_func(&p.func, MAX_SSE_CODE_SIZE)) {
|
||||
if (!x86_init_func_size(&p.func, MAX_SSE_CODE_SIZE)) {
|
||||
vtx->emit = NULL;
|
||||
return;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
||||
#if defined(__i386__) || defined(__386__)
|
||||
|
||||
#include "imports.h"
|
||||
#include "x86sse.h"
|
||||
@@ -6,54 +6,78 @@
|
||||
#define DISASSEM 0
|
||||
#define X86_TWOB 0x0f
|
||||
|
||||
static unsigned char *cptr( void (*label)() )
|
||||
{
|
||||
return (unsigned char *)(unsigned long)label;
|
||||
}
|
||||
|
||||
|
||||
static void do_realloc( struct x86_function *p )
|
||||
{
|
||||
if (p->size == 0) {
|
||||
p->size = 1024;
|
||||
p->store = _mesa_exec_malloc(p->size);
|
||||
p->csr = p->store;
|
||||
}
|
||||
else {
|
||||
unsigned used = p->csr - p->store;
|
||||
unsigned char *tmp = p->store;
|
||||
p->size *= 2;
|
||||
p->store = _mesa_exec_malloc(p->size);
|
||||
memcpy(p->store, tmp, used);
|
||||
p->csr = p->store + used;
|
||||
_mesa_exec_free(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit bytes to the instruction stream:
|
||||
*/
|
||||
static void emit_1b( struct x86_function *p, GLbyte b0 )
|
||||
static unsigned char *reserve( struct x86_function *p, int bytes )
|
||||
{
|
||||
*(GLbyte *)(p->csr++) = b0;
|
||||
}
|
||||
if (p->csr + bytes - p->store > p->size)
|
||||
do_realloc(p);
|
||||
|
||||
static void emit_1i( struct x86_function *p, GLint i0 )
|
||||
{
|
||||
*(GLint *)(p->csr) = i0;
|
||||
p->csr += 4;
|
||||
}
|
||||
|
||||
static void disassem( struct x86_function *p, const char *fn )
|
||||
{
|
||||
#if DISASSEM && 0
|
||||
if (fn && fn != p->fn) {
|
||||
_mesa_printf("0x%x: %s\n", p->csr, fn);
|
||||
p->fn = fn;
|
||||
{
|
||||
unsigned char *csr = p->csr;
|
||||
p->csr += bytes;
|
||||
return csr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void emit_1ub_fn( struct x86_function *p, GLubyte b0, const char *fn )
|
||||
|
||||
|
||||
static void emit_1b( struct x86_function *p, char b0 )
|
||||
{
|
||||
disassem(p, fn);
|
||||
*(p->csr++) = b0;
|
||||
char *csr = (char *)reserve(p, 1);
|
||||
*csr = b0;
|
||||
}
|
||||
|
||||
static void emit_2ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, const char *fn )
|
||||
static void emit_1i( struct x86_function *p, int i0 )
|
||||
{
|
||||
disassem(p, fn);
|
||||
*(p->csr++) = b0;
|
||||
*(p->csr++) = b1;
|
||||
int *icsr = (int *)reserve(p, sizeof(i0));
|
||||
*icsr = i0;
|
||||
}
|
||||
|
||||
static void emit_3ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, GLubyte b2, const char *fn )
|
||||
static void emit_1ub( struct x86_function *p, unsigned char b0 )
|
||||
{
|
||||
disassem(p, fn);
|
||||
*(p->csr++) = b0;
|
||||
*(p->csr++) = b1;
|
||||
*(p->csr++) = b2;
|
||||
unsigned char *csr = reserve(p, 1);
|
||||
*csr++ = b0;
|
||||
}
|
||||
|
||||
#define emit_1ub(p, b0) emit_1ub_fn(p, b0, __FUNCTION__)
|
||||
#define emit_2ub(p, b0, b1) emit_2ub_fn(p, b0, b1, __FUNCTION__)
|
||||
#define emit_3ub(p, b0, b1, b2) emit_3ub_fn(p, b0, b1, b2, __FUNCTION__)
|
||||
static void emit_2ub( struct x86_function *p, unsigned char b0, unsigned char b1 )
|
||||
{
|
||||
unsigned char *csr = reserve(p, 2);
|
||||
*csr++ = b0;
|
||||
*csr++ = b1;
|
||||
}
|
||||
|
||||
static void emit_3ub( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2 )
|
||||
{
|
||||
unsigned char *csr = reserve(p, 3);
|
||||
*csr++ = b0;
|
||||
*csr++ = b1;
|
||||
*csr++ = b2;
|
||||
}
|
||||
|
||||
|
||||
/* Build a modRM byte + possible displacement. No treatment of SIB
|
||||
@@ -63,7 +87,7 @@ static void emit_modrm( struct x86_function *p,
|
||||
struct x86_reg reg,
|
||||
struct x86_reg regmem )
|
||||
{
|
||||
GLubyte val = 0;
|
||||
unsigned char val = 0;
|
||||
|
||||
assert(reg.mod == mod_REG);
|
||||
|
||||
@@ -71,13 +95,13 @@ static void emit_modrm( struct x86_function *p,
|
||||
val |= reg.idx << 3; /* reg field */
|
||||
val |= regmem.idx; /* r/m field */
|
||||
|
||||
emit_1ub_fn(p, val, 0);
|
||||
emit_1ub(p, val);
|
||||
|
||||
/* Oh-oh we've stumbled into the SIB thing.
|
||||
*/
|
||||
if (regmem.file == file_REG32 &&
|
||||
regmem.idx == reg_SP) {
|
||||
emit_1ub_fn(p, 0x24, 0); /* simplistic! */
|
||||
emit_1ub(p, 0x24); /* simplistic! */
|
||||
}
|
||||
|
||||
switch (regmem.mod) {
|
||||
@@ -98,7 +122,7 @@ static void emit_modrm( struct x86_function *p,
|
||||
|
||||
|
||||
static void emit_modrm_noreg( struct x86_function *p,
|
||||
GLuint op,
|
||||
unsigned op,
|
||||
struct x86_reg regmem )
|
||||
{
|
||||
struct x86_reg dummy = x86_make_reg(file_REG32, op);
|
||||
@@ -111,21 +135,21 @@ static void emit_modrm_noreg( struct x86_function *p,
|
||||
* the arguments presented.
|
||||
*/
|
||||
static void emit_op_modrm( struct x86_function *p,
|
||||
GLubyte op_dst_is_reg,
|
||||
GLubyte op_dst_is_mem,
|
||||
unsigned char op_dst_is_reg,
|
||||
unsigned char op_dst_is_mem,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
switch (dst.mod) {
|
||||
case mod_REG:
|
||||
emit_1ub_fn(p, op_dst_is_reg, 0);
|
||||
emit_1ub(p, op_dst_is_reg);
|
||||
emit_modrm(p, dst, src);
|
||||
break;
|
||||
case mod_INDIRECT:
|
||||
case mod_DISP32:
|
||||
case mod_DISP8:
|
||||
assert(src.mod == mod_REG);
|
||||
emit_1ub_fn(p, op_dst_is_mem, 0);
|
||||
emit_1ub(p, op_dst_is_mem);
|
||||
emit_modrm(p, src, dst);
|
||||
break;
|
||||
default:
|
||||
@@ -156,7 +180,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file,
|
||||
}
|
||||
|
||||
struct x86_reg x86_make_disp( struct x86_reg reg,
|
||||
GLint disp )
|
||||
int disp )
|
||||
{
|
||||
assert(reg.file == file_REG32);
|
||||
|
||||
@@ -185,7 +209,7 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg )
|
||||
return x86_make_reg( reg.file, reg.idx );
|
||||
}
|
||||
|
||||
GLubyte *x86_get_label( struct x86_function *p )
|
||||
unsigned char *x86_get_label( struct x86_function *p )
|
||||
{
|
||||
return p->csr;
|
||||
}
|
||||
@@ -199,13 +223,13 @@ GLubyte *x86_get_label( struct x86_function *p )
|
||||
|
||||
void x86_jcc( struct x86_function *p,
|
||||
enum x86_cc cc,
|
||||
GLubyte *label )
|
||||
unsigned char *label )
|
||||
{
|
||||
GLint offset = label - (x86_get_label(p) + 2);
|
||||
int offset = label - (x86_get_label(p) + 2);
|
||||
|
||||
if (offset <= 127 && offset >= -128) {
|
||||
emit_1ub(p, 0x70 + cc);
|
||||
emit_1b(p, (GLbyte) offset);
|
||||
emit_1b(p, (char) offset);
|
||||
}
|
||||
else {
|
||||
offset = label - (x86_get_label(p) + 6);
|
||||
@@ -216,7 +240,7 @@ void x86_jcc( struct x86_function *p,
|
||||
|
||||
/* Always use a 32bit offset for forward jumps:
|
||||
*/
|
||||
GLubyte *x86_jcc_forward( struct x86_function *p,
|
||||
unsigned char *x86_jcc_forward( struct x86_function *p,
|
||||
enum x86_cc cc )
|
||||
{
|
||||
emit_2ub(p, 0x0f, 0x80 + cc);
|
||||
@@ -224,14 +248,14 @@ GLubyte *x86_jcc_forward( struct x86_function *p,
|
||||
return x86_get_label(p);
|
||||
}
|
||||
|
||||
GLubyte *x86_jmp_forward( struct x86_function *p)
|
||||
unsigned char *x86_jmp_forward( struct x86_function *p)
|
||||
{
|
||||
emit_1ub(p, 0xe9);
|
||||
emit_1i(p, 0);
|
||||
return x86_get_label(p);
|
||||
}
|
||||
|
||||
GLubyte *x86_call_forward( struct x86_function *p)
|
||||
unsigned char *x86_call_forward( struct x86_function *p)
|
||||
{
|
||||
emit_1ub(p, 0xe8);
|
||||
emit_1i(p, 0);
|
||||
@@ -241,28 +265,41 @@ GLubyte *x86_call_forward( struct x86_function *p)
|
||||
/* Fixup offset from forward jump:
|
||||
*/
|
||||
void x86_fixup_fwd_jump( struct x86_function *p,
|
||||
GLubyte *fixup )
|
||||
unsigned char *fixup )
|
||||
{
|
||||
*(int *)(fixup - 4) = x86_get_label(p) - fixup;
|
||||
}
|
||||
|
||||
void x86_jmp( struct x86_function *p, GLubyte *label)
|
||||
void x86_jmp( struct x86_function *p, unsigned char *label)
|
||||
{
|
||||
emit_1ub(p, 0xe9);
|
||||
emit_1i(p, label - x86_get_label(p) - 4);
|
||||
}
|
||||
|
||||
void x86_call( struct x86_function *p, GLubyte *label)
|
||||
#if 0
|
||||
/* This doesn't work once we start reallocating & copying the
|
||||
* generated code on buffer fills, because the call is relative to the
|
||||
* current pc.
|
||||
*/
|
||||
void x86_call( struct x86_function *p, void (*label)())
|
||||
{
|
||||
emit_1ub(p, 0xe8);
|
||||
emit_1i(p, label - x86_get_label(p) - 4);
|
||||
emit_1i(p, cptr(label) - x86_get_label(p) - 4);
|
||||
}
|
||||
#else
|
||||
void x86_call( struct x86_function *p, struct x86_reg reg)
|
||||
{
|
||||
emit_1ub(p, 0xff);
|
||||
emit_modrm(p, reg, reg);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* michal:
|
||||
* Temporary. As I need immediate operands, and dont want to mess with the codegen,
|
||||
* I load the immediate into general purpose register and use it.
|
||||
*/
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm )
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm )
|
||||
{
|
||||
assert(dst.mod == mod_REG);
|
||||
emit_1ub(p, 0xb8 + dst.idx);
|
||||
@@ -502,6 +539,14 @@ void sse_addss( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_andnps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x55);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_andps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
@@ -510,6 +555,13 @@ void sse_andps( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_rsqrtps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x52);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_rsqrtss( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
@@ -538,6 +590,21 @@ void sse_movlhps( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_orps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x56);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_xorps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x57);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse_cvtps2pi( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
@@ -559,7 +626,7 @@ void sse_cvtps2pi( struct x86_function *p,
|
||||
void sse_shufps( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg arg0,
|
||||
GLubyte shuf)
|
||||
unsigned char shuf)
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0xC6);
|
||||
emit_modrm(p, dest, arg0);
|
||||
@@ -569,13 +636,21 @@ void sse_shufps( struct x86_function *p,
|
||||
void sse_cmpps( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg arg0,
|
||||
GLubyte cc)
|
||||
unsigned char cc)
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0xC2);
|
||||
emit_modrm(p, dest, arg0);
|
||||
emit_1ub(p, cc);
|
||||
}
|
||||
|
||||
void sse_pmovmskb( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg src)
|
||||
{
|
||||
emit_3ub(p, 0x66, X86_TWOB, 0xD7);
|
||||
emit_modrm(p, dest, src);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SSE2 instructions
|
||||
*/
|
||||
@@ -586,13 +661,21 @@ void sse_cmpps( struct x86_function *p,
|
||||
void sse2_pshufd( struct x86_function *p,
|
||||
struct x86_reg dest,
|
||||
struct x86_reg arg0,
|
||||
GLubyte shuf)
|
||||
unsigned char shuf)
|
||||
{
|
||||
emit_3ub(p, 0x66, X86_TWOB, 0x70);
|
||||
emit_modrm(p, dest, arg0);
|
||||
emit_1ub(p, shuf);
|
||||
}
|
||||
|
||||
void sse2_cvttps2dq( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_3ub( p, 0xF3, X86_TWOB, 0x5B );
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse2_cvtps2dq( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
@@ -625,6 +708,14 @@ void sse2_packuswb( struct x86_function *p,
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse2_rcpps( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
{
|
||||
emit_2ub(p, X86_TWOB, 0x53);
|
||||
emit_modrm( p, dst, src );
|
||||
}
|
||||
|
||||
void sse2_rcpss( struct x86_function *p,
|
||||
struct x86_reg dst,
|
||||
struct x86_reg src )
|
||||
@@ -712,11 +803,11 @@ void x87_fclex( struct x86_function *p )
|
||||
|
||||
|
||||
static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg,
|
||||
GLubyte dst0ub0,
|
||||
GLubyte dst0ub1,
|
||||
GLubyte arg0ub0,
|
||||
GLubyte arg0ub1,
|
||||
GLubyte argmem_noreg)
|
||||
unsigned char dst0ub0,
|
||||
unsigned char dst0ub1,
|
||||
unsigned char arg0ub0,
|
||||
unsigned char arg0ub1,
|
||||
unsigned char argmem_noreg)
|
||||
{
|
||||
assert(dst.file == file_x87);
|
||||
|
||||
@@ -729,7 +820,7 @@ static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86
|
||||
assert(0);
|
||||
}
|
||||
else if (dst.idx == 0) {
|
||||
assert(arg.file = file_REG32);
|
||||
assert(arg.file == file_REG32);
|
||||
emit_1ub(p, 0xd8);
|
||||
emit_modrm_noreg(p, argmem_noreg, arg);
|
||||
}
|
||||
@@ -1056,44 +1147,42 @@ void mmx_movq( struct x86_function *p,
|
||||
* account any push/pop activity:
|
||||
*/
|
||||
struct x86_reg x86_fn_arg( struct x86_function *p,
|
||||
GLuint arg )
|
||||
unsigned arg )
|
||||
{
|
||||
return x86_make_disp(x86_make_reg(file_REG32, reg_SP),
|
||||
p->stack_offset + arg * 4); /* ??? */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize an x86_function object, allocating space for up to
|
||||
* 'code_size' bytes of code.
|
||||
*/
|
||||
GLboolean x86_init_func( struct x86_function *p, GLuint code_size )
|
||||
void x86_init_func( struct x86_function *p )
|
||||
{
|
||||
assert(!p->store);
|
||||
p->size = 0;
|
||||
p->store = NULL;
|
||||
p->csr = p->store;
|
||||
}
|
||||
|
||||
int x86_init_func_size( struct x86_function *p, unsigned code_size )
|
||||
{
|
||||
p->size = code_size;
|
||||
p->store = _mesa_exec_malloc(code_size);
|
||||
if (p->store) {
|
||||
p->csr = p->store;
|
||||
return GL_TRUE;
|
||||
}
|
||||
else {
|
||||
p->csr = NULL;
|
||||
return GL_FALSE;
|
||||
}
|
||||
p->csr = p->store;
|
||||
return p->store != NULL;
|
||||
}
|
||||
|
||||
void x86_release_func( struct x86_function *p )
|
||||
{
|
||||
if (p->store)
|
||||
_mesa_exec_free(p->store);
|
||||
p->store = p->csr = NULL;
|
||||
_mesa_exec_free(p->store);
|
||||
p->store = NULL;
|
||||
p->csr = NULL;
|
||||
p->size = 0;
|
||||
}
|
||||
|
||||
|
||||
void (*x86_get_func( struct x86_function *p ))(void)
|
||||
{
|
||||
if (DISASSEM)
|
||||
if (DISASSEM && p->store)
|
||||
_mesa_printf("disassemble %p %p\n", p->store, p->csr);
|
||||
return (void (*)(void))p->store;
|
||||
return (void (*)(void)) (unsigned long) p->store;
|
||||
}
|
||||
|
||||
#else
|
||||
|
@@ -2,26 +2,25 @@
|
||||
#ifndef _X86SSE_H_
|
||||
#define _X86SSE_H_
|
||||
|
||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
||||
|
||||
#include "glheader.h"
|
||||
#if defined(__i386__) || defined(__386__)
|
||||
|
||||
/* It is up to the caller to ensure that instructions issued are
|
||||
* suitable for the host cpu. There are no checks made in this module
|
||||
* for mmx/sse/sse2 support on the cpu.
|
||||
*/
|
||||
struct x86_reg {
|
||||
GLuint file:3;
|
||||
GLuint idx:3;
|
||||
GLuint mod:2; /* mod_REG if this is just a register */
|
||||
GLint disp:24; /* only +/- 23bits of offset - should be enough... */
|
||||
unsigned file:3;
|
||||
unsigned idx:3;
|
||||
unsigned mod:2; /* mod_REG if this is just a register */
|
||||
int disp:24; /* only +/- 23bits of offset - should be enough... */
|
||||
};
|
||||
|
||||
struct x86_function {
|
||||
GLubyte *store;
|
||||
GLubyte *csr;
|
||||
GLuint stack_offset;
|
||||
GLint need_emms;
|
||||
unsigned size;
|
||||
unsigned char *store;
|
||||
unsigned char *csr;
|
||||
unsigned stack_offset;
|
||||
int need_emms;
|
||||
const char *fn;
|
||||
};
|
||||
|
||||
@@ -80,7 +79,8 @@ enum sse_cc {
|
||||
*/
|
||||
|
||||
|
||||
GLboolean x86_init_func( struct x86_function *p, GLuint code_size );
|
||||
void x86_init_func( struct x86_function *p );
|
||||
int x86_init_func_size( struct x86_function *p, unsigned code_size );
|
||||
void x86_release_func( struct x86_function *p );
|
||||
void (*x86_get_func( struct x86_function *p ))( void );
|
||||
|
||||
@@ -92,7 +92,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file,
|
||||
enum x86_reg_name idx );
|
||||
|
||||
struct x86_reg x86_make_disp( struct x86_reg reg,
|
||||
GLint disp );
|
||||
int disp );
|
||||
|
||||
struct x86_reg x86_deref( struct x86_reg reg );
|
||||
|
||||
@@ -101,31 +101,32 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg );
|
||||
|
||||
/* Labels, jumps and fixup:
|
||||
*/
|
||||
GLubyte *x86_get_label( struct x86_function *p );
|
||||
unsigned char *x86_get_label( struct x86_function *p );
|
||||
|
||||
void x86_jcc( struct x86_function *p,
|
||||
enum x86_cc cc,
|
||||
GLubyte *label );
|
||||
unsigned char *label );
|
||||
|
||||
GLubyte *x86_jcc_forward( struct x86_function *p,
|
||||
unsigned char *x86_jcc_forward( struct x86_function *p,
|
||||
enum x86_cc cc );
|
||||
|
||||
GLubyte *x86_jmp_forward( struct x86_function *p);
|
||||
unsigned char *x86_jmp_forward( struct x86_function *p);
|
||||
|
||||
GLubyte *x86_call_forward( struct x86_function *p);
|
||||
unsigned char *x86_call_forward( struct x86_function *p);
|
||||
|
||||
void x86_fixup_fwd_jump( struct x86_function *p,
|
||||
GLubyte *fixup );
|
||||
unsigned char *fixup );
|
||||
|
||||
void x86_jmp( struct x86_function *p, GLubyte *label );
|
||||
void x86_jmp( struct x86_function *p, unsigned char *label );
|
||||
|
||||
void x86_call( struct x86_function *p, GLubyte *label );
|
||||
/* void x86_call( struct x86_function *p, void (*label)() ); */
|
||||
void x86_call( struct x86_function *p, struct x86_reg reg);
|
||||
|
||||
/* michal:
|
||||
* Temporary. As I need immediate operands, and dont want to mess with the codegen,
|
||||
* I load the immediate into general purpose register and use it.
|
||||
*/
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm );
|
||||
void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm );
|
||||
|
||||
|
||||
/* Macro for sse_shufps() and sse2_pshufd():
|
||||
@@ -141,19 +142,24 @@ void mmx_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg sr
|
||||
void mmx_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
|
||||
void sse2_cvtps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_cvttps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf );
|
||||
void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0,
|
||||
unsigned char shuf );
|
||||
void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
|
||||
void sse_addps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_addss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_andnps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, GLubyte cc );
|
||||
void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src,
|
||||
unsigned char cc );
|
||||
void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
@@ -166,9 +172,14 @@ void sse_movss( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
|
||||
void sse_movups( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_mulps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_mulss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_orps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_xorps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_rsqrtps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf );
|
||||
void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0,
|
||||
unsigned char shuf );
|
||||
void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src );
|
||||
|
||||
void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
void x86_and( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
|
||||
@@ -239,7 +250,7 @@ void x87_fucom( struct x86_function *p, struct x86_reg arg );
|
||||
* account any push/pop activity. Note - doesn't track explict
|
||||
* manipulation of ESP by other instructions.
|
||||
*/
|
||||
struct x86_reg x86_fn_arg( struct x86_function *p, GLuint arg );
|
||||
struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -146,7 +146,7 @@ SOURCE=..\..\..\..\src\glut\glx\glut_ext.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\src\glut\glx\glut_fbc.c
|
||||
SOURCE=..\..\..\..\src\glut\glx\glut_fcb.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@@ -176,7 +176,7 @@ if exist ..\..\..\..\progs\demos copy Release\GLUT32.DLL ..\..\..\..\progs\demos
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_ext.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fbc.c">
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fcb.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fullscrn.c">
|
||||
|
@@ -257,7 +257,7 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fbc.c"
|
||||
RelativePath="..\..\..\..\src\glut\glx\glut_fcb.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
Reference in New Issue
Block a user