WoW in opengl mode hangs the r300 GPU due to an uncommon vertex program. It defines an attibute (ATTRIB v18 = vertex.normal;) which is never used in the vertex program. This unused attrib goes into InputsRead. r300 code doesn't handle this case and the gpu hangs.

Markus

---
 src/mesa/shader/arbprogparse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 705507a..83569c8 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -1618,8 +1618,6 @@ parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst,
       program_error(ctx, Program->Position, "Bad attribute binding");
    }
 
-   Program->Base.InputsRead |= (1 << *inputReg);
-
    return err;
 }
 
@@ -2546,6 +2544,8 @@ parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
             case vt_attrib:
                *File = PROGRAM_INPUT;
                *Index = src->attrib_binding;
+               /* Only set inputs actually used */
+               Program->Base.InputsRead |= (1 << *Index);
                break;
 
                /* XXX: We have to handle offsets someplace in here!  -- or are those above? */

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to