Commit 694169f9 authored by Jamie Madill's avatar Jamie Madill Committed by Chromium LUCI CQ

Revert "Fix readPixels incorrectly allowing RGBA / UNSIGNED_SHORT without...

Revert "Fix readPixels incorrectly allowing RGBA / UNSIGNED_SHORT without EXT_texture_norm16 support"

This reverts commit 80b096ab.

Reason for revert: Causing failure on ANGLE bots. See bug.

Bug: chromium:1154356

Original change's description:
> Fix readPixels incorrectly allowing RGBA / UNSIGNED_SHORT without EXT_texture_norm16 support
>
> Add readPixels validation for RGBA / UNSIGNED_SHORT combination. This is
> only valid with EXT_texture_norm16 extension enabled.
>
> Bug: 1152259
> Change-Id: I0e10b7d29f3b362c4054500270bbad87dcde599f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2559797
> Commit-Queue: Shrek Shao <shrekshao@google.com>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#832141}

TBR=kbr@chromium.org,jdarpinian@chromium.org,shrekshao@google.com,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: If71af6582a51aeee39541a4e1a0c693162ba7f12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1152259
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568438Reviewed-by: default avatarJamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832496}
parent 9fd79fb1
......@@ -122,6 +122,9 @@ crbug.com/angleproject/5038 conformance/extensions/ext-color-buffer-half-float.h
# under crbug.com/963205 once these two failures are fixed.
crbug.com/1136231 [ win ] conformance/extensions/s3tc-and-rgtc.html [ Failure ]
crbug.com/1136231 [ linux ] conformance/extensions/s3tc-and-rgtc.html [ Failure ]
crbug.com/1152259 [ win ] conformance/reading/read-pixels-test.html [ Failure ]
crbug.com/1152259 [ linux ] conformance/reading/read-pixels-test.html [ Failure ]
crbug.com/1152259 [ mac passthrough ] conformance/reading/read-pixels-test.html [ Failure ]
crbug.com/953120 conformance/programs/program-handling.html [ Failure ]
......
......@@ -205,6 +205,8 @@ crbug.com/1110111 [ win nvidia ] conformance/rendering/point-no-attributes.html
# under crbug.com/963205 and crbug.com/964321 once these two failures are fixed.
crbug.com/1136231 [ win ] conformance/extensions/s3tc-and-rgtc.html [ Failure ]
crbug.com/1136231 [ linux ] conformance/extensions/s3tc-and-rgtc.html [ Failure ]
crbug.com/1152259 [ win ] conformance/reading/read-pixels-test.html [ Failure ]
crbug.com/1152259 [ linux ] conformance/reading/read-pixels-test.html [ Failure ]
# Skipping new tests
crbug.com/angleproject/5038 conformance/extensions/ext-color-buffer-half-float.html [ Skip ]
......
......@@ -1092,6 +1092,7 @@ uint32_t GLES2Util::GetGLReadPixelsImplementationType(uint32_t internal_format,
case GL_R16UI:
case GL_RG16UI:
case GL_RGBA16UI:
case GL_RGB10_A2:
case GL_RGB10_A2UI:
case GL_R16_EXT:
case GL_RG16_EXT:
......
......@@ -5527,6 +5527,7 @@ bool WebGL2RenderingContextBase::ValidateReadPixelsFormatAndType(
return false;
}
return true;
case GL_UNSIGNED_SHORT:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_4_4_4_4:
case GL_UNSIGNED_SHORT_5_5_5_1:
......@@ -5537,23 +5538,6 @@ bool WebGL2RenderingContextBase::ValidateReadPixelsFormatAndType(
return false;
}
return true;
case GL_UNSIGNED_SHORT:
if (buffer && buffer->GetType() != DOMArrayBufferView::kTypeUint16) {
SynthesizeGLError(
GL_INVALID_OPERATION, "readPixels",
"type GL_UNSIGNED_SHORT but ArrayBufferView not Uint16Array");
return false;
}
if (format == GL_RGBA) {
if (!ExtensionEnabled(kEXTTextureNorm16Name)) {
SynthesizeGLError(
GL_INVALID_ENUM, "readPixels",
"invalid format/type combination RGBA/UNSIGNED_SHORT without "
"EXT_texture_norm16 support");
return false;
}
}
return true;
case GL_SHORT:
if (buffer && buffer->GetType() != DOMArrayBufferView::kTypeInt16) {
SynthesizeGLError(GL_INVALID_OPERATION, "readPixels",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment