#else
return sin(a);
#endif
+}\r
+\r
+/** Single precision wrapper around either sin() or xf86sin() */\r
+float\r
+_mesa_sinf(float a)\r
+{\r
+#if defined(XFree86LOADER) && defined(IN_MODULE)\r
+ return (float) xf86sin((double) a);\r
+#else\r
+ return (float) sin((double) a);\r
+#endif\r
}
/** Wrapper around either cos() or xf86cos() */
_watcom_start_fast_math(&x,&mask); \
} while (0)
#endif
-#define END_FAST_MATH(x) _watcom_end_fast_math(&x)
+#define END_FAST_MATH(x) _watcom_end_fast_math(&x)\r
+\r
+#elif defined(_MSC_VER) && defined(_M_IX86)\r
+#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */\r
+#define FAST_X86_FPU 0x003f /* See GCC comments above */\r
+#if defined(NO_FAST_MATH)\r
+#define START_FAST_MATH(x) do {\\r
+ static GLuint mask = DEFAULT_X86_FPU;\\r
+ __asm fnstcw word ptr [x]\\r
+ __asm fldcw word ptr [mask]\\r
+} while(0)\r
+#else\r
+#define START_FAST_MATH(x) do {\\r
+ static GLuint mask = FAST_X86_FPU;\\r
+ __asm fnstcw word ptr [x]\\r
+ __asm fldcw word ptr [mask]\\r
+} while(0)\r
+#endif\r
+#define END_FAST_MATH(x) do {\\r
+ __asm fnclex\\r
+ __asm fldcw word ptr [x]\\r
+} while(0)\r
+
#else
#define START_FAST_MATH(x) x = 0
#define END_FAST_MATH(x) (void)(x)
_mesa_memcmp( const void *s1, const void *s2, size_t n );
extern double
-_mesa_sin(double a);
+_mesa_sin(double a);\r
+\r
+extern float\r
+_mesa_sinf(float a);
extern double
_mesa_cos(double a);
#include "glheader.h"
-#include "shaderobjects.h"
-#include "shaderobjects_3dlabs.h"
#include "context.h"
-#include "macros.h"
#include "hash.h"
+#include "shaderobjects.h"
+#include "shaderobjects_3dlabs.h"
-void GLAPIENTRY
+#define I_UNKNOWN struct gl2_unknown_intf **
+#define I_GENERIC struct gl2_generic_intf **
+#define I_CONTAINER struct gl2_container_intf **
+#define I_PROGRAM struct gl2_program_intf **
+#define I_SHADER struct gl2_shader_intf **
+
+#define RELEASE_GENERIC(x)\
+ (**x)._unknown.Release ((I_UNKNOWN) x)
+
+#define RELEASE_CONTAINER(x)\
+ (**x)._generic._unknown.Release ((I_UNKNOWN) x)
+
+#define RELEASE_PROGRAM(x)\
+ (**x)._container._generic._unknown.Release ((I_UNKNOWN) x)
+
+#define RELEASE_SHADER(x)\
+ (**x)._generic._unknown.Release ((I_UNKNOWN) x);
+
+#define _LOOKUP_HANDLE(handle, function)\
+ I_UNKNOWN unk;\
+ _glthread_LOCK_MUTEX (ctx->Shared->Mutex);\
+ unk = (I_UNKNOWN) _mesa_HashLookup (ctx->Shared->GL2Objects, handle);\
+ _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);\
+ if (unk == NULL) {\
+ _mesa_error (ctx, GL_INVALID_VALUE, function);\
+ break;\
+ }
+
+#define _QUERY_INTERFACE(x, type, uuid, function)\
+ x = (type) (**unk).QueryInterface (unk, uuid);\
+ if (x == NULL) {\
+ _mesa_error (ctx, GL_INVALID_OPERATION, function);\
+ break;\
+ }
+
+#define GET_GENERIC(x, handle, function)\
+ I_GENERIC x = NULL;\
+ do {\
+ _LOOKUP_HANDLE(handle, function);\
+ _QUERY_INTERFACE(x, I_GENERIC, UIID_GENERIC, function);\
+ } while (0)
+
+#define GET_CONTAINER(x, handle, function)\
+ I_CONTAINER x = NULL;\
+ do {\
+ _LOOKUP_HANDLE(handle, function);\
+ _QUERY_INTERFACE(x, I_CONTAINER, UIID_CONTAINER, function);\
+ } while (0)
+
+#define GET_PROGRAM(x, handle, function)\
+ I_PROGRAM x = NULL;\
+ do {\
+ _LOOKUP_HANDLE(handle, function);\
+ _QUERY_INTERFACE(x, I_PROGRAM, UIID_PROGRAM, function);\
+ } while (0)
+
+#define GET_SHADER(x, handle, function)\
+ I_SHADER x = NULL;\
+ do {\
+ _LOOKUP_HANDLE(handle, function);\
+ _QUERY_INTERFACE(x, I_SHADER, UIID_SHADER, function);\
+ } while (0)
+
+#define _LINKED_PROGRAM(x, function)\
+ if ((**x).GetLinkStatus (x) == GL_FALSE) {\
+ RELEASE_PROGRAM(x);\
+ _mesa_error (ctx, GL_INVALID_OPERATION, function);\
+ break;\
+ }
+
+#define GET_LINKED_PROGRAM(x, handle, function)\
+ I_PROGRAM x = NULL;\
+ do {\
+ _LOOKUP_HANDLE(handle, function);\
+ _QUERY_INTERFACE(x, I_PROGRAM, UIID_PROGRAM, function);\
+ _LINKED_PROGRAM(x, function);\
+ } while (0)
+
+#define _CURRENT_PROGRAM(x, function)\
+ if (ctx->ShaderObjects.CurrentProgram == NULL) {\
+ _mesa_error (ctx, GL_INVALID_OPERATION, function);\
+ break;\
+ }\
+ x = ctx->ShaderObjects.CurrentProgram;
+
+#define GET_CURRENT_LINKED_PROGRAM(x, function)\
+ I_PROGRAM x = NULL;\
+ do {\
+ _CURRENT_PROGRAM(x, function);\
+ _LINKED_PROGRAM(x, function);\
+ } while (0)
+
+
+GLvoid GLAPIENTRY
_mesa_DeleteObjectARB (GLhandleARB obj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_generic_intf **gen;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, obj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
+ GET_GENERIC(gen, obj, "glDeleteObjectARB");
- if (unk == NULL)
+ if (gen != NULL)
{
- _mesa_error (ctx, GL_INVALID_VALUE, "glDeleteObjectARB");
- return;
+ (**gen).Delete (gen);
+ RELEASE_GENERIC(gen);
}
-
- gen = (struct gl2_generic_intf **) (**unk).QueryInterface (unk, UIID_GENERIC);
- if (gen == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glDeleteObjectARB");
- return;
- }
-
- (**gen).Delete (gen);
- (**gen)._unknown.Release ((struct gl2_unknown_intf **) gen);
}
GLhandleARB GLAPIENTRY
switch (pname)
{
case GL_PROGRAM_OBJECT_ARB:
- if (ctx->ShaderObjects.CurrentProgram != NULL)
- return (**ctx->ShaderObjects.CurrentProgram)._container._generic.GetName (
- (struct gl2_generic_intf **) ctx->ShaderObjects.CurrentProgram);
+ {
+ I_PROGRAM pro = ctx->ShaderObjects.CurrentProgram;
+
+ if (pro != NULL)
+ return (**pro)._container._generic.GetName ((I_GENERIC) pro);
+ }
break;
+ default:
+ _mesa_error (ctx, GL_INVALID_ENUM, "glGetHandleARB");
}
return 0;
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_DetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unkc, **unka;
- struct gl2_container_intf **con;
- struct gl2_generic_intf **att;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unkc = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, containerObj);
- unka = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, attachedObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
+ GET_CONTAINER(con, containerObj, "glDetachObjectARB");
- if (unkc == NULL || unka == NULL)
+ if (con != NULL)
{
- _mesa_error (ctx, GL_INVALID_VALUE, "glDetachObjectARB");
- return;
- }
+ GET_GENERIC(att, attachedObj, "glDetachObjectARB");
- con = (struct gl2_container_intf **) (**unkc).QueryInterface (unkc, UIID_CONTAINER);
- if (con == NULL)
- {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glDetachObjectARB");
- return;
- }
-
- att = (struct gl2_generic_intf **) (**unka).QueryInterface (unka, UIID_GENERIC);
- if (att == NULL)
- {
- (**con)._generic._unknown.Release ((struct gl2_unknown_intf **) con);
- _mesa_error (ctx, GL_INVALID_VALUE, "glDetachObjectARB");
- return;
- }
-
- if ((**con).Detach (con, att) == GL_FALSE)
- {
- (**con)._generic._unknown.Release ((struct gl2_unknown_intf **) con);
- (**att)._unknown.Release ((struct gl2_unknown_intf **) att);
- return;
+ if (att != NULL)
+ {
+ (**con).Detach (con, att);
+ RELEASE_GENERIC(att);
+ }
+ RELEASE_CONTAINER(con);
}
-
- (**con)._generic._unknown.Release ((struct gl2_unknown_intf **) con);
- (**att)._unknown.Release ((struct gl2_unknown_intf **) att);
}
GLhandleARB GLAPIENTRY
return _mesa_3dlabs_create_shader_object (shaderType);
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_ShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string,
const GLint *length)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_shader_intf **sha;
GLint *offsets;
GLsizei i;
GLcharARB *source;
+ GET_SHADER(sha, shaderObj, "glShaderSourceARB");
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, shaderObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glShaderSourceARB");
- return;
- }
-
- sha = (struct gl2_shader_intf **) (**unk).QueryInterface (unk, UIID_SHADER);
if (sha == NULL)
- {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glShaderSourceARB");
return;
- }
- /* this array holds offsets of where the appropriate string ends, thus the last
- element will be set to the total length of the source code */
+ /*
+ * This array holds offsets of where the appropriate string ends, thus the last
+ * element will be set to the total length of the source code.
+ */
offsets = (GLint *) _mesa_malloc (count * sizeof (GLint));
if (offsets == NULL)
{
- (**sha)._generic._unknown.Release ((struct gl2_unknown_intf **) sha);
+ RELEASE_SHADER(sha);
_mesa_error (ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
return;
}
source = (GLcharARB *) _mesa_malloc ((offsets[count - 1] + 1) * sizeof (GLcharARB));
if (source == NULL)
{
- _mesa_free ((void *) offsets);
- (**sha)._generic._unknown.Release ((struct gl2_unknown_intf **) sha);
+ _mesa_free ((GLvoid *) offsets);
+ RELEASE_SHADER(sha);
_mesa_error (ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
return;
}
source[offsets[count - 1]] = '\0';
(**sha).SetSource (sha, source, offsets, count);
- (**sha)._generic._unknown.Release ((struct gl2_unknown_intf **) sha);
+ RELEASE_SHADER(sha);
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_CompileShaderARB (GLhandleARB shaderObj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_shader_intf **sha;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, shaderObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glCompileShaderARB");
- return;
- }
+ GET_SHADER(sha, shaderObj, "glCompileShaderARB");
- sha = (struct gl2_shader_intf **) (**unk).QueryInterface (unk, UIID_SHADER);
- if (sha == NULL)
+ if (sha != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glCompileShaderARB");
- return;
+ (**sha).Compile (sha);
+ RELEASE_SHADER(sha);
}
-
- (**sha).Compile (sha);
- (**sha)._generic._unknown.Release ((struct gl2_unknown_intf **) sha);
}
GLhandleARB GLAPIENTRY
-_mesa_CreateProgramObjectARB (void)
+_mesa_CreateProgramObjectARB (GLvoid)
{
return _mesa_3dlabs_create_program_object ();
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_AttachObjectARB (GLhandleARB containerObj, GLhandleARB obj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unkc, **unka;
- struct gl2_container_intf **con;
- struct gl2_generic_intf **att;
+ GET_CONTAINER(con, containerObj, "glAttachObjectARB");
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unkc = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, containerObj);
- unka = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, obj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unkc == NULL || unka == NULL)
+ if (con != NULL)
{
- _mesa_error (ctx, GL_INVALID_VALUE, "glAttachObjectARB");
- return;
- }
+ GET_GENERIC(att, obj, "glAttachObjectARB");
- con = (struct gl2_container_intf **) (**unkc).QueryInterface (unkc, UIID_CONTAINER);
- if (con == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glAttachObjectARB");
- return;
- }
-
- att = (struct gl2_generic_intf **) (**unka).QueryInterface (unka, UIID_GENERIC);
- if (att == NULL)
- {
- (**con)._generic._unknown.Release ((struct gl2_unknown_intf **) con);
- _mesa_error (ctx, GL_INVALID_VALUE, "glAttachObjectARB");
- return;
- }
-
- if (!(**con).Attach (con, att))
- {
- (**con)._generic._unknown.Release ((struct gl2_unknown_intf **) con);
- (**att)._unknown.Release ((struct gl2_unknown_intf **) att);
- return;
+ if (att != NULL)
+ {
+ (**con).Attach (con, att);
+ RELEASE_GENERIC(att);
+ }
+ RELEASE_CONTAINER(con);
}
-
- (**con)._generic._unknown.Release ((struct gl2_unknown_intf **) con);
- (**att)._unknown.Release ((struct gl2_unknown_intf **) att);
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_LinkProgramARB (GLhandleARB programObj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glLinkProgramARB");
- return;
- }
-
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
- {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glLinkProgramARB");
- return;
- }
+ GET_PROGRAM(pro, programObj, "glLinkProgramARB");
- if (pro == ctx->ShaderObjects.CurrentProgram)
+ if (pro != NULL)
{
- /* TODO re-install executable program */
+ if (pro == ctx->ShaderObjects.CurrentProgram)
+ {
+ /* TODO re-install executable program */
+ }
+ (**pro).Link (pro);
+ RELEASE_PROGRAM(pro);
}
-
- (**pro).Link (pro);
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_UseProgramObjectARB (GLhandleARB programObj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_program_intf **pro;\r
-\r
+ I_PROGRAM program = NULL;
+
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- if (programObj == 0)
+ if (programObj != 0)
{
- pro = NULL;
- }
- else
- {
- struct gl2_unknown_intf **unk;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glUseProgramObjectARB");
- return;
- }
+ GET_PROGRAM(pro, programObj, "glUseProgramObjectARB");
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
if (pro == NULL)
- {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB");
return;
- }
if ((**pro).GetLinkStatus (pro) == GL_FALSE)
{
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
+ RELEASE_PROGRAM(pro);
_mesa_error (ctx, GL_INVALID_OPERATION, "glUseProgramObjectARB");
return;
}
- }
- if (ctx->ShaderObjects.CurrentProgram != NULL)
- {
- (**ctx->ShaderObjects.CurrentProgram)._container._generic._unknown.Release (
- (struct gl2_unknown_intf **) ctx->ShaderObjects.CurrentProgram);
+ program = pro;
}
- ctx->ShaderObjects.CurrentProgram = pro;
+ if (ctx->ShaderObjects.CurrentProgram != NULL)
+ RELEASE_PROGRAM(ctx->ShaderObjects.CurrentProgram);
+ ctx->ShaderObjects.CurrentProgram = program;
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_ValidateProgramARB (GLhandleARB programObj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
+ GET_PROGRAM(pro, programObj, "glValidateProgramARB");
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glValidateProgramARB");
- return;
- }
-
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glValidateProgramARB");
- return;
+ (**pro).Validate (pro);
+ RELEASE_PROGRAM(pro);
}
-
- (**pro).Validate (pro);
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
}
/*
Uniform1i{v}ARB is used to load a sampler value.
-*/\r
-\r
-#define _RELEASE_PROGRAM(obj)\\r
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro)\r
-\r
-#define _LOOKUP_PROGRAM(obj, function)\\r
- struct gl2_unknown_intf **unk;\\r
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);\\r
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, obj);\\r
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);\\r
- if (unk == NULL) {\\r
- _mesa_error (ctx, GL_INVALID_VALUE, function);\\r
- break;\\r
- }\\r
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);\\r
- if (pro == NULL) {\\r
- _mesa_error (ctx, GL_INVALID_OPERATION, function);\\r
- break;\\r
- }\r
-\r
-#define _CURRENT_PROGRAM(function)\\r
- if (ctx->ShaderObjects.CurrentProgram == NULL) {\\r
- _mesa_error (ctx, GL_INVALID_OPERATION, function);\\r
- break;\\r
- }\\r
- pro = ctx->ShaderObjects.CurrentProgram;\r
-\r
-#define _IS_LINKED(function)\\r
- if ((**pro).GetLinkStatus (pro) == GL_FALSE) {\\r
- _mesa_error (ctx, GL_INVALID_OPERATION, function);\\r
- _RELEASE_PROGRAM(obj);\\r
- break;\\r
- }\r
-\r
-#define GET_PROGRAM(obj, function)\\r
- struct gl2_program_intf **pro = NULL;\\r
- do {\\r
- _LOOKUP_PROGRAM(obj, function);\\r
- } while (0)\r
-\r
-#define GET_LINKED_PROGRAM(obj, function)\\r
- struct gl2_program_intf **pro = NULL;\\r
- do {\\r
- _LOOKUP_PROGRAM(obj, function);\\r
- _IS_LINKED(function);\\r
- } while (0)\r
-\r
-#define CURRENT_LINKED_PROGRAM(function)\\r
- struct gl2_program_intf **pro = NULL;\\r
- do {\\r
- _CURRENT_PROGRAM(function);\\r
- _IS_LINKED(function);\\r
- } while (0)\r
-\r
-/* XXX */\r
-GLboolean _slang_write_uniform (struct gl2_program_intf **, GLint, GLsizei, const GLvoid *, GLenum);\r
-\r
-void GLAPIENTRY
+*/
+
+GLvoid GLAPIENTRY
_mesa_Uniform1fARB (GLint location, GLfloat v0)
-{\r
- GET_CURRENT_CONTEXT(ctx);\r
- CURRENT_LINKED_PROGRAM("glUniform1fARB");\r
-\r
- if (!_slang_write_uniform (pro, location, 1, &v0, GL_FLOAT))\r
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1fARB");
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fARB");
+
+ if (pro != NULL)
+ {
+ if (!_slang_write_uniform (pro, location, 1, &v0, GL_FLOAT))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1fARB");
+ }
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform2fARB (GLint location, GLfloat v0, GLfloat v1)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2fARB");
- return;
+ GLfloat v[2] = { v0, v1 };
+
+ if (!_slang_write_uniform (pro, location, 1, v, GL_FLOAT_VEC2))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2fARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3fARB");
- return;
+ GLfloat v[3] = { v0, v1, v2 };
+
+ if (!_slang_write_uniform (pro, location, 1, v, GL_FLOAT_VEC3))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3fARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4fARB");
- return;
+ GLfloat v[4] = { v0, v1, v2, v3 };
+
+ if (!_slang_write_uniform (pro, location, 1, v, GL_FLOAT_VEC4))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4fARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform1iARB (GLint location, GLint v0)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1iARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1iARB");
- return;
+ if (!_slang_write_uniform (pro, location, 1, &v0, GL_INT))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1iARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform2iARB (GLint location, GLint v0, GLint v1)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2iARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2iARB");
- return;
+ GLint v[2] = { v0, v1 };
+
+ if (!_slang_write_uniform (pro, location, 1, v, GL_INT_VEC2))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2iARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform3iARB (GLint location, GLint v0, GLint v1, GLint v2)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3iARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3iARB");
- return;
+ GLint v[3] = { v0, v1, v2 };
+
+ if (!_slang_write_uniform (pro, location, 1, v, GL_INT_VEC3))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3iARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4iARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4iARB");
- return;
+ GLint v[4] = { v0, v1, v2, v3 };
+
+ if (!_slang_write_uniform (pro, location, 1, v, GL_INT_VEC4))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4iARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform1fvARB (GLint location, GLsizei count, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1fvARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1fvARB");
- return;
+ if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1fvARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform2fvARB (GLint location, GLsizei count, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2fvARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2fvARB");
- return;
+ if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT_VEC2))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2fvARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform3fvARB (GLint location, GLsizei count, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3fvARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3fvARB");
- return;
+ if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT_VEC3))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3fvARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform4fvARB (GLint location, GLsizei count, const GLfloat *value)
{
- GET_CURRENT_CONTEXT(ctx);\r
- CURRENT_LINKED_PROGRAM("glUniform4fvARB");
+ GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4fvARB");
- if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT_VEC4_ARB))\r
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4fvARB");
+ if (pro != NULL)
+ {
+ if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT_VEC4))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4fvARB");
+ }
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform1ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform1ivARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1ivARB");
- return;
+ if (!_slang_write_uniform (pro, location, count, value, GL_INT))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform1ivARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform2ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform2ivARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2ivARB");
- return;
+ if (!_slang_write_uniform (pro, location, count, value, GL_INT_VEC2))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform2ivARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform3ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform3ivARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3ivARB");
- return;
+ if (!_slang_write_uniform (pro, location, count, value, GL_INT_VEC3))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform3ivARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_Uniform4ivARB (GLint location, GLsizei count, const GLint *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniform4ivARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4ivARB");
- return;
+ if (!_slang_write_uniform (pro, location, count, value, GL_INT_VEC4))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniform4ivARB");
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_UniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix2fvARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB");
- return;
+ if (transpose)
+ {
+ GLfloat *trans, *pt;
+ const GLfloat *pv;
+
+ trans = (GLfloat *) _mesa_malloc (count * 4 * sizeof (GLfloat));
+ if (trans == NULL)
+ {
+ _mesa_error (ctx, GL_OUT_OF_MEMORY, "glUniformMatrix2fvARB");
+ return;
+ }
+ for (pt = trans, pv = value; pt != trans + count * 4; pt += 4, pv += 4)
+ {
+ pt[0] = pv[0];
+ pt[1] = pv[2];
+ pt[2] = pv[1];
+ pt[3] = pv[3];
+ }
+ if (!_slang_write_uniform (pro, location, count, trans, GL_FLOAT_MAT2))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB");
+ _mesa_free (trans);
+ }
+ else
+ {
+ if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT_MAT2))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix2fvARB");
+ }
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_UniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix3fvARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB");
- return;
+ if (transpose)
+ {
+ GLfloat *trans, *pt;
+ const GLfloat *pv;
+
+ trans = (GLfloat *) _mesa_malloc (count * 9 * sizeof (GLfloat));
+ if (trans == NULL)
+ {
+ _mesa_error (ctx, GL_OUT_OF_MEMORY, "glUniformMatrix3fvARB");
+ return;
+ }
+ for (pt = trans, pv = value; pt != trans + count * 9; pt += 9, pv += 9)
+ {
+ pt[0] = pv[0];
+ pt[1] = pv[3];
+ pt[2] = pv[6];
+ pt[3] = pv[1];
+ pt[4] = pv[4];
+ pt[5] = pv[7];
+ pt[6] = pv[2];
+ pt[7] = pv[5];
+ pt[8] = pv[8];
+ }
+ if (!_slang_write_uniform (pro, location, count, trans, GL_FLOAT_MAT3))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB");
+ _mesa_free (trans);
+ }
+ else
+ {
+ if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT_MAT3))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix3fvARB");
+ }
}
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_UniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
+ GET_CURRENT_LINKED_PROGRAM(pro, "glUniformMatrix4fvARB");
- if (ctx->ShaderObjects.CurrentProgram == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB");
- return;
+ if (transpose)
+ {
+ GLfloat *trans, *pt;
+ const GLfloat *pv;
+
+ trans = (GLfloat *) _mesa_malloc (count * 16 * sizeof (GLfloat));
+ if (trans == NULL)
+ {
+ _mesa_error (ctx, GL_OUT_OF_MEMORY, "glUniformMatrix4fvARB");
+ return;
+ }
+ for (pt = trans, pv = value; pt != trans + count * 16; pt += 16, pv += 16)
+ {
+ _math_transposef (pt, pv);
+ }
+ if (!_slang_write_uniform (pro, location, count, trans, GL_FLOAT_MAT4))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB");
+ _mesa_free (trans);
+ }
+ else
+ {
+ if (!_slang_write_uniform (pro, location, count, value, GL_FLOAT_MAT4))
+ _mesa_error (ctx, GL_INVALID_OPERATION, "glUniformMatrix4fvARB");
+ }
}
}
GLint *size)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_generic_intf **gen;
- struct gl2_shader_intf **sha;
- struct gl2_program_intf **pro;
GLint *ipar = (GLint *) params;
- /*GLfloat *fpar = (GLfloat *) params;*/
- GLboolean success = GL_TRUE;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, obj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB");
- return GL_FALSE;
- }
-
- gen = (struct gl2_generic_intf **) (**unk).QueryInterface (unk, UIID_GENERIC);
- if (gen == NULL)
- {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- return GL_FALSE;
- }
-
- sha = (struct gl2_shader_intf **) (**unk).QueryInterface (unk, UIID_SHADER);
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
/* set default values */
*integral = GL_TRUE; /* indicates param type, TRUE: GLint, FALSE: GLfloat */
- *size = 1; /* param array size */
+ *size = 1; /* param array size */
switch (pname)
{
case GL_OBJECT_TYPE_ARB:
- *ipar = (**gen).GetType (gen);
- break;
- case GL_OBJECT_SUBTYPE_ARB:
- if (sha != NULL)
- *ipar = (**sha).GetSubType (sha);
- else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
- }
- break;
case GL_OBJECT_DELETE_STATUS_ARB:
- *ipar = (**gen).GetDeleteStatus (gen);
+ case GL_OBJECT_INFO_LOG_LENGTH_ARB:
+ {
+ GET_GENERIC(gen, obj, "glGetObjectParameterivARB");
+
+ if (gen == NULL)
+ return GL_FALSE;
+
+ switch (pname)
+ {
+ case GL_OBJECT_TYPE_ARB:
+ *ipar = (**gen).GetType (gen);
+ break;
+ case GL_OBJECT_DELETE_STATUS_ARB:
+ *ipar = (**gen).GetDeleteStatus (gen);
+ break;
+ case GL_OBJECT_INFO_LOG_LENGTH_ARB:
+ {
+ const GLcharARB *info = (**gen).GetInfoLog (gen);
+
+ if (info == NULL)
+ *ipar = 0;
+ else
+ *ipar = _mesa_strlen (info) + 1;
+ }
+ break;
+ }
+
+ RELEASE_GENERIC(gen);
+ }
break;
+ case GL_OBJECT_SUBTYPE_ARB:
case GL_OBJECT_COMPILE_STATUS_ARB:
- if (sha != NULL)
- *ipar = (**sha).GetCompileStatus (sha);
- else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
+ case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB:
+ {
+ GET_SHADER(sha, obj, "glGetObjectParameterivARB");
+
+ if (sha == NULL)
+ return GL_FALSE;
+
+ switch (pname)
+ {
+ case GL_OBJECT_SUBTYPE_ARB:
+ *ipar = (**sha).GetSubType (sha);
+ break;
+ case GL_OBJECT_COMPILE_STATUS_ARB:
+ *ipar = (**sha).GetCompileStatus (sha);
+ break;
+ case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB:
+ {
+ const GLcharARB *src = (**sha).GetSource (sha);
+
+ if (src == NULL)
+ *ipar = 0;
+ else
+ *ipar = _mesa_strlen (src) + 1;
+ }
+ break;
+ }
+
+ RELEASE_SHADER(sha);
}
break;
case GL_OBJECT_LINK_STATUS_ARB:
- if (pro != NULL)
- *ipar = (**pro).GetLinkStatus (pro);
- else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
- }
- break;
case GL_OBJECT_VALIDATE_STATUS_ARB:
- if (pro != NULL)
- *ipar = (**pro).GetValidateStatus (pro);
- else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
- }
- break;
- case GL_OBJECT_INFO_LOG_LENGTH_ARB:
- {
- const GLcharARB *info = (**gen).GetInfoLog (gen);
- if (info == NULL)
- *ipar = 0;
- else
- *ipar = _mesa_strlen (info) + 1;
- }
- break;
case GL_OBJECT_ATTACHED_OBJECTS_ARB:
- if (pro != NULL)
- *ipar = (**pro)._container.GetAttachedCount ((struct gl2_container_intf **) pro);
- else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
- }
- break;
case GL_OBJECT_ACTIVE_UNIFORMS_ARB:
- if (pro != NULL)
- *ipar = 0; /* TODO */
- else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
- }
- break;
case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB:
- if (pro != NULL)
- *ipar = 0; /* TODO */
- else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
- }
- break;
- case GL_OBJECT_SHADER_SOURCE_LENGTH_ARB:
- if (sha != NULL) {
- const GLcharARB *src = (**sha).GetSource (sha);
- if (src == NULL)
- *ipar = 0;
- else
- *ipar = _mesa_strlen (src) + 1;
- } else {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
- success = GL_FALSE;
+ {
+ GET_PROGRAM(pro, obj, "glGetObjectParameterivARB");
+
+ if (pro == NULL)
+ return GL_FALSE;
+
+ switch (pname)
+ {
+ case GL_OBJECT_LINK_STATUS_ARB:
+ *ipar = (**pro).GetLinkStatus (pro);
+ break;
+ case GL_OBJECT_VALIDATE_STATUS_ARB:
+ *ipar = (**pro).GetValidateStatus (pro);
+ break;
+ case GL_OBJECT_ATTACHED_OBJECTS_ARB:
+ *ipar = (**pro)._container.GetAttachedCount ((I_CONTAINER) pro);
+ break;
+ case GL_OBJECT_ACTIVE_UNIFORMS_ARB:
+ *ipar = _slang_get_active_uniform_count (pro);
+ break;
+ case GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB:
+ *ipar = _slang_get_active_uniform_max_length (pro);
+ break;
+ }
+
+ RELEASE_PROGRAM(pro);
}
break;
default:
_mesa_error (ctx, GL_INVALID_ENUM, "glGetObjectParameterivARB");
- success = GL_FALSE;
- break;
+ return GL_FALSE;
}
- (**gen)._unknown.Release ((struct gl2_unknown_intf **) gen);
- if (sha != NULL)
- (**sha)._generic._unknown.Release ((struct gl2_unknown_intf **) sha);
- if (pro != NULL)
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
-
- return success;
+ return GL_TRUE;
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_GetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params)
{
GLboolean integral;
- GLint size, i;
+ GLint size;
assert (sizeof (GLfloat) == sizeof (GLint));
- if (_mesa_get_object_parameter (obj, pname, (GLvoid *) params, &integral, &size) != GL_FALSE)
- if (integral != GL_FALSE)
+ if (_mesa_get_object_parameter (obj, pname, (GLvoid *) params, &integral, &size))
+ if (integral)
+ {
+ GLint i;
+
for (i = 0; i < size; i++)
params[i] = (GLfloat) ((GLint *) params)[i];
+ }
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_GetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params)
{
GLboolean integral;
- GLint size, i;
+ GLint size;
assert (sizeof (GLfloat) == sizeof (GLint));
- if (_mesa_get_object_parameter (obj, pname, (GLvoid *) params, &integral, &size) != GL_FALSE)
- if (integral == GL_FALSE)
+ if (_mesa_get_object_parameter (obj, pname, (GLvoid *) params, &integral, &size))
+ if (!integral)
+ {
+ GLint i;
+
for (i = 0; i < size; i++)
params[i] = (GLint) ((GLfloat *) params)[i];
+ }
}
-static void
+static GLvoid
_mesa_get_string (const GLcharARB *src, GLsizei maxLength, GLsizei *length, GLcharARB *str)
{
GLsizei len;
+ if (maxLength == 0)
+ {
+ if (length != NULL)
+ *length = 0;
+ return;
+ }
+
if (src == NULL)
src = "";
len = _mesa_strlen (src);
- if (len > maxLength)
- {
- len = maxLength;
- /* allocate space for null termination */
- if (len > 0)
- len--;
- }
+ if (len >= maxLength)
+ len = maxLength - 1;
_mesa_memcpy (str, src, len * sizeof (GLcharARB));
- if (maxLength > 0)
- str[len] = '\0';
-
+ str[len] = '\0';
if (length != NULL)
*length = len;
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_GetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_generic_intf **gen;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, obj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetInfoLogARB");
- return;
- }
+ GET_GENERIC(gen, obj, "glGetInfoLogARB");
- gen = (struct gl2_generic_intf **) (**unk).QueryInterface (unk, UIID_GENERIC);
- if (gen == NULL)
+ if (gen != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetInfoLogARB");
- return;
+ _mesa_get_string ((**gen).GetInfoLog (gen), maxLength, length, infoLog);
+ RELEASE_GENERIC(gen);
}
-
- _mesa_get_string ((**gen).GetInfoLog (gen), maxLength, length, infoLog);
-
- (**gen)._unknown.Release ((struct gl2_unknown_intf **) gen);
}
-void GLAPIENTRY
-_mesa_GetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj)
+GLvoid GLAPIENTRY
+_mesa_GetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count,
+ GLhandleARB *obj)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_container_intf **con;
GLsizei cnt, i;
+ GET_CONTAINER(con, containerObj, "glGetAttachedObjectsARB");
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, containerObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetAttachedObjectsARB");
- return;
- }
-
- con = (struct gl2_container_intf **) (**unk).QueryInterface (unk, UIID_CONTAINER);
- if (con == NULL)
+ if (con != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetAttachedObjectsARB");
- return;
- }
+ cnt = (**con).GetAttachedCount (con);
+ if (cnt > maxCount)
+ cnt = maxCount;
+ if (count != NULL)
+ *count = cnt;
- cnt = (**con).GetAttachedCount (con);
- if (cnt > maxCount)
- cnt = maxCount;
-
- for (i = 0; i < cnt; i++)
- {
- struct gl2_generic_intf **x = (**con).GetAttached (con, i);
- obj[i] = (**x).GetName (x);
- (**x)._unknown.Release ((struct gl2_unknown_intf **) x);
+ for (i = 0; i < cnt; i++)
+ {
+ I_GENERIC x = (**con).GetAttached (con, i);
+ obj[i] = (**x).GetName (x);
+ RELEASE_GENERIC(x);
+ }
+ RELEASE_CONTAINER(con);
}
-
- (**con)._generic._unknown.Release ((struct gl2_unknown_intf **) con);
-
- if (count != NULL)
- *count = cnt;
-}\r
-\r
-/* XXX */\r
-GLint _slang_get_uniform_location (struct gl2_program_intf **, const char *);
+}
GLint GLAPIENTRY
_mesa_GetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name)
{
- GET_CURRENT_CONTEXT(ctx);\r
+ GET_CURRENT_CONTEXT(ctx);
GLint loc = -1;
- GET_LINKED_PROGRAM(programObj, "glGetUniformLocationARB");
-
- if (pro == NULL)\r
- return -1;
+ GET_LINKED_PROGRAM(pro, programObj, "glGetUniformLocationARB");
- loc = _slang_get_uniform_location (pro, name);
- _RELEASE_PROGRAM(pro);
+ if (pro != NULL)
+ {
+ if (name != NULL && (name[0] != 'g' || name[1] != 'l' || name[2] != '_'))
+ loc = _slang_get_uniform_location (pro, name);
+ RELEASE_PROGRAM(pro);
+ }
return loc;
}
-void GLAPIENTRY
-_mesa_GetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+GLvoid GLAPIENTRY
+_mesa_GetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length,
+ GLint *size, GLenum *type, GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
+ GET_PROGRAM(pro, programObj, "glGetActiveUniformARB");
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveUniformARB");
- return;
- }
-
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetActiveUniformARB");
- return;
+ if (index < _slang_get_active_uniform_count (pro))
+ _slang_get_active_uniform (pro, index, maxLength, length, size, type, name);
+ else
+ _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveUniformARB");
+ RELEASE_PROGRAM(pro);
}
-
-/* if (index >= val (OBJECT_ACTIVE_ATTRIBUTES_ARB))
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveUniformARB");
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
- return;
- }*/
-
- /* TODO */
-
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_GetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetUniformfvARB");
- return;
- }
+ GET_LINKED_PROGRAM(pro, programObj, "glGetUniformfvARB");
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
- {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetUniformfvARB");
- return;
- }
-
- if ((**pro).GetLinkStatus (pro) == GL_FALSE)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetUniformfvARB");
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
- return;
+ /* TODO */
+ RELEASE_PROGRAM(pro);
}
-
- /* TODO validate location (OPERATION) */
-
- /* TODO */
-
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_GetUniformivARB (GLhandleARB programObj, GLint location, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetUniformivARB");
- return;
- }
-
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
- {
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetUniformivARB");
- return;
- }
+ GET_LINKED_PROGRAM(pro, programObj, "glGetUniformivARB");
- if ((**pro).GetLinkStatus (pro) == GL_FALSE)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetUniformivARB");
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
- return;
+ /* TODO */
+ RELEASE_PROGRAM(pro);
}
-
- /* TODO validate location (GL_INVALID_OPERATION) */
-
- /* TODO */
-
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
}
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_GetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_shader_intf **sha;
+ GET_SHADER(sha, obj, "glGetShaderSourceARB");
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, obj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetShaderSourceARB");
- return;
- }
-
- sha = (struct gl2_shader_intf **) (**unk).QueryInterface (unk, UIID_SHADER);
- if (sha == NULL)
+ if (sha != NULL)
{
- _mesa_error (ctx, GL_INVALID_OPERATION, "glGetShaderSourceARB");
- return;
+ _mesa_get_string ((**sha).GetSource (sha), maxLength, length, source);
+ RELEASE_SHADER(sha);
}
-
- _mesa_get_string ((**sha).GetSource (sha), maxLength, length, source);
-
- (**sha)._generic._unknown.Release ((struct gl2_unknown_intf **) sha);
}
/* GL_ARB_vertex_shader */
-void GLAPIENTRY
+GLvoid GLAPIENTRY
_mesa_BindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
+ GET_PROGRAM(pro, programObj, "glBindAttribLocationARB");
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glBindAttribLocationARB");
- return;
- }
-
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_VALUE, "glBindAttribLocationARB");
- return;
+ if (name != NULL && (name[0] != 'g' || name[1] != 'l' || name[2] != '_'))
+ {
+ /* TODO */
+ }
+ RELEASE_PROGRAM(pro);
}
-
- /* TODO */
-
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
}
-void GLAPIENTRY
-_mesa_GetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)
+GLvoid GLAPIENTRY
+_mesa_GetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length,
+ GLint *size, GLenum *type, GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveAttribARB");
- return;
- }
+ GET_PROGRAM(pro, programObj, "glGetActiveAttribARB");
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetActiveAttribARB");
- return;
+ /* TODO */
+ RELEASE_PROGRAM(pro);
}
-
- /* TODO */
-
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
}
GLint GLAPIENTRY
_mesa_GetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl2_unknown_intf **unk;
- struct gl2_program_intf **pro;
- GLint loc = 0;
-
- _glthread_LOCK_MUTEX (ctx->Shared->Mutex);
- unk = (struct gl2_unknown_intf **) _mesa_HashLookup (ctx->Shared->GL2Objects, programObj);
- _glthread_UNLOCK_MUTEX (ctx->Shared->Mutex);
-
- if (unk == NULL)
- {
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetAttribLocationARB");
- return 0;
- }
+ GLint loc = -1;
+ GET_PROGRAM(pro, programObj, "glGetAttribLocationARB");
- pro = (struct gl2_program_intf **) (**unk).QueryInterface (unk, UIID_PROGRAM);
- if (pro == NULL)
+ if (pro != NULL)
{
- _mesa_error (ctx, GL_INVALID_VALUE, "glGetAttribLocationARB");
- return 0;
+ if (name != NULL && (name[0] != 'g' || name[1] != 'l' || name[2] != '_'))
+ {
+ /* TODO */
+ }
+ RELEASE_PROGRAM(pro);
}
-
- /* TODO */
-
- (**pro)._container._generic._unknown.Release ((struct gl2_unknown_intf **) pro);
return loc;
}
-void
+GLvoid
_mesa_init_shaderobjects (GLcontext *ctx)
{
ctx->ShaderObjects.CurrentProgram = NULL;
#ifndef SHADEROBJECTS_H
#define SHADEROBJECTS_H
-#include "mtypes.h"
+#include "context.h"
/**
* gl2 unique interface identifier.
GLboolean (* GetLinkStatus) (struct gl2_program_intf **);
GLboolean (* GetValidateStatus) (struct gl2_program_intf **);
GLvoid (* Link) (struct gl2_program_intf **);
- GLvoid (* Validate) (struct gl2_program_intf **);
+ GLvoid (* Validate) (struct gl2_program_intf **);\r
+ GLvoid (* UpdateFixedUniforms) (struct gl2_program_intf **);\r
+ GLvoid (* UpdateFixedAttribute) (struct gl2_program_intf **, GLuint, GLvoid *, GLuint, GLuint,\r
+ GLboolean);\r
+ GLvoid (* UpdateFixedVarying) (struct gl2_program_intf **, GLuint, GLvoid *, GLuint, GLuint,\r
+ GLboolean);
};
struct gl2_fragment_shader_intf
/* Set this to 1 when we are ready to use 3dlabs' front-end */\r
#define USE_3DLABS_FRONTEND 0\r
\r
-#include "glheader.h"\r
-#include "shaderobjects.h"\r
-#include "shaderobjects_3dlabs.h"\r
-#include "context.h"\r
-#include "macros.h"\r
+#include "imports.h"\r
#include "hash.h"\r
+#include "shaderobjects.h"\r
\r
#if USE_3DLABS_FRONTEND\r
#include "slang_mesa.h"\r
#include "Public/ShaderLang.h"\r
#else\r
-#include "slang_utility.h"\r
-#include "slang_compile.h"\r
#include "slang_link.h"\r
#endif\r
\r
/* TODO validate */\r
}\r
\r
+static GLvoid\r
+write_common_fixed (slang_program *pro, GLuint index, const GLvoid *src, GLuint off, GLuint size)\r
+{\r
+ GLuint i;\r
+\r
+ for (i = 0; i < SLANG_UNIFORM_BINDING_MAX; i++)\r
+ {\r
+ GLuint addr;\r
+\r
+ addr = pro->common_fixed_entries[i][index];\r
+ if (addr != ~0)\r
+ {\r
+ GLubyte *dst;\r
+\r
+ dst = (GLubyte *) pro->machines[i]->mem + addr + off * size;\r
+ _mesa_memcpy (dst, src, size);\r
+ }\r
+ }\r
+}\r
+\r
+static GLvoid\r
+write_common_fixed_mat4 (slang_program *pro, GLmatrix *matrix, GLuint off, GLuint i, GLuint ii,\r
+ GLuint it, GLuint iit)\r
+{\r
+ GLfloat mat[16];\r
+\r
+ /* we want inverse matrix */\r
+ if (!matrix->inv)\r
+ {\r
+ /* allocate inverse matrix and make it dirty */\r
+ _math_matrix_alloc_inv (matrix);\r
+ _math_matrix_loadf (matrix, matrix->m);\r
+ }\r
+ _math_matrix_analyse (matrix);\r
+\r
+ write_common_fixed (pro, i, matrix->m, off, 16 * sizeof (GLfloat));\r
+\r
+ /* inverse */\r
+ write_common_fixed (pro, ii, matrix->inv, off, 16 * sizeof (GLfloat));\r
+\r
+ /* transpose */\r
+ _math_transposef (mat, matrix->m);\r
+ write_common_fixed (pro, it, mat, off, 16 * sizeof (GLfloat));\r
+\r
+ /* inverse transpose */\r
+ _math_transposef (mat, matrix->inv);\r
+ write_common_fixed (pro, iit, mat, off, 16 * sizeof (GLfloat));\r
+}\r
+\r
+static GLvoid\r
+_program_UpdateFixedUniforms (struct gl2_program_intf **intf)\r
+{\r
+ GET_CURRENT_CONTEXT(ctx);\r
+ struct gl2_program_impl *impl = (struct gl2_program_impl *) intf;\r
+ slang_program *pro = &impl->_obj.prog;\r
+ GLuint i;\r
+ GLfloat v[9];\r
+ GLfloat *p;\r
+\r
+ /* MODELVIEW matrix */\r
+ write_common_fixed_mat4 (pro, ctx->ModelviewMatrixStack.Top, 0,\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIX,\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE);\r
+\r
+ /* PROJECTION matrix */\r
+ write_common_fixed_mat4 (pro, ctx->ProjectionMatrixStack.Top, 0,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIX,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE);\r
+\r
+ /* MVP matrix */\r
+ write_common_fixed_mat4 (pro, &ctx->_ModelProjectMatrix, 0,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE);\r
+\r
+ /* TEXTURE matrix */\r
+ for (i = 0; i < 8; i++)\r
+ {\r
+ write_common_fixed_mat4 (pro, ctx->TextureMatrixStack[i].Top, i,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIX,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE);\r
+ }\r
+\r
+ /* NORMAL matrix - upper 3x3 inverse transpose of MODELVIEW matrix */\r
+ p = ctx->ModelviewMatrixStack.Top->inv;\r
+ v[0] = p[0];\r
+ v[1] = p[4];\r
+ v[2] = p[8];\r
+ v[3] = p[1];\r
+ v[4] = p[5];\r
+ v[5] = p[9];\r
+ v[6] = p[2];\r
+ v[7] = p[6];\r
+ v[8] = p[10];\r
+ write_common_fixed (pro, SLANG_COMMON_FIXED_NORMALMATRIX, v, 0, 9 * sizeof (GLfloat));\r
+\r
+ /* XXX: fetch uniform float gl_NormalScale */\r
+ /* XXX: fetch uniform mat4 gl_ClipPlane */\r
+ /* XXX: fetch uniform mat4 gl_TextureEnvColor */\r
+ /* XXX: fetch uniform mat4 gl_EyePlaneS */\r
+ /* XXX: fetch uniform mat4 gl_EyePlaneT */\r
+ /* XXX: fetch uniform mat4 gl_EyePlaneR */\r
+ /* XXX: fetch uniform mat4 gl_EyePlaneQ */\r
+ /* XXX: fetch uniform mat4 gl_ObjectPlaneS */\r
+ /* XXX: fetch uniform mat4 gl_ObjectPlaneT */\r
+ /* XXX: fetch uniform mat4 gl_ObjectPlaneR */\r
+ /* XXX: fetch uniform mat4 gl_ObjectPlaneQ */\r
+}\r
+\r
+static GLvoid\r
+_program_UpdateFixedAttribute (struct gl2_program_intf **intf, GLuint index, GLvoid *data,\r
+ GLuint offset, GLuint size, GLboolean write)\r
+{\r
+ struct gl2_program_impl *impl = (struct gl2_program_impl *) intf;\r
+ slang_program *pro = &impl->_obj.prog;\r
+ GLuint addr;\r
+\r
+ addr = pro->vertex_fixed_entries[index];\r
+ if (addr != ~0)\r
+ {\r
+ GLubyte *mem;\r
+\r
+ mem = (GLubyte *) pro->machines[SLANG_UNIFORM_BINDING_VERTEX]->mem + addr + offset * size;\r
+ if (write)\r
+ _mesa_memcpy (mem, data, size);\r
+ else\r
+ _mesa_memcpy (data, mem, size);\r
+ }\r
+}\r
+\r
+static GLvoid\r
+_program_UpdateFixedVarying (struct gl2_program_intf **intf, GLuint index, GLvoid *data,\r
+ GLuint offset, GLuint size, GLboolean write)\r
+{\r
+ struct gl2_program_impl *impl = (struct gl2_program_impl *) intf;\r
+ slang_program *pro = &impl->_obj.prog;\r
+ GLuint addr;\r
+\r
+ addr = pro->fragment_fixed_entries[index];\r
+ if (addr != ~0)\r
+ {\r
+ GLubyte *mem;\r
+\r
+ mem = (GLubyte *) pro->machines[SLANG_UNIFORM_BINDING_FRAGMENT]->mem + addr + offset * size;\r
+ if (write)\r
+ _mesa_memcpy (mem, data, size);\r
+ else\r
+ _mesa_memcpy (data, mem, size);\r
+ }\r
+}\r
+\r
static struct gl2_program_intf _program_vftbl = {\r
{\r
{\r
_program_GetLinkStatus,\r
_program_GetValidateStatus,\r
_program_Link,\r
- _program_Validate\r
+ _program_Validate,\r
+ _program_UpdateFixedUniforms,\r
+ _program_UpdateFixedAttribute,\r
+ _program_UpdateFixedVarying\r
};\r
\r
static void\r
#include "slang_assemble.h"\r
#include "slang_execute.h"\r
\r
-static GLubyte *get_address_of (struct gl2_vertex_shader_intf **vs, const char *name)\r
-{\r
- struct gl2_vertex_shader_impl *impl;\r
- slang_translation_unit *unit;\r
- slang_atom atom;\r
- slang_variable *var;\r
-\r
- impl = (struct gl2_vertex_shader_impl *) vs;\r
- unit = &impl->_obj._shader.unit;\r
- atom = slang_atom_pool_atom (unit->atom_pool, name);\r
- var = _slang_locate_variable (&unit->globals, atom, 1);\r
- if (var == NULL || var->address == ~0)\r
- return NULL;\r
- return (GLubyte *) unit->machine->mem + var->address;\r
-}\r
-\r
-static GLubyte *get_address_of_f (struct gl2_fragment_shader_intf **fs, const char *name)\r
+int _slang_fetch_discard (struct gl2_program_intf **pro, GLboolean *val)\r
{\r
- struct gl2_fragment_shader_impl *impl;\r
- slang_translation_unit *unit;\r
- slang_atom atom;\r
- slang_variable *var;\r
-\r
- impl = (struct gl2_fragment_shader_impl *) fs;\r
- unit = &impl->_obj._shader.unit;\r
- atom = slang_atom_pool_atom (unit->atom_pool, name);\r
- var = _slang_locate_variable (&unit->globals, atom, 1);\r
- if (var == NULL || var->address == ~0)\r
- return NULL;\r
- return (GLubyte *) unit->machine->mem + var->address;\r
-}\r
-\r
-static int fetch_mem (struct gl2_vertex_shader_intf **vs, const char *name, GLvoid *val,\r
- GLuint size, GLuint index, int write)\r
-{\r
- GLubyte *data;\r
-\r
- data = get_address_of (vs, name);\r
- if (data == NULL)\r
- return 0;\r
- if (write)\r
- _mesa_memcpy (data + index * size, val, size);\r
- else\r
- _mesa_memcpy (val, data + index * size, size);\r
- return 1;\r
-}\r
-\r
-static int fetch_mem_f (struct gl2_fragment_shader_intf **fs, const char *name, GLvoid *val,\r
- GLuint size, GLuint index, int write)\r
-{\r
- GLubyte *data;\r
+ struct gl2_program_impl *impl;\r
\r
- data = get_address_of_f (fs, name);\r
- if (data == NULL)\r
- return 0;\r
- if (write)\r
- _mesa_memcpy (data + index * size, val, size);\r
- else\r
- _mesa_memcpy (val, data + index * size, size);\r
+ impl = (struct gl2_program_impl *) pro;\r
+ *val = impl->_obj.prog.machines[SLANG_UNIFORM_BINDING_FRAGMENT]->kill ? GL_TRUE : GL_FALSE;\r
return 1;\r
}\r
\r
-int _slang_fetch_float (struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val, int write)\r
-{\r
- return fetch_mem (vs, name, val, 4, 0, write);\r
-}\r
-\r
-int _slang_fetch_vec3 (struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val, int write)\r
+static GLvoid exec_shader (struct gl2_program_intf **pro, GLuint i)\r
{\r
- return fetch_mem (vs, name, val, 12, 0, write);\r
-}\r
+ struct gl2_program_impl *impl;\r
+ slang_program *p;\r
\r
-int _slang_fetch_vec4 (struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val,\r
- GLuint index, int write)\r
-{\r
- return fetch_mem (vs, name, val, 16, index, write);\r
-}\r
+ impl = (struct gl2_program_impl *) pro;\r
+ p = &impl->_obj.prog;\r
\r
-int _slang_fetch_vec4_f (struct gl2_fragment_shader_intf **fs, const char *name, GLfloat *val,\r
- GLuint index, int write)\r
-{\r
- return fetch_mem_f (fs, name, val, 16, index, write);\r
-}\r
+ slang_machine_init (p->machines[i]);\r
+ p->machines[i]->ip = p->code[i];\r
\r
-int _slang_fetch_mat3 (struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val,\r
- GLuint index, int write)\r
-{\r
- return fetch_mem (vs, name, val, 36, index, write);\r
+ _slang_execute2 (p->assemblies[i], p->machines[i]);\r
}\r
\r
-int _slang_fetch_mat4 (struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val,\r
- GLuint index, int write)\r
+GLvoid _slang_exec_fragment_shader (struct gl2_program_intf **pro)\r
{\r
- return fetch_mem (vs, name, val, 64, index, write);\r
+ exec_shader (pro, SLANG_UNIFORM_BINDING_FRAGMENT);\r
}\r
\r
-int _slang_fetch_discard (struct gl2_fragment_shader_intf **fs, GLboolean *val)\r
+GLvoid _slang_exec_vertex_shader (struct gl2_program_intf **pro)\r
{\r
- struct gl2_fragment_shader_impl *impl;\r
- slang_translation_unit *unit;\r
-\r
- impl = (struct gl2_fragment_shader_impl *) fs;\r
- unit = &impl->_obj._shader.unit;\r
- *val = unit->machine->kill ? GL_TRUE : GL_FALSE;\r
- return 1;\r
-}\r
-\r
-void _slang_exec_vertex_shader (struct gl2_vertex_shader_intf **vs)\r
-{\r
- struct gl2_vertex_shader_impl *impl;\r
- slang_translation_unit *unit;\r
- slang_atom atom;\r
- unsigned int i;\r
-\r
- impl = (struct gl2_vertex_shader_impl *) vs;\r
- unit = &impl->_obj._shader.unit;\r
- atom = slang_atom_pool_atom (unit->atom_pool, "main");\r
- for (i = 0; i < unit->functions.num_functions; i++)\r
- if (atom == unit->functions.functions[i].header.a_name)\r
- break;\r
- if (i < unit->functions.num_functions)\r
- {\r
- slang_function *f;\r
- slang_assembly_file_restore_point point;\r
- slang_assemble_ctx A;\r
-\r
- f = &unit->functions.functions[i];\r
- slang_assembly_file_restore_point_save (unit->assembly, &point);\r
-\r
- slang_machine_init (unit->machine);\r
- unit->machine->ip = unit->assembly->count;\r
-\r
- A.file = unit->assembly;\r
- A.mach = unit->machine;\r
- A.atoms = unit->atom_pool;\r
- A.space.funcs = &unit->functions;\r
- A.space.structs = &unit->structs;\r
- A.space.vars = &unit->globals;\r
- slang_assembly_file_push_label (unit->assembly, slang_asm_local_alloc, 20);\r
- slang_assembly_file_push_label (unit->assembly, slang_asm_enter, 20);\r
- _slang_assemble_function_call (&A, f, NULL, 0, GL_FALSE);\r
- slang_assembly_file_push (unit->assembly, slang_asm_exit);\r
-\r
- _slang_execute2 (unit->assembly, unit->machine);\r
-\r
- slang_assembly_file_restore_point_load (unit->assembly, &point);\r
- }\r
-}\r
-\r
-void _slang_exec_fragment_shader (struct gl2_fragment_shader_intf **fs)\r
-{\r
- struct gl2_fragment_shader_impl *impl;\r
- slang_translation_unit *unit;\r
- slang_atom atom;\r
- unsigned int i;\r
-\r
- impl = (struct gl2_fragment_shader_impl *) fs;\r
- unit = &impl->_obj._shader.unit;\r
- atom = slang_atom_pool_atom (unit->atom_pool, "main");\r
- for (i = 0; i < unit->functions.num_functions; i++)\r
- if (atom == unit->functions.functions[i].header.a_name)\r
- break;\r
- if (i < unit->functions.num_functions)\r
- {\r
- slang_function *f;\r
- slang_assembly_file_restore_point point;\r
- slang_assemble_ctx A;\r
-\r
- f = &unit->functions.functions[i];\r
- slang_assembly_file_restore_point_save (unit->assembly, &point);\r
-\r
- slang_machine_init (unit->machine);\r
- unit->machine->ip = unit->assembly->count;\r
-\r
- A.file = unit->assembly;\r
- A.mach = unit->machine;\r
- A.atoms = unit->atom_pool;\r
- A.space.funcs = &unit->functions;\r
- A.space.structs = &unit->structs;\r
- A.space.vars = &unit->globals;\r
- slang_assembly_file_push_label (unit->assembly, slang_asm_local_alloc, 20);\r
- slang_assembly_file_push_label (unit->assembly, slang_asm_enter, 20);\r
- _slang_assemble_function_call (&A, f, NULL, 0, GL_FALSE);\r
- slang_assembly_file_push (unit->assembly, slang_asm_exit);\r
-\r
- _slang_execute2 (unit->assembly, unit->machine);\r
-\r
- slang_assembly_file_restore_point_load (unit->assembly, &point);\r
- }\r
+ exec_shader (pro, SLANG_UNIFORM_BINDING_VERTEX);\r
}\r
\r
GLint _slang_get_uniform_location (struct gl2_program_intf **pro, const char *name)\r
return GL_TRUE;\r
}\r
\r
+GLuint _slang_get_active_uniform_count (struct gl2_program_intf **pro)\r
+{\r
+ struct gl2_program_impl *impl;\r
+\r
+ impl = (struct gl2_program_impl *) pro;\r
+ return impl->_obj.prog.active_uniforms.count;\r
+}\r
+\r
+GLuint _slang_get_active_uniform_max_length (struct gl2_program_intf **pro)\r
+{\r
+ struct gl2_program_impl *impl;\r
+ GLuint i, len = 0;\r
+\r
+ impl = (struct gl2_program_impl *) pro;\r
+ for (i = 0; i < impl->_obj.prog.active_uniforms.count; i++)\r
+ {\r
+ GLuint n = _mesa_strlen (impl->_obj.prog.active_uniforms.table[i].name);\r
+ if (n > len)\r
+ len = n;\r
+ }\r
+ return len;\r
+}\r
+\r
+GLvoid _slang_get_active_uniform (struct gl2_program_intf **pro, GLuint index, GLsizei maxLength,\r
+ GLsizei *length, GLint *size, GLenum *type, char *name)\r
+{\r
+ struct gl2_program_impl *impl;\r
+ slang_active_uniform *u;\r
+ GLsizei len;\r
+\r
+ impl = (struct gl2_program_impl *) pro;\r
+ u = &impl->_obj.prog.active_uniforms.table[index];\r
+\r
+ len = _mesa_strlen (u->name);\r
+ if (len >= maxLength)\r
+ len = maxLength - 1;\r
+ _mesa_memcpy (name, u->name, len);\r
+ name[len] = '\0';\r
+ if (length != NULL)\r
+ *length = len;\r
+ *type = u->quant->u.basic_type;\r
+ if (u->quant->array_len == 0)\r
+ *size = 1;\r
+ else\r
+ *size = u->quant->array_len;\r
+}\r
+\r
void\r
_mesa_init_shaderobjects_3dlabs (GLcontext *ctx)\r
{\r
* Mesa 3-D graphics library\r
* Version: 6.5\r
*\r
- * Copyright (C) 2006 Brian Paul All Rights Reserved.\r
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.\r
*\r
* Permission is hereby granted, free of charge, to any person obtaining a\r
* copy of this software and associated documentation files (the "Software"),\r
#ifndef SHADEROBJECTS_3DLABS_H\r
#define SHADEROBJECTS_3DLABS_H\r
\r
-#include "mtypes.h"\r
+extern int _slang_fetch_discard (struct gl2_program_intf **pro, GLboolean *val);\r
\r
+extern GLvoid _slang_exec_fragment_shader (struct gl2_program_intf **pro);\r
\r
-extern int _slang_fetch_float(struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val, int write);\r
+extern GLvoid _slang_exec_vertex_shader (struct gl2_program_intf **pro);\r
\r
-extern int _slang_fetch_vec3(struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val, int write);\r
+extern GLint _slang_get_uniform_location (struct gl2_program_intf **pro, const char *name);\r
\r
-extern int _slang_fetch_vec4(struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val, GLuint index, int write);\r
+extern GLboolean _slang_write_uniform (struct gl2_program_intf **pro, GLint loc, GLsizei count,\r
+ const GLvoid *data, GLenum type);\r
\r
-extern int _slang_fetch_vec4_f(struct gl2_fragment_shader_intf **fs, const char *name, GLfloat *val, GLuint index, int write);\r
+extern GLuint _slang_get_active_uniform_count (struct gl2_program_intf **pro);\r
\r
-extern int _slang_fetch_mat3(struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val, GLuint index, int write);\r
-\r
-extern int _slang_fetch_mat4(struct gl2_vertex_shader_intf **vs, const char *name, GLfloat *val, GLuint index, int write);\r
-\r
-extern int _slang_fetch_discard(struct gl2_fragment_shader_intf **fs, GLboolean *val);\r
-\r
-extern GLint _slang_get_uniform_location(struct gl2_program_intf **pro, const char *name);\r
-\r
-extern GLboolean _slang_write_uniform(struct gl2_program_intf **pro, GLint loc, GLsizei count, const GLvoid *data, GLenum type);\r
-\r
-extern void _slang_exec_vertex_shader(struct gl2_vertex_shader_intf **vs);\r
-\r
-extern void _slang_exec_fragment_shader(struct gl2_fragment_shader_intf **fs);\r
+extern GLuint _slang_get_active_uniform_max_length (struct gl2_program_intf **pro);\r
\r
+extern GLvoid _slang_get_active_uniform (struct gl2_program_intf **pro, GLuint index, GLsizei maxLength,\r
+ GLsizei *length, GLint *size, GLenum *type, char *name);\r
\r
extern GLhandleARB\r
_mesa_3dlabs_create_shader_object (GLenum);\r
\r
extern GLhandleARB\r
-_mesa_3dlabs_create_program_object (void);\r
+_mesa_3dlabs_create_program_object (GLvoid);\r
\r
extern void\r
_mesa_init_shaderobjects_3dlabs (GLcontext *ctx);\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
#include "slang_assemble.h"\r
+#include "slang_compile.h"\r
#include "slang_storage.h"\r
-#include "slang_assemble_typeinfo.h"\r
-#include "slang_assemble_conditional.h"\r
-#include "slang_assemble_assignment.h"\r
-#include "slang_execute.h"\r
\r
/* slang_assembly */\r
\r
/* push the variable's address */\r
if (var->global)\r
{\r
- if (!PLAB (A->file, slang_asm_addr_push, var->address))\r
+ if (!PLAB (A->file, slang_asm_global_addr, var->address))\r
return GL_FALSE;\r
}\r
else\r
#if !defined SLANG_ASSEMBLE_H\r
#define SLANG_ASSEMBLE_H\r
\r
-#include "slang_compile.h"\r
+#include "slang_utility.h"\r
\r
#if defined __cplusplus\r
extern "C" {\r
slang_asm_local_alloc,\r
slang_asm_local_free,\r
slang_asm_local_addr,\r
+ slang_asm_global_addr,\r
slang_asm_call,\r
slang_asm_return,\r
slang_asm_discard,\r
slang_swizzle swz;\r
} slang_assemble_ctx;\r
\r
-slang_function *_slang_locate_function (slang_function_scope *funcs, slang_atom a_name,\r
- slang_operation *params, GLuint num_params, slang_assembly_name_space *space,\r
+struct slang_function_ *_slang_locate_function (struct slang_function_scope_ *funcs, slang_atom name,\r
+ struct slang_operation_ *params, GLuint num_params, slang_assembly_name_space *space,\r
slang_atom_pool *);\r
\r
GLboolean _slang_assemble_function (slang_assemble_ctx *, struct slang_function_ *);\r
\r
-GLboolean _slang_cleanup_stack (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_cleanup_stack (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_dereference (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_dereference (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_function_call (slang_assemble_ctx *, slang_function *, slang_operation *,\r
- GLuint, GLboolean);\r
+GLboolean _slang_assemble_function_call (slang_assemble_ctx *, struct slang_function_ *,\r
+ struct slang_operation_ *, GLuint, GLboolean);\r
\r
-GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *, const char *, slang_operation *,\r
- GLuint, GLboolean);\r
+GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *, const char *,\r
+ struct slang_operation_ *, GLuint, GLboolean);\r
\r
-GLboolean _slang_assemble_operation (slang_assemble_ctx *, struct slang_operation_ *, slang_ref_type);\r
+GLboolean _slang_assemble_operation (slang_assemble_ctx *, struct slang_operation_ *,\r
+ slang_ref_type);\r
\r
#ifdef __cplusplus\r
}\r
#endif\r
\r
+#include "slang_assemble_assignment.h"\r
+#include "slang_assemble_typeinfo.h"\r
+#include "slang_assemble_constructor.h"\r
+#include "slang_assemble_conditional.h"\r
+\r
#endif\r
\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_assemble_assignment.h"\r
-#include "slang_assemble_typeinfo.h"\r
+#include "slang_assemble.h"\r
#include "slang_storage.h"\r
-#include "slang_execute.h"\r
\r
/*\r
* _slang_assemble_assignment()\r
#if !defined SLANG_ASSEMBLE_ASSIGNMENT_H\r
#define SLANG_ASSEMBLE_ASSIGNMENT_H\r
\r
-#include "slang_assemble.h"\r
-\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
\r
-GLboolean _slang_assemble_assignment (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_assignment (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_assign (slang_assemble_ctx *, slang_operation *, const char *,\r
+GLboolean _slang_assemble_assign (slang_assemble_ctx *, struct slang_operation_ *, const char *,\r
slang_ref_type);\r
\r
#ifdef __cplusplus\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_assemble_conditional.h"\r
#include "slang_assemble.h"\r
-#include "slang_execute.h"\r
+#include "slang_compile.h"\r
\r
/*\r
* _slang_assemble_logicaland()\r
#if !defined SLANG_ASSEMBLE_CONDITIONAL_H\r
#define SLANG_ASSEMBLE_CONDITIONAL_H\r
\r
-#include "slang_assemble.h"\r
-\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
\r
-GLboolean _slang_assemble_logicaland (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_logicaland (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_logicalor (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_logicalor (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_select (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_select (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_for (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_for (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_do (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_do (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_while (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_while (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
-GLboolean _slang_assemble_if (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_if (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
#ifdef __cplusplus\r
}\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_assemble_constructor.h"\r
-#include "slang_assemble_typeinfo.h"\r
+#include "slang_assemble.h"\r
#include "slang_storage.h"\r
\r
/* _slang_is_swizzle() */\r
#if !defined SLANG_ASSEMBLE_CONSTRUCTOR_H\r
#define SLANG_ASSEMBLE_CONSTRUCTOR_H\r
\r
-#include "slang_assemble.h"\r
-#include "slang_compile.h"\r
-\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
*/\r
GLvoid _slang_multiply_swizzles (slang_swizzle *, const slang_swizzle *, const slang_swizzle *);\r
\r
-GLboolean _slang_assemble_constructor (slang_assemble_ctx *, slang_operation *);\r
+GLboolean _slang_assemble_constructor (slang_assemble_ctx *, struct slang_operation_ *);\r
\r
GLboolean _slang_assemble_constructor_from_swizzle (slang_assemble_ctx *, const slang_swizzle *,\r
slang_type_specifier *, slang_type_specifier *);\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_assemble_typeinfo.h"\r
+#include "slang_assemble.h"\r
+#include "slang_compile.h"\r
+\r
+/*\r
+ * slang_type_specifier\r
+ */\r
+\r
+GLvoid slang_type_specifier_ctr (slang_type_specifier *self)\r
+{\r
+ self->type = slang_spec_void;\r
+ self->_struct = NULL;\r
+ self->_array = NULL;\r
+}\r
+\r
+GLvoid slang_type_specifier_dtr (slang_type_specifier *self)\r
+{\r
+ if (self->_struct != NULL)\r
+ {\r
+ slang_struct_destruct (self->_struct);\r
+ slang_alloc_free (self->_struct);\r
+ }\r
+ if (self->_array != NULL)\r
+ {\r
+ slang_type_specifier_dtr (self->_array);\r
+ slang_alloc_free (self->_array);\r
+ }\r
+}\r
+\r
+GLboolean slang_type_specifier_copy (slang_type_specifier *x, const slang_type_specifier *y)\r
+{\r
+ slang_type_specifier z;\r
+\r
+ slang_type_specifier_ctr (&z);\r
+ z.type = y->type;\r
+ if (z.type == slang_spec_struct)\r
+ {\r
+ z._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct));\r
+ if (z._struct == NULL)\r
+ {\r
+ slang_type_specifier_dtr (&z);\r
+ return GL_FALSE;\r
+ }\r
+ if (!slang_struct_construct (z._struct))\r
+ {\r
+ slang_alloc_free (z._struct);\r
+ slang_type_specifier_dtr (&z);\r
+ return GL_FALSE;\r
+ }\r
+ if (!slang_struct_copy (z._struct, y->_struct))\r
+ {\r
+ slang_type_specifier_dtr (&z);\r
+ return GL_FALSE;\r
+ }\r
+ }\r
+ else if (z.type == slang_spec_array)\r
+ {\r
+ z._array = (slang_type_specifier *) slang_alloc_malloc (sizeof (slang_type_specifier));\r
+ if (z._array == NULL)\r
+ {\r
+ slang_type_specifier_dtr (&z);\r
+ return GL_FALSE;\r
+ }\r
+ slang_type_specifier_ctr (z._array);\r
+ if (!slang_type_specifier_copy (z._array, y->_array))\r
+ {\r
+ slang_type_specifier_dtr (&z);\r
+ return GL_FALSE;\r
+ }\r
+ }\r
+ slang_type_specifier_dtr (x);\r
+ *x = z;\r
+ return GL_TRUE;\r
+}\r
+\r
+GLboolean slang_type_specifier_equal (const slang_type_specifier *x, const slang_type_specifier *y)\r
+{\r
+ if (x->type != y->type)\r
+ return 0;\r
+ if (x->type == slang_spec_struct)\r
+ return slang_struct_equal (x->_struct, y->_struct);\r
+ if (x->type == slang_spec_array)\r
+ return slang_type_specifier_equal (x->_array, y->_array);\r
+ return 1;\r
+}\r
\r
/* slang_assembly_typeinfo */\r
\r
GLboolean slang_assembly_typeinfo_construct (slang_assembly_typeinfo *ti)\r
{\r
- if (!slang_type_specifier_construct (&ti->spec))\r
- return GL_FALSE;\r
+ slang_type_specifier_ctr (&ti->spec);\r
ti->array_len = 0;\r
return GL_TRUE;\r
}\r
\r
GLvoid slang_assembly_typeinfo_destruct (slang_assembly_typeinfo *ti)\r
{\r
- slang_type_specifier_destruct (&ti->spec);\r
+ slang_type_specifier_dtr (&ti->spec);\r
}\r
\r
/* _slang_typeof_operation() */\r
#if !defined SLANG_ASSEMBLE_TYPEINFO_H\r
#define SLANG_ASSEMBLE_TYPEINFO_H\r
\r
-#include "slang_assemble_constructor.h"\r
-#include "slang_compile.h"\r
-\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
\r
+typedef enum slang_type_specifier_type_\r
+{\r
+ slang_spec_void,\r
+ slang_spec_bool,\r
+ slang_spec_bvec2,\r
+ slang_spec_bvec3,\r
+ slang_spec_bvec4,\r
+ slang_spec_int,\r
+ slang_spec_ivec2,\r
+ slang_spec_ivec3,\r
+ slang_spec_ivec4,\r
+ slang_spec_float,\r
+ slang_spec_vec2,\r
+ slang_spec_vec3,\r
+ slang_spec_vec4,\r
+ slang_spec_mat2,\r
+ slang_spec_mat3,\r
+ slang_spec_mat4,\r
+ slang_spec_sampler1D,\r
+ slang_spec_sampler2D,\r
+ slang_spec_sampler3D,\r
+ slang_spec_samplerCube,\r
+ slang_spec_sampler1DShadow,\r
+ slang_spec_sampler2DShadow,\r
+ slang_spec_struct,\r
+ slang_spec_array\r
+} slang_type_specifier_type;\r
+\r
+typedef struct slang_type_specifier_\r
+{\r
+ slang_type_specifier_type type;\r
+ struct slang_struct_ *_struct; /* type: spec_struct */\r
+ struct slang_type_specifier_ *_array; /* type: spec_array */\r
+} slang_type_specifier;\r
+\r
+GLvoid slang_type_specifier_ctr (slang_type_specifier *);\r
+GLvoid slang_type_specifier_dtr (slang_type_specifier *);\r
+GLboolean slang_type_specifier_copy (slang_type_specifier *, const slang_type_specifier *);\r
+GLboolean slang_type_specifier_equal (const slang_type_specifier *, const slang_type_specifier *);\r
+\r
typedef struct slang_assembly_typeinfo_\r
{\r
GLboolean can_be_referenced;\r
* Returns GL_TRUE on success.\r
* Returns GL_FALSE otherwise.\r
*/\r
-GLboolean _slang_typeof_operation (slang_assemble_ctx *, slang_operation *, slang_assembly_typeinfo *);\r
-GLboolean _slang_typeof_operation_ (slang_operation *, slang_assembly_name_space *,\r
+GLboolean _slang_typeof_operation (slang_assemble_ctx *, struct slang_operation_ *,\r
+ slang_assembly_typeinfo *);\r
+GLboolean _slang_typeof_operation_ (struct slang_operation_ *, slang_assembly_name_space *,\r
slang_assembly_typeinfo *, slang_atom_pool *);\r
\r
/*\r
* Returns GL_TRUE on success, even if the function was not found.\r
* Returns GL_FALSE otherwise.\r
*/\r
-GLboolean _slang_typeof_function (slang_atom a_name, slang_operation *params, GLuint num_params,\r
- slang_assembly_name_space *, slang_type_specifier *spec, GLboolean *exists, slang_atom_pool *);\r
+GLboolean _slang_typeof_function (slang_atom a_name, struct slang_operation_ *params,\r
+ GLuint num_params, slang_assembly_name_space *, slang_type_specifier *spec, GLboolean *exists,\r
+ slang_atom_pool *);\r
\r
GLboolean _slang_type_is_matrix (slang_type_specifier_type);\r
\r
*/
#include "imports.h"
-#include "grammar_mesa.h"
-#include "slang_utility.h"
-#include "slang_compile.h"
-#include "slang_preprocess.h"
-#include "slang_storage.h"
-#include "slang_assemble.h"
-#include "slang_execute.h"
+#include "grammar_mesa.h"\r
+#include "slang_compile.h"\r
+#include "slang_preprocess.h"\r
+#include "slang_storage.h"\r
/*
* This is a straightforward implementation of the slang front-end compiler.
slang_alloc_free (unit->assembly);
return 0;
}
- slang_machine_init (unit->machine);
+ slang_machine_ctr (unit->machine);
unit->atom_pool = (slang_atom_pool *) slang_alloc_malloc (sizeof (slang_atom_pool));
if (unit->atom_pool == NULL)
{
unit->atom_pool = atoms;
unit->free_atom_pool = 0;\r
slang_export_data_table_ctr (&unit->exp_data);\r
- slang_active_uniforms_ctr (&unit->uniforms);
+ slang_export_code_table_ctr (&unit->exp_code);
return 1;
}
}
if (unit->free_global_pool)
slang_alloc_free (unit->global_pool);
- if (unit->free_machine)
- slang_alloc_free (unit->machine);
+ if (unit->free_machine)\r
+ {\r
+ slang_machine_dtr (unit->machine);
+ slang_alloc_free (unit->machine);\r
+ }
if (unit->free_atom_pool)
{
slang_atom_pool_destruct (unit->atom_pool);
slang_alloc_free (unit->atom_pool);
}\r
- slang_active_uniforms_dtr (&unit->uniforms);\r
- slang_export_data_table_dtr (&unit->exp_data);
+ slang_export_data_table_dtr (&unit->exp_data);\r
+ slang_export_code_table_ctr (&unit->exp_code);
}
/* slang_info_log */
slang_info_log_memory (C->L);\r
return GL_FALSE;\r
}\r
- if (!slang_type_specifier_construct (var->type.specifier._array))\r
- {\r
- slang_alloc_free (var->type.specifier._array);\r
- var->type.specifier._array = NULL;\r
- slang_info_log_memory (C->L);\r
- return GL_FALSE;\r
- }\r
+ slang_type_specifier_ctr (var->type.specifier._array);\r
return slang_type_specifier_copy (var->type.specifier._array, sp);\r
}
{
slang_type_specifier sp;
- if (!slang_type_specifier_construct (&sp))
- return 0;
+ slang_type_specifier_ctr (&sp);
if (!parse_struct_field (C, O, *st, &sp))
{
- slang_type_specifier_destruct (&sp);
+ slang_type_specifier_dtr (&sp);
return 0;
}\r
- slang_type_specifier_destruct (&sp);
+ slang_type_specifier_dtr (&sp);
}
while (*C->I++ != FIELD_NONE);
{\r
slang_type_specifier p;\r
\r
- if (!slang_type_specifier_construct (&p))\r
- return GL_FALSE;\r
+ slang_type_specifier_ctr (&p);\r
if (!slang_type_specifier_copy (&p, ¶m->type.specifier))\r
{\r
- slang_type_specifier_destruct (&p);\r
+ slang_type_specifier_dtr (&p);\r
return GL_FALSE;\r
}\r
if (!convert_to_array (C, param, &p))\r
{\r
- slang_type_specifier_destruct (&p);\r
+ slang_type_specifier_dtr (&p);\r
return GL_FALSE;\r
}\r
- slang_type_specifier_destruct (&p);\r
+ slang_type_specifier_dtr (&p);\r
if (!parse_array_len (C, O, ¶m->array_len))\r
return GL_FALSE;
}
return 0;
return 1;
-}
+}\r
+\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+/* XXX */\r
+GLboolean _slang_x86_codegen (slang_machine *, slang_assembly_file *, GLuint);\r
+#endif
int _slang_compile (const char *source, slang_translation_unit *unit, slang_unit_type type,
slang_info_log *log)
\r
if (!success)\r
return 0;\r
+\r
unit->exp_data.atoms = unit->atom_pool;\r
if (!_slang_build_export_data_table (&unit->exp_data, &unit->globals))\r
return 0;\r
- if (!_slang_gather_active_uniforms (&unit->uniforms, &unit->exp_data))\r
- return 0;
+\r
+ unit->exp_code.atoms = unit->atom_pool;\r
+ if (!_slang_build_export_code_table (&unit->exp_code, &unit->functions, unit))\r
+ return 0;\r
+\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+ /* XXX: lookup the @main label */\r
+ if (!_slang_x86_codegen (unit->machine, unit->assembly, unit->exp_code.entries[0].address))\r
+ return 0;\r
+#endif\r
return 1;
}
#if !defined SLANG_COMPILE_H
#define SLANG_COMPILE_H\r
\r
+#include "slang_export.h"\r
+#include "slang_execute.h"\r
#include "slang_compile_variable.h"\r
#include "slang_compile_struct.h"\r
#include "slang_compile_operation.h"\r
slang_function_scope functions;
slang_struct_scope structs;
slang_unit_type type;\r
- struct slang_assembly_file_ *assembly;\r
+ slang_assembly_file *assembly;\r
int free_assembly;\r
slang_var_pool *global_pool;\r
int free_global_pool;\r
- struct slang_machine_ *machine;\r
+ slang_machine *machine;\r
int free_machine;\r
slang_atom_pool *atom_pool;\r
int free_atom_pool;\r
slang_export_data_table exp_data;\r
- slang_active_uniforms uniforms;
+ slang_export_code_table exp_code;
} slang_translation_unit;
int slang_translation_unit_construct (slang_translation_unit *);\r
-int slang_translation_unit_construct2 (slang_translation_unit *, struct slang_assembly_file_ *,\r
- slang_var_pool *, struct slang_machine_ *, slang_atom_pool *);
+int slang_translation_unit_construct2 (slang_translation_unit *, slang_assembly_file *,\r
+ slang_var_pool *, slang_machine *, slang_atom_pool *);
void slang_translation_unit_destruct (slang_translation_unit *);
typedef struct slang_info_log_
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_compile_variable.h"\r
-#include "slang_compile_operation.h"\r
-#include "slang_compile_function.h"\r
+#include "slang_compile.h"\r
\r
/* slang_fixup_table */\r
\r
return NULL;\r
}\r
\r
+/*\r
+ * _slang_build_export_code_table()\r
+ */\r
+\r
+GLboolean _slang_build_export_code_table (slang_export_code_table *tbl, slang_function_scope *funs,\r
+ slang_translation_unit *unit)\r
+{\r
+ slang_atom main;\r
+ GLuint i;\r
+\r
+ main = slang_atom_pool_atom (tbl->atoms, "main");\r
+ if (main == SLANG_ATOM_NULL)\r
+ return GL_FALSE;\r
+\r
+ for (i = 0; i < funs->num_functions; i++)\r
+ {\r
+ if (funs->functions[i].header.a_name == main)\r
+ {\r
+ slang_function *fun = &funs->functions[i];\r
+ slang_export_code_entry *e;\r
+ slang_assemble_ctx A;\r
+\r
+ e = slang_export_code_table_add (tbl);\r
+ if (e == NULL)\r
+ return GL_FALSE;\r
+ e->address = unit->assembly->count;\r
+ e->name = slang_atom_pool_atom (tbl->atoms, "@main");\r
+ if (e->name == SLANG_ATOM_NULL)\r
+ return GL_FALSE;\r
+\r
+ A.file = unit->assembly;\r
+ A.mach = unit->machine;\r
+ A.atoms = unit->atom_pool;\r
+ A.space.funcs = &unit->functions;\r
+ A.space.structs = &unit->structs;\r
+ A.space.vars = &unit->globals;\r
+ slang_assembly_file_push_label (unit->assembly, slang_asm_local_alloc, 20);\r
+ slang_assembly_file_push_label (unit->assembly, slang_asm_enter, 20);\r
+ _slang_assemble_function_call (&A, fun, NULL, 0, GL_FALSE);\r
+ slang_assembly_file_push (unit->assembly, slang_asm_exit);\r
+ }\r
+ }\r
+ return GL_TRUE;\r
+}\r
+\r
int slang_function_scope_find_by_name (slang_function_scope *, slang_atom, int);\r
slang_function *slang_function_scope_find (slang_function_scope *, slang_function *, int);\r
\r
+GLboolean _slang_build_export_code_table (slang_export_code_table *, slang_function_scope *,\r
+ struct slang_translation_unit_ *);\r
+\r
#ifdef __cplusplus\r
}\r
#endif\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_compile_variable.h"\r
-#include "slang_compile_operation.h"\r
+#include "slang_compile.h"\r
\r
/* slang_operation */\r
\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_compile_variable.h"\r
-#include "slang_compile_struct.h"\r
+#include "slang_compile.h"\r
\r
/* slang_struct_scope */\r
\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_compile_variable.h"\r
-#include "slang_compile_struct.h"\r
-#include "slang_compile_operation.h"\r
+#include "slang_compile.h"\r
\r
/* slang_type_specifier_type */\r
\r
return p->name;\r
}\r
\r
-/* slang_type_specifier */\r
-\r
-int slang_type_specifier_construct (slang_type_specifier *spec)\r
-{\r
- spec->type = slang_spec_void;\r
- spec->_struct = NULL;\r
- spec->_array = NULL;\r
- return 1;\r
-}\r
-\r
-void slang_type_specifier_destruct (slang_type_specifier *spec)\r
-{\r
- if (spec->_struct != NULL)\r
- {\r
- slang_struct_destruct (spec->_struct);\r
- slang_alloc_free (spec->_struct);\r
- }\r
- if (spec->_array != NULL)\r
- {\r
- slang_type_specifier_destruct (spec->_array);\r
- slang_alloc_free (spec->_array);\r
- }\r
-}\r
-\r
-int slang_type_specifier_copy (slang_type_specifier *x, const slang_type_specifier *y)\r
-{\r
- slang_type_specifier z;\r
-\r
- if (!slang_type_specifier_construct (&z))\r
- return 0;\r
- z.type = y->type;\r
- if (z.type == slang_spec_struct)\r
- {\r
- z._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct));\r
- if (z._struct == NULL)\r
- {\r
- slang_type_specifier_destruct (&z);\r
- return 0;\r
- }\r
- if (!slang_struct_construct (z._struct))\r
- {\r
- slang_alloc_free (z._struct);\r
- slang_type_specifier_destruct (&z);\r
- return 0;\r
- }\r
- if (!slang_struct_copy (z._struct, y->_struct))\r
- {\r
- slang_type_specifier_destruct (&z);\r
- return 0;\r
- }\r
- }\r
- else if (z.type == slang_spec_array)\r
- {\r
- z._array = (slang_type_specifier *) slang_alloc_malloc (sizeof (slang_type_specifier));\r
- if (z._array == NULL)\r
- {\r
- slang_type_specifier_destruct (&z);\r
- return 0;\r
- }\r
- if (!slang_type_specifier_construct (z._array))\r
- {\r
- slang_alloc_free (z._array);\r
- slang_type_specifier_destruct (&z);\r
- return 0;\r
- }\r
- if (!slang_type_specifier_copy (z._array, y->_array))\r
- {\r
- slang_type_specifier_destruct (&z);\r
- return 0;\r
- }\r
- }\r
- slang_type_specifier_destruct (x);\r
- *x = z;\r
- return 1;\r
-}\r
-\r
-int slang_type_specifier_equal (const slang_type_specifier *x, const slang_type_specifier *y)\r
-{\r
- if (x->type != y->type)\r
- return 0;\r
- if (x->type == slang_spec_struct)\r
- return slang_struct_equal (x->_struct, y->_struct);\r
- if (x->type == slang_spec_array)\r
- return slang_type_specifier_equal (x->_array, y->_array);\r
- return 1;\r
-}\r
-\r
/* slang_fully_specified_type */\r
\r
int slang_fully_specified_type_construct (slang_fully_specified_type *type)\r
{\r
type->qualifier = slang_qual_none;\r
- if (!slang_type_specifier_construct (&type->specifier))\r
- return 0;\r
+ slang_type_specifier_ctr (&type->specifier);\r
return 1;\r
}\r
\r
void slang_fully_specified_type_destruct (slang_fully_specified_type *type)\r
{\r
- slang_type_specifier_destruct (&type->specifier);\r
+ slang_type_specifier_dtr (&type->specifier);\r
}\r
\r
int slang_fully_specified_type_copy (slang_fully_specified_type *x, const slang_fully_specified_type *y)\r
}\r
\r
/*\r
- * slang_active_uniforms\r
+ * _slang_build_export_data_table()\r
*/\r
\r
-GLvoid slang_active_uniforms_ctr (slang_active_uniforms *self)\r
-{\r
- self->table = NULL;\r
- self->count = 0;\r
-}\r
-\r
-GLvoid slang_active_uniforms_dtr (slang_active_uniforms *self)\r
-{\r
- GLuint i;\r
-\r
- for (i = 0; i < self->count; i++)\r
- slang_alloc_free (self->table[i].name);\r
- slang_alloc_free (self->table);\r
-}\r
-\r
-GLboolean slang_active_uniforms_add (slang_active_uniforms *self, slang_export_data_quant *q,\r
- const char *name)\r
-{\r
- const GLuint n = self->count;\r
-\r
- self->table = (slang_active_uniform *) slang_alloc_realloc (self->table,\r
- n * sizeof (slang_active_uniform), (n + 1) * sizeof (slang_active_uniform));\r
- if (self->table == NULL)\r
- return GL_FALSE;\r
- self->table[n].quant = q;\r
- self->table[n].name = slang_string_duplicate (name);\r
- if (self->table[n].name == NULL)\r
- return GL_FALSE;\r
- self->count++;\r
- return GL_TRUE;\r
-}\r
-\r
static GLenum gl_type_from_specifier (const slang_type_specifier *type)\r
{\r
switch (type->type)\r
for (i = 0; i < vars->num_variables; i++)\r
{\r
slang_variable *var = &vars->variables[i];\r
-\r
+ slang_export_data_entry *e;\r
+ \r
+ e = slang_export_data_table_add (tbl);\r
+ if (e == NULL)\r
+ return GL_FALSE;\r
+ if (!build_quant (&e->quant, var))\r
+ return GL_FALSE;\r
if (var->type.qualifier == slang_qual_uniform)\r
- {\r
- slang_export_data_entry *e = slang_export_data_table_add (tbl);\r
- if (e == NULL)\r
- return GL_FALSE;\r
- if (!build_quant (&e->quant, var))\r
- return GL_FALSE;\r
e->access = slang_exp_uniform;\r
- e->address = var->address;\r
- }\r
+ else if (var->type.qualifier == slang_qual_attribute)\r
+ e->access = slang_exp_attribute;\r
+ else\r
+ e->access = slang_exp_varying;\r
+ e->address = var->address;\r
}\r
\r
if (vars->outer_scope != NULL)\r
return GL_TRUE;\r
}\r
\r
-static GLboolean insert_uniform (slang_active_uniforms *u, slang_export_data_quant *q, char *name,\r
- slang_atom_pool *atoms)\r
-{\r
- slang_string_concat (name, slang_atom_pool_id (atoms, q->name));\r
- if (q->array_len != 0)\r
- slang_string_concat (name, "[0]");\r
-\r
- if (q->structure != NULL)\r
- {\r
- GLuint save, i;\r
-\r
- slang_string_concat (name, ".");\r
- save = slang_string_length (name);\r
-\r
- for (i = 0; i < q->u.field_count; i++)\r
- {\r
- if (!insert_uniform (u, &q->structure[i], name, atoms))\r
- return GL_FALSE;\r
- name[save] = '\0';\r
- }\r
-\r
- return GL_TRUE;\r
- }\r
-\r
- return slang_active_uniforms_add (u, q, name);\r
-}\r
-\r
-GLboolean _slang_gather_active_uniforms (slang_active_uniforms *u, slang_export_data_table *tbl)\r
-{\r
- GLuint i;\r
-\r
- for (i = 0; i < tbl->count; i++)\r
- {\r
- char name[1024] = "";\r
-\r
- if (!insert_uniform (u, &tbl->entries[i].quant, name, tbl->atoms))\r
- return GL_FALSE;\r
- }\r
-\r
- return GL_TRUE;\r
-}\r
-\r
#if !defined SLANG_COMPILE_VARIABLE_H\r
#define SLANG_COMPILE_VARIABLE_H\r
\r
-#include "slang_export.h"\r
-\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
slang_qual_fixedinput /* internal */\r
} slang_type_qualifier;\r
\r
-typedef enum slang_type_specifier_type_\r
-{\r
- slang_spec_void,\r
- slang_spec_bool,\r
- slang_spec_bvec2,\r
- slang_spec_bvec3,\r
- slang_spec_bvec4,\r
- slang_spec_int,\r
- slang_spec_ivec2,\r
- slang_spec_ivec3,\r
- slang_spec_ivec4,\r
- slang_spec_float,\r
- slang_spec_vec2,\r
- slang_spec_vec3,\r
- slang_spec_vec4,\r
- slang_spec_mat2,\r
- slang_spec_mat3,\r
- slang_spec_mat4,\r
- slang_spec_sampler1D,\r
- slang_spec_sampler2D,\r
- slang_spec_sampler3D,\r
- slang_spec_samplerCube,\r
- slang_spec_sampler1DShadow,\r
- slang_spec_sampler2DShadow,\r
- slang_spec_struct,\r
- slang_spec_array\r
-} slang_type_specifier_type;\r
-\r
slang_type_specifier_type slang_type_specifier_type_from_string (const char *);\r
const char *slang_type_specifier_type_to_string (slang_type_specifier_type);\r
\r
-typedef struct slang_type_specifier_\r
-{\r
- slang_type_specifier_type type;\r
- struct slang_struct_ *_struct; /* type: spec_struct */\r
- struct slang_type_specifier_ *_array; /* type: spec_array */\r
-} slang_type_specifier;\r
-\r
-int slang_type_specifier_construct (slang_type_specifier *);\r
-void slang_type_specifier_destruct (slang_type_specifier *);\r
-int slang_type_specifier_copy (slang_type_specifier *, const slang_type_specifier *);\r
-int slang_type_specifier_equal (const slang_type_specifier *, const slang_type_specifier *);\r
-\r
typedef struct slang_fully_specified_type_\r
{\r
slang_type_qualifier qualifier;\r
\r
slang_variable *_slang_locate_variable (slang_variable_scope *, slang_atom a_name, GLboolean all);\r
\r
-typedef struct\r
-{\r
- slang_export_data_quant *quant;\r
- char *name;\r
-} slang_active_uniform;\r
-\r
-typedef struct\r
-{\r
- slang_active_uniform *table;\r
- GLuint count;\r
-} slang_active_uniforms;\r
-\r
-GLvoid slang_active_uniforms_ctr (slang_active_uniforms *);\r
-GLvoid slang_active_uniforms_dtr (slang_active_uniforms *);\r
-GLboolean slang_active_uniforms_add (slang_active_uniforms *, slang_export_data_quant *,\r
- const char *);\r
-\r
GLboolean _slang_build_export_data_table (slang_export_data_table *, slang_variable_scope *);\r
\r
-GLboolean _slang_gather_active_uniforms (slang_active_uniforms *, slang_export_data_table *);\r
-\r
#ifdef __cplusplus\r
}\r
#endif\r
#include "context.h"\r
#include "swrast/s_context.h"\r
#include "colormac.h"\r
-#include "slang_utility.h"\r
-#include "slang_assemble.h"\r
-#include "slang_storage.h"\r
#include "slang_execute.h"\r
#include "slang_library_noise.h"\r
\r
#define DEBUG_SLANG 0\r
\r
+GLvoid slang_machine_ctr (slang_machine *self)\r
+{\r
+ slang_machine_init (self);\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+ self->x86.compiled_func = NULL;\r
+#endif\r
+}\r
+\r
+GLvoid slang_machine_dtr (slang_machine *self)\r
+{\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+ /* TODO: free self->x86.compiled_func */\r
+#endif\r
+}\r
+\r
void slang_machine_init (slang_machine *mach)\r
{\r
mach->ip = 0;\r
{\r
slang_machine mach;\r
\r
- slang_machine_init (&mach);\r
+ slang_machine_ctr (&mach);\r
return _slang_execute2 (file, &mach);\r
}\r
\r
case slang_asm_local_addr:\r
fprintf (f, "local_addr\t%u, %u", a->param[0], a->param[1]);\r
break;\r
+ case slang_asm_global_addr:\r
+ fprintf (f, "global_addr\t%u", a->param[0]);\r
+ break;\r
case slang_asm_call:\r
fprintf (f, "call\t%u", a->param[0]);\r
break;\r
f = fopen (filename, "w");\r
#endif\r
\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+ if (mach->x86.compiled_func != NULL)\r
+ {\r
+ mach->x86.compiled_func (mach);\r
+ return 1;\r
+ }\r
+#endif\r
+\r
stack = mach->mem + SLANG_MACHINE_GLOBAL_SIZE;\r
\r
while (!mach->exit)\r
mach->sp++;\r
break;\r
case slang_asm_addr_push:\r
+ case slang_asm_global_addr:\r
mach->sp--;\r
stack[mach->sp]._addr = a->param[0];\r
break;\r
#if !defined SLANG_EXECUTE_H\r
#define SLANG_EXECUTE_H\r
\r
+#include "slang_assemble.h"\r
+\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
#define SLANG_MACHINE_STACK_SIZE 1024\r
#define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE)\r
\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+typedef struct\r
+{\r
+ GLvoid (* compiled_func) (struct slang_machine_ *);\r
+ GLuint esp_restore;\r
+ GLshort fpucntl_rnd_neg;\r
+ GLshort fpucntl_restore;\r
+} slang_machine_x86;\r
+#endif\r
+\r
typedef struct slang_machine_\r
{\r
GLuint ip; /* instruction pointer, for flow control */\r
GLuint kill; /* discard the fragment */\r
GLuint exit; /* terminate the shader */\r
slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE];\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+ slang_machine_x86 x86;\r
+#endif\r
} slang_machine;\r
\r
+GLvoid slang_machine_ctr (slang_machine *);\r
+GLvoid slang_machine_dtr (slang_machine *);\r
+\r
void slang_machine_init (slang_machine *);\r
\r
int _slang_execute (const slang_assembly_file *);\r
--- /dev/null
+/*\r
+ * Mesa 3-D graphics library\r
+ * Version: 6.5\r
+ *\r
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a\r
+ * copy of this software and associated documentation files (the "Software"),\r
+ * to deal in the Software without restriction, including without limitation\r
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
+ * and/or sell copies of the Software, and to permit persons to whom the\r
+ * Software is furnished to do so, subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included\r
+ * in all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\r
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+ */\r
+\r
+/**\r
+ * \file slang_execute_x86.c\r
+ * x86 back end compiler\r
+ * \author Michal Krol, Keith Whitwell\r
+ */\r
+\r
+#include "imports.h"\r
+#include "context.h"\r
+#include "colormac.h"\r
+#include "swrast/s_context.h"\r
+#include "slang_execute.h"\r
+#include "slang_library_noise.h"\r
+\r
+#if defined(USE_X86_ASM) || defined(SLANG_X86)\r
+\r
+#include "x86/rtasm/x86sse.h"\r
+\r
+typedef struct\r
+{\r
+ GLuint index;\r
+ GLubyte *csr;\r
+} fixup;\r
+\r
+typedef struct\r
+{\r
+ struct x86_function f;\r
+ struct x86_reg r_eax;\r
+ struct x86_reg r_ecx;\r
+ struct x86_reg r_edx;\r
+ struct x86_reg r_esp;\r
+ struct x86_reg r_ebp;\r
+ struct x86_reg r_st0;\r
+ struct x86_reg r_st1;\r
+ struct x86_reg r_st2;\r
+ struct x86_reg r_st3;\r
+ fixup *fixups;\r
+ GLuint fixup_count;\r
+ GLubyte **labels;\r
+ slang_machine *mach;\r
+ GLubyte *l_discard;\r
+ GLubyte *l_exit;\r
+ GLshort fpucntl;\r
+} codegen_ctx;\r
+\r
+static GLvoid add_fixup (codegen_ctx *G, GLuint index, GLubyte *csr)\r
+{\r
+ G->fixups = (fixup *) slang_alloc_realloc (G->fixups, G->fixup_count * sizeof (fixup),\r
+ (G->fixup_count + 1) * sizeof (fixup));\r
+ G->fixups[G->fixup_count].index = index;\r
+ G->fixups[G->fixup_count].csr = csr;\r
+ G->fixup_count++;\r
+}\r
+\r
+#ifdef NO_FAST_MATH\r
+#define RESTORE_FPU (DEFAULT_X86_FPU)\r
+#define RND_NEG_FPU (DEFAULT_X86_FPU | 0x400)\r
+#else\r
+#define RESTORE_FPU (FAST_X86_FPU)\r
+#define RND_NEG_FPU (FAST_X86_FPU | 0x400)\r
+#endif\r
+\r
+static void set_fpu_round_neg_inf (codegen_ctx *G)\r
+{\r
+ if (G->fpucntl != RND_NEG_FPU)\r
+ {\r
+ G->fpucntl = RND_NEG_FPU;\r
+ x87_fnclex (&G->f);\r
+ x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->x86.fpucntl_rnd_neg);\r
+ x87_fldcw (&G->f, x86_deref (G->r_eax));\r
+ }\r
+}\r
+\r
+static void emit_x87_ex2 (codegen_ctx *G)\r
+{\r
+ set_fpu_round_neg_inf (G);\r
+\r
+ x87_fld (&G->f, G->r_st0); /* a a */\r
+ x87_fprndint (&G->f); /* int(a) a */\r
+ x87_fld (&G->f, G->r_st0); /* int(a) int(a) a */\r
+ x87_fstp (&G->f, G->r_st3); /* int(a) a int(a)*/\r
+ x87_fsubp (&G->f, G->r_st1);/* frac(a) int(a) */\r
+ x87_f2xm1 (&G->f); /* (2^frac(a))-1 int(a)*/\r
+ x87_fld1 (&G->f); /* 1 (2^frac(a))-1 int(a)*/\r
+ x87_faddp (&G->f, G->r_st1);/* 2^frac(a) int(a) */\r
+ x87_fscale (&G->f); /* 2^a */\r
+}\r
+\r
+static GLfloat do_ceilf (GLfloat x)\r
+{\r
+ return CEILF (x);\r
+}\r
+\r
+static void fetch_texel (GLuint sampler, const GLfloat texcoord[4], GLfloat lambda, GLfloat color[4])\r
+{\r
+ GET_CURRENT_CONTEXT(ctx);\r
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);\r
+ GLchan rgba[4];\r
+\r
+ /* XXX: the function pointer is NULL! */\r
+ swrast->TextureSample[sampler] (ctx, ctx->Texture.Unit[sampler]._Current, 1,\r
+ (const GLfloat (*)[4]) texcoord, &lambda, &rgba);\r
+ color[0] = CHAN_TO_FLOAT(rgba[0]);\r
+ color[1] = CHAN_TO_FLOAT(rgba[1]);\r
+ color[2] = CHAN_TO_FLOAT(rgba[2]);\r
+ color[3] = CHAN_TO_FLOAT(rgba[3]);\r
+}\r
+\r
+static GLvoid do_vec4_tex2d (GLfloat s, GLfloat t, GLuint sampler, GLfloat *rgba)\r
+{\r
+ GLfloat st[4] = { s, t, 0.0f, 1.0f };\r
+\r
+ fetch_texel (sampler, st, 0.0f, rgba);\r
+}\r
+\r
+static GLvoid do_print_float (GLfloat x)\r
+{\r
+ _mesa_printf ("slang print: %f\n", x);\r
+}\r
+\r
+static GLvoid do_print_int (GLfloat x)\r
+{\r
+ _mesa_printf ("slang print: %d\n", (GLint) x);\r
+}\r
+\r
+static GLvoid do_print_bool (GLfloat x)\r
+{\r
+ _mesa_printf ("slang print: %s\n", (GLint) x ? "true" : "false");\r
+}\r
+\r
+static GLvoid codegen_assem (codegen_ctx *G, slang_assembly *a)\r
+{\r
+ GLint disp;\r
+\r
+ switch (a->type)\r
+ {\r
+ case slang_asm_none:\r
+ break;\r
+ case slang_asm_float_copy:\r
+ case slang_asm_int_copy:\r
+ case slang_asm_bool_copy:\r
+ x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[0]));\r
+ x86_pop (&G->f, G->r_ecx);\r
+ x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1]), G->r_ecx);\r
+ break;\r
+ case slang_asm_float_move:\r
+ case slang_asm_int_move:\r
+ case slang_asm_bool_move:\r
+ x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[1]));\r
+ x86_add (&G->f, G->r_eax, x86_deref (G->r_esp));\r
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax));\r
+ x86_mov (&G->f, x86_make_disp (G->r_esp, a->param[0]), G->r_eax);\r
+ break;\r
+ case slang_asm_float_push:\r
+ case slang_asm_int_push:\r
+ case slang_asm_bool_push:\r
+ /* TODO: use push imm32 */\r
+ x86_mov_reg_imm (&G->f, G->r_eax, *((GLint *) &a->literal));\r
+ x86_push (&G->f, G->r_eax);\r
+ break;\r
+ case slang_asm_float_deref:\r
+ case slang_asm_int_deref:\r
+ case slang_asm_bool_deref:\r
+ case slang_asm_addr_deref:\r
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp));\r
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax));\r
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax);\r
+ break;\r
+ case slang_asm_float_add:\r
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_faddp (&G->f, G->r_st1);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_multiply:\r
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_fmulp (&G->f, G->r_st1);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_divide:\r
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_fdivp (&G->f, G->r_st1);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_negate:\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_fchs (&G->f);\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_less:\r
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));\r
+ x87_fcomp (&G->f, x86_deref (G->r_esp));\r
+ x87_fnstsw (&G->f, G->r_eax);\r
+ /* TODO: use test r8,imm8 */\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, 0x100);\r
+ x86_test (&G->f, G->r_eax, G->r_ecx);\r
+ {\r
+ GLfloat one = 1.0f, zero = 0.0f;\r
+ GLubyte *lab0, *lab1;\r
+\r
+ /* TODO: use jcc rel8 */\r
+ lab0 = x86_jcc_forward (&G->f, cc_E);\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, *((GLint *) &one));\r
+ /* TODO: use jmp rel8 */\r
+ lab1 = x86_jmp_forward (&G->f);\r
+ x86_fixup_fwd_jump (&G->f, lab0);\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, *((GLint *) &zero));\r
+ x86_fixup_fwd_jump (&G->f, lab1);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);\r
+ }\r
+ break;\r
+ case slang_asm_float_equal_exp:\r
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));\r
+ x87_fcomp (&G->f, x86_deref (G->r_esp));\r
+ x87_fnstsw (&G->f, G->r_eax);\r
+ /* TODO: use test r8,imm8 */\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000);\r
+ x86_test (&G->f, G->r_eax, G->r_ecx);\r
+ {\r
+ GLfloat one = 1.0f, zero = 0.0f;\r
+ GLubyte *lab0, *lab1;\r
+\r
+ /* TODO: use jcc rel8 */\r
+ lab0 = x86_jcc_forward (&G->f, cc_E);\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, *((GLint *) &one));\r
+ /* TODO: use jmp rel8 */\r
+ lab1 = x86_jmp_forward (&G->f);\r
+ x86_fixup_fwd_jump (&G->f, lab0);\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, *((GLint *) &zero));\r
+ x86_fixup_fwd_jump (&G->f, lab1);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);\r
+ }\r
+ break;\r
+ case slang_asm_float_equal_int:\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -4));\r
+ x87_fld (&G->f, x86_make_disp (G->r_esp, a->param[0] + 4));\r
+ x87_fcomp (&G->f, x86_make_disp (G->r_esp, a->param[1] + 4));\r
+ x87_fnstsw (&G->f, G->r_eax);\r
+ /* TODO: use test r8,imm8 */\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000);\r
+ x86_test (&G->f, G->r_eax, G->r_ecx);\r
+ {\r
+ GLfloat one = 1.0f, zero = 0.0f;\r
+ GLubyte *lab0, *lab1;\r
+\r
+ /* TODO: use jcc rel8 */\r
+ lab0 = x86_jcc_forward (&G->f, cc_E);\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, *((GLint *) &one));\r
+ /* TODO: use jmp rel8 */\r
+ lab1 = x86_jmp_forward (&G->f);\r
+ x86_fixup_fwd_jump (&G->f, lab0);\r
+ x86_mov_reg_imm (&G->f, G->r_ecx, *((GLint *) &zero));\r
+ x86_fixup_fwd_jump (&G->f, lab1);\r
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);\r
+ }\r
+ break;\r
+ case slang_asm_float_to_int:\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_fistp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_sine:\r
+ /* TODO: use fsin */\r
+ x86_call (&G->f, (GLubyte *) _mesa_sinf);\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_arcsine:\r
+ /* TODO: use fpatan (?) */\r
+ x86_call (&G->f, (GLubyte *) _mesa_asinf);\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_arctan:\r
+ /* TODO: use fpatan */\r
+ x86_call (&G->f, (GLubyte *) _mesa_atanf);\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_power:\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));\r
+ x87_fyl2x (&G->f);\r
+ emit_x87_ex2 (G);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_log2:\r
+ x87_fld1 (&G->f);\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_fyl2x (&G->f);\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_floor:\r
+ set_fpu_round_neg_inf (G);\r
+ x87_fld (&G->f, x86_deref (G->r_esp)); \r
+ x87_fprndint (&G->f); \r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_ceil:\r
+ /* TODO: use frndint */\r
+ x86_call (&G->f, (GLubyte *) do_ceilf);\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_noise1:\r
+ x86_call (&G->f, (GLubyte *) _slang_library_noise1);\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_noise2:\r
+ x86_call (&G->f, (GLubyte *) _slang_library_noise2);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_noise3:\r
+ x86_call (&G->f, (GLubyte *) _slang_library_noise4);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 8));\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_float_noise4:\r
+ x86_call (&G->f, (GLubyte *) _slang_library_noise4);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 12));\r
+ x87_fstp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_int_to_float:\r
+ break;\r
+ case slang_asm_int_to_addr:\r
+ x87_fld (&G->f, x86_deref (G->r_esp));\r
+ x87_fistp (&G->f, x86_deref (G->r_esp));\r
+ break;\r
+ case slang_asm_addr_copy:\r
+ x86_pop (&G->f, G->r_eax);\r
+ x86_mov (&G->f, G->r_ecx, x86_deref (G->r_esp));\r
+ x86_mov (&G->f, x86_deref (G->r_ecx), G->r_eax);\r
+ break;\r
+ case slang_asm_addr_push:\r
+ /* TODO: use push imm32 */\r
+ x86_mov_reg_imm (&G->f, G->r_eax, (GLint) a->param[0]);\r
+ x86_push (&G->f, G->r_eax);\r
+ break;\r
+ case slang_asm_addr_add:\r
+ x86_pop (&G->f, G->r_eax);\r
+ x86_add (&G->f, x86_deref (G->r_esp), G->r_eax);\r
+ break;\r
+ case slang_asm_addr_multiply:\r
+ x86_pop (&G->f, G->r_ecx);\r
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp));\r
+ x86_mul (&G->f, G->r_ecx);\r
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax);\r
+ break;\r
+ case slang_asm_vec4_tex2d:\r
+ x86_call (&G->f, (GLubyte *) do_vec4_tex2d);\r
+ x86_lea (&G->f, G->r_ebp, x86_make_disp (G->r_esp, 12));\r
+ break;\r
+ case slang_asm_jump:\r
+ add_fixup (G, a->param[0], x86_jmp_forward (&G->f));\r
+ break;\r
+ case slang_asm_jump_if_zero:\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));\r
+ x86_xor (&G->f, G->r_eax, G->r_eax);\r
+ x86_cmp (&G->f, G->r_eax, x86_make_disp (G->r_esp, -4));\r
+ {\r
+ GLubyte *lab0;\r
+\r
+ /* TODO: use jcc rel8 */\r
+ lab0 = x86_jcc_forward (&G->f, cc_NE);\r
+ add_fixup (G, a->param[0], x86_jmp_forward (&G->f));\r
+ x86_fixup_fwd_jump (&G->f, lab0);\r
+ }\r
+ break;\r
+ case slang_asm_enter:\r
+ /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */\r
+ assert (a->param[0] != 0);\r
+ x86_push (&G->f, G->r_ebp);\r
+ x86_lea (&G->f, G->r_ebp, x86_make_disp (G->r_esp, (GLint) a->param[0]));\r
+ break;\r
+ case slang_asm_leave:\r
+ x86_pop (&G->f, G->r_ebp);\r
+ break;\r
+ case slang_asm_local_alloc:\r
+ /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */\r
+ assert (a->param[0] != 0);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -(GLint) a->param[0]));\r
+ break;\r
+ case slang_asm_local_free:\r
+ /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */\r
+ assert (a->param[0] != 0);\r
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, (GLint) a->param[0]));\r
+ break;\r
+ case slang_asm_local_addr:\r
+ disp = -(GLint) (a->param[0] + a->param[1]) + 4;\r
+ if (disp != 0)\r
+ {\r
+ x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_ebp, disp));\r
+ x86_push (&G->f, G->r_eax);\r
+ }\r
+ else\r
+ x86_push (&G->f, G->r_ebp);\r
+ break;\r
+ case slang_asm_global_addr:\r
+ /* TODO: use push imm32 */\r
+ x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->mem + a->param[0]);\r
+ x86_push (&G->f, G->r_eax);\r
+ break;\r
+ case slang_asm_call:\r
+ add_fixup (G, a->param[0], x86_call_forward (&G->f));\r
+ break;\r
+ case slang_asm_return:\r
+ x86_ret (&G->f);\r
+ break;\r
+ case slang_asm_discard:\r
+ x86_jmp (&G->f, G->l_discard);\r
+ break;\r
+ case slang_asm_exit:\r
+ x86_jmp (&G->f, G->l_exit);\r
+ break;\r
+ /* mesa-specific extensions */\r
+ case slang_asm_float_print:\r
+ x86_call (&G->f, (GLubyte *) do_print_float);\r
+ break;\r
+ case slang_asm_int_print:\r
+ x86_call (&G->f, (GLubyte *) do_print_int);\r
+ break;\r
+ case slang_asm_bool_print:\r
+ x86_call (&G->f, (GLubyte *) do_print_bool);\r
+ break;\r
+ default:\r
+ assert (0);\r
+ }\r
+}\r
+\r
+GLboolean _slang_x86_codegen (slang_machine *mach, slang_assembly_file *file, GLuint start)\r
+{\r
+ codegen_ctx G;\r
+ GLubyte *j_body, *j_exit;\r
+ GLuint i;\r
+\r
+ x86_init_func_size (&G.f, 4*1048576);\r
+ G.r_eax = x86_make_reg (file_REG32, reg_AX);\r
+ G.r_ecx = x86_make_reg (file_REG32, reg_CX);\r
+ G.r_edx = x86_make_reg (file_REG32, reg_DX);\r
+ G.r_esp = x86_make_reg (file_REG32, reg_SP);\r
+ G.r_ebp = x86_make_reg (file_REG32, reg_BP);\r
+ G.r_st0 = x86_make_reg (file_x87, 0);\r
+ G.r_st1 = x86_make_reg (file_x87, 1);\r
+ G.r_st2 = x86_make_reg (file_x87, 2);\r
+ G.r_st3 = x86_make_reg (file_x87, 3);\r
+ G.fixups = NULL;\r
+ G.fixup_count = 0;\r
+ G.labels = (GLubyte **) slang_alloc_malloc (file->count * sizeof (GLubyte *));\r
+ G.mach = mach;\r
+ G.fpucntl = RESTORE_FPU;\r
+\r
+ mach->x86.fpucntl_rnd_neg = RND_NEG_FPU;\r
+ mach->x86.fpucntl_restore = RESTORE_FPU;\r
+\r
+ /* prepare stack and jump to start */\r
+ x86_push (&G.f, G.r_ebp);\r
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore);\r
+ x86_push (&G.f, G.r_esp);\r
+ x86_pop (&G.f, G.r_ecx);\r
+ x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx);\r
+ j_body = x86_jmp_forward (&G.f);\r
+\r
+ /* discard keywords go here */\r
+ G.l_discard = x86_get_label (&G.f);\r
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->kill);\r
+ x86_mov_reg_imm (&G.f, G.r_ecx, 1);\r
+ x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx);\r
+ G.l_exit = x86_get_label (&G.f);\r
+ j_exit = x86_jmp_forward (&G.f);\r
+\r
+ for (i = 0; i < file->count; i++)\r
+ {\r
+ G.labels[i] = x86_get_label (&G.f);\r
+ if (i == start)\r
+ x86_fixup_fwd_jump (&G.f, j_body);\r
+ codegen_assem (&G, &file->code[i]);\r
+ }\r
+\r
+ /* restore stack and return */\r
+ x86_fixup_fwd_jump (&G.f, j_exit);\r
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore);\r
+ x86_mov (&G.f, G.r_esp, x86_deref (G.r_eax));\r
+ x86_pop (&G.f, G.r_ebp);\r
+ if (G.fpucntl != RESTORE_FPU)\r
+ {\r
+ x87_fnclex (&G.f);\r
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->x86.fpucntl_restore);\r
+ x87_fldcw (&G.f, x86_deref (G.r_eax));\r
+ }\r
+ x86_ret (&G.f);\r
+\r
+ /* fixup forward labels */\r
+ for (i = 0; i < G.fixup_count; i++)\r
+ {\r
+ G.f.csr = G.labels[G.fixups[i].index];\r
+ x86_fixup_fwd_jump (&G.f, G.fixups[i].csr);\r
+ }\r
+\r
+ slang_alloc_free (G.fixups);\r
+ slang_alloc_free (G.labels);\r
+\r
+ /* TODO: free previous instance, if not NULL */\r
+ mach->x86.compiled_func = (GLvoid (*) (slang_machine *)) x86_get_func (&G.f);\r
+\r
+ return GL_TRUE;\r
+}\r
+\r
+#endif\r
+\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
#include "slang_export.h"\r
\r
/*\r
return &self->entries[n];\r
}\r
\r
+/*\r
+ * slang_export_code_entry\r
+ */\r
+\r
+GLvoid slang_export_code_entry_ctr (slang_export_code_entry *self)\r
+{\r
+ self->name = SLANG_ATOM_NULL;\r
+ self->address = ~0;\r
+}\r
+\r
+GLvoid slang_export_code_entry_dtr (slang_export_code_entry *self)\r
+{\r
+}\r
+\r
+/*\r
+ * slang_export_code_table\r
+ */\r
+\r
+GLvoid slang_export_code_table_ctr (slang_export_code_table *self)\r
+{\r
+ self->entries = NULL;\r
+ self->count = 0;\r
+ self->atoms = NULL;\r
+}\r
+\r
+GLvoid slang_export_code_table_dtr (slang_export_code_table *self)\r
+{\r
+ if (self->entries != NULL)\r
+ {\r
+ GLuint i;\r
+\r
+ for (i = 0; i < self->count; i++)\r
+ slang_export_code_entry_dtr (&self->entries[i]);\r
+ slang_alloc_free (self->entries);\r
+ }\r
+}\r
+\r
+slang_export_code_entry *slang_export_code_table_add (slang_export_code_table *self)\r
+{\r
+ const GLuint n = self->count;\r
+\r
+ self->entries = (slang_export_code_entry *) slang_alloc_realloc (self->entries,\r
+ n * sizeof (slang_export_code_entry), (n + 1) * sizeof (slang_export_code_entry));\r
+ if (self->entries == NULL)\r
+ return NULL;\r
+ slang_export_code_entry_ctr (&self->entries[n]);\r
+ self->count++;\r
+ return &self->entries[n];\r
+}\r
+\r
/*\r
* _slang_find_exported_data()\r
*/\r
#if !defined SLANG_EXPORT_H\r
#define SLANG_EXPORT_H\r
\r
+#include "slang_utility.h"\r
+\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
GLvoid slang_export_data_entry_dtr (slang_export_data_entry *);\r
\r
/*\r
- * Data export table. Holds <count> elements in <entries> array.\r
+ * Data export table.\r
*/\r
\r
typedef struct\r
GLvoid slang_export_data_table_dtr (slang_export_data_table *);\r
slang_export_data_entry *slang_export_data_table_add (slang_export_data_table *);\r
\r
+/*\r
+ * Code export entry. Contains label name and its entry point (label, address).\r
+ */\r
+\r
+typedef struct\r
+{\r
+ slang_atom name;\r
+ GLuint address;\r
+} slang_export_code_entry;\r
+\r
+/*\r
+ * Code export table.\r
+ */\r
+\r
+typedef struct\r
+{\r
+ slang_export_code_entry *entries;\r
+ GLuint count;\r
+ slang_atom_pool *atoms;\r
+} slang_export_code_table;\r
+\r
+GLvoid slang_export_code_table_ctr (slang_export_code_table *);\r
+GLvoid slang_export_code_table_dtr (slang_export_code_table *);\r
+slang_export_code_entry *slang_export_code_table_add (slang_export_code_table *);\r
+\r
/*\r
* _slang_find_exported_data()\r
*\r
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
*/\r
\r
-#include "imports.h"\r
-#include "slang_library_noise.h"\r
-\r
/*\r
* SimplexNoise1234\r
* Copyright © 2003-2005, Stefan Gustavson\r
*\r
* Contact: stegu@itn.liu.se\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
- * General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public\r
- * License along with this library; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
*/\r
\r
/** \file\r
*/\r
\r
\r
+#include "imports.h"\r
+#include "slang_library_noise.h"\r
+\r
#define FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) )\r
\r
/*\r
*/\r
\r
#include "imports.h"\r
-#include "slang_utility.h"\r
-#include "slang_compile.h"\r
-#include "slang_export.h"\r
#include "slang_link.h"\r
\r
/*\r
GLuint i;\r
\r
for (i = 0; i < tbl->count; i++)\r
+ if (tbl->entries[i].access == slang_exp_uniform)\r
+ {\r
+ char name[1024] = "";\r
+\r
+ if (!insert_binding (bind, &tbl->entries[i].quant, name, tbl->atoms, index,\r
+ tbl->entries[i].address))\r
+ return GL_FALSE;\r
+ }\r
+\r
+ return GL_TRUE;\r
+}\r
+\r
+/*\r
+ * slang_active_uniforms\r
+ */\r
+\r
+static GLvoid slang_active_uniforms_ctr (slang_active_uniforms *self)\r
+{\r
+ self->table = NULL;\r
+ self->count = 0;\r
+}\r
+\r
+static GLvoid slang_active_uniforms_dtr (slang_active_uniforms *self)\r
+{\r
+ GLuint i;\r
+\r
+ for (i = 0; i < self->count; i++)\r
+ slang_alloc_free (self->table[i].name);\r
+ slang_alloc_free (self->table);\r
+}\r
+\r
+static GLboolean slang_active_uniforms_add (slang_active_uniforms *self, slang_export_data_quant *q,\r
+ const char *name)\r
+{\r
+ const GLuint n = self->count;\r
+\r
+ self->table = (slang_active_uniform *) slang_alloc_realloc (self->table,\r
+ n * sizeof (slang_active_uniform), (n + 1) * sizeof (slang_active_uniform));\r
+ if (self->table == NULL)\r
+ return GL_FALSE;\r
+ self->table[n].quant = q;\r
+ self->table[n].name = slang_string_duplicate (name);\r
+ if (self->table[n].name == NULL)\r
+ return GL_FALSE;\r
+ self->count++;\r
+ return GL_TRUE;\r
+}\r
+\r
+static GLboolean insert_uniform (slang_active_uniforms *u, slang_export_data_quant *q, char *name,\r
+ slang_atom_pool *atoms)\r
+{\r
+ slang_string_concat (name, slang_atom_pool_id (atoms, q->name));\r
+ if (q->array_len != 0)\r
+ slang_string_concat (name, "[0]");\r
+\r
+ if (q->structure != NULL)\r
{\r
- char name[1024] = "";\r
+ GLuint save, i;\r
\r
- if (!insert_binding (bind, &tbl->entries[i].quant, name, tbl->atoms, index,\r
- tbl->entries[i].address))\r
- return GL_FALSE;\r
+ slang_string_concat (name, ".");\r
+ save = slang_string_length (name);\r
+\r
+ for (i = 0; i < q->u.field_count; i++)\r
+ {\r
+ if (!insert_uniform (u, &q->structure[i], name, atoms))\r
+ return GL_FALSE;\r
+ name[save] = '\0';\r
+ }\r
+\r
+ return GL_TRUE;\r
}\r
\r
+ return slang_active_uniforms_add (u, q, name);\r
+}\r
+\r
+static GLboolean gather_active_uniforms (slang_active_uniforms *u, slang_export_data_table *tbl)\r
+{\r
+ GLuint i;\r
+\r
+ for (i = 0; i < tbl->count; i++)\r
+ if (tbl->entries[i].access == slang_exp_uniform)\r
+ {\r
+ char name[1024] = "";\r
+\r
+ if (!insert_uniform (u, &tbl->entries[i].quant, name, tbl->atoms))\r
+ return GL_FALSE;\r
+ }\r
+\r
return GL_TRUE;\r
}\r
\r
\r
GLvoid slang_program_ctr (slang_program *self)\r
{\r
+ GLuint i;\r
+\r
slang_uniform_bindings_ctr (&self->uniforms);\r
+ slang_active_uniforms_ctr (&self->active_uniforms);\r
+ for (i = 0; i < SLANG_UNIFORM_BINDING_MAX; i++)\r
+ {\r
+ GLuint j;\r
+\r
+ for (j = 0; j < SLANG_COMMON_FIXED_MAX; j++)\r
+ self->common_fixed_entries[i][j] = ~0;\r
+ self->code[i] = ~0;\r
+ self->machines[i] = NULL;\r
+ self->assemblies[i] = NULL;\r
+ }\r
+ for (i = 0; i < SLANG_VERTEX_FIXED_MAX; i++)\r
+ self->vertex_fixed_entries[i] = ~0;\r
+ for (i = 0; i < SLANG_FRAGMENT_FIXED_MAX; i++)\r
+ self->fragment_fixed_entries[i] = ~0;\r
}\r
\r
GLvoid slang_program_dtr (slang_program *self)\r
{\r
slang_uniform_bindings_dtr (&self->uniforms);\r
+ slang_active_uniforms_dtr (&self->active_uniforms);\r
}\r
\r
/*\r
* _slang_link()\r
*/\r
\r
+static GLuint gd (slang_export_data_table *tbl, const char *name)\r
+{\r
+ slang_atom atom;\r
+ GLuint i;\r
+\r
+ atom = slang_atom_pool_atom (tbl->atoms, name);\r
+ if (atom == SLANG_ATOM_NULL)\r
+ return ~0;\r
+\r
+ for (i = 0; i < tbl->count; i++)\r
+ if (atom == tbl->entries[i].quant.name)\r
+ return tbl->entries[i].address;\r
+ return ~0;\r
+}\r
+\r
+static GLvoid fill_common_fixed_entries (GLuint e[], slang_export_data_table *tbl)\r
+{\r
+ e[SLANG_COMMON_FIXED_MODELVIEWMATRIX] = gd (tbl, "gl_ModelViewMatrix");\r
+ e[SLANG_COMMON_FIXED_PROJECTIONMATRIX] = gd (tbl, "gl_ProjectionMatrix");\r
+ e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX] = gd (tbl, "gl_ModelViewProjectionMatrix");\r
+ e[SLANG_COMMON_FIXED_TEXTUREMATRIX] = gd (tbl, "gl_TextureMatrix");\r
+ e[SLANG_COMMON_FIXED_NORMALMATRIX] = gd (tbl, "gl_NormalMatrix");\r
+ e[SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE] = gd (tbl, "gl_ModelViewMatrixInverse");\r
+ e[SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE] = gd (tbl, "gl_ProjectionMatrixInverse");\r
+ e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE] =\r
+ gd (tbl, "gl_ModelViewProjectionMatrixInverse");\r
+ e[SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE] = gd (tbl, "gl_TextureMatrixInverse");\r
+ e[SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE] = gd (tbl, "gl_ModelViewMatrixTranspose");\r
+ e[SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE] = gd (tbl, "gl_ProjectionMatrixTranspose");\r
+ e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE] =\r
+ gd (tbl, "gl_ModelViewProjectionMatrixTranspose");\r
+ e[SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE] = gd (tbl, "gl_TextureMatrixTranspose");\r
+ e[SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE] =\r
+ gd (tbl, "gl_ModelViewMatrixInverseTranspose");\r
+ e[SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE] =\r
+ gd (tbl, "gl_ProjectionMatrixInverseTranspose");\r
+ e[SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE] =\r
+ gd (tbl, "gl_ModelViewProjectionMatrixInverseTranspose");\r
+ e[SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE] =\r
+ gd (tbl, "gl_TextureMatrixInverseTranspose");\r
+ e[SLANG_COMMON_FIXED_NORMALSCALE] = gd (tbl, "gl_NormalScale");\r
+ e[SLANG_COMMON_FIXED_DEPTHRANGE] = gd (tbl, "gl_DepthRange");\r
+ e[SLANG_COMMON_FIXED_CLIPPLANE] = gd (tbl, "gl_ClipPlane");\r
+ e[SLANG_COMMON_FIXED_POINT] = gd (tbl, "gl_Point");\r
+ e[SLANG_COMMON_FIXED_FRONTMATERIAL] = gd (tbl, "gl_FrontMaterial");\r
+ e[SLANG_COMMON_FIXED_BACKMATERIAL] = gd (tbl, "gl_BackMaterial");\r
+ e[SLANG_COMMON_FIXED_LIGHTSOURCE] = gd (tbl, "gl_LightSource");\r
+ e[SLANG_COMMON_FIXED_LIGHTMODEL] = gd (tbl, "gl_LightModel");\r
+ e[SLANG_COMMON_FIXED_FRONTLIGHTMODELPRODUCT] = gd (tbl, "gl_FrontLightModelProduct");\r
+ e[SLANG_COMMON_FIXED_BACKLIGHTMODELPRODUCT] = gd (tbl, "gl_BackLightModelProduct");\r
+ e[SLANG_COMMON_FIXED_FRONTLIGHTPRODUCT] = gd (tbl, "gl_FrontLightProduct");\r
+ e[SLANG_COMMON_FIXED_BACKLIGHTPRODUCT] = gd (tbl, "gl_BackLightProduct");\r
+ e[SLANG_COMMON_FIXED_TEXTUREENVCOLOR] = gd (tbl, "gl_TextureEnvColor");\r
+ e[SLANG_COMMON_FIXED_EYEPLANES] = gd (tbl, "gl_EyePlaneS");\r
+ e[SLANG_COMMON_FIXED_EYEPLANET] = gd (tbl, "gl_EyePlaneT");\r
+ e[SLANG_COMMON_FIXED_EYEPLANER] = gd (tbl, "gl_EyePlaneR");\r
+ e[SLANG_COMMON_FIXED_EYEPLANEQ] = gd (tbl, "gl_EyePlaneQ");\r
+ e[SLANG_COMMON_FIXED_OBJECTPLANES] = gd (tbl, "gl_ObjectPlaneS");\r
+ e[SLANG_COMMON_FIXED_OBJECTPLANET] = gd (tbl, "gl_ObjectPlaneT");\r
+ e[SLANG_COMMON_FIXED_OBJECTPLANER] = gd (tbl, "gl_ObjectPlaneR");\r
+ e[SLANG_COMMON_FIXED_OBJECTPLANEQ] = gd (tbl, "gl_ObjectPlaneQ");\r
+ e[SLANG_COMMON_FIXED_FOG] = gd (tbl, "gl_Fog");\r
+}\r
+\r
+static GLvoid fill_vertex_fixed_entries (GLuint e[], slang_export_data_table *tbl)\r
+{\r
+ e[SLANG_VERTEX_FIXED_POSITION] = gd (tbl, "gl_Position");\r
+ e[SLANG_VERTEX_FIXED_POINTSIZE] = gd (tbl, "gl_PointSize");\r
+ e[SLANG_VERTEX_FIXED_CLIPVERTEX] = gd (tbl, "gl_ClipVertex");\r
+ e[SLANG_VERTEX_FIXED_COLOR] = gd (tbl, "gl_Color");\r
+ e[SLANG_VERTEX_FIXED_SECONDARYCOLOR] = gd (tbl, "gl_SecondaryColor");\r
+ e[SLANG_VERTEX_FIXED_NORMAL] = gd (tbl, "gl_Normal");\r
+ e[SLANG_VERTEX_FIXED_VERTEX] = gd (tbl, "gl_Vertex");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD0] = gd (tbl, "gl_MultiTexCoord0");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD1] = gd (tbl, "gl_MultiTexCoord1");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD2] = gd (tbl, "gl_MultiTexCoord2");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD3] = gd (tbl, "gl_MultiTexCoord3");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD4] = gd (tbl, "gl_MultiTexCoord4");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD5] = gd (tbl, "gl_MultiTexCoord5");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD6] = gd (tbl, "gl_MultiTexCoord6");\r
+ e[SLANG_VERTEX_FIXED_MULTITEXCOORD7] = gd (tbl, "gl_MultiTexCoord7");\r
+ e[SLANG_VERTEX_FIXED_FOGCOORD] = gd (tbl, "gl_FogCoord");\r
+ e[SLANG_VERTEX_FIXED_FRONTCOLOR] = gd (tbl, "gl_FrontColor");\r
+ e[SLANG_VERTEX_FIXED_BACKCOLOR] = gd (tbl, "gl_BackColor");\r
+ e[SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR] = gd (tbl, "gl_FrontSecondaryColor");\r
+ e[SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR] = gd (tbl, "gl_BackSecondaryColor");\r
+ e[SLANG_VERTEX_FIXED_TEXCOORD] = gd (tbl, "gl_TexCoord");\r
+ e[SLANG_VERTEX_FIXED_FOGFRAGCOORD] = gd (tbl, "gl_FogFragCoord");\r
+}\r
+\r
+static GLvoid fill_fragment_fixed_entries (GLuint e[], slang_export_data_table *tbl)\r
+{\r
+ e[SLANG_FRAGMENT_FIXED_FRAGCOORD] = gd (tbl, "gl_FragCoord");\r
+ e[SLANG_FRAGMENT_FIXED_FRONTFACING] = gd (tbl, "gl_FrontFacing");\r
+ e[SLANG_FRAGMENT_FIXED_FRAGCOLOR] = gd (tbl, "gl_FragColor");\r
+ e[SLANG_FRAGMENT_FIXED_FRAGDATA] = gd (tbl, "gl_FragData");\r
+ e[SLANG_FRAGMENT_FIXED_FRAGDEPTH] = gd (tbl, "gl_FragDepth");\r
+ e[SLANG_FRAGMENT_FIXED_COLOR] = gd (tbl, "gl_Color");\r
+ e[SLANG_FRAGMENT_FIXED_SECONDARYCOLOR] = gd (tbl, "gl_SecondaryColor");\r
+ e[SLANG_FRAGMENT_FIXED_TEXCOORD] = gd (tbl, "gl_TexCoord");\r
+ e[SLANG_FRAGMENT_FIXED_FOGFRAGCOORD] = gd (tbl, "gl_FogFragCoord");\r
+}\r
+\r
+static GLuint gc (slang_export_code_table *tbl, const char *name)\r
+{\r
+ slang_atom atom;\r
+ GLuint i;\r
+\r
+ atom = slang_atom_pool_atom (tbl->atoms, name);\r
+ if (atom == SLANG_ATOM_NULL)\r
+ return ~0;\r
+\r
+ for (i = 0; i < tbl->count; i++)\r
+ if (atom == tbl->entries[i].name)\r
+ return tbl->entries[i].address;\r
+ return ~0;\r
+}\r
+\r
+static GLvoid resolve_code (GLuint code[], slang_export_code_table *tbl)\r
+{\r
+ code[0] = gc (tbl, "@main");\r
+}\r
+\r
GLboolean _slang_link (slang_program *prog, slang_translation_unit **units, GLuint count)\r
{\r
GLuint i;\r
GLuint index;\r
\r
if (units[i]->type == slang_unit_fragment_shader)\r
+ {\r
index = SLANG_UNIFORM_BINDING_FRAGMENT;\r
+ fill_fragment_fixed_entries (prog->fragment_fixed_entries, &units[i]->exp_data);\r
+ }\r
else\r
+ {\r
index = SLANG_UNIFORM_BINDING_VERTEX;\r
+ fill_vertex_fixed_entries (prog->vertex_fixed_entries, &units[i]->exp_data);\r
+ }\r
\r
if (!gather_uniform_bindings (&prog->uniforms, &units[i]->exp_data, index))\r
return GL_FALSE;\r
+ if (!gather_active_uniforms (&prog->active_uniforms, &units[i]->exp_data))\r
+ return GL_FALSE;\r
+ fill_common_fixed_entries (prog->common_fixed_entries[index], &units[i]->exp_data);\r
+ resolve_code (&prog->code[index], &units[i]->exp_code);\r
prog->machines[index] = units[i]->machine;\r
+ prog->assemblies[index] = units[i]->assembly;\r
}\r
\r
return GL_TRUE;\r
#if !defined SLANG_LINK_H\r
#define SLANG_LINK_H\r
\r
-#include "slang_assemble.h"\r
-#include "slang_execute.h"\r
+#include "slang_compile.h"\r
\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
\r
-#define SLANG_UNIFORM_BINDING_VERTEX 0\r
-#define SLANG_UNIFORM_BINDING_FRAGMENT 1\r
-#define SLANG_UNIFORM_BINDING_MAX 2\r
+typedef enum\r
+{\r
+ SLANG_UNIFORM_BINDING_VERTEX,\r
+ SLANG_UNIFORM_BINDING_FRAGMENT,\r
+ SLANG_UNIFORM_BINDING_MAX\r
+};\r
\r
typedef struct\r
{\r
GLuint count;\r
} slang_uniform_bindings;\r
\r
+typedef struct\r
+{\r
+ slang_export_data_quant *quant;\r
+ char *name;\r
+} slang_active_uniform;\r
+\r
+typedef struct\r
+{\r
+ slang_active_uniform *table;\r
+ GLuint count;\r
+} slang_active_uniforms;\r
+\r
+typedef enum\r
+{\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIX,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIX,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIX,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIX,\r
+ SLANG_COMMON_FIXED_NORMALMATRIX,\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIXTRANSPOSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWMATRIXINVERSETRANSPOSE,\r
+ SLANG_COMMON_FIXED_PROJECTIONMATRIXINVERSETRANSPOSE,\r
+ SLANG_COMMON_FIXED_MODELVIEWPROJECTIONMATRIXINVERSETRANSPOSE,\r
+ SLANG_COMMON_FIXED_TEXTUREMATRIXINVERSETRANSPOSE,\r
+ SLANG_COMMON_FIXED_NORMALSCALE,\r
+ SLANG_COMMON_FIXED_DEPTHRANGE,\r
+ SLANG_COMMON_FIXED_CLIPPLANE,\r
+ SLANG_COMMON_FIXED_POINT,\r
+ SLANG_COMMON_FIXED_FRONTMATERIAL,\r
+ SLANG_COMMON_FIXED_BACKMATERIAL,\r
+ SLANG_COMMON_FIXED_LIGHTSOURCE,\r
+ SLANG_COMMON_FIXED_LIGHTMODEL,\r
+ SLANG_COMMON_FIXED_FRONTLIGHTMODELPRODUCT,\r
+ SLANG_COMMON_FIXED_BACKLIGHTMODELPRODUCT,\r
+ SLANG_COMMON_FIXED_FRONTLIGHTPRODUCT,\r
+ SLANG_COMMON_FIXED_BACKLIGHTPRODUCT,\r
+ SLANG_COMMON_FIXED_TEXTUREENVCOLOR,\r
+ SLANG_COMMON_FIXED_EYEPLANES,\r
+ SLANG_COMMON_FIXED_EYEPLANET,\r
+ SLANG_COMMON_FIXED_EYEPLANER,\r
+ SLANG_COMMON_FIXED_EYEPLANEQ,\r
+ SLANG_COMMON_FIXED_OBJECTPLANES,\r
+ SLANG_COMMON_FIXED_OBJECTPLANET,\r
+ SLANG_COMMON_FIXED_OBJECTPLANER,\r
+ SLANG_COMMON_FIXED_OBJECTPLANEQ,\r
+ SLANG_COMMON_FIXED_FOG,\r
+ SLANG_COMMON_FIXED_MAX\r
+};\r
+\r
+typedef enum\r
+{\r
+ SLANG_VERTEX_FIXED_POSITION,\r
+ SLANG_VERTEX_FIXED_POINTSIZE,\r
+ SLANG_VERTEX_FIXED_CLIPVERTEX,\r
+ SLANG_VERTEX_FIXED_COLOR,\r
+ SLANG_VERTEX_FIXED_SECONDARYCOLOR,\r
+ SLANG_VERTEX_FIXED_NORMAL,\r
+ SLANG_VERTEX_FIXED_VERTEX,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD0,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD1,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD2,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD3,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD4,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD5,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD6,\r
+ SLANG_VERTEX_FIXED_MULTITEXCOORD7,\r
+ SLANG_VERTEX_FIXED_FOGCOORD,\r
+ SLANG_VERTEX_FIXED_FRONTCOLOR,\r
+ SLANG_VERTEX_FIXED_BACKCOLOR,\r
+ SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR,\r
+ SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR,\r
+ SLANG_VERTEX_FIXED_TEXCOORD,\r
+ SLANG_VERTEX_FIXED_FOGFRAGCOORD,\r
+ SLANG_VERTEX_FIXED_MAX\r
+};\r
+\r
+typedef enum\r
+{\r
+ SLANG_FRAGMENT_FIXED_FRAGCOORD,\r
+ SLANG_FRAGMENT_FIXED_FRONTFACING,\r
+ SLANG_FRAGMENT_FIXED_FRAGCOLOR,\r
+ SLANG_FRAGMENT_FIXED_FRAGDATA,\r
+ SLANG_FRAGMENT_FIXED_FRAGDEPTH,\r
+ SLANG_FRAGMENT_FIXED_COLOR,\r
+ SLANG_FRAGMENT_FIXED_SECONDARYCOLOR,\r
+ SLANG_FRAGMENT_FIXED_TEXCOORD,\r
+ SLANG_FRAGMENT_FIXED_FOGFRAGCOORD,\r
+ SLANG_FRAGMENT_FIXED_MAX\r
+};\r
+\r
typedef struct\r
{\r
slang_uniform_bindings uniforms;\r
+ slang_active_uniforms active_uniforms;\r
+ GLuint common_fixed_entries[SLANG_UNIFORM_BINDING_MAX][SLANG_COMMON_FIXED_MAX];\r
+ GLuint vertex_fixed_entries[SLANG_VERTEX_FIXED_MAX];\r
+ GLuint fragment_fixed_entries[SLANG_FRAGMENT_FIXED_MAX];\r
+ GLuint code[SLANG_UNIFORM_BINDING_MAX];\r
slang_machine *machines[SLANG_UNIFORM_BINDING_MAX];\r
+ slang_assembly_file *assemblies[SLANG_UNIFORM_BINDING_MAX];\r
} slang_program;\r
\r
GLvoid slang_program_ctr (slang_program *);\r
\r
#include "imports.h"\r
#include "grammar_mesa.h"\r
-#include "slang_utility.h"\r
-#include "slang_compile.h"\r
#include "slang_preprocess.h"\r
\r
static const char *slang_version_syn =\r
/*\r
* Mesa 3-D graphics library\r
- * Version: 6.3\r
+ * Version: 6.5\r
*\r
- * Copyright (C) 2005 Brian Paul All Rights Reserved.\r
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.\r
*\r
* Permission is hereby granted, free of charge, to any person obtaining a\r
* copy of this software and associated documentation files (the "Software"),\r
#if !defined SLANG_PREPROCESS_H\r
#define SLANG_PREPROCESS_H\r
\r
+#include "slang_compile.h"\r
+\r
#if defined __cplusplus\r
extern "C" {\r
#endif\r
*/
#include "imports.h"
-#include "slang_utility.h"
#include "slang_storage.h"
-#include "slang_assemble.h"\r
-#include "slang_execute.h"
/* slang_storage_array */
* elements. They are also required to support indirect addressing. That is, if B references
* first data slot in the array, S is the size of the data slot and I is the integral index that
* is not known at compile time, B+I*S references I-th data slot.
- *\r
+ *
* This structure is also used to break down built-in data types that are not supported directly.
* Vectors, like vec3, are constructed from arrays of their basic types. Matrices are formed of
* an array of column vectors, which are in turn processed as other vectors.
slang_atom_entry *entries[SLANG_ATOM_POOL_SIZE];\r
} slang_atom_pool;\r
\r
-void slang_atom_pool_construct (slang_atom_pool *);\r
-void slang_atom_pool_destruct (slang_atom_pool *);\r
+GLvoid slang_atom_pool_construct (slang_atom_pool *);\r
+GLvoid slang_atom_pool_destruct (slang_atom_pool *);\r
slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *);\r
const char *slang_atom_pool_id (slang_atom_pool *, slang_atom);\r
\r
x86/rtasm/x86sse.c \
sparc/sparc.c \
ppc/common_ppc.c \
- x86-64/x86-64.c
+ x86-64/x86-64.c \
+ shader/slang/slang_execute_x86.c
X86_SOURCES = \
x86/common_x86_asm.S \
#include "s_context.h"\r
#include "shaderobjects.h"\r
#include "shaderobjects_3dlabs.h"\r
-\r
-\r
-static void fetch_input_vec4 (const char *name, GLfloat *vec, GLuint index,\r
- struct gl2_fragment_shader_intf **fs)\r
-{\r
- _slang_fetch_vec4_f (fs, name, vec, index, 1);\r
-}\r
-\r
-static void fetch_output_vec4 (const char *name, GLfloat *vec, GLuint index,\r
- struct gl2_fragment_shader_intf **fs)\r
-{\r
- _slang_fetch_vec4_f (fs, name, vec, index, 0);\r
-}\r
+#include "slang_utility.h"\r
+#include "slang_link.h"\r
\r
void _swrast_exec_arbshader (GLcontext *ctx, struct sw_span *span)\r
{\r
- struct gl2_program_intf **prog;\r
- struct gl2_fragment_shader_intf **fs = NULL;\r
- GLuint count, i;\r
+ struct gl2_program_intf **pro;\r
+ GLuint i;\r
\r
- prog = ctx->ShaderObjects.CurrentProgram;\r
- count = (**prog)._container.GetAttachedCount ((struct gl2_container_intf **) prog);\r
- for (i = 0; i < count; i++)\r
- {\r
- struct gl2_generic_intf **obj;\r
- struct gl2_unknown_intf **unk;\r
-\r
- obj = (**prog)._container.GetAttached ((struct gl2_container_intf **) prog, i);\r
- unk = (**obj)._unknown.QueryInterface ((struct gl2_unknown_intf **) obj, UIID_FRAGMENT_SHADER);\r
- (**obj)._unknown.Release ((struct gl2_unknown_intf **) obj);\r
- if (unk != NULL)\r
- {\r
- fs = (struct gl2_fragment_shader_intf **) unk;\r
- break;\r
- }\r
- }\r
- if (fs == NULL)\r
+ pro = ctx->ShaderObjects.CurrentProgram;\r
+ if (pro == NULL)\r
return;\r
\r
for (i = span->start; i < span->end; i++)\r
{\r
GLfloat vec[4];\r
GLuint j;\r
- GLboolean kill;\r
+ GLboolean discard;\r
\r
vec[0] = (GLfloat) span->x + i;\r
vec[1] = (GLfloat) span->y;\r
vec[2] = (GLfloat) span->array->z[i] / ctx->DrawBuffer->_DepthMaxF;\r
vec[3] = span->w + span->dwdx * i;\r
- fetch_input_vec4 ("gl_FragCoord", vec, 0, fs);\r
+ (**pro).UpdateFixedVarying (pro, SLANG_FRAGMENT_FIXED_FRAGCOORD, vec, 0,\r
+ 4 * sizeof (GLfloat), GL_TRUE);\r
vec[0] = CHAN_TO_FLOAT(span->array->rgba[i][RCOMP]);\r
vec[1] = CHAN_TO_FLOAT(span->array->rgba[i][GCOMP]);\r
vec[2] = CHAN_TO_FLOAT(span->array->rgba[i][BCOMP]);\r
vec[3] = CHAN_TO_FLOAT(span->array->rgba[i][ACOMP]);\r
- fetch_input_vec4 ("gl_Color", vec, 0, fs);\r
+ (**pro).UpdateFixedVarying (pro, SLANG_FRAGMENT_FIXED_COLOR, vec, 0, 4 * sizeof (GLfloat),\r
+ GL_TRUE);\r
for (j = 0; j < ctx->Const.MaxTextureCoordUnits; j++)\r
{\r
vec[0] = span->array->texcoords[j][i][0];\r
vec[1] = span->array->texcoords[j][i][1];\r
vec[2] = span->array->texcoords[j][i][2];\r
vec[3] = span->array->texcoords[j][i][3];\r
- fetch_input_vec4 ("gl_TexCoord", vec, j, fs);\r
+ (**pro).UpdateFixedVarying (pro, SLANG_FRAGMENT_FIXED_TEXCOORD, vec, j,\r
+ 4 * sizeof (GLfloat), GL_TRUE);\r
}\r
\r
- _slang_exec_fragment_shader (fs);\r
+ _slang_exec_fragment_shader (pro);\r
\r
- _slang_fetch_discard (fs, &kill);\r
- if (kill)\r
+ _slang_fetch_discard (pro, &discard);\r
+ if (discard)\r
{\r
span->array->mask[i] = GL_FALSE;\r
span->writeAll = GL_FALSE;\r
}\r
- fetch_output_vec4 ("gl_FragColor", vec, 0, fs);\r
- UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][RCOMP], vec[0]);\r
- UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][GCOMP], vec[1]);\r
- UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][BCOMP], vec[2]);\r
- UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][ACOMP], vec[3]);\r
+ else\r
+ {\r
+ (**pro).UpdateFixedVarying (pro, SLANG_FRAGMENT_FIXED_FRAGCOLOR, vec, 0,\r
+ 4 * sizeof (GLfloat), GL_FALSE);\r
+ UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][RCOMP], vec[0]);\r
+ UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][GCOMP], vec[1]);\r
+ UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][BCOMP], vec[2]);\r
+ UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][ACOMP], vec[3]);\r
+ }\r
}\r
}\r
\r
#include "shaderobjects_3dlabs.h"\r
#include "t_pipeline.h"\r
#include "slang_utility.h"\r
+#include "slang_link.h"\r
\r
typedef struct\r
{\r
{\r
}\r
\r
-static void fetch_input_float (const char *name, GLuint attr, GLuint i, struct vertex_buffer *vb,\r
- struct gl2_vertex_shader_intf **vs)\r
+static GLvoid fetch_input_float (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i,\r
+ struct vertex_buffer *vb)\r
{\r
const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data;\r
- /*const GLuint size = vb->AttribPtr[attr]->size;*/\r
const GLuint stride = vb->AttribPtr[attr]->stride;\r
const GLfloat *data = (const GLfloat *) (ptr + stride * i);\r
- float vec[1];\r
+ GLfloat vec[1];\r
\r
vec[0] = data[0];\r
- _slang_fetch_float (vs, name, vec, 1);\r
+ (**pro).UpdateFixedAttribute (pro, index, vec, 0, sizeof (GLfloat), GL_TRUE);\r
}\r
\r
-static void fetch_input_vec3 (const char *name, GLuint attr, GLuint i, struct vertex_buffer *vb,\r
- struct gl2_vertex_shader_intf **vs)\r
+static GLvoid fetch_input_vec3 (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i,\r
+ struct vertex_buffer *vb)\r
{\r
const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data;\r
- /*const GLuint size = vb->AttribPtr[attr]->size;*/\r
const GLuint stride = vb->AttribPtr[attr]->stride;\r
const GLfloat *data = (const GLfloat *) (ptr + stride * i);\r
- float vec[3];\r
+ GLfloat vec[3];\r
\r
vec[0] = data[0];\r
vec[1] = data[1];\r
vec[2] = data[2];\r
- _slang_fetch_vec3 (vs, name, vec, 1);\r
+ (**pro).UpdateFixedAttribute (pro, index, vec, 0, 3 * sizeof (GLfloat), GL_TRUE);\r
}\r
\r
-static void fetch_input_vec4 (const char *name, GLuint attr, GLuint i, struct vertex_buffer *vb,\r
- struct gl2_vertex_shader_intf **vs)\r
+static void fetch_input_vec4 (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i,\r
+ struct vertex_buffer *vb)\r
{\r
const GLubyte *ptr = (const GLubyte *) vb->AttribPtr[attr]->data;\r
const GLuint size = vb->AttribPtr[attr]->size;\r
const GLuint stride = vb->AttribPtr[attr]->stride;\r
const GLfloat *data = (const GLfloat *) (ptr + stride * i);\r
- float vec[4];\r
+ GLfloat vec[4];\r
\r
switch (size)\r
{\r
vec[3] = data[3];\r
break;\r
}\r
- _slang_fetch_vec4 (vs, name, vec, 0, 1);\r
+ (**pro).UpdateFixedAttribute (pro, index, vec, 0, 4 * sizeof (GLfloat), GL_TRUE);\r
}\r
\r
-static void fetch_output_float (const char *name, GLuint attr, GLuint i, arbvs_stage_data *store,\r
- struct gl2_vertex_shader_intf **vs)\r
+static GLvoid fetch_output_float (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i,\r
+ arbvs_stage_data *store)\r
{\r
- float vec[1];\r
-\r
- _slang_fetch_float (vs, name, vec, 0);\r
- _mesa_memcpy (&store->outputs[attr].data[i], vec, 4);\r
+ (**pro).UpdateFixedAttribute (pro, index, &store->outputs[attr].data[i], 0, sizeof (GLfloat),\r
+ GL_FALSE);\r
}\r
\r
-static void fetch_output_vec4 (const char *name, GLuint attr, GLuint i, GLuint index,\r
- arbvs_stage_data *store, struct gl2_vertex_shader_intf **vs)\r
+static void fetch_output_vec4 (struct gl2_program_intf **pro, GLuint index, GLuint attr, GLuint i,\r
+ GLuint offset, arbvs_stage_data *store)\r
{\r
- float vec[4];\r
-\r
- _slang_fetch_vec4 (vs, name, vec, index, 0);\r
- _mesa_memcpy (&store->outputs[attr].data[i], vec, 16);\r
-}\r
-\r
-static void fetch_uniform_mat4 (const char *name, GLmatrix *matrix, GLuint index,\r
- struct gl2_vertex_shader_intf **vs)\r
-{\r
- GLuint len;\r
- GLfloat mat[16];\r
- char buffer[64];\r
-\r
- _mesa_strcpy (buffer, name);\r
- len = _mesa_strlen (name);\r
-\r
- /* we want inverse matrix */\r
- if (!matrix->inv)\r
- {\r
- /* allocate inverse matrix and make it dirty */\r
- _math_matrix_alloc_inv (matrix);\r
- _math_matrix_loadf (matrix, matrix->m);\r
- }\r
- _math_matrix_analyse (matrix);\r
-\r
- /* identity */\r
- _slang_fetch_mat4 (vs, name, matrix->m, index, 1);\r
-\r
- /* transpose */\r
- _mesa_strcpy (buffer + len, "Transpose");\r
- _math_transposef (mat, matrix->m);\r
- _slang_fetch_mat4 (vs, buffer, mat, index, 1);\r
-\r
- /* inverse */\r
- _mesa_strcpy (buffer + len, "Inverse");\r
- _slang_fetch_mat4 (vs, buffer, matrix->inv, index, 1);\r
-\r
- /* inverse transpose */\r
- _mesa_strcpy (buffer + len, "InverseTranspose");\r
- _math_transposef (mat, matrix->inv);\r
- _slang_fetch_mat4 (vs, buffer, mat, index, 1);\r
-}\r
-\r
-static void fetch_normal_matrix (const char *name, GLmatrix *matrix,\r
- struct gl2_vertex_shader_intf **vs)\r
-{\r
- GLfloat mat[9];\r
-\r
- _math_matrix_analyse (matrix);\r
-\r
- /* inverse transpose */\r
- mat[0] = matrix->inv[0];\r
- mat[1] = matrix->inv[4];\r
- mat[2] = matrix->inv[8];\r
- mat[3] = matrix->inv[1];\r
- mat[4] = matrix->inv[5];\r
- mat[5] = matrix->inv[9];\r
- mat[6] = matrix->inv[2];\r
- mat[7] = matrix->inv[6];\r
- mat[8] = matrix->inv[10];\r
- _slang_fetch_mat3 (vs, name, mat, 0, 1);\r
+ (**pro).UpdateFixedAttribute (pro, index, &store->outputs[attr].data[i], offset,\r
+ 4 * sizeof (GLfloat), GL_FALSE);\r
}\r
\r
static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stage *stage)\r
TNLcontext *tnl = TNL_CONTEXT(ctx);\r
struct vertex_buffer *vb = &tnl->vb;\r
arbvs_stage_data *store = ARBVS_STAGE_DATA(stage);\r
- struct gl2_program_intf **prog;\r
- struct gl2_vertex_shader_intf **vs = NULL;\r
- GLsizei count, i, j;\r
+ struct gl2_program_intf **pro;\r
+ GLsizei i, j;\r
\r
- prog = ctx->ShaderObjects.CurrentProgram;\r
- if (prog == NULL)\r
+ pro = ctx->ShaderObjects.CurrentProgram;\r
+ if (pro == NULL)\r
return GL_TRUE;\r
\r
- count = (**prog)._container.GetAttachedCount ((struct gl2_container_intf **) prog);\r
- for (i = 0; i < count; i++)\r
- {\r
- struct gl2_generic_intf **obj;\r
- struct gl2_unknown_intf **unk;\r
-\r
- obj = (**prog)._container.GetAttached ((struct gl2_container_intf **) prog, i);\r
- unk = (**obj)._unknown.QueryInterface ((struct gl2_unknown_intf **) obj, UIID_VERTEX_SHADER);\r
- (**obj)._unknown.Release ((struct gl2_unknown_intf **) obj);\r
- if (unk != NULL)\r
- {\r
- vs = (struct gl2_vertex_shader_intf **) unk;\r
- break;\r
- }\r
- }\r
- if (vs == NULL)\r
- return GL_TRUE;\r
-\r
- fetch_uniform_mat4 ("gl_ModelViewMatrix", ctx->ModelviewMatrixStack.Top, 0, vs);\r
- fetch_uniform_mat4 ("gl_ProjectionMatrix", ctx->ProjectionMatrixStack.Top, 0, vs);\r
- fetch_uniform_mat4 ("gl_ModelViewProjectionMatrix", &ctx->_ModelProjectMatrix, 0, vs);\r
- for (j = 0; j < 8; j++)\r
- fetch_uniform_mat4 ("gl_TextureMatrix", ctx->TextureMatrixStack[j].Top, j, vs);\r
- fetch_normal_matrix ("gl_NormalMatrix", ctx->ModelviewMatrixStack.Top, vs);\r
- /* XXX: fetch uniform float gl_NormalScale */\r
- /* XXX: fetch uniform mat4 gl_ClipPlane */\r
- /* XXX: fetch uniform mat4 gl_TextureEnvColor */\r
- /* XXX: fetch uniform mat4 gl_EyePlaneS */\r
- /* XXX: fetch uniform mat4 gl_EyePlaneT */\r
- /* XXX: fetch uniform mat4 gl_EyePlaneR */\r
- /* XXX: fetch uniform mat4 gl_EyePlaneQ */\r
- /* XXX: fetch uniform mat4 gl_ObjectPlaneS */\r
- /* XXX: fetch uniform mat4 gl_ObjectPlaneT */\r
- /* XXX: fetch uniform mat4 gl_ObjectPlaneR */\r
- /* XXX: fetch uniform mat4 gl_ObjectPlaneQ */\r
+ (**pro).UpdateFixedUniforms (pro);\r
\r
for (i = 0; i < vb->Count; i++)\r
{\r
- fetch_input_vec4 ("gl_Vertex", _TNL_ATTRIB_POS, i, vb, vs);\r
- fetch_input_vec3 ("gl_Normal", _TNL_ATTRIB_NORMAL, i, vb, vs);\r
- fetch_input_vec4 ("gl_Color", _TNL_ATTRIB_COLOR0, i, vb, vs);\r
- fetch_input_vec4 ("gl_SecondaryColor", _TNL_ATTRIB_COLOR1, i, vb, vs);\r
- fetch_input_float ("gl_FogCoord", _TNL_ATTRIB_FOG, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord0", _TNL_ATTRIB_TEX0, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord1", _TNL_ATTRIB_TEX1, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord2", _TNL_ATTRIB_TEX2, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord3", _TNL_ATTRIB_TEX3, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord4", _TNL_ATTRIB_TEX4, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord5", _TNL_ATTRIB_TEX5, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord6", _TNL_ATTRIB_TEX6, i, vb, vs);\r
- fetch_input_vec4 ("gl_MultiTexCoord7", _TNL_ATTRIB_TEX7, i, vb, vs);\r
-\r
- _slang_exec_vertex_shader (vs);\r
-\r
- fetch_output_vec4 ("gl_Position", VERT_RESULT_HPOS, i, 0, store, vs);\r
- fetch_output_vec4 ("gl_FrontColor", VERT_RESULT_COL0, i, 0, store, vs);\r
- fetch_output_vec4 ("gl_FrontSecondaryColor", VERT_RESULT_COL1, i, 0, store, vs);\r
- fetch_output_float ("gl_FogFragCoord", VERT_RESULT_FOGC, i, store, vs);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_VERTEX, _TNL_ATTRIB_POS, i, vb);\r
+ fetch_input_vec3 (pro, SLANG_VERTEX_FIXED_NORMAL, _TNL_ATTRIB_NORMAL, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_COLOR, _TNL_ATTRIB_COLOR0, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_SECONDARYCOLOR, _TNL_ATTRIB_COLOR1, i, vb);\r
+ fetch_input_float (pro, SLANG_VERTEX_FIXED_FOGCOORD, _TNL_ATTRIB_FOG, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD0, _TNL_ATTRIB_TEX0, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD1, _TNL_ATTRIB_TEX1, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD2, _TNL_ATTRIB_TEX2, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD3, _TNL_ATTRIB_TEX3, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD4, _TNL_ATTRIB_TEX4, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD5, _TNL_ATTRIB_TEX5, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD6, _TNL_ATTRIB_TEX6, i, vb);\r
+ fetch_input_vec4 (pro, SLANG_VERTEX_FIXED_MULTITEXCOORD7, _TNL_ATTRIB_TEX7, i, vb);\r
+\r
+ _slang_exec_vertex_shader (pro);\r
+\r
+ fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_POSITION, VERT_RESULT_HPOS, i, 0, store);\r
+ fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_FRONTCOLOR, VERT_RESULT_COL0, i, 0, store);\r
+ fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_FRONTSECONDARYCOLOR, VERT_RESULT_COL1, i, 0, store);\r
+ fetch_output_float (pro, SLANG_VERTEX_FIXED_FOGFRAGCOORD, VERT_RESULT_FOGC, i, store);\r
for (j = 0; j < 8; j++)\r
- fetch_output_vec4 ("gl_TexCoord", VERT_RESULT_TEX0 + j, i, j, store, vs);\r
- fetch_output_float ("gl_PointSize", VERT_RESULT_PSIZ, i, store, vs);\r
- fetch_output_vec4 ("gl_BackColor", VERT_RESULT_BFC0, i, 0, store, vs);\r
- fetch_output_vec4 ("gl_BackSecondaryColor", VERT_RESULT_BFC1, i, 0, store, vs);\r
- /* XXX: fetch output gl_ClipVertex */\r
+ fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_TEXCOORD, VERT_RESULT_TEX0 + j, i, j, store);\r
+ fetch_output_float (pro, SLANG_VERTEX_FIXED_POINTSIZE, VERT_RESULT_PSIZ, i, store);\r
+ fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_BACKCOLOR, VERT_RESULT_BFC0, i, 0, store);\r
+ fetch_output_vec4 (pro, SLANG_VERTEX_FIXED_BACKSECONDARYCOLOR, VERT_RESULT_BFC1, i, 0, store);\r
+ /* XXX: fetch output SLANG_VERTEX_FIXED_CLIPVERTEX */\r
}\r
\r
- (**vs)._shader._generic._unknown.Release ((struct gl2_unknown_intf **) vs);\r
-\r
vb->ClipPtr = &store->outputs[VERT_RESULT_HPOS];\r
vb->ClipPtr->count = vb->Count;\r
vb->ColorPtr[0] = &store->outputs[VERT_RESULT_COL0];\r
-#if defined(USE_X86_ASM)
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
#include "imports.h"
#include "x86sse.h"
case mod_INDIRECT:
break;
case mod_DISP8:
- emit_1b(p, regmem.disp);
+ emit_1b(p, regmem.disp);\r
break;
case mod_DISP32:
- emit_1i(p, regmem.disp);
+ emit_1i(p, regmem.disp);\r
break;
default:
assert(0);
/* Create and manipulate registers and regmem values:
*/
-struct x86_reg x86_make_reg( GLuint file,
- GLuint idx )
+struct x86_reg x86_make_reg( enum x86_reg_file file,
+ enum x86_reg_name idx )
{
struct x86_reg reg;
void x86_jcc( struct x86_function *p,
- GLuint cc,
+ enum x86_cc cc,
GLubyte *label )
{
GLint offset = label - (x86_get_label(p) + 2);
/* Always use a 32bit offset for forward jumps:
*/
GLubyte *x86_jcc_forward( struct x86_function *p,
- GLuint cc )
+ enum x86_cc cc )
{
emit_2ub(p, 0x0f, 0x80 + cc);
emit_1i(p, 0);
return x86_get_label(p);
+}\r
+\r
+GLubyte *x86_jmp_forward( struct x86_function *p)\r
+{\r
+ emit_1ub(p, 0xe9);\r
+ emit_1i(p, 0);\r
+ return x86_get_label(p);\r
+}\r
+\r
+GLubyte *x86_call_forward( struct x86_function *p)\r
+{\r
+ emit_1ub(p, 0xe8);\r
+ emit_1i(p, 0);\r
+ return x86_get_label(p);\r
}
/* Fixup offset from forward jump:
GLubyte *fixup )
{
*(int *)(fixup - 4) = x86_get_label(p) - fixup;
+}\r
+\r
+void x86_jmp( struct x86_function *p, GLubyte *label)\r
+{\r
+ emit_1ub(p, 0xe9);\r
+ emit_1i(p, label - x86_get_label(p) - 4);\r
+}\r
+\r
+void x86_call( struct x86_function *p, GLubyte *label)\r
+{\r
+ emit_1ub(p, 0xe8);\r
+ emit_1i(p, label - x86_get_label(p) - 4);\r
+}\r
+\r
+/* michal:\r
+ * Temporary. As I need immediate operands, and dont want to mess with the codegen,\r
+ * I load the immediate into general purpose register and use it.\r
+ */\r
+void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm )\r
+{\r
+ assert(dst.mod == mod_REG);\r
+ emit_1ub(p, 0xb8 + dst.idx);\r
+ emit_1i(p, imm);\r
}
void x86_push( struct x86_function *p,
{
emit_1ub(p, 0x85);
emit_modrm( p, dst, src );
+}\r
+\r
+void x86_add( struct x86_function *p,\r
+ struct x86_reg dst,\r
+ struct x86_reg src )\r
+{\r
+ emit_op_modrm(p, 0x03, 0x01, dst, src );\r
+}\r
+\r
+void x86_mul( struct x86_function *p,\r
+ struct x86_reg src )\r
+{\r
+ assert (src.file == file_REG32 && src.mod == mod_REG);\r
+ emit_op_modrm(p, 0xf7, 0, x86_make_reg (file_REG32, reg_SP), src );\r
+}\r
+\r
+void x86_sub( struct x86_function *p,\r
+ struct x86_reg dst,\r
+ struct x86_reg src )\r
+{\r
+ emit_op_modrm(p, 0x2b, 0x29, dst, src );\r
}
void x86_init_func( struct x86_function *p )
{
- p->store = _mesa_exec_malloc(1024);
- p->csr = p->store;
+ x86_init_func_size(p, 1024);
+}\r
+\r
+void x86_init_func_size( struct x86_function *p, GLuint code_size )\r
+{\r
+ p->store = _mesa_exec_malloc(code_size);\r
+ p->csr = p->store;\r
}
void x86_release_func( struct x86_function *p )
{
if (DISASSEM)
_mesa_printf("disassemble %p %p\n", p->store, p->csr);
- return (void (*)())p->store;
+ return (void (*)(void))p->store;
}
#else
#ifndef _X86SSE_H_
#define _X86SSE_H_
-#if defined(USE_X86_ASM)
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
#include "glheader.h"
*/
-void x86_init_func( struct x86_function *p );
+void x86_init_func( struct x86_function *p );\r
+void x86_init_func_size( struct x86_function *p, GLuint code_size );
void x86_release_func( struct x86_function *p );
void (*x86_get_func( struct x86_function *p ))( void );
GLubyte *label );
GLubyte *x86_jcc_forward( struct x86_function *p,
- enum x86_cc cc );
+ enum x86_cc cc );\r
+\r
+GLubyte *x86_jmp_forward( struct x86_function *p);\r
+\r
+GLubyte *x86_call_forward( struct x86_function *p);
void x86_fixup_fwd_jump( struct x86_function *p,
- GLubyte *fixup );
+ GLubyte *fixup );\r
+\r
+void x86_jmp( struct x86_function *p, GLubyte *label );\r
+\r
+void x86_call( struct x86_function *p, GLubyte *label );\r
+\r
+/* michal:\r
+ * Temporary. As I need immediate operands, and dont want to mess with the codegen,\r
+ * I load the immediate into general purpose register and use it.\r
+ */\r
+void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm );
/* Macro for sse_shufps() and sse2_pshufd():
void sse_subps( 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 );
-
+\r
+void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_cmp( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_dec( struct x86_function *p, struct x86_reg reg );
void x86_inc( struct x86_function *p, struct x86_reg reg );
void x86_lea( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
-void x86_mov( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
+void x86_mov( struct x86_function *p, struct x86_reg dst, struct x86_reg src );\r
+void x86_mul( struct x86_function *p, struct x86_reg src );
void x86_pop( struct x86_function *p, struct x86_reg reg );
void x86_push( struct x86_function *p, struct x86_reg reg );
-void x86_ret( struct x86_function *p );
+void x86_ret( struct x86_function *p );\r
+void x86_sub( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_test( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_xor( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_sahf( struct x86_function *p );
\r
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
\r
-CFG=gdi - Win32 Debug\r
+CFG=gdi - Win32 Debug x86\r
!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
!MESSAGE use the Export Makefile command and run\r
!MESSAGE \r
!MESSAGE You can specify a configuration when running NMAKE\r
!MESSAGE by defining the macro CFG on the command line. For example:\r
!MESSAGE \r
-!MESSAGE NMAKE /f "gdi.mak" CFG="gdi - Win32 Debug"\r
+!MESSAGE NMAKE /f "gdi.mak" CFG="gdi - Win32 Debug x86"\r
!MESSAGE \r
!MESSAGE Possible choices for configuration are:\r
!MESSAGE \r
!MESSAGE "gdi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")\r
!MESSAGE "gdi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "gdi - Win32 Release x86" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "gdi - Win32 Debug x86" (based on "Win32 (x86) Dynamic-Link Library")\r
!MESSAGE \r
\r
# Begin Project\r
PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Debug\OPENGL32.LIB ..\..\..\..\lib copy Debug\OPENGL32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Debug\OPENGL32.DLL ..\..\..\..\progs\demos\r
# End Special Build Tool\r
\r
+!ELSEIF "$(CFG)" == "gdi - Win32 Release x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "gdi___Win32_Release_x86"\r
+# PROP BASE Intermediate_Dir "gdi___Win32_Release_x86"\r
+# PROP BASE Ignore_Export_Lib 0\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release_x86"\r
+# PROP Intermediate_Dir "Release_x86"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../main" /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GDI_EXPORTS" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /FD /c\r
+# SUBTRACT BASE CPP /YX\r
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../main" /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GDI_EXPORTS" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /FD /c\r
+# SUBTRACT CPP /YX\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 mesa.lib winmm.lib msvcrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib /out:"Release/OPENGL32.DLL" /libpath:"../mesa/Release"\r
+# ADD LINK32 mesa.lib winmm.lib msvcrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib /out:"Release_x86/OPENGL32.DLL" /libpath:"../mesa/Release_x86"\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Release_x86\OPENGL32.LIB ..\..\..\..\lib copy Release_x86\OPENGL32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Release_x86\OPENGL32.DLL ..\..\..\..\progs\demos\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "gdi - Win32 Debug x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "gdi___Win32_Debug_x86"\r
+# PROP BASE Intermediate_Dir "gdi___Win32_Debug_x86"\r
+# PROP BASE Ignore_Export_Lib 0\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug_x86"\r
+# PROP Intermediate_Dir "Debug_x86"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GDI_EXPORTS" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /FR /FD /GZ /c\r
+# SUBTRACT BASE CPP /YX /Yc /Yu\r
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GDI_EXPORTS" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /FR /FD /GZ /c\r
+# SUBTRACT CPP /YX /Yc /Yu\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 mesa.lib winmm.lib msvcrtd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib /out:"Debug/OPENGL32.DLL" /pdbtype:sept /libpath:"../mesa/Debug"\r
+# ADD LINK32 mesa.lib winmm.lib msvcrtd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib /out:"Debug_x86/OPENGL32.DLL" /pdbtype:sept /libpath:"../mesa/Debug_x86"\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Debug_x86\OPENGL32.LIB ..\..\..\..\lib copy Debug_x86\OPENGL32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Debug_x86\OPENGL32.DLL ..\..\..\..\progs\demos\r
+# End Special Build Tool\r
+\r
!ENDIF \r
\r
# Begin Target\r
\r
# Name "gdi - Win32 Release"\r
# Name "gdi - Win32 Debug"\r
+# Name "gdi - Win32 Release x86"\r
+# Name "gdi - Win32 Debug x86"\r
# Begin Group "Source Files"\r
\r
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
\r
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
\r
-CFG=glu - Win32 Debug\r
+CFG=glu - Win32 Debug x86\r
!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
!MESSAGE use the Export Makefile command and run\r
!MESSAGE \r
!MESSAGE You can specify a configuration when running NMAKE\r
!MESSAGE by defining the macro CFG on the command line. For example:\r
!MESSAGE \r
-!MESSAGE NMAKE /f "glu.mak" CFG="glu - Win32 Debug"\r
+!MESSAGE NMAKE /f "glu.mak" CFG="glu - Win32 Debug x86"\r
!MESSAGE \r
!MESSAGE Possible choices for configuration are:\r
!MESSAGE \r
!MESSAGE "glu - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")\r
!MESSAGE "glu - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "glu - Win32 Release x86" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "glu - Win32 Debug x86" (based on "Win32 (x86) Dynamic-Link Library")\r
!MESSAGE \r
\r
# Begin Project\r
PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Debug\GLU32.LIB ..\..\..\..\lib copy Debug\GLU32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Debug\GLU32.DLL ..\..\..\..\progs\demos\r
# End Special Build Tool\r
\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "glu___Win32_Release_x86"\r
+# PROP BASE Intermediate_Dir "glu___Win32_Release_x86"\r
+# PROP BASE Ignore_Export_Lib 0\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release_x86"\r
+# PROP Intermediate_Dir "Release_x86"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../../include" /I "../../../../src/glu/sgi/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLU_EXPORTS" /D "BUILD_GL32" /FD /c\r
+# SUBTRACT BASE CPP /YX\r
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../../include" /I "../../../../src/glu/sgi/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLU_EXPORTS" /D "BUILD_GL32" /FD /c\r
+# SUBTRACT CPP /YX\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 msvcrt.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib Release/glucc.lib /nologo /dll /machine:I386 /nodefaultlib /out:"Release/GLU32.DLL" /libpath:"../gdi/Release"\r
+# ADD LINK32 msvcrt.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib Release/glucc.lib /nologo /dll /machine:I386 /nodefaultlib /out:"Release_x86/GLU32.DLL" /libpath:"../gdi/Release_x86"\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PreLink_Desc=C++ Compilations\r
+PreLink_Cmds=cl @compileRelease.txt LIB /OUT:Release/GLUCC.LIB @objectsRelease.txt\r
+PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Release_x86\GLU32.LIB ..\..\..\..\lib copy Release_x86\GLU32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Release_x86\GLU32.DLL ..\..\..\..\progs\demos\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "glu___Win32_Debug_x86"\r
+# PROP BASE Intermediate_Dir "glu___Win32_Debug_x86"\r
+# PROP BASE Ignore_Export_Lib 0\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug_x86"\r
+# PROP Intermediate_Dir "Debug_x86"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/glu/sgi/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLU_EXPORTS" /D "BUILD_GL32" /FD /GZ /c\r
+# SUBTRACT BASE CPP /YX\r
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/glu/sgi/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GLU_EXPORTS" /D "BUILD_GL32" /FD /GZ /c\r
+# SUBTRACT CPP /YX\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 msvcrtd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib Debug/glucc.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib /out:"Debug/GLU32.DLL" /pdbtype:sept /libpath:"../gdi/Debug"\r
+# ADD LINK32 msvcrtd.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib Debug/glucc.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib /out:"Debug_x86/GLU32.DLL" /pdbtype:sept /libpath:"../gdi/Debug_x86"\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PreLink_Desc=C++ Compilations\r
+PreLink_Cmds=cl @compileDebug.txt LIB /OUT:Debug/GLUCC.LIB @objectsDebug.txt\r
+PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Debug_x86\GLU32.LIB ..\..\..\..\lib copy Debug_x86\GLU32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Debug_x86\GLU32.DLL ..\..\..\..\progs\demos\r
+# End Special Build Tool\r
+\r
!ENDIF \r
\r
# Begin Target\r
\r
# Name "glu - Win32 Release"\r
# Name "glu - Win32 Debug"\r
+# Name "glu - Win32 Release x86"\r
+# Name "glu - Win32 Debug x86"\r
# Begin Group "Source Files"\r
\r
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
# Begin Source File\r
\r
SOURCE="..\..\..\..\src\glu\sgi\libtess\priorityq-heap.c"\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\arc.cc\r
-# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\arcsorter.cc\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\arctess.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\backend.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\basiccrveval.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\basicsurfeval.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\arcsorter.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\bezierEval.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\bezierPatch.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\bezierPatchMesh.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\bin.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\arctess.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\bufpool.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\cachingeval.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\ccw.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\coveandtiler.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\backend.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\curve.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\curvelist.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\curvesub.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\dataTransform.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\basiccrveval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\directedLine.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\displaylist.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\flist.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\flistsorter.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\basicsurfeval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glcurveval.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glinterface.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glrenderer.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glsurfeval.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\bezierEval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\gridWrap.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\hull.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\incurveeval.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\insurfeval.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\bezierPatch.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\intersect.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\knotvector.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mapdesc.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mapdescv.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\bezierPatchMesh.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\maplist.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mesher.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\monoChain.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\monoPolyPart.cc\r
-# PROP Exclude_From_Build 1\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\bin.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\bufpool.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\cachingeval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\ccw.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\coveandtiler.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\curve.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\curvelist.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\curvesub.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\dataTransform.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\directedLine.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\displaylist.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\flist.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\flistsorter.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glcurveval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glinterface.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glrenderer.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\glsurfeval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\gridWrap.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\hull.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\incurveeval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\interface\insurfeval.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\intersect.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\knotvector.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mapdesc.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mapdescv.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\maplist.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mesher.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\monoChain.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\monoPolyPart.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\monotonizer.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\monoTriangulation.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\monoTriangulationBackend.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mycode.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\nurbsinterfac.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\nurbstess.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\partitionX.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\partitionY.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\patch.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\patchlist.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\polyDBG.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\polyUtil.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\primitiveStream.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\quicksort.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\quilt.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\reader.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libtess\README\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\rectBlock.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\renderhints.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleComp.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleCompBot.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleCompRight.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleCompTop.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\monotonizer.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampledLine.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\monoTriangulation.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\monoTriangulationBackend.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\mycode.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleMonoPoly.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\nurbsinterfac.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\nurbstess.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\partitionX.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\partitionY.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\searchTree.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\patch.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\patchlist.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\polyDBG.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\polyUtil.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\slicer.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\primitiveStream.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\quicksort.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\quilt.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\reader.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\sorter.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libtess\README\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\rectBlock.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\renderhints.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleComp.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\splitarcs.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleCompBot.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleCompRight.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleCompTop.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampledLine.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\subdivider.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\sampleMonoPoly.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\nurbtess\searchTree.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\slicer.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\sorter.cc\r
+SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\tobezier.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\splitarcs.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\subdivider.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
-# End Source File\r
-# Begin Source File\r
\r
-SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\tobezier.cc\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\trimline.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\trimregion.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\trimvertpool.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\uarray.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\glu\sgi\libnurbs\internals\varray.cc\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# End Group\r
# Begin Source File\r
\r
SOURCE="..\..\..\..\src\glu\sgi\libtess\alg-outline"\r
+\r
+!IF "$(CFG)" == "glu - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "glu - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
\r
###############################################################################\r
\r
-Project: "gdi"=.\gdi\gdi.dsp - Package Owner=<4>\r
+Project: "gdi"=".\gdi\gdi.dsp" - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "glu"=.\glu\glu.dsp - Package Owner=<4>\r
+Project: "glu"=".\glu\glu.dsp" - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "mesa"=.\mesa\mesa.dsp - Package Owner=<4>\r
+Project: "mesa"=".\mesa\mesa.dsp" - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "osmesa"=.\osmesa\osmesa.dsp - Package Owner=<4>\r
+Project: "osmesa"=".\osmesa\osmesa.dsp" - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+ Begin Project Dependency\r
+ Project_Dep_Name gdi\r
+ End Project Dependency\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Project: "test"=".\test\test.dsp" - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
\r
-CFG=mesa - Win32 Debug\r
+CFG=mesa - Win32 Debug x86\r
!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
!MESSAGE use the Export Makefile command and run\r
!MESSAGE \r
!MESSAGE You can specify a configuration when running NMAKE\r
!MESSAGE by defining the macro CFG on the command line. For example:\r
!MESSAGE \r
-!MESSAGE NMAKE /f "mesa.mak" CFG="mesa - Win32 Debug"\r
+!MESSAGE NMAKE /f "mesa.mak" CFG="mesa - Win32 Debug x86"\r
!MESSAGE \r
!MESSAGE Possible choices for configuration are:\r
!MESSAGE \r
!MESSAGE "mesa - Win32 Release" (based on "Win32 (x86) Static Library")\r
!MESSAGE "mesa - Win32 Debug" (based on "Win32 (x86) Static Library")\r
+!MESSAGE "mesa - Win32 Release x86" (based on "Win32 (x86) Static Library")\r
+!MESSAGE "mesa - Win32 Debug x86" (based on "Win32 (x86) Static Library")\r
!MESSAGE \r
\r
# Begin Project\r
# ADD BASE LIB32 /nologo\r
# ADD LIB32 /nologo\r
\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Release x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "mesa___Win32_Release_x86"\r
+# PROP BASE Intermediate_Dir "mesa___Win32_Release_x86"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release_x86"\r
+# PROP Intermediate_Dir "Release_x86"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /GX /O2 /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/main" /I "../../../../src/mesa/shader" /I "../../../../src/mesa/shader/slang" /I "../../../../src/mesa/shader/grammar" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /YX /FD /Zm1000 /c\r
+# ADD CPP /nologo /W3 /GX /O2 /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/main" /I "../../../../src/mesa/shader" /I "../../../../src/mesa/shader/slang" /I "../../../../src/mesa/shader/grammar" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /D "SLANG_X86" /YX /FD /Zm1000 /c\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Debug x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "mesa___Win32_Debug_x86"\r
+# PROP BASE Intermediate_Dir "mesa___Win32_Debug_x86"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug_x86"\r
+# PROP Intermediate_Dir "Debug_x86"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/main" /I "../../../../src/mesa/shader" /I "../../../../src/mesa/shader/slang" /I "../../../../src/mesa/shader/grammar" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /Fr /FD /GZ /Zm1000 /c\r
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/main" /I "../../../../src/mesa/shader" /I "../../../../src/mesa/shader/slang" /I "../../../../src/mesa/shader/grammar" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "_DLL" /D "BUILD_GL32" /D "MESA_MINWARN" /D "SLANG_X86" /Fr /FD /GZ /Zm1000 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo\r
+\r
!ENDIF \r
\r
# Begin Target\r
\r
# Name "mesa - Win32 Release"\r
# Name "mesa - Win32 Debug"\r
+# Name "mesa - Win32 Release x86"\r
+# Name "mesa - Win32 Debug x86"\r
# Begin Group "Source Files"\r
\r
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\mesa\shader\grammar\grammar.c\r
+\r
+!IF "$(CFG)" == "mesa - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\..\..\src\mesa\shader\slang\slang_execute_x86.c\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\..\..\..\src\mesa\shader\slang\slang_export.c\r
# End Source File\r
# Begin Source File\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\mesa\main\vsnprintf.c\r
+\r
+!IF "$(CFG)" == "mesa - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Release x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
# PROP Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# Begin Source File\r
\r
SOURCE=..\..\..\..\src\mesa\main\vtxfmt.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\..\src\mesa\x86\rtasm\x86sse.c\r
+\r
+!IF "$(CFG)" == "mesa - Win32 Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Release x86"\r
+\r
+!ELSEIF "$(CFG)" == "mesa - Win32 Debug x86"\r
+\r
+# PROP BASE Exclude_From_Build 1\r
+\r
+!ENDIF \r
+\r
# End Source File\r
# End Group\r
# Begin Group "Header Files"\r
\r
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
\r
-CFG=osmesa - Win32 Debug\r
+CFG=osmesa - Win32 Debug x86\r
!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
!MESSAGE use the Export Makefile command and run\r
!MESSAGE \r
!MESSAGE You can specify a configuration when running NMAKE\r
!MESSAGE by defining the macro CFG on the command line. For example:\r
!MESSAGE \r
-!MESSAGE NMAKE /f "osmesa.mak" CFG="osmesa - Win32 Debug"\r
+!MESSAGE NMAKE /f "osmesa.mak" CFG="osmesa - Win32 Debug x86"\r
!MESSAGE \r
!MESSAGE Possible choices for configuration are:\r
!MESSAGE \r
!MESSAGE "osmesa - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")\r
!MESSAGE "osmesa - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "osmesa - Win32 Release x86" (based on "Win32 (x86) Dynamic-Link Library")\r
+!MESSAGE "osmesa - Win32 Debug x86" (based on "Win32 (x86) Dynamic-Link Library")\r
!MESSAGE \r
\r
# Begin Project\r
PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Debug\OSMESA32.LIB ..\..\..\..\lib copy Debug\OSMESA32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Debug\OSMESA32.DLL ..\..\..\..\progs\demos\r
# End Special Build Tool\r
\r
+!ELSEIF "$(CFG)" == "osmesa - Win32 Release x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "osmesa___Win32_Release_x86"\r
+# PROP BASE Intermediate_Dir "osmesa___Win32_Release_x86"\r
+# PROP BASE Ignore_Export_Lib 0\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release_x86"\r
+# PROP Intermediate_Dir "Release_x86"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OSMESA_EXPORTS" /FD /c\r
+# SUBTRACT BASE CPP /YX\r
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OSMESA_EXPORTS" /FD /c\r
+# SUBTRACT CPP /YX\r
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 opengl32.lib winmm.lib msvcrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib /out:"Release/OSMESA32.DLL" /libpath:"../gdi/Release"\r
+# ADD LINK32 opengl32.lib winmm.lib msvcrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib /out:"Release_x86/OSMESA32.DLL" /libpath:"../gdi/Release_x86"\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Release_x86\OSMESA32.LIB ..\..\..\..\lib copy Release_x86\OSMESA32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Release_x86\OSMESA32.DLL ..\..\..\..\progs\demos\r
+# End Special Build Tool\r
+\r
+!ELSEIF "$(CFG)" == "osmesa - Win32 Debug x86"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "osmesa___Win32_Debug_x86"\r
+# PROP BASE Intermediate_Dir "osmesa___Win32_Debug_x86"\r
+# PROP BASE Ignore_Export_Lib 0\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug_x86"\r
+# PROP Intermediate_Dir "Debug_x86"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OSMESA_EXPORTS" /FD /GZ /c\r
+# SUBTRACT BASE CPP /YX\r
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../src/mesa" /I "../../../../src/mesa/main" /I "../../../../src/mesa/glapi" /I "../../../../src/mesa/swrast" /I "../../../../src/mesa/shader" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "OSMESA_EXPORTS" /FD /GZ /c\r
+# SUBTRACT CPP /YX\r
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 opengl32.lib winmm.lib msvcrtd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib /out:"Debug/OSMESA32.DLL" /pdbtype:sept /libpath:"../gdi/Debug"\r
+# ADD LINK32 opengl32.lib winmm.lib msvcrtd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /debug /machine:I386 /nodefaultlib /out:"Debug/OSMESA32.DLL" /pdbtype:sept /libpath:"../gdi/Debug_x86"\r
+# Begin Special Build Tool\r
+SOURCE="$(InputPath)"\r
+PostBuild_Cmds=if not exist ..\..\..\..\lib md ..\..\..\..\lib copy Debug_x86\OSMESA32.LIB ..\..\..\..\lib copy Debug_x86\OSMESA32.DLL ..\..\..\..\lib if exist ..\..\..\..\progs\demos copy Debug_x86\OSMESA32.DLL ..\..\..\..\progs\demos\r
+# End Special Build Tool\r
+\r
!ENDIF \r
\r
# Begin Target\r
\r
# Name "osmesa - Win32 Release"\r
# Name "osmesa - Win32 Debug"\r
+# Name "osmesa - Win32 Release x86"\r
+# Name "osmesa - Win32 Debug x86"\r
# Begin Group "Source Files"\r
\r
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r