http://bugs.freedesktop.org/show_bug.cgi?id=20986

           Summary: Incorrect tokens emitted for texgen planes in
                    emit_statevars, slang_builtin.c
           Product: Mesa
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: [email protected]
        ReportedBy: [email protected]


If you write a shader that uses the texgen planes, you will get complaints
about invalid state[0] or something like that.

I haven't cooked up a simple example program to trip this up, but it should not
be necessary, because there is obviously a problem with the code.

In src/mesa/shader/slang/slang_builtin.c:
In emit_statevar:

      else if (strcmp(name, "gl_EyePlaneS") == 0) {
         tokens[0] = STATE_TEXGEN_EYE_S;
      }
      ...
      else if (strcmp(name, "gl_ObjectPlaneQ") == 0) {
         tokens[0] = STATE_TEXGEN_OBJECT_Q;
      }

This is inconsistent with _mesa_fetch_state in
src/mesa/shader/prog_statevars.c.
My guess (not being familiar with the code) is that it should be

         tokens[0] = STATE_TEXGEN;
         tokens[2] = STATE_TEXGEN_EYE_S;

etc.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to