Compare commits

...

17 Commits

Author SHA1 Message Date
Brian
02e958a1e4 added glGetActiveAttrib 2007-04-27 16:27:36 -06:00
Brian
cce5084941 "Fix" for bug 9170. May need more attention. 2007-04-27 15:41:07 -06:00
Brian
4b1d1b7b18 document perspective correction issues 2007-04-27 15:25:00 -06:00
Brian
7ff72a7659 document broken inverse trig functions 2007-04-27 15:23:19 -06:00
Brian
c4b3b8dece asin(), acos(), atan() just return 0.5 for now to avoid crashing. Fix someday. 2007-04-27 15:22:58 -06:00
Brian
65bab0dad8 remove rc4 suffix 2007-04-27 08:00:51 -06:00
Brian
74edc663a6 set 6.5.3 release date 2007-04-27 08:00:37 -06:00
Brian
54d59cfb70 Added error check that all varying vars needed by the fragment shader are produced by vertex shader. 2007-04-26 12:20:53 -06:00
Brian
b7f5b8af65 Unconditionally update _TriangleCaps bits. Fixes software fallback bugs, such as #10687. 2007-04-26 10:45:44 -06:00
Brian
4099531a0a bump Windows to OpenGL 2.1, set release date 2007-04-26 07:50:26 -06:00
Brian
1606f2c123 enable 2.1 extensions 2007-04-26 07:49:33 -06:00
Brian
1dd7c00214 Windows updates 2007-04-26 07:48:35 -06:00
Brian
f42d4ab41e move #include <GL/glut.h> after other #includes for Windows 2007-04-26 07:46:59 -06:00
Brian
4a28548cbf use sqrt(), not sqrtf() for Windows 2007-04-26 07:46:38 -06:00
Karl Schultz
5814922d25 updates for 6.5.3 w/ VC8 2007-04-25 10:28:37 -06:00
Brian
3de20aead2 RC4 2007-04-25 10:01:30 -06:00
Brian
6d27194dff fix attribsMask (re-fixes depth peeling algorithm) 2007-04-25 09:58:15 -06:00
17 changed files with 934 additions and 862 deletions

View File

@@ -155,10 +155,10 @@ ultrix-gcc:
# Rules for making release tarballs # Rules for making release tarballs
DIRECTORY = Mesa-6.5.3rc3 DIRECTORY = Mesa-6.5.3
LIB_NAME = MesaLib-6.5.3rc3 LIB_NAME = MesaLib-6.5.3
DEMO_NAME = MesaDemos-6.5.3rc3 DEMO_NAME = MesaDemos-6.5.3
GLUT_NAME = MesaGLUT-6.5.3rc3 GLUT_NAME = MesaGLUT-6.5.3
MAIN_FILES = \ MAIN_FILES = \
$(DIRECTORY)/Makefile* \ $(DIRECTORY)/Makefile* \

View File

