From 4c5b8bfe586d983fae6a0571cc702f43e5f5b719 Mon Sep 17 00:00:00 2001 From: Ken Russell Date: Tue, 2 Apr 2024 14:17:01 -0700 Subject: [PATCH] Verify invalidated uniform locations when there is no current program. (#3633) 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");