Closed Bug 1237191 Opened 8 years ago Closed 8 years ago

[WebGL2] pass getQueryParameter in gl-object-get-calls.html

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: ethlin, Assigned: ethlin)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Test getQueryParameter
FAIL gl.getQueryParameter(query, gl.QUERY_RESULT_AVAILABLE) should be false (of type boolean). Was null (of type object).
FAIL getQueryParameter did not generate INVALID_ENUM for invalid pname enum: NO_ERROR
Attached patch Add check for getQueryParameter (obsolete) — Splinter Review
Add some checks to return correct gl error.
Attachment #8704529 - Flags: review?(jgilbert)
Comment on attachment 8704529 [details] [diff] [review]
Add check for getQueryParameter

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

::: dom/canvas/WebGL2ContextQueries.cpp
@@ +295,5 @@
>  
>      if (IsContextLost())
>          return;
>  
> +    if (!ValidateQueryEnum(pname, "getQueryParameter"))

Just define this function above this function:

static bool
ValidateQueryEnum(WebGLContext* webgl, pname, funcName)

::: dom/canvas/WebGLContext.h
@@ +1285,5 @@
>      bool ValidateCurFBForRead(const char* funcName,
>                                const webgl::FormatUsageInfo** const out_format,
>                                uint32_t* const out_width, uint32_t* const out_height);
>  
> +    bool ValidateQueryEnum(GLenum pname, const char* info);

No need to add a member for this.
Attachment #8704529 - Flags: review?(jgilbert) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/adfe8792f603
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: