Compare commits
15 Commits
mesa_6_5_3
...
mesa_6_5_3
Author | SHA1 | Date | |
---|---|---|---|
|
02e958a1e4 | ||
|
cce5084941 | ||
|
4b1d1b7b18 | ||
|
7ff72a7659 | ||
|
c4b3b8dece | ||
|
65bab0dad8 | ||
|
74edc663a6 | ||
|
54d59cfb70 | ||
|
b7f5b8af65 | ||
|
4099531a0a | ||
|
1606f2c123 | ||
|
1dd7c00214 | ||
|
f42d4ab41e | ||
|
4a28548cbf | ||
|
5814922d25 |
8
Makefile
8
Makefile
@@ -155,10 +155,10 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-6.5.3rc4
|
||||
LIB_NAME = MesaLib-6.5.3rc4
|
||||
DEMO_NAME = MesaDemos-6.5.3rc4
|
||||
GLUT_NAME = MesaGLUT-6.5.3rc4
|
||||
DIRECTORY = Mesa-6.5.3
|
||||
LIB_NAME = MesaLib-6.5.3
|
||||
DEMO_NAME = MesaDemos-6.5.3
|
||||
GLUT_NAME = MesaGLUT-6.5.3
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
|
@@ -1,155 +1,163 @@
|
||||
File: docs/README.WIN32
|
||||
|
||||
Last updated: Mar 31, 2006 - Karl Schultz - kschultz@users.sourceforge.net
|
||||
|
||||
Quick Start
|
||||
----- -----
|
||||
|
||||
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
|
||||
directory. The libs and demos build separately, so if you do not care
|
||||
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
|
||||
more than one ZIP file, they all need to be unzipped into the same
|
||||
directory. Don't worry, you will not overwrite anything.
|
||||
|
||||
The Windows build system uses Microsoft Visual Studio. Project files
|
||||
for a specific version of Visual Studio are in their own directory in
|
||||
the top-level "windows" directory. For example, Visual Studio 6 files
|
||||
are in windows/VC6. If a directory does not exist for your version of
|
||||
Visual Studio, you can try importing the project files from an earlier
|
||||
version of Visual Studio. At this time, project files exist for
|
||||
Version 6 and Version 7. The code has been built with a beta version
|
||||
of Version 8 and it runs on 64-bit Windows. If you want to try this,
|
||||
start by importing the VC7 files and create the 64-bit targets in the
|
||||
configuration manager.
|
||||
|
||||
It is likely that the new and free Visual Studio Express can be used
|
||||
to build Mesa, but it hasn't been tried yet. Start with the VC7
|
||||
project files.
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
to build GLUT and some demo programs are in the progs directory.
|
||||
|
||||
Makefiles are no longer shipped or supported, but can be generated
|
||||
from the projects using Visual Studio.
|
||||
|
||||
|
||||
Windows Drivers
|
||||
------- -------
|
||||
|
||||
At this time, only the GDI driver is known to work. Most of the demos
|
||||
in progs/demos should work with this driver.
|
||||
|
||||
Source code also exists in the tree for other drivers in
|
||||
src/mesa/drivers/windows, but the status of this code is unknown.
|
||||
|
||||
The GDI driver operates basically by writing pixel spans into a DIB
|
||||
section and then blitting the DIB to the window. The driver was
|
||||
recently cleaned up and rewitten and so may have bugs or may be
|
||||
missing some functionality. The older versions of the CVS source may
|
||||
be useful in figuring out any problems, or report them to me.
|
||||
|
||||
To build Mesa with the GDI driver, build the mesa, gdi, and glu
|
||||
projects in the Visual Studio workspace found at
|
||||
|
||||
windows/VC6/mesa/mesa.dsw
|
||||
or
|
||||
windows/VC7/mesa/mesa.sln
|
||||
|
||||
The osmesa DLL can also be built with the osmesa project.
|
||||
|
||||
The build system creates a lib top-level directory and copies
|
||||
resulting LIB and DLL files to this lib directory. The files are:
|
||||
|
||||
OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
|
||||
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
|
||||
|
||||
If the MesaDemos ZIP file was extracted, the DLL files are also copied
|
||||
to the demos directory. This facilitates running the demos as described
|
||||
below.
|
||||
|
||||
|
||||
GLUT and Demos
|
||||
---- --- -----
|
||||
|
||||
A Visual Studio workspace can be found at
|
||||
|
||||
windows/VC6/progs/progs.dsw
|
||||
or
|
||||
windows/VC7/progs/progs.sln
|
||||
|
||||
It can be used to build GLUT and a few demos. The GLUT lib and DLL
|
||||
are copied to the top-level lib directory, along with the Mesa libs.
|
||||
|
||||
The demo build system expects to find the LIB files in the top level
|
||||
lib directory, so you must build the Mesa libs first. The demo
|
||||
executables are placed in the demos directory, because some of them
|
||||
rely on data files found there. Also, the Mesa lib DLL's were copied
|
||||
there by the Mesa lib build process. Therefore, you should be able to
|
||||
simply run the demo executables from the demo directory.
|
||||
|
||||
If you want to run the demos from the Visual Studio, you may have to
|
||||
change the startup directory and explicitly state where the executables are.
|
||||
|
||||
You may also build all the demo programs by using a makefile. Go to
|
||||
the progs/demos directory and make sure you have executed VCVARS32.BAT
|
||||
or whatever setup script is appropriate for your compiler. Then,
|
||||
|
||||
nmake -f Makefile.win
|
||||
|
||||
should build all the demos.
|
||||
|
||||
|
||||
Build System Notes
|
||||
----- ------ -----
|
||||
|
||||
VC6
|
||||
---
|
||||
|
||||
Visual Studio 6 does not recognize files with the .cc extension as C++
|
||||
language files, without a lot of unnatural tweaking. So, the VC6
|
||||
build process uses custom build steps to compile these files in the
|
||||
GLU library.
|
||||
|
||||
Two additional configurations are provided, Debug x86 and Release x86
|
||||
that activate the shader code compilation by defining SLANG_86. It is
|
||||
unknown if and how this works.
|
||||
|
||||
VC7
|
||||
---
|
||||
|
||||
The above-mentioned .cc problem does not exist in this version.
|
||||
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
After building, you can copy the above DLL files to a place in your
|
||||
PATH such as $SystemRoot/SYSTEM32. If you don't like putting things
|
||||
in a system directory, place them in the same directory as the
|
||||
executable(s). Be careful about accidentially overwriting files of
|
||||
the same name in the SYSTEM32 directory.
|
||||
|
||||
The DLL files are built so that the external entry points use the
|
||||
stdcall calling convention.
|
||||
|
||||
Static LIB files are not built. The LIB files that are built with are
|
||||
the linker import files associated with the DLL files.
|
||||
|
||||
The si-glu sources are used to build the GLU libs. This was done
|
||||
mainly to get the better tessellator code.
|
||||
|
||||
To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
|
||||
to the project settings. You will also need to edit src/mesa.def to
|
||||
change all the gl* symbols to mgl*. Because this is easy to do with a
|
||||
global replace operation in a text editor, no additional mangled
|
||||
version of mesa.def is maintained or shipped.
|
||||
|
||||
If you have a Windows-related build problem or question, it is
|
||||
probably better to direct it to me (kschultz@users.sourceforge.net),
|
||||
rather than directly to the other Mesa developers. I will help you as
|
||||
much as I can. I also monitor the Mesa mailing lists and will answer
|
||||
questions in this area there as well.
|
||||
|
||||
|
||||
Karl Schultz
|
||||
File: docs/README.WIN32
|
||||
|
||||
Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
|
||||
|
||||
Quick Start
|
||||
----- -----
|
||||
|
||||
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
|
||||
directory. The libs and demos build separately, so if you do not care
|
||||
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
|
||||
more than one ZIP file, they all need to be unzipped into the same
|
||||
directory. Don't worry, you will not overwrite anything.
|
||||
|
||||
The Windows build system uses Microsoft Visual Studio. Project files
|
||||
for a specific version of Visual Studio are in their own directory in
|
||||
the top-level "windows" directory. For example, Visual Studio 8 files
|
||||
are in windows/VC8.
|
||||
|
||||
Support has been dropped for versions of Visual Studio prior to 8. The
|
||||
main reason is because Microsoft now provides a free compiler and
|
||||
developer environment. Visual Studio Express can be found at
|
||||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
|
||||
|
||||
You'll also need the Platform SDK. Instructions for obtaining and
|
||||
using the SDK with Visual Studio Express can be found at
|
||||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
|
||||
|
||||
If you are stuck using VC6 or VC7, you may start with these project
|
||||
files, but you may need to modify them to reflect changes in the
|
||||
Mesa source code tree. If you sucessfully update the project files,
|
||||
please submit them to the author of this document so that they may
|
||||
be included in the next distribution.
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
to build GLUT and some demo programs are in the progs directory.
|
||||
|
||||
Makefiles are no longer shipped or supported, but can be generated
|
||||
from the projects using Visual Studio.
|
||||
|
||||
|
||||
Windows Drivers
|
||||
------- -------
|
||||
|
||||
At this time, only the GDI driver is known to work. Most of the demos
|
||||
in progs/demos should work with this driver.
|
||||
|
||||
Source code also exists in the tree for other drivers in
|
||||
src/mesa/drivers/windows, but the status of this code is unknown.
|
||||
|
||||
The GDI driver operates basically by writing pixel spans into a DIB
|
||||
section and then blitting the DIB to the window. The driver was
|
||||
recently cleaned up and rewitten and so may have bugs or may be
|
||||
missing some functionality. The older versions of the CVS source may
|
||||
be useful in figuring out any problems, or report them to me.
|
||||
|
||||
To build Mesa with the GDI driver, build the mesa, gdi, and glu
|
||||
projects in the Visual Studio workspace found at
|
||||
|
||||
windows/VC8/mesa/mesa.sln
|
||||
|
||||
The osmesa DLL can also be built with the osmesa project.
|
||||
|
||||
The build system creates a lib top-level directory and copies
|
||||
resulting LIB and DLL files to this lib directory. The files are:
|
||||
|
||||
OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
|
||||
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
|
||||
|
||||
If the MesaDemos ZIP file was extracted, the DLL files are also copied
|
||||
to the demos directory. This facilitates running the demos as described
|
||||
below.
|
||||
|
||||
|
||||
GLUT and Demos
|
||||
---- --- -----
|
||||
|
||||
A Visual Studio workspace can be found at
|
||||
|
||||
windows/VC8/progs/progs.sln
|
||||
|
||||
It can be used to build GLUT and a few demos. The GLUT lib and DLL
|
||||
are copied to the top-level lib directory, along with the Mesa libs.
|
||||
|
||||
The demo build system expects to find the LIB files in the top level
|
||||
lib directory, so you must build the Mesa libs first. The demo
|
||||
executables are placed in the demos directory, because some of them
|
||||
rely on data files found there. Also, the Mesa lib DLL's were copied
|
||||
there by the Mesa lib build process. Therefore, you should be able to
|
||||
simply run the demo executables from the demo directory.
|
||||
|
||||
If you want to run the demos from the Visual Studio, you may have to
|
||||
change the startup directory and explicitly state where the executables are.
|
||||
|
||||
You may also build all the demo programs by using a makefile. Go to
|
||||
the progs/demos directory and make sure you have executed VCVARS32.BAT
|
||||
or whatever setup script is appropriate for your compiler. Then,
|
||||
|
||||
nmake -f Makefile.win
|
||||
|
||||
should build all the demos.
|
||||
|
||||
|
||||
Build System Notes
|
||||
----- ------ -----
|
||||
|
||||
VC6 (not actively supported)
|
||||
---
|
||||
|
||||
Visual Studio 6 does not recognize files with the .cc extension as C++
|
||||
language files, without a lot of unnatural tweaking. So, the VC6
|
||||
build process uses custom build steps to compile these files in the
|
||||
GLU library.
|
||||
|
||||
Two additional configurations are provided, Debug x86 and Release x86
|
||||
that activate the shader code compilation by defining SLANG_86. It is
|
||||
unknown if and how this works.
|
||||
|
||||
VC7 (not actively supported)
|
||||
---
|
||||
|
||||
The above-mentioned .cc problem does not exist in this version.
|
||||
|
||||
VC8
|
||||
---
|
||||
|
||||
No notes.
|
||||
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
After building, you can copy the above DLL files to a place in your
|
||||
PATH such as $SystemRoot/SYSTEM32. If you don't like putting things
|
||||
in a system directory, place them in the same directory as the
|
||||
executable(s). Be careful about accidentially overwriting files of
|
||||
the same name in the SYSTEM32 directory.
|
||||
|
||||
The DLL files are built so that the external entry points use the
|
||||
stdcall calling convention.
|
||||
|
||||
Static LIB files are not built. The LIB files that are built with are
|
||||
the linker import files associated with the DLL files.
|
||||
|
||||
The si-glu sources are used to build the GLU libs. This was done
|
||||
mainly to get the better tessellator code.
|
||||
|
||||
To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
|
||||
to the project settings. You will also need to edit src/mesa.def to
|
||||
change all the gl* symbols to mgl*. Because this is easy to do with a
|
||||
global replace operation in a text editor, no additional mangled
|
||||
version of mesa.def is maintained or shipped.
|
||||
|
||||
If you have a Windows-related build problem or question, it is
|
||||
probably better to direct it to me (kschultz@users.sourceforge.net),
|
||||
rather than directly to the other Mesa developers. I will help you as
|
||||
much as I can. I also monitor the Mesa mailing lists and will answer
|
||||
questions in this area there as well.
|
||||
|
||||
|
||||
Karl Schultz
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>April ?, 2007</h2>
|
||||
<h2>April 27, 2007</h2>
|
||||
<p>
|
||||
<a href="relnotes-6.5.3.html">Mesa 6.5.3</a> is released.
|
||||
This is a development release which will lead up to the Mesa 7.0 release
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 6.5.3 Release Notes / April ??, 2007</H1>
|
||||
<H1>Mesa 6.5.3 Release Notes / April 27, 2007</H1>
|
||||
|
||||
<p>
|
||||
Mesa 6.5.3 is a development release with many changes and new features.
|
||||
@@ -96,7 +96,7 @@ Driver Status
|
||||
DRI drivers varies with the driver
|
||||
XMesa/GLX (on Xlib) implements OpenGL 2.1
|
||||
OSMesa (off-screen) implements OpenGL 2.1
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
Windows/Win32 implements OpenGL 2.1
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA unsupported
|
||||
Wind River UGL unsupported
|
||||
|
@@ -45,6 +45,9 @@ in Mesa:
|
||||
<li>Linking of multiple shaders is not supported
|
||||
<li>gl_ClipVertex
|
||||
<li>The derivative functions such as dFdx() are not implemented
|
||||
<li>The inverse trig functions asin(), acos(), and atan() are not implemented
|
||||
<li>The gl_Color and gl_SecondaryColor varying vars are interpolated
|
||||
without perspective correction
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
@@ -22,9 +22,11 @@ LIBS = GLUT32.LIB OPENGL32.LIB
|
||||
|
||||
all: OPENGL32.DLL GLU32.DLL GLUT32.DLL \
|
||||
readtex.h readtex.c showbuffer.h showbuffer.c \
|
||||
extfuncs.h trackball.h trackball.c \
|
||||
arbfplight.exe arbfslight.exe arbocclude.exe bounce.exe \
|
||||
clearspd.exe cubemap.exe drawpix.exe fire.exe fogcoord.exe \
|
||||
fplight.exe gamma.exe gearbox.exe \
|
||||
clearspd.exe cubemap.exe drawpix.exe engine.exe \
|
||||
fire.exe fogcoord.exe \
|
||||
fplight.exe fslight.exe gamma.exe gearbox.exe \
|
||||
gears.exe geartrain.exe gloss.exe \
|
||||
glinfo.exe glslnoise.exe \
|
||||
gltestperf.exe glutfx.exe ipers.exe isosurf.exe lodbias.exe \
|
||||
@@ -42,14 +44,16 @@ bounce.exe: bounce.obj
|
||||
clearspd.exe: clearspd.obj
|
||||
cubemap.exe: cubemap.obj readtex.obj
|
||||
drawpix.exe: drawpix.obj readtex.obj
|
||||
engine.exe: engine.obj readtex.obj trackball.obj
|
||||
fire.exe: fire.obj readtex.obj
|
||||
fogcoord.exe: fogcoord.obj readtex.obj
|
||||
fplight.exe: fplight.obj
|
||||
fslight.exe: fslight.obj
|
||||
gamma.exe: gamma.obj
|
||||
gearbox.exe: gearbox.obj
|
||||
gears.exe: gears.obj
|
||||
geartrain.exe: geartrain.obj
|
||||
gloss.exe: gloss.obj readtex.obj
|
||||
gloss.exe: gloss.obj readtex.obj trackball.obj
|
||||
glinfo.exe: glinfo.obj
|
||||
glslnoise.exe: glslnoise.obj
|
||||
gltestperf.exe: gltestperf.obj
|
||||
@@ -105,14 +109,23 @@ showbuffer.c: $(TOP)\progs\util\showbuffer.c
|
||||
showbuffer.h: $(TOP)\progs\util\showbuffer.h
|
||||
copy $** .
|
||||
|
||||
trackball.c: $(TOP)\progs\util\trackball.c
|
||||
copy $** .
|
||||
|
||||
trackball.h: $(TOP)\progs\util\trackball.h
|
||||
copy $** .
|
||||
|
||||
extfuncs.h: $(TOP)\progs\util\extfuncs.h
|
||||
copy $** .
|
||||
|
||||
.obj.exe:
|
||||
$(link) $(ldebug) -out:$@ $** /LIBPATH:$(LIBDIR) $(LIBS)
|
||||
|
||||
.c.obj:
|
||||
$(cc) $(cdebug) $(cflags) $(cvars) /I$(INCDIR) $*.c
|
||||
$(cc) $(cdebug) $(cflags) $(cvars) -D_USE_MATH_DEFINES /I$(INCDIR) $*.c
|
||||
|
||||
clean::
|
||||
del *.obj *.exe readtex.* showbuffer.*
|
||||
del *.obj *.exe readtex.* showbuffer.* trackball.*
|
||||
|
||||
clobber::
|
||||
|
||||
|
@@ -62,7 +62,7 @@ static PFNGLUNIFORM3FVARBPROC glUniform4fvARB = NULL;
|
||||
|
||||
static void normalize (GLfloat *dst, const GLfloat *src)
|
||||
{
|
||||
GLfloat len = sqrtf (src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
|
||||
GLfloat len = sqrt (src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
|
||||
dst[0] = src[0] / len;
|
||||
dst[1] = src[1] / len;
|
||||
dst[2] = src[2] / len;
|
||||
|
@@ -58,7 +58,7 @@ static GLfloat xRot = 90.0f, yRot = 0.0f;
|
||||
static void
|
||||
normalize(GLfloat *dst, const GLfloat *src)
|
||||
{
|
||||
GLfloat len = sqrtf(src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
|
||||
GLfloat len = sqrt(src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
|
||||
dst[0] = src[0] / len;
|
||||
dst[1] = src[1] / len;
|
||||
dst[2] = src[2] / len;
|
||||
|
@@ -4,10 +4,10 @@
|
||||
* Updated for GLU 1.3 tessellation by Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
||||
#include <GL/glut.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#define MAX_POINTS 256
|
||||
#define MAX_CONTOURS 32
|
||||
|
@@ -11,6 +11,7 @@ static PFNGLCREATEPROGRAMPROC glCreateProgram_func = NULL;
|
||||
static PFNGLCREATESHADERPROC glCreateShader_func = NULL;
|
||||
static PFNGLDELETEPROGRAMPROC glDeleteProgram_func = NULL;
|
||||
static PFNGLDELETESHADERPROC glDeleteShader_func = NULL;
|
||||
static PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib_func = NULL;
|
||||
static PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders_func = NULL;
|
||||
static PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation_func = NULL;
|
||||
static PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog_func = NULL;
|
||||
@@ -78,6 +79,7 @@ GetExtensionFuncs(void)
|
||||
glCreateShader_func = (PFNGLCREATESHADERPROC) glutGetProcAddress("glCreateShader");
|
||||
glDeleteProgram_func = (PFNGLDELETEPROGRAMPROC) glutGetProcAddress("glDeleteProgram");
|
||||
glDeleteShader_func = (PFNGLDELETESHADERPROC) glutGetProcAddress("glDeleteShader");
|
||||
glGetActiveAttrib_func = (PFNGLGETACTIVEATTRIBPROC) glutGetProcAddress("glGetActiveAttrib");
|
||||
glGetAttachedShaders_func = (PFNGLGETATTACHEDSHADERSPROC) glutGetProcAddress("glGetAttachedShaders");
|
||||
glGetAttribLocation_func = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress("glGetAttribLocation");
|
||||
glGetProgramInfoLog_func = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress("glGetProgramInfoLog");
|
||||
|
@@ -1269,6 +1269,9 @@ void r300_setup_textures(GLcontext *ctx)
|
||||
tmu_mappings[i] = hw_tmu;
|
||||
|
||||
t=r300->state.texture.unit[i].texobj;
|
||||
/* XXX questionable fix for bug 9170: */
|
||||
if (!t)
|
||||
continue;
|
||||
|
||||
if((t->format & 0xffffff00)==0xffffff00) {
|
||||
WARN_ONCE("unknown texture format (entry %x) encountered. Help me !\n", t->format & 0xff);
|
||||
|
@@ -1239,6 +1239,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
|
||||
_mesa_enable_1_4_extensions(ctx);
|
||||
_mesa_enable_1_5_extensions(ctx);
|
||||
_mesa_enable_2_0_extensions(ctx);
|
||||
_mesa_enable_2_1_extensions(ctx);
|
||||
|
||||
/* Initialize the software rasterizer and helper modules. */
|
||||
if (!_swrast_CreateContext(ctx) ||
|
||||
|
@@ -1060,7 +1060,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
|
||||
/*
|
||||
* Points
|
||||
*/
|
||||
if (new_state & _NEW_POINT) {
|
||||
if (1/*new_state & _NEW_POINT*/) {
|
||||
if (ctx->Point.SmoothFlag)
|
||||
ctx->_TriangleCaps |= DD_POINT_SMOOTH;
|
||||
if (ctx->Point._Size != 1.0F)
|
||||
@@ -1072,7 +1072,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
|
||||
/*
|
||||
* Lines
|
||||
*/
|
||||
if (new_state & _NEW_LINE) {
|
||||
if (1/*new_state & _NEW_LINE*/) {
|
||||
if (ctx->Line.SmoothFlag)
|
||||
ctx->_TriangleCaps |= DD_LINE_SMOOTH;
|
||||
if (ctx->Line.StippleFlag)
|
||||
@@ -1084,7 +1084,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
|
||||
/*
|
||||
* Polygons
|
||||
*/
|
||||
if (new_state & _NEW_POLYGON) {
|
||||
if (1/*new_state & _NEW_POLYGON*/) {
|
||||
if (ctx->Polygon.SmoothFlag)
|
||||
ctx->_TriangleCaps |= DD_TRI_SMOOTH;
|
||||
if (ctx->Polygon.StippleFlag)
|
||||
|
@@ -311,96 +311,93 @@ vec4 tan(const vec4 angle)
|
||||
|
||||
|
||||
|
||||
float asin (float x) {
|
||||
float y;
|
||||
__asm float_arcsine y, x;
|
||||
return y;
|
||||
float asin(const float x)
|
||||
{
|
||||
// XXX FIX ME!
|
||||
// __asm float_arcsine y, x;
|
||||
__retVal = 0.5;
|
||||
}
|
||||
|
||||
vec2 asin (vec2 v) {
|
||||
return vec2 (
|
||||
asin (v.x),
|
||||
asin (v.y)
|
||||
);
|
||||
vec2 asin(const vec2 v)
|
||||
{
|
||||
__retVal.x = asin(v.x);
|
||||
__retVal.y = asin(v.y);
|
||||
}
|
||||
|
||||
vec3 asin (vec3 v) {
|
||||
return vec3 (
|
||||
asin (v.x),
|
||||
asin (v.y),
|
||||
asin (v.z)
|
||||
);
|
||||
vec3 asin(const vec3 v)
|
||||
{
|
||||
__retVal.x = asin(v.x);
|
||||
__retVal.y = asin(v.y);
|
||||
__retVal.z = asin(v.z);
|
||||
}
|
||||
|
||||
vec4 asin (vec4 v) {
|
||||
return vec4 (
|
||||
asin (v.x),
|
||||
asin (v.y),
|
||||
asin (v.z),
|
||||
asin (v.w)
|
||||
);
|
||||
vec4 asin(const vec4 v)
|
||||
{
|
||||
__retVal.x = asin(v.x);
|
||||
__retVal.y = asin(v.y);
|
||||
__retVal.z = asin(v.z);
|
||||
}
|
||||
|
||||
float acos (float x) {
|
||||
return 1.5708 - asin (x);
|
||||
float acos(const float x)
|
||||
{
|
||||
// XXX FIX ME!
|
||||
__retVal = 0.5;
|
||||
}
|
||||
|
||||
vec2 acos (vec2 v) {
|
||||
return vec2 (
|
||||
acos (v.x),
|
||||
acos (v.y)
|
||||
);
|
||||
vec2 acos(const vec2 v)
|
||||
{
|
||||
__retVal.x = acos(v.x);
|
||||
__retVal.y = acos(v.y);
|
||||
}
|
||||
|
||||
vec3 acos (vec3 v) {
|
||||
return vec3 (
|
||||
acos (v.x),
|
||||
acos (v.y),
|
||||
acos (v.z)
|
||||
);
|
||||
vec3 acos(const vec3 v)
|
||||
{
|
||||
__retVal.x = acos(v.x);
|
||||
__retVal.y = acos(v.y);
|
||||
__retVal.z = acos(v.z);
|
||||
}
|
||||
|
||||
vec4 acos (vec4 v) {
|
||||
return vec4 (
|
||||
acos (v.x),
|
||||
acos (v.y),
|
||||
acos (v.z),
|
||||
acos (v.w)
|
||||
);
|
||||
vec4 acos(const vec4 v)
|
||||
{
|
||||
__retVal.x = acos(v.x);
|
||||
__retVal.y = acos(v.y);
|
||||
__retVal.z = acos(v.z);
|
||||
__retVal.w = acos(v.w);
|
||||
}
|
||||
|
||||
float atan (float y_over_x) {
|
||||
float z;
|
||||
__asm float_arctan z, y_over_x;
|
||||
return z;
|
||||
float atan(const float y_over_x)
|
||||
{
|
||||
// XXX FIX ME
|
||||
//__asm float_arctan z, y_over_x;
|
||||
__retVal = 0.5;
|
||||
}
|
||||
|
||||
vec2 atan (vec2 y_over_x) {
|
||||
return vec2 (
|
||||
atan (y_over_x.x),
|
||||
atan (y_over_x.y)
|
||||
);
|
||||
vec2 atan(const vec2 y_over_x)
|
||||
{
|
||||
__retVal.x = atan(y_over_x.x);
|
||||
__retVal.y = atan(y_over_x.y);
|
||||
}
|
||||
|
||||
vec3 atan (vec3 y_over_x) {
|
||||
return vec3 (
|
||||
atan (y_over_x.x),
|
||||
atan (y_over_x.y),
|
||||
atan (y_over_x.z)
|
||||
);
|
||||
vec3 atan(const vec3 y_over_x)
|
||||
{
|
||||
__retVal.x = atan(y_over_x.x);
|
||||
__retVal.y = atan(y_over_x.y);
|
||||
__retVal.z = atan(y_over_x.z);
|
||||
}
|
||||
|
||||
vec4 atan (vec4 y_over_x) {
|
||||
return vec4 (
|
||||
atan (y_over_x.x),
|
||||
atan (y_over_x.y),
|
||||
atan (y_over_x.z),
|
||||
atan (y_over_x.w)
|
||||
);
|
||||
vec4 atan(const vec4 y_over_x)
|
||||
{
|
||||
__retVal.x = atan(y_over_x.x);
|
||||
__retVal.y = atan(y_over_x.y);
|
||||
__retVal.z = atan(y_over_x.z);
|
||||
__retVal.w = atan(y_over_x.w);
|
||||
}
|
||||
|
||||
float atan (float y, float x) {
|
||||
float z = atan (y / x);
|
||||
float atan(const float y, const float x)
|
||||
{
|
||||
if (x == 0.0)
|
||||
return 0.0;
|
||||
float z = atan(y / x);
|
||||
if (x < 0.0)
|
||||
{
|
||||
if (y < 0.0)
|
||||
@@ -410,30 +407,28 @@ float atan (float y, float x) {
|
||||
return z;
|
||||
}
|
||||
|
||||
vec2 atan (vec2 u, vec2 v) {
|
||||
return vec2 (
|
||||
atan (u.x, v.x),
|
||||
atan (u.y, v.y)
|
||||
);
|
||||
vec2 atan(const vec2 u, const vec2 v)
|
||||
{
|
||||
__retVal.x = atan(u.x, v.x);
|
||||
__retVal.y = atan(u.y, v.y);
|
||||
}
|
||||
|
||||
vec3 atan (vec3 u, vec3 v) {
|
||||
return vec3 (
|
||||
atan (u.x, v.x),
|
||||
atan (u.y, v.y),
|
||||
atan (u.z, v.z)
|
||||
);
|
||||
vec3 atan(const vec3 u, const vec3 v)
|
||||
{
|
||||
__retVal.x = atan(u.x, v.x);
|
||||
__retVal.y = atan(u.y, v.y);
|
||||
__retVal.z = atan(u.z, v.z);
|
||||
}
|
||||
|
||||
vec4 atan (vec4 u, vec4 v) {
|
||||
return vec4 (
|
||||
atan (u.x, v.x),
|
||||
atan (u.y, v.y),
|
||||
atan (u.z, v.z),
|
||||
atan (u.w, v.w)
|
||||
);
|
||||
vec4 atan(const vec4 u, const vec4 v)
|
||||
{
|
||||
__retVal.x = atan(u.x, v.x);
|
||||
__retVal.y = atan(u.y, v.y);
|
||||
__retVal.z = atan(u.z, v.z);
|
||||
__retVal.w = atan(u.w, v.w);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 8.2 Exponential Functions
|
||||
//
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -114,18 +114,18 @@ link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog)
|
||||
varsRead |= (1 << inst->SrcReg[j].Index);
|
||||
}
|
||||
}
|
||||
/* XXX update program OutputsWritten, InputsRead */
|
||||
}
|
||||
|
||||
if (prog->Target == GL_VERTEX_PROGRAM_ARB) {
|
||||
prog->OutputsWritten |= varsWritten;
|
||||
/*printf("VERT OUTPUTS: 0x%x \n", varsWritten);*/
|
||||
}
|
||||
else {
|
||||
assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB);
|
||||
prog->InputsRead |= varsRead;
|
||||
/*printf("FRAG INPUTS: 0x%x\n", varsRead);*/
|
||||
}
|
||||
|
||||
|
||||
free(map);
|
||||
|
||||
return GL_TRUE;
|
||||
@@ -452,6 +452,21 @@ fragment_program(struct gl_program *prog)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Record a linking error.
|
||||
*/
|
||||
static void
|
||||
link_error(struct gl_shader_program *shProg, const char *msg)
|
||||
{
|
||||
if (shProg->InfoLog) {
|
||||
_mesa_free(shProg->InfoLog);
|
||||
}
|
||||
shProg->InfoLog = _mesa_strdup(msg);
|
||||
shProg->LinkStatus = GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Shader linker. Currently:
|
||||
*
|
||||
@@ -553,18 +568,30 @@ _slang_link(GLcontext *ctx,
|
||||
_slang_update_inputs_outputs(&shProg->VertexProgram->Base);
|
||||
if (!(shProg->VertexProgram->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) {
|
||||
/* the vertex program did not compute a vertex position */
|
||||
if (shProg->InfoLog) {
|
||||
_mesa_free(shProg->InfoLog);
|
||||
}
|
||||
shProg->InfoLog
|
||||
= _mesa_strdup("gl_Position was not written by vertex shader\n");
|
||||
shProg->LinkStatus = GL_FALSE;
|
||||
link_error(shProg,
|
||||
"gl_Position was not written by vertex shader\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (shProg->FragmentProgram)
|
||||
_slang_update_inputs_outputs(&shProg->FragmentProgram->Base);
|
||||
|
||||
/* Check that all the varying vars needed by the fragment shader are
|
||||
* actually produced by the vertex shader.
|
||||
*/
|
||||
if (shProg->FragmentProgram) {
|
||||
const GLbitfield varyingRead
|
||||
= shProg->FragmentProgram->Base.InputsRead >> FRAG_ATTRIB_VAR0;
|
||||
const GLbitfield varyingWritten = shProg->VertexProgram ?
|
||||
shProg->VertexProgram->Base.OutputsWritten >> VERT_RESULT_VAR0 : 0x0;
|
||||
if ((varyingRead & varyingWritten) != varyingRead) {
|
||||
link_error(shProg,
|
||||
"Fragment program using varying vars not written by vertex shader\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (fragProg && shProg->FragmentProgram) {
|
||||
/* notify driver that a new fragment program has been compiled/linked */
|
||||
ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB,
|
||||
|
Reference in New Issue
Block a user