Bug 127465 - Support ANGLE_instanced_arrays for linux
Summary: Support ANGLE_instanced_arrays for linux
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: ChangSeok Oh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 23:41 PST by ChangSeok Oh
Modified: 2014-02-11 23:53 PST (History)
9 users (show)

See Also:


Attachments
Patch (10.20 KB, patch)
2014-02-10 06:40 PST, ChangSeok Oh
no flags Details | Formatted Diff | Diff
Patch (10.23 KB, patch)
2014-02-10 07:26 PST, ChangSeok Oh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ChangSeok Oh 2014-01-22 23:41:00 PST
ANGLE_instanced_arrays is supported by Mac only. https://bugs.webkit.org/show_bug.cgi?id=127257
We need to fill blanks for linux platform either.
Comment 1 ChangSeok Oh 2014-02-10 06:40:16 PST
Created attachment 223704 [details]
Patch
Comment 2 WebKit Commit Bot 2014-02-10 06:42:10 PST
Attachment 223704 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:358:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:364:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:370:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 3 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 ChangSeok Oh 2014-02-10 06:44:05 PST
(In reply to comment #2)
> Attachment 223704 [details] did not pass style-queue:
> 
> 
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:358:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:364:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:370:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
> Total errors found: 3 in 6 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

I believe these are false alarms.
Comment 4 ChangSeok Oh 2014-02-10 07:26:04 PST
Created attachment 223709 [details]
Patch
Comment 5 WebKit Commit Bot 2014-02-10 07:27:45 PST
Attachment 223709 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:358:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:364:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:370:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
Total errors found: 3 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 ChangSeok Oh 2014-02-10 20:48:21 PST
Comment on attachment 223709 [details]
Patch

Thanks!
Comment 7 WebKit Commit Bot 2014-02-10 21:19:44 PST
Comment on attachment 223709 [details]
Patch

Clearing flags on attachment: 223709

Committed r163858: <http://trac.webkit.org/changeset/163858>
Comment 8 WebKit Commit Bot 2014-02-10 21:19:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Dean Jackson 2014-02-10 23:12:02 PST
Comment on attachment 223709 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223709&action=review

> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:371
>  void GraphicsContext3D::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
>  {
> -    UNUSED_PARAM(mode);
> -    UNUSED_PARAM(first);
> -    UNUSED_PARAM(count);
> -    UNUSED_PARAM(primcount);
> +    makeContextCurrent();
> +    ::glDrawArraysInstanced(mode, first, count, primcount);
>  }
>  
>  void GraphicsContext3D::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, GC3Dintptr offset, GC3Dsizei primcount)
>  {
> -    UNUSED_PARAM(mode);
> -    UNUSED_PARAM(count);
> -    UNUSED_PARAM(type);
> -    UNUSED_PARAM(offset);
> -    UNUSED_PARAM(primcount);
> +    makeContextCurrent();
> +    ::glDrawElementsInstanced(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount);
>  }
>  
>  void GraphicsContext3D::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
>  {
> -    UNUSED_PARAM(index);
> -    UNUSED_PARAM(divisor);
> +    makeContextCurrent();
> +    ::glVertexAttribDivisor(index, divisor);
>  }

I expect we could merge the COCOA code into here too.
Comment 10 ChangSeok Oh 2014-02-11 23:53:55 PST
(In reply to comment #9)
> (From update of attachment 223709 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223709&action=review
> 
> > Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:371
> >  void GraphicsContext3D::drawArraysInstanced(GC3Denum mode, GC3Dint first, GC3Dsizei count, GC3Dsizei primcount)
> >  {
> > -    UNUSED_PARAM(mode);
> > -    UNUSED_PARAM(first);
> > -    UNUSED_PARAM(count);
> > -    UNUSED_PARAM(primcount);
> > +    makeContextCurrent();
> > +    ::glDrawArraysInstanced(mode, first, count, primcount);
> >  }
> >  
> >  void GraphicsContext3D::drawElementsInstanced(GC3Denum mode, GC3Dsizei count, GC3Denum type, GC3Dintptr offset, GC3Dsizei primcount)
> >  {
> > -    UNUSED_PARAM(mode);
> > -    UNUSED_PARAM(count);
> > -    UNUSED_PARAM(type);
> > -    UNUSED_PARAM(offset);
> > -    UNUSED_PARAM(primcount);
> > +    makeContextCurrent();
> > +    ::glDrawElementsInstanced(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount);
> >  }
> >  
> >  void GraphicsContext3D::vertexAttribDivisor(GC3Duint index, GC3Duint divisor)
> >  {
> > -    UNUSED_PARAM(index);
> > -    UNUSED_PARAM(divisor);
> > +    makeContextCurrent();
> > +    ::glVertexAttribDivisor(index, divisor);
> >  }
> 
> I expect we could merge the COCOA code into here too.

Yeap. I'll do!