@@ -1,6 +1,6 @@
File: docs/README.WIN32 File: docs/README.WIN32
Last updated: Mar 31, 2006 - Karl Schultz - kschultz@users.sourceforge.net Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
Quick Start Quick Start
----- ----- ----- -----
@@ -13,18 +13,25 @@ directory. Don't worry, you will not overwrite anything.
The Windows build system uses Microsoft Visual Studio. Project files The Windows build system uses Microsoft Visual Studio. Project files
for a specific version of Visual Studio are in their own directory in for a specific version of Visual Studio are in their own directory in
the top-level "windows" directory. For example, Visual Studio 6 files the top-level "windows" directory. For example, Visual Studio 8 files
are in windows/VC6. If a directory does not exist for your version of are in windows/VC8.
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 Support has been dropped for versions of Visual Studio prior to 8. The
to build Mesa, but it hasn't been tried yet. Start with the VC7 main reason is because Microsoft now provides a free compiler and
project files. 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 The project files to build the core Mesa library, Windows Mesa
drivers, OSMesa, and GLU are in the mesa directory. The project files drivers, OSMesa, and GLU are in the mesa directory. The project files
@@ -52,9 +59,7 @@ 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 To build Mesa with the GDI driver, build the mesa, gdi, and glu
projects in the Visual Studio workspace found at projects in the Visual Studio workspace found at
windows/VC6/mesa/mesa.dsw windows/VC8/mesa/mesa.sln
or
windows/VC7/mesa/mesa.sln
The osmesa DLL can also be built with the osmesa project. The osmesa DLL can also be built with the osmesa project.
@@ -74,9 +79,7 @@ GLUT and Demos
A Visual Studio workspace can be found at A Visual Studio workspace can be found at
windows/VC6/progs/progs.dsw windows/VC8/progs/progs.sln
or
windows/VC7/progs/progs.sln
It can be used to build GLUT and a few demos. The GLUT lib and DLL 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. are copied to the top-level lib directory, along with the Mesa libs.
@@ -103,7 +106,7 @@ should build all the demos.
Build System Notes Build System Notes
----- ------ ----- ----- ------ -----
VC6 VC6 (not actively supported)
--- ---
Visual Studio 6 does not recognize files with the .cc extension as C++ Visual Studio 6 does not recognize files with the .cc extension as C++
@@ -115,11 +118,16 @@ Two additional configurations are provided, Debug x86 and Release x86
that activate the shader code compilation by defining SLANG_86. It is that activate the shader code compilation by defining SLANG_86. It is
unknown if and how this works. unknown if and how this works.
VC7 VC7 (not actively supported)
--- ---
The above-mentioned .cc problem does not exist in this version. The above-mentioned .cc problem does not exist in this version.
VC8
---
No notes.
General General
------- -------

View File

@@ -11,7 +11,7 @@
<H1>News</H1> <H1>News</H1>
<h2>April ?, 2007</h2> <h2>April 27, 2007</h2>
<p> <p>
<a href="relnotes-6.5.3.html">Mesa 6.5.3</a> is released. <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 This is a development release which will lead up to the Mesa 7.0 release

View File

