Skip to content
  • Ian Romanick's avatar
    glsl: Don't early-out for error-type inputs · 58d93e32
    Ian Romanick authored
    
    
    Check the type of the array operand and the index operand before doing
    other checks.  This simplifies the code a bit now (eliminating the
    error_emitted parameter), and enables some later functional changes.
    
    The shader
    
    uniform float x[6];
    uniform sampler2D s;
    void main() { gl_Position.x = xx[s + 1]; }
    
    still generates (only) the two expected errors:
    
    0:3(33): error: `xx' undeclared
    0:3(39): error: Operands to arithmetic operators must be numeric
    
    Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    58d93e32