yuq / mesa-lima

Deprecated, new place: https://gitlab.freedesktop.org/lima
https://github.com/yuq/mesa-lima/wiki
165 stars 18 forks source link

gpir basic conditional support #41

Closed enunes closed 6 years ago

enunes commented 6 years ago

Implement 'less-than' and 'select' alu opcodes. Tested with gbm-surface and the following silly vertex shader:

attribute vec3 positionIn;
void main()
{
    vec3 myvar = positionIn;
    if (positionIn.x > 0.1)
        myvar.y = 0.8;
    gl_Position = vec4(myvar, 1);
}

It causes the rightmost edge of the gbm-surface triangle to have its y-coordinate modified.