@@ -8,7 +8,7 @@
<body bgcolor="#eeeeee"> <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> <p>
Mesa 6.5.3 is a development release with many changes and new features. 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 DRI drivers varies with the driver
XMesa/GLX (on Xlib) implements OpenGL 2.1 XMesa/GLX (on Xlib) implements OpenGL 2.1
OSMesa (off-screen) 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 Glide (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA unsupported SVGA unsupported
Wind River UGL unsupported Wind River UGL unsupported

View File

@@ -45,6 +45,9 @@ in Mesa:
<li>Linking of multiple shaders is not supported <li>Linking of multiple shaders is not supported
<li>gl_ClipVertex <li>gl_ClipVertex
<li>The derivative functions such as dFdx() are not implemented <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> </ul>
<p> <p>

View File

@@ -22,9 +22,11 @@ LIBS = GLUT32.LIB OPENGL32.LIB
all: OPENGL32.DLL GLU32.DLL GLUT32.DLL \ all: OPENGL32.DLL GLU32.DLL GLUT32.DLL \
readtex.h readtex.c showbuffer.h showbuffer.c \ readtex.h readtex.c showbuffer.h showbuffer.c \
extfuncs.h trackball.h trackball.c \
arbfplight.exe arbfslight.exe arbocclude.exe bounce.exe \ arbfplight.exe arbfslight.exe arbocclude.exe bounce.exe \
clearspd.exe cubemap.exe drawpix.exe fire.exe fogcoord.exe \ clearspd.exe cubemap.exe drawpix.exe engine.exe \
fplight.exe gamma.exe gearbox.exe \ fire.exe fogcoord.exe \
fplight.exe fslight.exe gamma.exe gearbox.exe \
gears.exe geartrain.exe gloss.exe \ gears.exe geartrain.exe gloss.exe \
glinfo.exe glslnoise.exe \ glinfo.exe glslnoise.exe \
gltestperf.exe glutfx.exe ipers.exe isosurf.exe lodbias.exe \ gltestperf.exe glutfx.exe ipers.exe isosurf.exe lodbias.exe \
@@ -42,14 +44,16 @@ bounce.exe: bounce.obj
clearspd.exe: clearspd.obj clearspd.exe: clearspd.obj
cubemap.exe: cubemap.obj readtex.obj cubemap.exe: cubemap.obj readtex.obj
drawpix.exe: drawpix.obj readtex.obj drawpix.exe: drawpix.obj readtex.obj
engine.exe: engine.obj readtex.obj trackball.obj
fire.exe: fire.obj readtex.obj fire.exe: fire.obj readtex.obj
fogcoord.exe: fogcoord.obj readtex.obj fogcoord.exe: fogcoord.obj readtex.obj
fplight.exe: fplight.obj fplight.exe: fplight.obj
fslight.exe: fslight.obj
gamma.exe: gamma.obj gamma.exe: gamma.obj
gearbox.exe: gearbox.obj gearbox.exe: gearbox.obj
gears.exe: gears.obj gears.exe: gears.obj
geartrain.exe: geartrain.obj geartrain.exe: geartrain.obj
gloss.exe: gloss.obj readtex.obj gloss.exe: gloss.obj readtex.obj trackball.obj
glinfo.exe: glinfo.obj glinfo.exe: glinfo.obj
glslnoise.exe: glslnoise.obj glslnoise.exe: glslnoise.obj
gltestperf.exe: gltestperf.obj gltestperf.exe: gltestperf.obj
@@ -105,14 +109,23 @@ showbuffer.c: $(TOP)\progs\util\showbuffer.c
showbuffer.h: $(TOP)\progs\util\showbuffer.h showbuffer.h: $(TOP)\progs\util\showbuffer.h
copy $** . 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: .obj.exe:
$(link) $(ldebug) -out:$@ $** /LIBPATH:$(LIBDIR) $(LIBS) $(link) $(ldebug) -out:$@ $** /LIBPATH:$(LIBDIR) $(LIBS)
.c.obj: .c.obj:
$(cc) $(cdebug) $(cflags) $(cvars) /I$(INCDIR) $*.c $(cc) $(cdebug) $(cflags) $(cvars) -D_USE_MATH_DEFINES /I$(INCDIR) $*.c
clean:: clean::
del *.obj *.exe readtex.* showbuffer.* del *.obj *.exe readtex.* showbuffer.* trackball.*
clobber:: clobber::

View File

@@ -62,7 +62,7 @@ static PFNGLUNIFORM3FVARBPROC glUniform4fvARB = NULL;
static void normalize (GLfloat *dst, const GLfloat *src) 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[0] = src[0] / len;
dst[1] = src[1] / len; dst[1] = src[1] / len;
dst[2] = src[2] / len; dst[2] = src[2] / len;

View File

@@ -58,7 +58,7 @@ static GLfloat xRot = 90.0f, yRot = 0.0f;
static void static void
normalize(GLfloat *dst, const GLfloat *src) 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[0] = src[0] / len;
dst[1] = src[1] / len; dst[1] = src[1] / len;
dst[2] = src[2] / len; dst[2] = src[2] / len;

View File

@@ -4,10 +4,10 @@
* Updated for GLU 1.3 tessellation by Gareth Hughes <gareth@valinux.com> * Updated for GLU 1.3 tessellation by Gareth Hughes <gareth@valinux.com>
*/ */
#include <GL/glut.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <GL/glut.h>
#define MAX_POINTS 256 #define MAX_POINTS 256
#define MAX_CONTOURS 32 #define MAX_CONTOURS 32

View File

@@ -11,6 +11,7 @@ static PFNGLCREATEPROGRAMPROC glCreateProgram_func = NULL;
static PFNGLCREATESHADERPROC glCreateShader_func = NULL; static PFNGLCREATESHADERPROC glCreateShader_func = NULL;
static PFNGLDELETEPROGRAMPROC glDeleteProgram_func = NULL; static PFNGLDELETEPROGRAMPROC glDeleteProgram_func = NULL;
static PFNGLDELETESHADERPROC glDeleteShader_func = NULL; static PFNGLDELETESHADERPROC glDeleteShader_func = NULL;
static PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib_func = NULL;
static PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders_func = NULL; static PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders_func = NULL;
static PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation_func = NULL; static PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation_func = NULL;
static PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog_func = NULL; static PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog_func = NULL;
@@ -78,6 +79,7 @@ GetExtensionFuncs(void)
glCreateShader_func = (PFNGLCREATESHADERPROC) glutGetProcAddress("glCreateShader"); glCreateShader_func = (PFNGLCREATESHADERPROC) glutGetProcAddress("glCreateShader");
glDeleteProgram_func = (PFNGLDELETEPROGRAMPROC) glutGetProcAddress("glDeleteProgram"); glDeleteProgram_func = (PFNGLDELETEPROGRAMPROC) glutGetProcAddress("glDeleteProgram");
glDeleteShader_func = (PFNGLDELETESHADERPROC) glutGetProcAddress("glDeleteShader"); glDeleteShader_func = (PFNGLDELETESHADERPROC) glutGetProcAddress("glDeleteShader");
glGetActiveAttrib_func = (PFNGLGETACTIVEATTRIBPROC) glutGetProcAddress("glGetActiveAttrib");
glGetAttachedShaders_func = (PFNGLGETATTACHEDSHADERSPROC) glutGetProcAddress("glGetAttachedShaders"); glGetAttachedShaders_func = (PFNGLGETATTACHEDSHADERSPROC) glutGetProcAddress("glGetAttachedShaders");
glGetAttribLocation_func = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress("glGetAttribLocation"); glGetAttribLocation_func = (PFNGLGETATTRIBLOCATIONPROC) glutGetProcAddress("glGetAttribLocation");
glGetProgramInfoLog_func = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress("glGetProgramInfoLog"); glGetProgramInfoLog_func = (PFNGLGETPROGRAMINFOLOGPROC) glutGetProcAddress("glGetProgramInfoLog");

View File

@@ -1269,6 +1269,9 @@ void r300_setup_textures(GLcontext *ctx)
tmu_mappings[i] = hw_tmu; tmu_mappings[i] = hw_tmu;
t=r300->state.texture.unit[i].texobj; t=r300->state.texture.unit[i].texobj;
/* XXX questionable fix for bug 9170: */
if (!t)
continue;
if((t->format & 0xffffff00)==0xffffff00) { if((t->format & 0xffffff00)==0xffffff00) {
WARN_ONCE("unknown texture format (entry %x) encountered. Help me !\n", t->format & 0xff); WARN_ONCE("unknown texture format (entry %x) encountered. Help me !\n", t->format & 0xff);

View File

@@ -1239,6 +1239,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
_mesa_enable_1_4_extensions(ctx); _mesa_enable_1_4_extensions(ctx);
_mesa_enable_1_5_extensions(ctx); _mesa_enable_1_5_extensions(ctx);
_mesa_enable_2_0_extensions(ctx); _mesa_enable_2_0_extensions(ctx);
_mesa_enable_2_1_extensions(ctx);
/* Initialize the software rasterizer and helper modules. */ /* Initialize the software rasterizer and helper modules. */
if (!_swrast_CreateContext(ctx) || if (!_swrast_CreateContext(ctx) ||

View File

@@ -1060,7 +1060,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
/* /*
* Points * Points
*/ */
if (new_state & _NEW_POINT) { if (1/*new_state & _NEW_POINT*/) {
if (ctx->Point.SmoothFlag) if (ctx->Point.SmoothFlag)
ctx->_TriangleCaps |= DD_POINT_SMOOTH; ctx->_TriangleCaps |= DD_POINT_SMOOTH;
if (ctx->Point._Size != 1.0F) if (ctx->Point._Size != 1.0F)
@@ -1072,7 +1072,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
/* /*
* Lines * Lines
*/ */
if (new_state & _NEW_LINE) { if (1/*new_state & _NEW_LINE*/) {
if (ctx->Line.SmoothFlag) if (ctx->Line.SmoothFlag)
ctx->_TriangleCaps |= DD_LINE_SMOOTH; ctx->_TriangleCaps |= DD_LINE_SMOOTH;
if (ctx->Line.StippleFlag) if (ctx->Line.StippleFlag)
@@ -1084,7 +1084,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
/* /*
* Polygons * Polygons
*/ */
if (new_state & _NEW_POLYGON) { if (1/*new_state & _NEW_POLYGON*/) {
if (ctx->Polygon.SmoothFlag) if (ctx->Polygon.SmoothFlag)
ctx->_TriangleCaps |= DD_TRI_SMOOTH; ctx->_TriangleCaps |= DD_TRI_SMOOTH;
if (ctx->Polygon.StippleFlag) if (ctx->Polygon.StippleFlag)

View File

@@ -311,95 +311,92 @@ vec4 tan(const vec4 angle)
float asin (float x) { float asin(const float x)
float y; {
__asm float_arcsine y, x; // XXX FIX ME!
return y; // __asm float_arcsine y, x;
__retVal = 0.5;
} }
vec2 asin (vec2 v) { vec2 asin(const vec2 v)
return vec2 ( {
asin (v.x), __retVal.x = asin(v.x);
asin (v.y) __retVal.y = asin(v.y);
);
} }
vec3 asin (vec3 v) { vec3 asin(const vec3 v)
return vec3 ( {
asin (v.x), __retVal.x = asin(v.x);
asin (v.y), __retVal.y = asin(v.y);
asin (v.z) __retVal.z = asin(v.z);
);
} }
vec4 asin (vec4 v) { vec4 asin(const vec4 v)
return vec4 ( {
asin (v.x), __retVal.x = asin(v.x);
asin (v.y), __retVal.y = asin(v.y);
asin (v.z), __retVal.z = asin(v.z);
asin (v.w)
);
} }
float acos (float x) { float acos(const float x)
return 1.5708 - asin (x); {
// XXX FIX ME!
__retVal = 0.5;
} }
vec2 acos (vec2 v) { vec2 acos(const vec2 v)
return vec2 ( {
acos (v.x), __retVal.x = acos(v.x);
acos (v.y) __retVal.y = acos(v.y);
);
} }
vec3 acos (vec3 v) { vec3 acos(const vec3 v)
return vec3 ( {
acos (v.x), __retVal.x = acos(v.x);
acos (v.y), __retVal.y = acos(v.y);
acos (v.z) __retVal.z = acos(v.z);
);
} }
vec4 acos (vec4 v) { vec4 acos(const vec4 v)
return vec4 ( {
acos (v.x), __retVal.x = acos(v.x);
acos (v.y), __retVal.y = acos(v.y);
acos (v.z), __retVal.z = acos(v.z);
acos (v.w) __retVal.w = acos(v.w);
);
} }
float atan (float y_over_x) { float atan(const float y_over_x)
float z; {
__asm float_arctan z, y_over_x; // XXX FIX ME
return z; //__asm float_arctan z, y_over_x;
__retVal = 0.5;
} }
vec2 atan (vec2 y_over_x) { vec2 atan(const vec2 y_over_x)
return vec2 ( {
atan (y_over_x.x), __retVal.x = atan(y_over_x.x);
atan (y_over_x.y) __retVal.y = atan(y_over_x.y);
);
} }
vec3 atan (vec3 y_over_x) { vec3 atan(const vec3 y_over_x)
return vec3 ( {
atan (y_over_x.x), __retVal.x = atan(y_over_x.x);
atan (y_over_x.y), __retVal.y = atan(y_over_x.y);
atan (y_over_x.z) __retVal.z = atan(y_over_x.z);
);
} }
vec4 atan (vec4 y_over_x) { vec4 atan(const vec4 y_over_x)
return vec4 ( {
atan (y_over_x.x), __retVal.x = atan(y_over_x.x);
atan (y_over_x.y), __retVal.y = atan(y_over_x.y);
atan (y_over_x.z), __retVal.z = atan(y_over_x.z);
atan (y_over_x.w) __retVal.w = atan(y_over_x.w);
);
} }
float atan (float y, float x) { float atan(const float y, const float x)
{
if (x == 0.0)
return 0.0;
float z = atan(y / x); float z = atan(y / x);
if (x < 0.0) if (x < 0.0)
{ {
@@ -410,30 +407,28 @@ float atan (float y, float x) {
return z; return z;
} }
vec2 atan (vec2 u, vec2 v) { vec2 atan(const vec2 u, const vec2 v)
return vec2 ( {
atan (u.x, v.x), __retVal.x = atan(u.x, v.x);
atan (u.y, v.y) __retVal.y = atan(u.y, v.y);
);
} }
vec3 atan (vec3 u, vec3 v) { vec3 atan(const vec3 u, const vec3 v)
return vec3 ( {
atan (u.x, v.x), __retVal.x = atan(u.x, v.x);
atan (u.y, v.y), __retVal.y = atan(u.y, v.y);
atan (u.z, v.z) __retVal.z = atan(u.z, v.z);
);
} }
vec4 atan (vec4 u, vec4 v) { vec4 atan(const vec4 u, const vec4 v)
return vec4 ( {
atan (u.x, v.x), __retVal.x = atan(u.x, v.x);
atan (u.y, v.y), __retVal.y = atan(u.y, v.y);
atan (u.z, v.z), __retVal.z = atan(u.z, v.z);
atan (u.w, v.w) __retVal.w = atan(u.w, v.w);
);
} }
// //
// 8.2 Exponential Functions // 8.2 Exponential Functions
// //

File diff suppressed because it is too large Load Diff

View File

@@ -114,18 +114,18 @@ link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog)
varsRead |= (1 << inst->SrcReg[j].Index); varsRead |= (1 << inst->SrcReg[j].Index);
} }
} }
/* XXX update program OutputsWritten, InputsRead */
} }
if (prog->Target == GL_VERTEX_PROGRAM_ARB) { if (prog->Target == GL_VERTEX_PROGRAM_ARB) {
prog->OutputsWritten |= varsWritten; prog->OutputsWritten |= varsWritten;
/*printf("VERT OUTPUTS: 0x%x \n", varsWritten);*/
} }
else { else {
assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB); assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB);
prog->InputsRead |= varsRead; prog->InputsRead |= varsRead;
/*printf("FRAG INPUTS: 0x%x\n", varsRead);*/
} }
free(map); free(map);
return GL_TRUE; 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: * Shader linker. Currently:
* *
@@ -553,18 +568,30 @@ _slang_link(GLcontext *ctx,
_slang_update_inputs_outputs(&shProg->VertexProgram->Base); _slang_update_inputs_outputs(&shProg->VertexProgram->Base);
if (!(shProg->VertexProgram->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) { if (!(shProg->VertexProgram->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) {
/* the vertex program did not compute a vertex position */ /* the vertex program did not compute a vertex position */
if (shProg->InfoLog) { link_error(shProg,
_mesa_free(shProg->InfoLog); "gl_Position was not written by vertex shader\n");
}
shProg->InfoLog
= _mesa_strdup("gl_Position was not written by vertex shader\n");
shProg->LinkStatus = GL_FALSE;
return; return;
} }
} }
if (shProg->FragmentProgram) if (shProg->FragmentProgram)
_slang_update_inputs_outputs(&shProg->FragmentProgram->Base); _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) { if (fragProg && shProg->FragmentProgram) {
/* notify driver that a new fragment program has been compiled/linked */ /* notify driver that a new fragment program has been compiled/linked */
ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB, ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB,

View File

@@ -536,6 +536,13 @@ _swrast_update_fragment_attribs(GLcontext *ctx)
} }
} }
/* don't want to interpolate these generic attribs just yet */
/* XXX temporary */
attribsMask &= ~(FRAG_BIT_WPOS |
FRAG_BIT_COL0 |
FRAG_BIT_COL1 |
FRAG_BIT_FOGC);
/* Update _ActiveAttribs[] list */ /* Update _ActiveAttribs[] list */
{ {
GLuint i, num = 0; GLuint i, num = 0;