|
130 | 130 | shouldBe("pls.PIXEL_LOCAL_TEXTURE_NAME_WEBGL", "0x96E8"); |
131 | 131 | shouldBe("pls.PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL", "0x96E9"); |
132 | 132 | shouldBe("pls.PIXEL_LOCAL_TEXTURE_LAYER_WEBGL", "0x96EA"); |
133 | | - shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL", "0x96EB"); |
134 | | - shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL", "0x96EC"); |
135 | | - shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL", "0x96ED"); |
| 133 | + shouldBe("pls.PIXEL_LOCAL_USAGE_WEBGL", "0x96EB"); |
| 134 | + shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL", "0x96EC"); |
| 135 | + shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_INT_WEBGL", "0x96ED"); |
| 136 | + shouldBe("pls.PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_WEBGL", "0x96EE"); |
| 137 | + shouldBe("pls.PIXEL_LOCAL_USAGE_ALWAYS_NONCOHERENT_BIT_WEBGL", "0x1"); |
136 | 138 | } |
137 | 139 |
|
138 | 140 | function checkImplementationDependentLimits() { |
|
182 | 184 | i, pls.PIXEL_LOCAL_TEXTURE_LEVEL_WEBGL) == 0); |
183 | 185 | expectTrue(pls.getFramebufferPixelLocalStorageParameterWEBGL( |
184 | 186 | i, pls.PIXEL_LOCAL_TEXTURE_LAYER_WEBGL) == 0); |
| 187 | + expectTrue(pls.getFramebufferPixelLocalStorageParameterWEBGL( |
| 188 | + i, pls.PIXEL_LOCAL_USAGE_WEBGL) == 0); |
185 | 189 | expectTrue(arraysEqual( |
186 | 190 | pls.getFramebufferPixelLocalStorageParameterWEBGL( |
187 | 191 | i, pls.PIXEL_LOCAL_CLEAR_VALUE_FLOAT_WEBGL), |
|
211 | 215 | gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA8, 1, 1); |
212 | 216 | wtu.glErrorShouldBe(gl, gl.NONE); |
213 | 217 | gl.deleteTexture(tex); |
214 | | - pls.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0); |
| 218 | + pls.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0, 0); |
215 | 219 | wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); |
216 | 220 |
|
217 | 221 | debug("\nIf 'texture' was generated by a different WebGL2RenderingContext than this one, " + |
|
220 | 224 | const tex2 = gl2.createTexture(); |
221 | 225 | gl2.bindTexture(gl2.TEXTURE_2D, tex2); |
222 | 226 | gl2.texStorage2D(gl2.TEXTURE_2D, 1, gl2.RGBA8, 1, 1); |
223 | | - pls.framebufferTexturePixelLocalStorageWEBGL(0, tex2, 0, 0); |
| 227 | + pls.framebufferTexturePixelLocalStorageWEBGL(0, tex2, 0, 0, 0); |
224 | 228 | wtu.glErrorShouldBe(gl2, gl2.NONE); |
225 | 229 | wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); |
226 | 230 |
|
|
294 | 298 | gl.bindTexture(gl.TEXTURE_2D, validTex); |
295 | 299 | gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA8, 1, 1); |
296 | 300 | wtu.glErrorShouldBe(gl, gl.NONE); |
297 | | - pls.framebufferTexturePixelLocalStorageWEBGL(0, validTex, 0, 0); |
| 301 | + pls.framebufferTexturePixelLocalStorageWEBGL(0, validTex, 0, 0, 0); |
298 | 302 | shouldBeTrue(`pls.getFramebufferPixelLocalStorageParameterWEBGL( |
299 | 303 | 0, pls.PIXEL_LOCAL_TEXTURE_NAME_WEBGL) === validTex`); |
300 | | - pls.framebufferTexturePixelLocalStorageWEBGL(0, null, 0, 0); |
| 304 | + pls.framebufferTexturePixelLocalStorageWEBGL(0, null, 0, 0, 0); |
301 | 305 | shouldBeTrue(`pls.getFramebufferPixelLocalStorageParameterWEBGL( |
302 | 306 | 0, pls.PIXEL_LOCAL_TEXTURE_NAME_WEBGL) === null`); |
303 | 307 |
|
|
323 | 327 |
|
324 | 328 | const plsFBO = localGL.createFramebuffer(); |
325 | 329 | localGL.bindFramebuffer(localGL.FRAMEBUFFER, plsFBO); |
326 | | - localPLS.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0); |
| 330 | + localPLS.framebufferTexturePixelLocalStorageWEBGL(0, tex, 0, 0, 0); |
327 | 331 | wtu.glErrorShouldBe(localGL, localGL.NONE); |
328 | 332 |
|
329 | 333 | localGL.viewport(0, 0, localCanvas.width, localCanvas.height); |
|
0 commit comments