[Public WebGL] possible non-passable test: program-test.html requires program state to be left untouched by a failed link

Benoit Jacob [email protected]
Mon Apr 23 10:46:19 PDT 2012


Kudos to Eric Anholt on the mesa-dev list for finding this.

program-test.html contains this:

    gl.attachShader(progGood2, fsBad);
    assertMsg(gl.getProgramParameter(progGood2, gl.LINK_STATUS) == false,
              "linking should fail with in-use formerly good program, with new bad shader attached");

    // Invalid link leaves previous valid program intact.
    gl.drawArrays(gl.TRIANGLES, 0, 3);
    glErrorShouldBe(gl, gl.NO_ERROR, "drawing with a valid program shouldn't generate a GL error");

As the comment says, this requires a WebGL implementation to keep programs intact after a failed link. 

The WebGL spec doesn't seem to say anything specific about that, and the OpenGL ES 2.0.25 spec, page 30, says:

"If LinkProgram failed, any information about a previous link of that program object is lost. Thus, a failed link does not restore the old state of program."

Thus, this test seems incorrect.

OK to fix it by enforcing the above-quoted behavior from the GLES2 spec? This should be easy to implement in WebGL implementations in a way that doesn't depend on drivers.


You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list