Closed Bug 1422714 Opened 2 years ago Closed 2 years ago

WebGL 2: getQueryParameter returning boolean values instead of uints

Categories

(Core :: Canvas: WebGL, defect, P3)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: tareksherif, Assigned: cleu)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce:

var canvas = document.createElement("canvas");
var gl = canvas.getContext("webgl2");
var query = gl.createQuery();
gl.beginQuery(gl.ANY_SAMPLES_PASSED, query);
gl.endQuery(gl.ANY_SAMPLES_PASSED);
requestAnimationFrame(function() {
    console.log(gl.getQueryParameter(query, gl.QUERY_RESULT));
});




Actual results:

Prints "false"


Expected results:

Should print "0"

The WebGL 2 spec states in section 3.7.12 that the result of gl.getQueryParameter(query, gl.QUERY_RESULT) should be a GLuint

https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.12
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
Whiteboard: [gfx-noted]
Do you have time for this, :lenzak?
Assignee: nobody → cleu
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(cleu)
Priority: -- → P3
Attachment #8937076 - Flags: review?(jgilbert)
Comment on attachment 8937076 [details]
Bug 1422714 - Make return value of WebGLQuery::GetQueryParameter conformant to WebGL2 Spec

https://reviewboard.mozilla.org/r/207784/#review213670
Attachment #8937076 - Flags: review?(jgilbert) → review+
Flags: needinfo?(cleu)
Keywords: checkin-needed
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1526b26c9961
Make return value of WebGLQuery::GetQueryParameter conformant to WebGL2 Spec r=jgilbert
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1526b26c9961
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.