Skip to content

Commit

Permalink
Fix ext-color-buffer-float.html to pass valid RGB16F/32F texture form…
Browse files Browse the repository at this point in the history
…ats (#2426)

RGB16F and RGB32F are both valid internal texture formats and
should not produce an error when this extension is enabled. The
extension should not be limiting the enums that can be passed
to CopyTexImage.
  • Loading branch information
Samulus authored and kenrussell committed Jun 23, 2017
1 parent 9ffa3b5 commit a4803e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
5 changes: 1 addition & 4 deletions extensions/EXT_color_buffer_float/extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@
</feature>

<feature>
<p>Renderbuffers with these internal formats can be created. These
internal formats are valid for CopyTexImage2D. Note that textures
with these internal formats can be created with TexImage2D in core
WebGL 2.0.</p>
<p>Renderbuffers with these internal formats can be created.</p>
</feature>

<feature>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,7 @@
if (enabled) {
shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
gl.copyTexImage2D(gl.TEXTURE_2D, level, destInternalformat, 0, 0, width, height, 0);
if (destInternalformat == gl.RGB16F || destInternalformat == gl.RGB32F) {
wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "CopyTexImage2D should fail.");
} else {
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "CopyTexImage2D should succeed.");
}
wtu.glErrorShouldBe(gl, gl.NO_ERROR, "CopyTexImage2D should succeed.");
} else {
shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT");
gl.copyTexImage2D(gl.TEXTURE_2D, level, destInternalformat, 0, 0, width, height, 0);
Expand Down

0 comments on commit a4803e1

Please sign in to comment.