GetError() returns GL_CONTEXT_LOST not GL_CONTEXT_LOST_WEBGL

RESOLVED FIXED in Firefox 56

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: jerry, Assigned: jerry)

Tracking

unspecified
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

(Whiteboard: gfx-noted)

Attachments

(1 attachment)

(Assignee)

Description

10 months ago
It should be GL_CONTEXT_LOST_WEBGL instead of GL_CONTEXT_LOST.


From:
https://www.khronos.org/registry/webgl/specs/latest/1.0/

[WebGLHandlesContextLoss] GLenum getError() (OpenGL ES 2.0 §2.5, man page)
    If the context's webgl context lost flag is set, returns CONTEXT_LOST_WEBGL the first time this method is called. Afterward, returns NO_ERROR until the context has been restored.
(Assignee)

Comment 1

10 months ago
Created attachment 8877017 [details] [diff] [review]
Fix the wrong return value for webgl context-lost.

MozReview-Commit-ID: KYr0cKoeWJo
Attachment #8877017 - Flags: review?(jgilbert)
Comment on attachment 8877017 [details] [diff] [review]
Fix the wrong return value for webgl context-lost.

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

This is the same value, just technically different names. We have a history of omitting the vendor suffix where possible, which is what we do here.
Attachment #8877017 - Flags: review?(jgilbert) → review-

Updated

10 months ago
Status: ASSIGNED → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → WONTFIX
Summary: Fix the wrong return value for webgl context-lost. → GetError() returns GL_CONTEXT_LOST not GL_CONTEXT_LOST_WEBGL

Updated

10 months ago
Component: Graphics → Canvas: WebGL

Updated

10 months ago
Whiteboard: gfx-noted
(Assignee)

Comment 3

10 months ago
From https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml,
the value of GL_CONTEXT_LOST and GL_CONTEXT_LOST_WEBGL are different.

<enum value="0x0507" name="GL_CONTEXT_LOST"/>
<enum value="0x0507" name="GL_CONTEXT_LOST_KHR"/>

<enum value="0x9242" name="GL_CONTEXT_LOST_WEBGL"/>
Status: RESOLVED → REOPENED
Flags: needinfo?(jgilbert)
Resolution: WONTFIX → ---
Ah, I see grep failed me here, because our code was wrong.
Flags: needinfo?(jgilbert)
Comment on attachment 8877017 [details] [diff] [review]
Fix the wrong return value for webgl context-lost.

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

Confirmed that these are different values in the bug this bug depends on.
Attachment #8877017 - Flags: review- → review+

Comment 7

10 months ago
Pushed by hshih@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0d3a9cc05519
GetError() returns GL_CONTEXT_LOST not GL_CONTEXT_LOST_WEBGL. r=jgilbert
https://hg.mozilla.org/mozilla-central/rev/0d3a9cc05519
Status: REOPENED → RESOLVED
Last Resolved: 10 months ago10 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.