https://bugs.freedesktop.org/show_bug.cgi?id=100303

--- Comment #3 from Roland Scheidegger <[email protected]> ---
Here's a simplified example, not even the empty branch is necessary, it is
sufficient if the return is inside a loop which is inside a conditional (I'm
actually wondering why this isn't hit in ordinary shaders...):

#version 130
uniform vec2 val_cond;

float func1()
{
   if(val_cond.x > val_cond.y) {
      for(int i = 0; i < 1; i++) {
         return 2.0;
      }
   }
   return 1.0;
}

void main(void)
{
    gl_FragColor = vec4(func1());
}

The --dump-lir output for func1 is just:
( function func1
  (signature float
    (parameters
    )
    (
      (return (constant float (1.000000)) )
    ))

)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to