mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
webgl: Fix active uniform block length check.
This commit is contained in:
parent
62f00df79d
commit
66b2b3293d
3 changed files with 72 additions and 63 deletions
|
@ -25,7 +25,8 @@ use crate::dom::webglprogram::WebGLProgram;
|
|||
use crate::dom::webglquery::WebGLQuery;
|
||||
use crate::dom::webglrenderbuffer::WebGLRenderbuffer;
|
||||
use crate::dom::webglrenderingcontext::{
|
||||
uniform_get, uniform_typed, LayoutCanvasWebGLRenderingContextHelpers, VertexAttrib, WebGLRenderingContext,
|
||||
uniform_get, uniform_typed, LayoutCanvasWebGLRenderingContextHelpers, VertexAttrib,
|
||||
WebGLRenderingContext,
|
||||
};
|
||||
use crate::dom::webglsampler::{WebGLSampler, WebGLSamplerValue};
|
||||
use crate::dom::webglshader::WebGLShader;
|
||||
|
|
|
@ -556,7 +556,7 @@ impl WebGLProgram {
|
|||
return Err(WebGLError::InvalidOperation);
|
||||
}
|
||||
|
||||
if block_index as usize >= self.active_uniforms.borrow().len() {
|
||||
if block_index as usize >= self.active_uniform_blocks.borrow().len() {
|
||||
return Err(WebGLError::InvalidValue);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,98 +1,106 @@
|
|||
[gl-object-get-calls.html]
|
||||
expected: TIMEOUT
|
||||
[WebGL test #257: getError expected: NO_ERROR. Was INVALID_OPERATION : ]
|
||||
[WebGL test #201: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_R) should be 33071 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #10: gl.getBufferParameter(gl.COPY_WRITE_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #18: gl.getBufferParameter(gl.TRANSFORM_FEEDBACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #182: gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_SAMPLES) should be 4 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #204: getTexParameter returned 1 instead of null for invalid parameter enum: 0x84fe]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #199: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LOD) should be 10 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #19: gl.getBufferParameter(gl.TRANSFORM_FEEDBACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #21: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #15: gl.getBufferParameter(gl.PIXEL_UNPACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #202: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_FORMAT) should be false (of type boolean). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #7: gl.getBufferParameter(gl.COPY_READ_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #9: gl.getBufferParameter(gl.COPY_WRITE_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #16: gl.getBufferParameter(gl.PIXEL_UNPACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #201: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_R) should be 33071 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #6: gl.getBufferParameter(gl.COPY_READ_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #4: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #203: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_LEVELS) should be 0 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #5: getBufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #22: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #12: gl.getBufferParameter(gl.PIXEL_PACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #196: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC) should be 515 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #195: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_BASE_LEVEL) should be 0 (of type number). Was null (of type object).]
|
||||
[WebGL test #204: getTexParameter returned 1 instead of null for invalid parameter enum: 0x84fe]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #13: gl.getBufferParameter(gl.PIXEL_PACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #196: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC) should be 515 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #257: getError expected: NO_ERROR. Was INVALID_OPERATION : ]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #199: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LOD) should be 10 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #15: gl.getBufferParameter(gl.PIXEL_UNPACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #202: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_FORMAT) should be false (of type boolean). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #198: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LEVEL) should be 10 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #337: gl.getActiveUniformBlockName(program, 0) should be Transform. Was _uTransform.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #22: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #259: gl.getUniform(samplerForWebGL2Program, s2DArrayValLoc) should be 1. Was 0.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #200: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MIN_LOD) should be 0 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #182: gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_SAMPLES) should be 4 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #276: getError expected: NO_ERROR. Was INVALID_ENUM : ]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #195: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_BASE_LEVEL) should be 0 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #5: getBufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #18: gl.getBufferParameter(gl.TRANSFORM_FEEDBACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #19: gl.getBufferParameter(gl.TRANSFORM_FEEDBACK_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #21: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #7: gl.getBufferParameter(gl.COPY_READ_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #6: gl.getBufferParameter(gl.COPY_READ_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #12: gl.getBufferParameter(gl.PIXEL_PACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #197: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE) should be 34894 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #275: gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be true (of type boolean). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #167: gl.getProgramParameter(uniformBlockProgram, gl.ACTIVE_UNIFORM_BLOCKS) should be 1 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #268: gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be false (of type boolean). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #259: gl.getUniform(samplerForWebGL2Program, s2DArrayValLoc) should be 1. Was 0.]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #198: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAX_LEVEL) should be 10 (of type number). Was null (of type object).]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #200: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MIN_LOD) should be 0 (of type number). Was null (of type object).]
|
||||
[WebGL test #288: getInternalformatParameter returned instead of null for invalid internalformat enum: NO_ERROR]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #183: getRenderbufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #274: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue