mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Properly check the right internal formats in gl.renderbufferStorage
This commit is contained in:
parent
ac85d1255d
commit
e8f19fa7fc
2 changed files with 18 additions and 7 deletions
|
@ -95,11 +95,14 @@ impl WebGLRenderbuffer {
|
|||
// validation.
|
||||
match internal_format {
|
||||
constants::RGBA4 |
|
||||
constants::DEPTH_STENCIL |
|
||||
constants::RGB565 |
|
||||
constants::RGB5_A1 |
|
||||
constants::DEPTH_COMPONENT16 |
|
||||
constants::STENCIL_INDEX8 =>
|
||||
self.internal_format.set(Some(internal_format)),
|
||||
|
||||
constants::STENCIL_INDEX8 |
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.7
|
||||
constants::DEPTH_STENCIL => {
|
||||
self.internal_format.set(Some(internal_format))
|
||||
}
|
||||
_ => return Err(WebGLError::InvalidEnum),
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
[tex-input-validation.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
[WebGL test #3: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
[WebGL test #34: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB565 internalFormat: RGBA target: TEXTURE_2D border: 0]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #20: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
|
||||
[WebGL test #37: getError expected: NO_ERROR. Was INVALID_OPERATION : colorBufferFormat: RGB565 internalFormat: RGB target: TEXTURE_2D border: 0]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #45: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB565 internalFormat: RGBA target: TEXTURE_2D]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #53: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB internalFormat: RGBA]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #61: getError expected: INVALID_OPERATION. Was NO_ERROR : colorBufferFormat: RGB internalFormat: RGBA]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue