mesa: Branch 'master' - 8 commits

Brian Paul brianp at kemper.freedesktop.org
Thu Apr 19 20:25:01 UTC 2007


 docs/relnotes-6.5.3.html              |   17 +++++++++++++++++
 docs/shading.html                     |    1 +
 src/mesa/shader/grammar/grammar.c     |    8 +++++---
 src/mesa/shader/slang/slang_codegen.c |    8 ++++----
 src/mesa/shader/slang/slang_compile.c |    1 +
 src/mesa/swrast/s_context.h           |    8 ++++++--
 src/mesa/swrast/s_fragprog.c          |   15 +++++++--------
 src/mesa/swrast/s_stencil.c           |    2 --
 8 files changed, 41 insertions(+), 19 deletions(-)

New commits:
diff-tree 535c37e85d9283f177825e7534e5d0abb4d93886 (from ba3d384e94faaedd4b1e0a90c1a765452bf594f3)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:24:58 2007 -0600

    Notes about shared lib version.  Document depth-peel fixes.

diff --git a/docs/relnotes-6.5.3.html b/docs/relnotes-6.5.3.html
index 8f6ea8b..0d0398a 100644
--- a/docs/relnotes-6.5.3.html
+++ b/docs/relnotes-6.5.3.html
@@ -22,6 +22,22 @@ TBD
 </pre>
 
 
+<h2>Shared library numbering</h2>
+<p>
+Mesa 6.5.3 supports the OpenGL 2.0/2.1 API.  However, the (unix)
+shared library version is still 1.5 (i.e. libGL.so.1.5.xxxxxx).
+Bumping the shared library version to 2.x would cause linking problems
+with existing OpenGL applications.  Since OpenGL 2.x is backward
+compatible with OpenGL 1.x the shared library version number doesn't
+have to be incremented (which would indicate an incompatible ABI).
+</p>
+<p>
+Other OpenGL vendors name their OpenGL 2.x libraries libGL.so.1.0.xxxxx
+for the same reason.
+</p>
+
+
+
 <h2>New features</h2>
 <ul>
 <li>OpenGL 2.0 and 2.1 API support.
@@ -47,6 +63,7 @@ TBD
 <li>Fixed a few bugs in software-emulated alpha planes
 <li>Assorted minor bug fixes in glCopy/DrawPixels, glPixelZoom, etc.
 <li>Assorted DRI driver bug fixes.
+<li>Fixed a number of bugs that prevented "depth-peeling" rendering from working.
 </ul>
 
 
diff-tree ba3d384e94faaedd4b1e0a90c1a765452bf594f3 (from 8b5fce6bcc88cd9dd321f0db95c1714e5e5e85a1)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:24:29 2007 -0600

    dFdx(), etc. don't work yet

diff --git a/docs/shading.html b/docs/shading.html
index 3a10f1b..64ec999 100644
--- a/docs/shading.html
+++ b/docs/shading.html
@@ -44,6 +44,7 @@ in Mesa:
 <li>Comparison of user-defined structs
 <li>Linking of multiple shaders is not supported
 <li>gl_ClipVertex
+<li>The derivative functions such as dFdx() are not implemented
 </ul>
 
 <p>
diff-tree 8b5fce6bcc88cd9dd321f0db95c1714e5e5e85a1 (from 020cdb47cf172c6ef8da78abcf6621233439d08b)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:24:10 2007 -0600

    Put gl_program_machine into swrast structure rather than using a local variable.
    
    Basically an easy way to make sure the memory gets initialized once (to zero)
    to avoid lots of valgrind warnings.

diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 1cf3813..dfe311a 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.2
+ * Version:  6.5.3
  *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -46,6 +46,7 @@
 #include "mtypes.h"
 #include "swrast.h"
 #include "s_span.h"
+#include "prog_execute.h"
 
 
 typedef void (*texture_sample_func)(GLcontext *ctx,
@@ -222,6 +223,9 @@ typedef struct
 
    validate_texture_image_func ValidateTextureImage;
 
+   /** State used during execution of fragment programs */
+   struct gl_program_machine FragProgMachine;
+
 } SWcontext;
 
 
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index 7f7c0d6..1b5f20d 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -25,7 +25,6 @@
 #include "glheader.h"
 #include "colormac.h"
 #include "context.h"
-#include "prog_execute.h"
 #include "prog_instruction.h"
 
 #include "s_fragprog.h"
