Closed Bug 900767 Opened 6 years ago Closed 6 years ago

WebGL implement ANGLE_instanced_arrays

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

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

References

()

Details

Attachments

(1 file)

Attached patch patch revision 1Splinter Review
WebGL conformance test about ANGLE_instanced_arrays fully green. Found a bug in the WebGL 2 code. DrawElementsInstanced was using DrawElements...
Attachment #788142 - Flags: review?(jgilbert)
Assignee: nobody → gabadie
Comment on attachment 788142 [details] [diff] [review]
patch revision 1

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

::: content/canvas/src/WebGLContext.h
@@ +814,5 @@
>                               WebGLintptr byteOffset);
>      void VertexAttribDivisor(WebGLuint index, WebGLuint divisor);
>  
>  private:
> +    // Cache the max number of vertices and isntances that can be read from

'instances'

::: content/canvas/src/WebGLExtensionInstancedArrays.cpp
@@ +11,5 @@
> +
> +WebGLExtensionInstancedArrays::WebGLExtensionInstancedArrays(WebGLContext* context)
> +  : WebGLExtensionBase(context)
> +{
> +    MOZ_ASSERT(IsSupported(context), "should not construct WebGLExtensionInstancedArrays :"

Put the space after the color, not before.

@@ +12,5 @@
> +WebGLExtensionInstancedArrays::WebGLExtensionInstancedArrays(WebGLContext* context)
> +  : WebGLExtensionBase(context)
> +{
> +    MOZ_ASSERT(IsSupported(context), "should not construct WebGLExtensionInstancedArrays :"
> +                                     "ANGLE_instanced_arrays unsuported.");

'unsupported'

::: content/canvas/src/WebGLExtensions.h
@@ +192,5 @@
> +class WebGLExtensionInstancedArrays
> +    : public WebGLExtensionBase
> +{
> +public:
> +    WebGLExtensionInstancedArrays(WebGLContext*);

`WebGLContext* context`

::: dom/webidl/WebGLRenderingContext.webidl
@@ +902,5 @@
> +    const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
> +
> +    void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
> +    void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
> +    void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); 

Extra trailing space here.
Attachment #788142 - Flags: review?(jgilbert) → review+
(In reply to Jeff Gilbert [:jgilbert] from comment #2)
> Comment on attachment 788142 [details] [diff] [review]
> patch revision 1
> 
> Review of attachment 788142 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: content/canvas/src/WebGLContext.h
> @@ +814,5 @@
> >                               WebGLintptr byteOffset);
> >      void VertexAttribDivisor(WebGLuint index, WebGLuint divisor);
> >  
> >  private:
> > +    // Cache the max number of vertices and isntances that can be read from
> 
> 'instances'
Fixed.
> 
> ::: content/canvas/src/WebGLExtensionInstancedArrays.cpp
> @@ +11,5 @@
> > +
> > +WebGLExtensionInstancedArrays::WebGLExtensionInstancedArrays(WebGLContext* context)
> > +  : WebGLExtensionBase(context)
> > +{
> > +    MOZ_ASSERT(IsSupported(context), "should not construct WebGLExtensionInstancedArrays :"
> 
> Put the space after the color, not before.
Fixed.
> 
> @@ +12,5 @@
> > +WebGLExtensionInstancedArrays::WebGLExtensionInstancedArrays(WebGLContext* context)
> > +  : WebGLExtensionBase(context)
> > +{
> > +    MOZ_ASSERT(IsSupported(context), "should not construct WebGLExtensionInstancedArrays :"
> > +                                     "ANGLE_instanced_arrays unsuported.");
> 
> 'unsupported'
Fixed.
> 
> ::: content/canvas/src/WebGLExtensions.h
> @@ +192,5 @@
> > +class WebGLExtensionInstancedArrays
> > +    : public WebGLExtensionBase
> > +{
> > +public:
> > +    WebGLExtensionInstancedArrays(WebGLContext*);
> 
> `WebGLContext* context`
Fixed.
> 
> ::: dom/webidl/WebGLRenderingContext.webidl
> @@ +902,5 @@
> > +    const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
> > +
> > +    void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
> > +    void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
> > +    void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); 
> 
> Extra trailing space here.
Fixed.

Thanks!
https://hg.mozilla.org/integration/mozilla-inbound/rev/46f7b11d2594
Target Milestone: --- → mozilla26
https://hg.mozilla.org/mozilla-central/rev/46f7b11d2594
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Depends on: 916816
You need to log in before you can comment on or make changes to this bug.