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

           Summary: glsl ifelse BranchTargets seem off
           Product: Mesa
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa3d-dev@lists.sourceforge.net
        ReportedBy: amaasi...@gmail.com


For example: ./vp-tris -f ifelse.glsl
compiles to:
# Vertex Program/Shader 3
  0: MOV TEMP[1], INPUT[0];
  1: SLT.C TEMP[0].x, INPUT[0].xxxx, CONST[0].xxxx;
  2: IF (NE.xxxx); # (if false, goto 5);
  3:    MOV OUTPUT[1], CONST[1];
  4: ELSE; # (goto 8)
  5:    MOV OUTPUT[1], INPUT[3];
  6: ENDIF;
  7: MOV OUTPUT[0], TEMP[1];
  8: END

Seems if points one past the else statement and else points to
program end?
Also nestedifs.glsl shows somewhat similar behaviour.
r600 currently tries to emit a bit different code when no else
present and uses inst[BranchTarget] to determine presence.
Andre


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

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to