Skip to content

Commit

Permalink
Verify invalidated uniform locations when there is no current program. (
Browse files Browse the repository at this point in the history
KhronosGroup#3633)

Associated with crbug.com/331119482 .
  • Loading branch information
kenrussell authored Apr 2, 2024
1 parent ec899a5 commit 4c5b8bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdk/tests/conformance/uniforms/uniform-location.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.linkProgram(programS)");
wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.uniform1i(locationSx, 3)");
wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getUniform(programS, locationSx)");
// Make sure that with no current program, uniform location validation doesn't get confused.
wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(null)");
wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.uniform1i(locationSx, 3)");
wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(programS)");

// Retrieve the locations again, and they should be good.
locationSx = contextA.getUniformLocation(programS, "u_struct.x");
Expand Down

0 comments on commit 4c5b8bf

Please sign in to comment.