@@ -105,7 +104,7 @@ init_machine(GLcontext *ctx, struct gl_p
    if (ctx->FragmentProgram.CallbackEnabled)
       inputsRead = ~0;
 
-   if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) {
+   if (1/*program->Base.Target == GL_FRAGMENT_PROGRAM_NV*/) {
       /* Clear temporary registers (undefined for ARB_f_p) */
       _mesa_bzero(machine->Temporaries,
                   MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat));
@@ -142,19 +141,19 @@ run_program(GLcontext *ctx, SWspan *span
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
    const struct gl_fragment_program *program = ctx->FragmentProgram._Current;
    const GLbitfield outputsWritten = program->Base.OutputsWritten;
-   struct gl_program_machine machine;
+   struct gl_program_machine *machine = &swrast->FragProgMachine;
    GLuint i;
 
    for (i = start; i < end; i++) {
       if (span->array->mask[i]) {
-         init_machine(ctx, &machine, program, span, i);
+         init_machine(ctx, machine, program, span, i);
 
-         if (_mesa_execute_program(ctx, &program->Base, &machine)) {
+         if (_mesa_execute_program(ctx, &program->Base, machine)) {
 
             /* Store result color */
             if (outputsWritten & (1 << FRAG_RESULT_COLR)) {
                COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i],
-                       machine.Outputs[FRAG_RESULT_COLR]);
+                       machine->Outputs[FRAG_RESULT_COLR]);
             }
             else {
                /* Multiple drawbuffers / render targets
@@ -165,14 +164,14 @@ run_program(GLcontext *ctx, SWspan *span
                for (output = 0; output < swrast->_NumColorOutputs; output++) {
                   if (outputsWritten & (1 << (FRAG_RESULT_DATA0 + output))) {
                      COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0+output][i],
-                             machine.Outputs[FRAG_RESULT_DATA0 + output]);
+                             machine->Outputs[FRAG_RESULT_DATA0 + output]);
                   }
                }
             }
 
             /* Store result depth/z */
             if (outputsWritten & (1 << FRAG_RESULT_DEPR)) {
-               const GLfloat depth = machine.Outputs[FRAG_RESULT_DEPR][2];
+               const GLfloat depth = machine->Outputs[FRAG_RESULT_DEPR][2];
                if (depth <= 0.0)
                   span->array->z[i] = 0;
                else if (depth >= 1.0)
diff-tree 020cdb47cf172c6ef8da78abcf6621233439d08b (from 121f2212ccfa716e4853d0eead3755103d8c89e4)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:15:11 2007 -0600

    Fix valgrind problem caused by reading text[-1].

diff --git a/src/mesa/shader/grammar/grammar.c b/src/mesa/shader/grammar/grammar.c
index 989e954..a977596 100644
--- a/src/mesa/shader/grammar/grammar.c
+++ b/src/mesa/shader/grammar/grammar.c
@@ -2693,14 +2693,16 @@ fast_match (dict *di, const byte *text, 
 
         if (status == mr_matched)
         {
-            if (sp->m_emits != NULL)
-                if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx))
+            if (sp->m_emits != NULL) {
+                const byte ch = (ind <= 0) ? 0 : text[ind - 1];
+                if (emit_push (sp->m_emits, _BP->_F + _P, ch, save_ind, &ctx))
                 {
                     free_regbyte_ctx_stack (ctx, *rbc);
                     return mr_internal_error;
                 }
 
-            _P = _P2;
+           }
+           _P = _P2;
         }
 
         /* if the rule operator is a logical or, we pick up the first matching specifier */
diff-tree 121f2212ccfa716e4853d0eead3755103d8c89e4 (from 24a93dd6a427567071bd5aecd7bf53828381bc73)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:07:16 2007 -0600

    remove invalid assertion (span->facing may be set because of polygonmode)

diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 43475c0..2b89848 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -1009,8 +1009,6 @@ stencil_and_ztest_pixels( GLcontext *ctx
 GLboolean
 _swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span)
 {
-   /* span->facing can only be non-zero if using two-sided stencil */
-   ASSERT(ctx->Stencil._TestTwoSide || span->facing == 0);
    if (span->arrayMask & SPAN_XY)
       return stencil_and_ztest_pixels(ctx, span, span->facing);
    else
diff-tree 24a93dd6a427567071bd5aecd7bf53828381bc73 (from 00da9afb8493a883b4a4db47484e875781c72c71)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:06:43 2007 -0600

    remove invalid assertion

diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index f176174..6519040 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1202,7 +1202,6 @@ _slang_gen_function_call(slang_assemble_
 
    /*_slang_label_delete(A->curFuncEndLabel);*/
    A->curFuncEndLabel = prevFuncEndLabel;
-   assert(A->curFuncEndLabel);
 
    return n;
 }
diff-tree 00da9afb8493a883b4a4db47484e875781c72c71 (from 4abcaf3949a7ad9580a05d6029f2289adb4bcf03)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:06:27 2007 -0600

    fix crash when program has invalid structure field

diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index a928abd..f176174 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2320,15 +2320,16 @@ _slang_gen_field(slang_assemble_ctx * A,
       /* oper->a_id is the field name */
       slang_ir_node *base, *n;
       slang_typeinfo field_ti;
-      GLint fieldSize, fieldOffset;
+      GLint fieldSize, fieldOffset = -1;
       /* type of field */
       slang_typeinfo_construct(&field_ti);
       _slang_typeof_operation(A, oper, &field_ti);
 
       fieldSize = _slang_sizeof_type_specifier(&field_ti.spec);
-      fieldOffset = _slang_field_offset(&ti.spec, oper->a_id);
+      if (fieldSize > 0)
+         fieldOffset = _slang_field_offset(&ti.spec, oper->a_id);
 
-      if (fieldOffset < 0) {
+      if (fieldSize == 0 || fieldOffset < 0) {
          slang_info_log_error(A->log,
                               "\"%s\" is not a member of struct \"%s\"",
                               (char *) oper->a_id,
diff-tree 4abcaf3949a7ad9580a05d6029f2289adb4bcf03 (from 6bde08815fae2a5ba95e0446d8c73040d1f321bc)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Apr 19 14:04:30 2007 -0600

    init A.curFuncEndLabel = NULL

diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index d3f6986..7ea6cc0 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -1617,6 +1617,7 @@ parse_init_declarator(slang_parse_ctx * 
       A.space.vars = O->vars;
       A.program = O->program;
       A.vartable = O->vartable;
+      A.curFuncEndLabel = NULL;
       _slang_codegen_global_variable(&A, var, C->type);
    }
 



More information about the mesa-commit mailing list