Closed Bug 917046 Opened 11 years ago Closed 11 years ago

WebGL2 requires instanced drawing with only non-zero-divisor active attrib arrays to be allowed

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(2 files)

ANGLE_instanced_arrays and NV_instanced_arrays disallow instanced drawing when there is not at least one active attrib array with a zero instancing divisor.

GLES3 (and thus WebGL2) does not appear to have this restriction.
Add a `instanced_arrays2` feature to encapsulate this functionality.
Attachment #805664 - Flags: review?(bjacob)
Attachment #805664 - Attachment description: req-better-inst → patch 1: Add a `instanced_arrays2` feature to encapsulate this functionality.
Depends on: 911394
Comment on attachment 805664 [details] [diff] [review]
patch 1: 
Add a `instanced_arrays2` feature to encapsulate this functionality.

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

::: gfx/gl/GLContextFeatures.cpp
@@ +158,5 @@
>              GLContext::Extensions_End
>          }
>      },
>      {
> +        "instanced_arrays2",

Have you thought of maybe giving this a more descriptive name?

@@ +169,5 @@
> +        /* This is an expanded version of `instanced_arrays` that allows for all
> +         * enabled active attrib arrays to have non-zero divisors.
> +         * ANGLE_instanced_arrays and NV_instanced_arrays forbid this, but GLES3
> +         * has no such restriction.
> +         */

Comments usually go _above_ what they refer to.
Attachment #805664 - Flags: review?(bjacob) → review+
Attachment #805668 - Flags: review?(bjacob) → review+
(In reply to Benoit Jacob [:bjacob] from comment #3)
> Comment on attachment 805664 [details] [diff] [review]
> patch 1: 
> Add a `instanced_arrays2` feature to encapsulate this functionality.
> 
> Review of attachment 805664 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/gl/GLContextFeatures.cpp
> @@ +158,5 @@
> >              GLContext::Extensions_End
> >          }
> >      },
> >      {
> > +        "instanced_arrays2",
> 
> Have you thought of maybe giving this a more descriptive name?
"instanced_non_arrays"? :P
Actually, that's as good a name as any.
> 
> @@ +169,5 @@
> > +        /* This is an expanded version of `instanced_arrays` that allows for all
> > +         * enabled active attrib arrays to have non-zero divisors.
> > +         * ANGLE_instanced_arrays and NV_instanced_arrays forbid this, but GLES3
> > +         * has no such restriction.
> > +         */
> 
> Comments usually go _above_ what they refer to.
I agree, but we should change this all at once for this file.
https://hg.mozilla.org/mozilla-central/rev/7ca634037700
https://hg.mozilla.org/mozilla-central/rev/ae79bc0418e1
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: