From 5a458977113e4a0d3c389b03801cf6ce580d3935 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 22 Jan 2009 10:14:04 -0700 Subject: mesa: set version to 7.3 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ebc52546de..c1e0f67223 100644 --- a/Makefile +++ b/Makefile @@ -174,10 +174,10 @@ ultrix-gcc: # Rules for making release tarballs -DIRECTORY = Mesa-7.3-rc3 -LIB_NAME = MesaLib-7.3-rc3 -DEMO_NAME = MesaDemos-7.3-rc3 -GLUT_NAME = MesaGLUT-7.3-rc3 +DIRECTORY = Mesa-7.3 +LIB_NAME = MesaLib-7.3 +DEMO_NAME = MesaDemos-7.3 +GLUT_NAME = MesaGLUT-7.3 MAIN_FILES = \ $(DIRECTORY)/Makefile* \ -- cgit v1.2.3 From 0e4805685035dc3ea26f169830843cd4cecd1a29 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 22 Jan 2009 10:22:55 -0700 Subject: mesa: master is open for new development, eventually will be Mesa 7.5 --- Makefile | 8 ++++---- src/mesa/main/version.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c1e0f67223..840b41464f 100644 --- a/Makefile +++ b/Makefile @@ -174,10 +174,10 @@ ultrix-gcc: # Rules for making release tarballs -DIRECTORY = Mesa-7.3 -LIB_NAME = MesaLib-7.3 -DEMO_NAME = MesaDemos-7.3 -GLUT_NAME = MesaGLUT-7.3 +DIRECTORY = Mesa-7.5-devel +LIB_NAME = MesaLib-7.5-devel +DEMO_NAME = MesaDemos-7.5-devel +GLUT_NAME = MesaGLUT-7.5-devel MAIN_FILES = \ $(DIRECTORY)/Makefile* \ diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index 62cd03f5e2..f5bf6e2c85 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.3 + * Version: 7.5 * * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * @@ -29,9 +29,9 @@ /* Mesa version */ #define MESA_MAJOR 7 -#define MESA_MINOR 3 +#define MESA_MINOR 5 #define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.3" +#define MESA_VERSION_STRING "7.5-devel" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From 681a13e7f9c9edd6587c0b2c2c88b82e24fda036 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 5 Feb 2009 08:39:10 -0700 Subject: mesa: minor Makefile improvement for versioning --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 840b41464f..bf69b2a587 100644 --- a/Makefile +++ b/Makefile @@ -174,10 +174,11 @@ ultrix-gcc: # Rules for making release tarballs -DIRECTORY = Mesa-7.5-devel -LIB_NAME = MesaLib-7.5-devel -DEMO_NAME = MesaDemos-7.5-devel -GLUT_NAME = MesaGLUT-7.5-devel +VERSION=7.5-devel +DIRECTORY = Mesa-$(VERSION) +LIB_NAME = MesaLib-$(VERSION) +DEMO_NAME = MesaDemos-$(VERSION) +GLUT_NAME = MesaGLUT-$(VERSION) MAIN_FILES = \ $(DIRECTORY)/Makefile* \ -- cgit v1.2.3 From 6e5d3117193fcbaa19c605c4d73241243ed46bcc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 5 Feb 2009 08:41:27 -0700 Subject: mesa: remove oddball linux-directfb-install makefile rule It's probably not needed since the 'make install' rules were overhauled last year. --- Makefile | 4 ---- docs/README.directfb | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bf69b2a587..419265df80 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,6 @@ install: done -# DirectFBGL module installation -linux-directfb-install: - cd src/mesa/drivers/directfb && $(MAKE) install - .PHONY: default doxygen clean realclean install linux-directfb-install # If there's no current configuration file diff --git a/docs/README.directfb b/docs/README.directfb index e3bada4888..d66ca8d3ca 100644 --- a/docs/README.directfb +++ b/docs/README.directfb @@ -22,7 +22,8 @@ Installation to install OpenGL libraries and - make linux-directfb-install + cd src/mesa/drivers/directfb ; make install to install DirectFBGL module in the proper location. + Actually, that last command may not be needed. Please provide feedback. -- cgit v1.2.3 From b2e779988eeb595187933fe2122d86f8ccfe059c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 6 Feb 2009 09:57:28 -0700 Subject: mesa: meaningless whitespace change to see if git's working (ignore) --- Makefile | 1 + src/mesa/main/debug.c | 4 +-- src/mesa/main/mtypes.h | 10 ++++-- src/mesa/shader/shader_api.c | 62 +++++++++++++++++++++++++++++++++++ src/mesa/shader/slang/slang_compile.c | 18 ++++++++-- src/mesa/shader/slang/slang_link.c | 20 ++++++----- src/mesa/shader/slang/slang_log.c | 6 ++-- src/mesa/sources | 1 + 8 files changed, 102 insertions(+), 20 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 419265df80..4d4c6a551a 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ default: $(TOP)/configs/current doxygen: cd doxygen && $(MAKE) + clean: -@touch $(TOP)/configs/current -@for dir in $(SUBDIRS) ; do \ diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 77fef32558..65970a53a9 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -164,9 +164,7 @@ static void add_debug_flags( const char *debug ) { "api", VERBOSE_API }, { "list", VERBOSE_DISPLAY_LIST }, { "lighting", VERBOSE_LIGHTING }, - { "disassem", VERBOSE_DISASSEM }, - { "glsl", VERBOSE_GLSL }, /* report GLSL compile/link errors */ - { "glsl_dump", VERBOSE_GLSL_DUMP } /* print shader GPU instructions */ + { "disassem", VERBOSE_DISASSEM } }; GLuint i; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 17dd3e6afd..509da06d09 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2162,6 +2162,13 @@ struct gl_shader_program }; +#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */ +#define GLSL_LOG 0x2 /**< Write shaders to files */ +#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ +#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ +#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ + + /** * Context state for GLSL vertex/fragment shaders. */ @@ -2173,6 +2180,7 @@ struct gl_shader_state GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ void *MemPool; + GLbitfield Flags; /**< Mask of GLSL_x flags */ }; @@ -3163,8 +3171,6 @@ enum _verbose VERBOSE_PRIMS = 0x0400, VERBOSE_VERTS = 0x0800, VERBOSE_DISASSEM = 0x1000, - VERBOSE_GLSL = 0x2000, - VERBOSE_GLSL_DUMP = 0x4000 }; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index acee34dc5b..fb2a7e54fe 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -370,6 +370,31 @@ _mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller) } +/** + * Return mask of GLSL_x flags by examining the MESA_GLSL env var. + */ +static GLbitfield +get_shader_flags(void) +{ + GLbitfield flags = 0x0; + const char *env = _mesa_getenv("MESA_GLSL"); + + if (env) { + if (_mesa_strstr(env, "dump")) + flags |= GLSL_DUMP; + if (_mesa_strstr(env, "log")) + flags |= GLSL_LOG; + if (_mesa_strstr(env, "nopt")) + flags |= GLSL_NO_OPT; + else if (_mesa_strstr(env, "opt")) + flags |= GLSL_OPT; + if (_mesa_strstr(env, "uniform")) + flags |= GLSL_UNIFORMS; + } + + return flags; +} + /** * Initialize context's shader state. @@ -383,6 +408,7 @@ _mesa_init_shader_state(GLcontext * ctx) ctx->Shader.EmitHighLevelInstructions = GL_TRUE; ctx->Shader.EmitCondCodes = GL_TRUE; /* XXX probably want GL_FALSE... */ ctx->Shader.EmitComments = GL_FALSE; + ctx->Shader.Flags = get_shader_flags(); } @@ -1613,6 +1639,7 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; struct gl_uniform *uniform; GLint elems, offset; + GLenum basicType; if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); @@ -1636,19 +1663,35 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, switch (type) { case GL_FLOAT: + basicType = GL_FLOAT; + elems = 1; + break; case GL_INT: + basicType = GL_INT; elems = 1; break; case GL_FLOAT_VEC2: + basicType = GL_FLOAT; + elems = 2; + break; case GL_INT_VEC2: + basicType = GL_INT; elems = 2; break; case GL_FLOAT_VEC3: + basicType = GL_FLOAT; + elems = 3; + break; case GL_INT_VEC3: + basicType = GL_INT; elems = 3; break; case GL_FLOAT_VEC4: + basicType = GL_FLOAT; + elems = 4; + break; case GL_INT_VEC4: + basicType = GL_INT; elems = 4; break; default: @@ -1660,6 +1703,25 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, uniform = &shProg->Uniforms->Uniforms[location]; + if (ctx->Shader.Flags & GLSL_UNIFORMS) { + GLint i; + _mesa_printf("Mesa: set program %u uniform %s (loc %d) to: ", + shProg->Name, uniform->Name, location); + if (basicType == GL_INT) { + const GLint *v = (const GLint *) values; + for (i = 0; i < count * elems; i++) { + _mesa_printf("%d ", v[i]); + } + } + else { + const GLfloat *v = (const GLfloat *) values; + for (i = 0; i < count * elems; i++) { + _mesa_printf("%g ", v[i]); + } + } + _mesa_printf("\n"); + } + /* A uniform var may be used by both a vertex shader and a fragment * shader. We may need to update one or both shader's uniform here: */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 40460e0c7e..0c7881dd19 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -32,6 +32,7 @@ #include "main/context.h" #include "shader/program.h" #include "shader/programopt.h" +#include "shader/prog_optimize.h" #include "shader/prog_print.h" #include "shader/prog_parameter.h" #include "shader/grammar/grammar_mesa.h" @@ -2794,11 +2795,22 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) _mesa_print_program(shader->Program); #endif + if (success) { + if ((ctx->Shader.Flags & GLSL_NO_OPT) == 0) { + if ((ctx->Shader.Flags & GLSL_OPT) || shader->Pragmas.Optimize) { + /* apply program optimizations */ + _mesa_remove_extra_moves(shader->Program); + _mesa_remove_dead_code(shader->Program); + _mesa_consolidate_registers(shader->Program); + } + } + } + shader->CompileStatus = success; -#if 0 - _mesa_write_shader_to_file(shader); -#endif + if (ctx->Shader.Flags & GLSL_LOG) { + _mesa_write_shader_to_file(shader); + } return success; } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 77bcda0871..4ee1beccd4 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -675,12 +675,12 @@ _slang_link(GLcontext *ctx, /* notify driver that a new fragment program has been compiled/linked */ ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB, &shProg->FragmentProgram->Base); - if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { - printf("Mesa original fragment program:\n"); + if (ctx->Shader.Flags & GLSL_DUMP) { + _mesa_printf("Mesa original fragment program:\n"); _mesa_print_program(&fragProg->Base); _mesa_print_program_parameters(ctx, &fragProg->Base); - printf("Mesa post-link fragment program:\n"); + _mesa_printf("Mesa post-link fragment program:\n"); _mesa_print_program(&shProg->FragmentProgram->Base); _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); } @@ -693,22 +693,26 @@ _slang_link(GLcontext *ctx, /* notify driver that a new vertex program has been compiled/linked */ ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB, &shProg->VertexProgram->Base); - if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { - printf("Mesa original vertex program:\n"); + if (ctx->Shader.Flags & GLSL_DUMP) { + _mesa_printf("Mesa original vertex program:\n"); _mesa_print_program(&vertProg->Base); _mesa_print_program_parameters(ctx, &vertProg->Base); - printf("Mesa post-link vertex program:\n"); + _mesa_printf("Mesa post-link vertex program:\n"); _mesa_print_program(&shProg->VertexProgram->Base); _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); } } - if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { - printf("Varying vars:\n"); + if (ctx->Shader.Flags & GLSL_DUMP) { + _mesa_printf("Varying vars:\n"); _mesa_print_parameter_list(shProg->Varying); + if (shProg->InfoLog) { + _mesa_printf("Info Log: %s\n", shProg->InfoLog); + } } + shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); } diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c index d5576d7ee2..30729ba8d5 100644 --- a/src/mesa/shader/slang/slang_log.c +++ b/src/mesa/shader/slang/slang_log.c @@ -77,13 +77,11 @@ slang_info_log_message(slang_info_log * log, const char *prefix, slang_string_concat(log->text, msg); slang_string_concat(log->text, "\n"); - if (MESA_VERBOSE & VERBOSE_GLSL) { - _mesa_printf("Mesa: GLSL %s", log->text); - } - return 1; } +#define EXIT_SUCCESS 13 + int slang_info_log_print(slang_info_log * log, const char *msg, ...) { diff --git a/src/mesa/sources b/src/mesa/sources index 01a3fb89e6..a7210c134d 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -177,6 +177,7 @@ SHADER_SOURCES = \ shader/prog_execute.c \ shader/prog_instruction.c \ shader/prog_noise.c \ + shader/prog_optimize.c \ shader/prog_parameter.c \ shader/prog_print.c \ shader/prog_statevars.c \ -- cgit v1.2.3 From aafcc26642d5243944a1abb816c2657f644c0649 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 6 Feb 2009 10:00:34 -0700 Subject: Revert "mesa: meaningless whitespace change to see if git's working (ignore)" This reverts commit b2e779988eeb595187933fe2122d86f8ccfe059c. I didn't mean to push this stuff yet. I'm having a bad git day... --- Makefile | 1 - src/mesa/main/debug.c | 4 ++- src/mesa/main/mtypes.h | 10 ++---- src/mesa/shader/shader_api.c | 62 ----------------------------------- src/mesa/shader/slang/slang_compile.c | 18 ++-------- src/mesa/shader/slang/slang_link.c | 20 +++++------ src/mesa/shader/slang/slang_log.c | 6 ++-- src/mesa/sources | 1 - 8 files changed, 20 insertions(+), 102 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4d4c6a551a..419265df80 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ default: $(TOP)/configs/current doxygen: cd doxygen && $(MAKE) - clean: -@touch $(TOP)/configs/current -@for dir in $(SUBDIRS) ; do \ diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 65970a53a9..77fef32558 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -164,7 +164,9 @@ static void add_debug_flags( const char *debug ) { "api", VERBOSE_API }, { "list", VERBOSE_DISPLAY_LIST }, { "lighting", VERBOSE_LIGHTING }, - { "disassem", VERBOSE_DISASSEM } + { "disassem", VERBOSE_DISASSEM }, + { "glsl", VERBOSE_GLSL }, /* report GLSL compile/link errors */ + { "glsl_dump", VERBOSE_GLSL_DUMP } /* print shader GPU instructions */ }; GLuint i; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 509da06d09..17dd3e6afd 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2162,13 +2162,6 @@ struct gl_shader_program }; -#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */ -#define GLSL_LOG 0x2 /**< Write shaders to files */ -#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ -#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ -#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ - - /** * Context state for GLSL vertex/fragment shaders. */ @@ -2180,7 +2173,6 @@ struct gl_shader_state GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ void *MemPool; - GLbitfield Flags; /**< Mask of GLSL_x flags */ }; @@ -3171,6 +3163,8 @@ enum _verbose VERBOSE_PRIMS = 0x0400, VERBOSE_VERTS = 0x0800, VERBOSE_DISASSEM = 0x1000, + VERBOSE_GLSL = 0x2000, + VERBOSE_GLSL_DUMP = 0x4000 }; diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index fb2a7e54fe..acee34dc5b 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -370,31 +370,6 @@ _mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller) } -/** - * Return mask of GLSL_x flags by examining the MESA_GLSL env var. - */ -static GLbitfield -get_shader_flags(void) -{ - GLbitfield flags = 0x0; - const char *env = _mesa_getenv("MESA_GLSL"); - - if (env) { - if (_mesa_strstr(env, "dump")) - flags |= GLSL_DUMP; - if (_mesa_strstr(env, "log")) - flags |= GLSL_LOG; - if (_mesa_strstr(env, "nopt")) - flags |= GLSL_NO_OPT; - else if (_mesa_strstr(env, "opt")) - flags |= GLSL_OPT; - if (_mesa_strstr(env, "uniform")) - flags |= GLSL_UNIFORMS; - } - - return flags; -} - /** * Initialize context's shader state. @@ -408,7 +383,6 @@ _mesa_init_shader_state(GLcontext * ctx) ctx->Shader.EmitHighLevelInstructions = GL_TRUE; ctx->Shader.EmitCondCodes = GL_TRUE; /* XXX probably want GL_FALSE... */ ctx->Shader.EmitComments = GL_FALSE; - ctx->Shader.Flags = get_shader_flags(); } @@ -1639,7 +1613,6 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; struct gl_uniform *uniform; GLint elems, offset; - GLenum basicType; if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); @@ -1663,35 +1636,19 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, switch (type) { case GL_FLOAT: - basicType = GL_FLOAT; - elems = 1; - break; case GL_INT: - basicType = GL_INT; elems = 1; break; case GL_FLOAT_VEC2: - basicType = GL_FLOAT; - elems = 2; - break; case GL_INT_VEC2: - basicType = GL_INT; elems = 2; break; case GL_FLOAT_VEC3: - basicType = GL_FLOAT; - elems = 3; - break; case GL_INT_VEC3: - basicType = GL_INT; elems = 3; break; case GL_FLOAT_VEC4: - basicType = GL_FLOAT; - elems = 4; - break; case GL_INT_VEC4: - basicType = GL_INT; elems = 4; break; default: @@ -1703,25 +1660,6 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, uniform = &shProg->Uniforms->Uniforms[location]; - if (ctx->Shader.Flags & GLSL_UNIFORMS) { - GLint i; - _mesa_printf("Mesa: set program %u uniform %s (loc %d) to: ", - shProg->Name, uniform->Name, location); - if (basicType == GL_INT) { - const GLint *v = (const GLint *) values; - for (i = 0; i < count * elems; i++) { - _mesa_printf("%d ", v[i]); - } - } - else { - const GLfloat *v = (const GLfloat *) values; - for (i = 0; i < count * elems; i++) { - _mesa_printf("%g ", v[i]); - } - } - _mesa_printf("\n"); - } - /* A uniform var may be used by both a vertex shader and a fragment * shader. We may need to update one or both shader's uniform here: */ diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 0c7881dd19..40460e0c7e 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -32,7 +32,6 @@ #include "main/context.h" #include "shader/program.h" #include "shader/programopt.h" -#include "shader/prog_optimize.h" #include "shader/prog_print.h" #include "shader/prog_parameter.h" #include "shader/grammar/grammar_mesa.h" @@ -2795,22 +2794,11 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) _mesa_print_program(shader->Program); #endif - if (success) { - if ((ctx->Shader.Flags & GLSL_NO_OPT) == 0) { - if ((ctx->Shader.Flags & GLSL_OPT) || shader->Pragmas.Optimize) { - /* apply program optimizations */ - _mesa_remove_extra_moves(shader->Program); - _mesa_remove_dead_code(shader->Program); - _mesa_consolidate_registers(shader->Program); - } - } - } - shader->CompileStatus = success; - if (ctx->Shader.Flags & GLSL_LOG) { - _mesa_write_shader_to_file(shader); - } +#if 0 + _mesa_write_shader_to_file(shader); +#endif return success; } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 4ee1beccd4..77bcda0871 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -675,12 +675,12 @@ _slang_link(GLcontext *ctx, /* notify driver that a new fragment program has been compiled/linked */ ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB, &shProg->FragmentProgram->Base); - if (ctx->Shader.Flags & GLSL_DUMP) { - _mesa_printf("Mesa original fragment program:\n"); + if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { + printf("Mesa original fragment program:\n"); _mesa_print_program(&fragProg->Base); _mesa_print_program_parameters(ctx, &fragProg->Base); - _mesa_printf("Mesa post-link fragment program:\n"); + printf("Mesa post-link fragment program:\n"); _mesa_print_program(&shProg->FragmentProgram->Base); _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); } @@ -693,26 +693,22 @@ _slang_link(GLcontext *ctx, /* notify driver that a new vertex program has been compiled/linked */ ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB, &shProg->VertexProgram->Base); - if (ctx->Shader.Flags & GLSL_DUMP) { - _mesa_printf("Mesa original vertex program:\n"); + if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { + printf("Mesa original vertex program:\n"); _mesa_print_program(&vertProg->Base); _mesa_print_program_parameters(ctx, &vertProg->Base); - _mesa_printf("Mesa post-link vertex program:\n"); + printf("Mesa post-link vertex program:\n"); _mesa_print_program(&shProg->VertexProgram->Base); _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); } } - if (ctx->Shader.Flags & GLSL_DUMP) { - _mesa_printf("Varying vars:\n"); + if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { + printf("Varying vars:\n"); _mesa_print_parameter_list(shProg->Varying); - if (shProg->InfoLog) { - _mesa_printf("Info Log: %s\n", shProg->InfoLog); - } } - shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); } diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c index 30729ba8d5..d5576d7ee2 100644 --- a/src/mesa/shader/slang/slang_log.c +++ b/src/mesa/shader/slang/slang_log.c @@ -77,11 +77,13 @@ slang_info_log_message(slang_info_log * log, const char *prefix, slang_string_concat(log->text, msg); slang_string_concat(log->text, "\n"); + if (MESA_VERBOSE & VERBOSE_GLSL) { + _mesa_printf("Mesa: GLSL %s", log->text); + } + return 1; } -#define EXIT_SUCCESS 13 - int slang_info_log_print(slang_info_log * log, const char *msg, ...) { diff --git a/src/mesa/sources b/src/mesa/sources index a7210c134d..01a3fb89e6 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -177,7 +177,6 @@ SHADER_SOURCES = \ shader/prog_execute.c \ shader/prog_instruction.c \ shader/prog_noise.c \ - shader/prog_optimize.c \ shader/prog_parameter.c \ shader/prog_print.c \ shader/prog_statevars.c \ -- cgit v1.2.3 From abbe96cb6e7581a52652030e40442b943a482840 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 9 Feb 2009 10:17:58 -0700 Subject: mesa: added new linux-gallium and linux-gallium-debug configs Also, remove gallium-related things from configs/default. They're in linux-gallium now. So the default builds are the same as they have been for Mesa/master. --- Makefile | 2 ++ configs/default | 12 ++---------- configs/linux-gallium | 22 ++++++++++++++++++++++ configs/linux-gallium-debug | 8 ++++++++ src/mesa/Makefile | 4 ++++ src/mesa/sources.mak | 28 ++++++++++++++++++++-------- 6 files changed, 58 insertions(+), 18 deletions(-) create mode 100644 configs/linux-gallium create mode 100644 configs/linux-gallium-debug (limited to 'Makefile') diff --git a/Makefile b/Makefile index c79fb1cb28..24cfbe5922 100644 --- a/Makefile +++ b/Makefile @@ -115,6 +115,8 @@ linux-dri-x86-64 \ linux-dri-ppc \ linux-dri-xcb \ linux-egl \ +linux-gallium \ +linux-gallium-debug \ linux-indirect \ linux-fbdev \ linux-glide \ diff --git a/configs/default b/configs/default index 13bda58f18..ec8d51ccfe 100644 --- a/configs/default +++ b/configs/default @@ -79,24 +79,16 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 # Directories to build LIB_DIR = lib -SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw +SRC_DIRS = mesa egl glu glut/glx glew glw GLU_DIRS = sgi -DRIVER_DIRS = +DRIVER_DIRS = x11 osmesa # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl xdemos # EGL directories EGL_DRIVERS_DIRS = demo -# Gallium directories and -GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace -GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) -GALLIUM_WINSYS_DIRS = xlib egl_xlib - -# Library dependencies #EXTRA_LIB_PATH ?= GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) diff --git a/configs/linux-gallium b/configs/linux-gallium new file mode 100644 index 0000000000..b046f248ec --- /dev/null +++ b/configs/linux-gallium @@ -0,0 +1,22 @@ +# Configuration for Linux / Gallium + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-gallium + + +# Directories to build (adds gallium to SRC_DIRS) +SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw + + +# don't build old/conventional Mesa drivers +DRIVER_DIRS = + + +# Gallium directories and +GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices +GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace +GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) +GALLIUM_WINSYS_DIRS = xlib egl_xlib + diff --git a/configs/linux-gallium-debug b/configs/linux-gallium-debug new file mode 100644 index 0000000000..111c43b884 --- /dev/null +++ b/configs/linux-gallium-debug @@ -0,0 +1,8 @@ +# Configuration for Linux / Gallium for debug + +include $(TOP)/configs/linux-gallium + +CONFIG_NAME = linux-gallium-debug + +OPT_FLAGS = -g -ansi -pedantic +DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 552c20e0b9..22ef05c335 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -32,6 +32,10 @@ default: depend asm_subdirs libmesa.a libglapi.a driver_subdirs libmesa.a: $(MESA_OBJECTS) @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) +# Make archive of subset of core mesa object files for gallium +libmesagallium.a: $(MESA_GALLIUM_OBJECTS) + @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) + # Make archive of gl* API dispatcher functions only libglapi.a: $(GLAPI_OBJECTS) @if [ "${WINDOW_SYSTEM}" = "dri" ] ; then \ diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak index 8940670d5b..13ec1fa454 100644 --- a/src/mesa/sources.mak +++ b/src/mesa/sources.mak @@ -91,7 +91,7 @@ MATH_SOURCES = \ math/m_vector.c \ math/m_xform.c -__SWRAST_SOURCES = \ +SWRAST_SOURCES = \ swrast/s_aaline.c \ swrast/s_aatriangle.c \ swrast/s_accum.c \ @@ -122,11 +122,11 @@ __SWRAST_SOURCES = \ swrast/s_triangle.c \ swrast/s_zoom.c -__SWRAST_SETUP_SOURCES = \ +SWRAST_SETUP_SOURCES = \ swrast_setup/ss_context.c \ swrast_setup/ss_triangle.c -__TNL_SOURCES = \ +TNL_SOURCES = \ tnl/t_context.c \ tnl/t_pipeline.c \ tnl/t_draw.c \ @@ -162,7 +162,7 @@ VBO_SOURCES = \ vbo/vbo_save_draw.c \ vbo/vbo_save_loopback.c -__VF_SOURCES = \ +VF_SOURCES = \ vf/vf.c \ vf/vf_generic.c \ vf/vf_sse.c @@ -299,7 +299,7 @@ SPARC_SOURCES = \ SPARC_API = \ sparc/glapi_sparc.S -__COMMON_DRIVER_SOURCES = \ +COMMON_DRIVER_SOURCES = \ drivers/common/driverfuncs.c @@ -310,19 +310,27 @@ MESA_SOURCES = \ $(MAIN_SOURCES) \ $(MATH_SOURCES) \ $(VBO_SOURCES) \ - $(STATETRACKER_SOURCES) \ $(TNL_SOURCES) \ $(SHADER_SOURCES) \ $(SWRAST_SOURCES) \ $(SWRAST_SETUP_SOURCES) \ + $(COMMON_DRIVER_SOURCES)\ $(ASM_C_SOURCES) \ $(SLANG_SOURCES) ALL_SOURCES = \ $(MESA_SOURCES) \ $(GLAPI_SOURCES) \ - $(MESA_ASM_SOURCES) \ - $(COMMON_DRIVER_SOURCES) + $(MESA_ASM_SOURCES) + +MESA_GALLIUM_SOURCES = \ + $(MAIN_SOURCES) \ + $(MATH_SOURCES) \ + $(VBO_SOURCES) \ + $(STATETRACKER_SOURCES) \ + $(SHADER_SOURCES) \ + $(ASM_C_SOURCES) \ + $(SLANG_SOURCES) ### Object files @@ -331,6 +339,10 @@ MESA_OBJECTS = \ $(MESA_SOURCES:.c=.o) \ $(MESA_ASM_SOURCES:.S=.o) +MESA_GALLIUM_OBJECTS = \ + $(MESA_GALLIUM_SOURCES:.c=.o) \ + $(MESA_ASM_SOURCES:.S=.o) + GLAPI_OBJECTS = \ $(GLAPI_SOURCES:.c=.o) \ $(GLAPI_ASM_SOURCES:.S=.o) -- cgit v1.2.3 From b96d50da8b56010a040c93027b4c4eb35f922d51 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 10 Feb 2009 13:59:35 +0100 Subject: Revert "mesa: added new linux-gallium and linux-gallium-debug configs" This reverts commit abbe96cb6e7581a52652030e40442b943a482840. It only reverts parts of the commit the other parts where related to libmesagallium changes. --- Makefile | 2 -- configs/default | 12 ++++++++++-- configs/linux-gallium | 22 ---------------------- configs/linux-gallium-debug | 8 -------- 4 files changed, 10 insertions(+), 34 deletions(-) delete mode 100644 configs/linux-gallium delete mode 100644 configs/linux-gallium-debug (limited to 'Makefile') diff --git a/Makefile b/Makefile index 24cfbe5922..c79fb1cb28 100644 --- a/Makefile +++ b/Makefile @@ -115,8 +115,6 @@ linux-dri-x86-64 \ linux-dri-ppc \ linux-dri-xcb \ linux-egl \ -linux-gallium \ -linux-gallium-debug \ linux-indirect \ linux-fbdev \ linux-glide \ diff --git a/configs/default b/configs/default index ec8d51ccfe..13bda58f18 100644 --- a/configs/default +++ b/configs/default @@ -79,16 +79,24 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 # Directories to build LIB_DIR = lib -SRC_DIRS = mesa egl glu glut/glx glew glw +SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw GLU_DIRS = sgi -DRIVER_DIRS = x11 osmesa +DRIVER_DIRS = # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl xdemos # EGL directories EGL_DRIVERS_DIRS = demo +# Gallium directories and +GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices +GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace +GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) +GALLIUM_WINSYS_DIRS = xlib egl_xlib + +# Library dependencies #EXTRA_LIB_PATH ?= GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) diff --git a/configs/linux-gallium b/configs/linux-gallium deleted file mode 100644 index b046f248ec..0000000000 --- a/configs/linux-gallium +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration for Linux / Gallium - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-gallium - - -# Directories to build (adds gallium to SRC_DIRS) -SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw - - -# don't build old/conventional Mesa drivers -DRIVER_DIRS = - - -# Gallium directories and -GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace -GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) -GALLIUM_WINSYS_DIRS = xlib egl_xlib - diff --git a/configs/linux-gallium-debug b/configs/linux-gallium-debug deleted file mode 100644 index 111c43b884..0000000000 --- a/configs/linux-gallium-debug +++ /dev/null @@ -1,8 +0,0 @@ -# Configuration for Linux / Gallium for debug - -include $(TOP)/configs/linux-gallium - -CONFIG_NAME = linux-gallium-debug - -OPT_FLAGS = -g -ansi -pedantic -DEFINES += -DDEBUG -DDEBUG_MATH -- cgit v1.2.3