Closed Bug 1022272 Opened 11 years ago Closed 11 years ago

WebGL bug: calling drawArrays() with a divisor different than 0 for all attributes should be illegal with ANGLE_instanced_arrays

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: guillaume.abadie, Assigned: guillaume.abadie)

Details

Attachments

(1 file)

Since drawArray(mode, first, count) == DrawArraysInstanced(mode, first, count, 1), WebGLContext::DrawArrays(...) should also verify DrawInstanced_check("drawArraysInstanced") == true. http://hg.mozilla.org/mozilla-central/annotate/7146e89a7b83/content/canvas/src/WebGLContextDraw.cpp#l149 Same for WebGLContext::DrawElements().
This patch just move the WebGLContext::DrawInstanced_check() verification within WebGLContext::Draw{Arrays,Elements}_check() in order to have WebGLContext::Draw{Arrays,Elements}(Instanced) verifying it automatically. Push to try: https://tbpl.mozilla.org/?tree=Try&rev=9fa6b9c9476d
Attachment #8436427 - Flags: review?(jgilbert)
Comment on attachment 8436427 [details] [diff] [review] bug_1022272.patch Review of attachment 8436427 [details] [diff] [review]: ----------------------------------------------------------------- Nits, but functionally correct. ::: content/canvas/src/WebGLContextDraw.cpp @@ +111,5 @@ > if (!DoFakeVertexAttrib0(checked_firstPlusCount.value())) { > return false; > } > + > + if (!DrawInstanced_check("drawElementsInstanced")) { s/"drawElementsInstanced"/info/ @@ +284,5 @@ > if (!DoFakeVertexAttrib0(mMaxFetchedVertices)) { > return false; > } > + > + if (!DrawInstanced_check("drawElementsInstanced")) { s/"drawElementsInstanced"/info/
Attachment #8436427 - Flags: review?(jgilbert) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: