mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Remove erroneous check from CopyTexImage2D
The internal format of the bound texture doesn't matter, what matters is which components can be found in the framebuffer.
This commit is contained in:
parent
9db1a5cd0b
commit
ac822ee2fc
1 changed files with 0 additions and 16 deletions
|
@ -1752,22 +1752,6 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
Err(_) => return,
|
||||
};
|
||||
|
||||
let image_info = texture.image_info_for_target(&target, level);
|
||||
|
||||
// The color buffer components can be dropped during the conversion to
|
||||
// the internal_format, but new components cannot be added.
|
||||
//
|
||||
// Note that this only applies if we're copying to an already
|
||||
// initialized texture.
|
||||
//
|
||||
// GL_INVALID_OPERATION is generated if the color buffer cannot be
|
||||
// converted to the internal_format.
|
||||
if let Some(old_internal_format) = image_info.internal_format() {
|
||||
if old_internal_format.components() > internal_format.components() {
|
||||
return self.webgl_error(InvalidOperation);
|
||||
}
|
||||
}
|
||||
|
||||
// NB: TexImage2D depth is always equal to 1
|
||||
handle_potential_webgl_error!(self, texture.initialize(target,
|
||||
width as u32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue