From c5154bcfaf490464117cbfd705477874cb3e6dda Mon Sep 17 00:00:00 2001 From: Kenneth Russell Date: Tue, 2 Apr 2024 14:09:30 -0700 Subject: [PATCH] Verify invalidated uniform locations when there is no current program. Associated with crbug.com/331119482 . --- sdk/tests/conformance/uniforms/uniform-location.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/tests/conformance/uniforms/uniform-location.html b/sdk/tests/conformance/uniforms/uniform-location.html index 3b1c185caf..6de8114651 100644 --- a/sdk/tests/conformance/uniforms/uniform-location.html +++ b/sdk/tests/conformance/uniforms/uniform-location.html @@ -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");