Closed Bug 1242336 Opened 9 years ago Closed 9 years ago

Pass WebGL2 conformance test gl-get-calls

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: ethlin, Assigned: ethlin)

References

()

Details

Attachments

(1 file, 1 obsolete file)

FAIL context.getParameter(context.UNPACK_SKIP_IMAGES) should be 0 (of type number). Was false (of type boolean).
FAIL context.getParameter(context.UNPACK_SKIP_PIXELS) should be 0 (of type number). Was false (of type boolean).
FAIL context.getParameter(context.UNPACK_SKIP_ROWS) should be 0 (of type number). Was false (of type boolean).
Attached patch Fix return type. (obsolete) — Splinter Review
According to the spec[1], GL_PACK_SKIP_PIXELS, GL_PACK_SKIP_ROWS, GL_PIXEL_PACK_BUFFER_BINDING should return the number of something. So I change the return type to integer.

[1] https://www.khronos.org/opengles/sdk/docs/man3/html/glGet.xhtml
Attachment #8711568 - Flags: review?(jgilbert)
Comment on attachment 8711568 [details] [diff] [review]
Fix return type.

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

::: dom/canvas/WebGL2ContextState.cpp
@@ +80,5 @@
>      case LOCAL_GL_UNPACK_IMAGE_HEIGHT:
> +    case LOCAL_GL_UNPACK_ROW_LENGTH:
> +    case LOCAL_GL_UNPACK_SKIP_IMAGES:
> +    case LOCAL_GL_UNPACK_SKIP_PIXELS:
> +    case LOCAL_GL_UNPACK_SKIP_ROWS: {

We cache these. Just return the cached values.
Attachment #8711568 - Flags: review?(jgilbert) → review-
Attached patch Fix return type.Splinter Review
Addressed jgilbert's comment. I think we should also use the cached value for LOCAL_GL_PACK_ROW_LENGTH, LOCAL_GL_PACK_SKIP_ROWS, etc. I will open another bug to do that.
Attachment #8712017 - Flags: review?(jgilbert)
Attachment #8711568 - Attachment is obsolete: true
Attachment #8712017 - Flags: review?(jgilbert) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/78ee856813f0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: