• Ian Romanick's avatar
    glsl-1.10: Verify pre- and post-inc/dec cannot be l-values · 02550817
    Ian Romanick authored
    
    
    These generators create two kinds of tests.  The first verifies that
    pre- and post-increment/decrement operations cannot be assignment
    targets.  These look like:
    
    uniform float u;
    varying vec4 v;
    
    void main()
    {
        float t = u;
    
        ++t = float(v.x);
        gl_FragColor = vec4(t, v.yzw);
    }
    
    The second kind of test verifies that pre- and
    post-increment/decrement operations cannot be used for function 'out'
    parameters.  These look like:
    
    uniform ivec4 u;
    attribute vec4 v;
    
    void f(out ivec4 p)
    {
        p = ivec4(v);
    }
    
    void main()
    {
        ivec4 t = u;
    
        f(t--);
        gl_Position = vec4(t);
    }
    
    Function 'inout' parameters are not explicitly tested.
    
    A test is generated for both vertex and fragment targets for each
    int and float vector or scalar datatype.  Matrix types and GLSL 1.30
    unsigned types are not tested.
    Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Paul Berry's avatarPaul Berry <stereotype441@gmail.com>
    02550817
gen_non-lvalue_tests.py 5.24 KB