Skip to content

Commit 4c5b8bf

Browse files
authored
Verify invalidated uniform locations when there is no current program. (KhronosGroup#3633)
Associated with crbug.com/331119482 .
1 parent ec899a5 commit 4c5b8bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdk/tests/conformance/uniforms/uniform-location.html

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.linkProgram(programS)");
6969
wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.uniform1i(locationSx, 3)");
7070
wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getUniform(programS, locationSx)");
71+
// Make sure that with no current program, uniform location validation doesn't get confused.
72+
wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(null)");
73+
wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.uniform1i(locationSx, 3)");
74+
wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(programS)");
7175

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

0 commit comments

Comments
 (0)