Closed Bug 1243907 Opened 4 years ago Closed 4 years ago

Don't query _BITS enums on GL Core profiles

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

The _BITS enums don't exist in Core profiles.
Attachment #8713370 - Flags: review?(jmuizelaar)
Comment on attachment 8713370 [details] [diff] [review]
0002-Don-t-query-GL_-_BITS-on-Core-profiles.patch

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

::: dom/canvas/WebGLContextState.cpp
@@ +109,5 @@
> +        switch (pname) {
> +        case LOCAL_GL_RED_BITS:
> +        case LOCAL_GL_GREEN_BITS:
> +        case LOCAL_GL_BLUE_BITS:
> +            *out_val = 8;

What about 565?
Flags: needinfo?(jgilbert)
Comment on attachment 8713370 [details] [diff] [review]
0002-Don-t-query-GL_-_BITS-on-Core-profiles.patch

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

::: dom/canvas/WebGLContextState.cpp
@@ +109,5 @@
> +        switch (pname) {
> +        case LOCAL_GL_RED_BITS:
> +        case LOCAL_GL_GREEN_BITS:
> +        case LOCAL_GL_BLUE_BITS:
> +            *out_val = 8;

It's actually out-of-spec to give back a 565/4444 backbuffer. The WebGL 1 spec requires at least 8 bits per channel.

I don't think we should worry about this.
Flags: needinfo?(jgilbert)
What about situations where the framebuffer is higher precision than 8,8,8,8?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #3)
> What about situations where the framebuffer is higher precision than 8,8,8,8?

This doesn't happen yet.
Attachment #8713370 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/78bd3a5e7968
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.