WebGL 2 - ReadBuffer returns incorrect errors

RESOLVED FIXED in Firefox 42

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: kamidphish, Assigned: kamidphish)

Tracking

(Blocks: 1 bug)

unspecified
mozilla42
All
Unspecified
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

(Whiteboard: [gfx-noted], URL)

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
ReadBuffer is returning the incorrect error type when checking parameters.
(Assignee)

Comment 1

2 years ago
Created attachment 8635032 [details] [diff] [review]
Fix LastColorAttachment().
Attachment #8635032 - Flags: review?(jgilbert)
(Assignee)

Comment 2

2 years ago
Created attachment 8635036 [details] [diff] [review]
Fix ReadBuffer parameter validation.
Attachment #8635036 - Flags: review?(jgilbert)
Attachment #8635032 - Flags: review?(jgilbert) → review+
Comment on attachment 8635036 [details] [diff] [review]
Fix ReadBuffer parameter validation.

Review of attachment 8635036 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGL2ContextFramebuffers.cpp
@@ +585,3 @@
>  
>      if (mBoundReadFramebuffer) {
> +        if (src == LOCAL_GL_BACK) {

I would rather test explicitly what it says below, instead of testing against what (for now?) is the only alternative.

@@ +599,5 @@
>      // Operating on the default framebuffer.
> +    if (isColorAttachment) {
> +        ErrorInvalidOperation("readBuffer: If READ_FRAMEBUFFER is null, `src`"
> +                              " must be BACK or NONE. Was %s",
> +                              EnumName(src));

Again, I'd rather test explicitly what is requested to test, rather than process-of-elimination. (prone to breakage when things above it change)
Attachment #8635036 - Flags: review?(jgilbert) → review+
(Assignee)

Comment 4

2 years ago
Try - https://treeherder.mozilla.org/#/jobs?repo=try&revision=81413e960456

Comment 5

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5834e85fc660
https://hg.mozilla.org/integration/mozilla-inbound/rev/0c777aabd5d0
https://hg.mozilla.org/mozilla-central/rev/5834e85fc660
https://hg.mozilla.org/mozilla-central/rev/0c777aabd5d0
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.