mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1889448 - Allow FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE if WEBGL_color_buffer_float || EXT_color_buffer_half_float. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D206539
This commit is contained in:
parent
c77f3de099
commit
21234546af
@ -352,10 +352,17 @@ Maybe<double> WebGLFBAttachPoint::GetParameter(WebGLContext* webgl,
|
||||
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
|
||||
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
|
||||
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
|
||||
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
|
||||
isPNameValid = webgl->IsWebGL2();
|
||||
break;
|
||||
|
||||
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
|
||||
isPNameValid = (webgl->IsWebGL2() ||
|
||||
webgl->IsExtensionEnabled(
|
||||
WebGLExtensionID::WEBGL_color_buffer_float) ||
|
||||
webgl->IsExtensionEnabled(
|
||||
WebGLExtensionID::EXT_color_buffer_half_float));
|
||||
break;
|
||||
|
||||
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:
|
||||
isPNameValid = (webgl->IsWebGL2() ||
|
||||
webgl->IsExtensionEnabled(WebGLExtensionID::EXT_sRGB));
|
||||
@ -404,7 +411,14 @@ Maybe<double> WebGLFBAttachPoint::GetParameter(WebGLContext* webgl,
|
||||
break;
|
||||
|
||||
case LOCAL_GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
|
||||
MOZ_ASSERT(attachment != LOCAL_GL_DEPTH_STENCIL_ATTACHMENT);
|
||||
if (attachment == LOCAL_GL_DEPTH_STENCIL_ATTACHMENT) {
|
||||
webgl->ErrorInvalidOperation(
|
||||
"Querying"
|
||||
" FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"
|
||||
" against DEPTH_STENCIL_ATTACHMENT is an"
|
||||
" error.");
|
||||
return Nothing();
|
||||
}
|
||||
|
||||
if (format->unsizedFormat == webgl::UnsizedFormat::DEPTH_STENCIL) {
|
||||
MOZ_ASSERT(attachment == LOCAL_GL_DEPTH_ATTACHMENT ||
|
||||
@ -1222,17 +1236,6 @@ Maybe<double> WebGLFramebuffer::GetAttachmentParameter(GLenum attachEnum,
|
||||
auto attach = maybeAttach.value();
|
||||
|
||||
if (mContext->IsWebGL2() && attachEnum == LOCAL_GL_DEPTH_STENCIL_ATTACHMENT) {
|
||||
// There are a couple special rules for this one.
|
||||
|
||||
if (pname == LOCAL_GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) {
|
||||
mContext->ErrorInvalidOperation(
|
||||
"Querying"
|
||||
" FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"
|
||||
" against DEPTH_STENCIL_ATTACHMENT is an"
|
||||
" error.");
|
||||
return Nothing();
|
||||
}
|
||||
|
||||
if (mDepthAttachment.Renderbuffer() != mStencilAttachment.Renderbuffer() ||
|
||||
mDepthAttachment.Texture() != mStencilAttachment.Texture()) {
|
||||
mContext->ErrorInvalidOperation(
|
||||
|
@ -9199,7 +9199,6 @@ subsuite = "webgl2-core"
|
||||
|
||||
["generated/test_2_conformance__extensions__ext-color-buffer-half-float.html"]
|
||||
subsuite = "webgl2-core"
|
||||
fail-if = ["true"]
|
||||
|
||||
["generated/test_2_conformance__extensions__ext-depth-clamp.html"]
|
||||
subsuite = "webgl2-core"
|
||||
@ -14335,7 +14334,6 @@ subsuite = "webgl1-core"
|
||||
|
||||
["generated/test_conformance__extensions__ext-color-buffer-half-float.html"]
|
||||
subsuite = "webgl1-core"
|
||||
fail-if = ["true"]
|
||||
|
||||
["generated/test_conformance__extensions__ext-depth-clamp.html"]
|
||||
subsuite = "webgl1-core"
|
||||
@ -14404,7 +14402,6 @@ skip-if = ["os == 'android'"]
|
||||
|
||||
["generated/test_conformance__extensions__oes-texture-float.html"]
|
||||
subsuite = "webgl1-core"
|
||||
fail-if = ["true"]
|
||||
|
||||
["generated/test_conformance__extensions__oes-texture-half-float-linear.html"]
|
||||
subsuite = "webgl1-core"
|
||||
|
@ -32,36 +32,6 @@ fail-if = ["true"]
|
||||
####################
|
||||
# Failures from 2024-04 CTS update
|
||||
|
||||
["generated/test_conformance__extensions__ext-color-buffer-half-float.html"]
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 35863 (of type number). Was null (of type object).
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 5126 (of type number). Was null (of type object).
|
||||
# getError expected: NO_ERROR. Was INVALID_ENUM : No errors after valid renderbuffer attachment queries.
|
||||
# getError expected: INVALID_OPERATION. Was INVALID_ENUM : Component type query is not allowed for combined depth-stencil attachments.
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 35863 (of type number). Was null (of type object).
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 5126 (of type number). Was null (of type object).
|
||||
# getError expected: NO_ERROR. Was INVALID_ENUM : No errors after valid texture attachment queries.
|
||||
fail-if = ["true"]
|
||||
|
||||
["generated/test_conformance__extensions__oes-texture-float.html"]
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 35863 (of type number). Was null (of type object).
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 5126 (of type number). Was null (of type object).
|
||||
# getError expected: NO_ERROR. Was INVALID_ENUM : No errors after valid renderbuffer attachment queries.
|
||||
# getError expected: INVALID_OPERATION. Was INVALID_ENUM : Component type query is not allowed for combined depth-stencil attachments.
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 35863 (of type number). Was null (of type object).
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 5126 (of type number). Was null (of type object).
|
||||
# getError expected: NO_ERROR. Was INVALID_ENUM : No errors after valid texture attachment queries.
|
||||
fail-if = ["true"]
|
||||
|
||||
["generated/test_2_conformance__extensions__ext-color-buffer-half-float.html"]
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 35863 (of type number). Was null (of type object).
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 5126 (of type number). Was null (of type object).
|
||||
# getError expected: NO_ERROR. Was INVALID_ENUM : No errors after valid renderbuffer attachment queries.
|
||||
# getError expected: INVALID_OPERATION. Was INVALID_ENUM : Component type query is not allowed for combined depth-stencil attachments.
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 35863 (of type number). Was null (of type object).
|
||||
# gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) should be 5126 (of type number). Was null (of type object).
|
||||
# getError expected: NO_ERROR. Was INVALID_ENUM : No errors after valid texture attachment queries.
|
||||
fail-if = ["true"]
|
||||
|
||||
["generated/test_2_conformance2__textures__misc__tex-image-10bpc.html"]
|
||||
# gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Was 36054.
|
||||
# uniquePixels.size should be >= 7. Was 1 (of type number).
|
||||
|
Loading…
Reference in New Issue
Block a user