Bug 45908

Summary: Must enable GL_POINT_SPRITE in GraphicsContext3D implementations
Product: WebKit Reporter: Kenneth Russell <kbr>
Component: WebGLAssignee: Zhenyao Mo <zmo>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, cmarrin, danceoffwithyourpantsoff, enne, eric, simon.fraser, webkit.review.bot, zmo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch none

Description Kenneth Russell 2010-09-16 11:07:28 PDT
In order to properly support the gl_PointCoord built-in variable in fragment shaders, it is necessary for the various GraphicsContext3D implementations running on desktop GL to enable the GL_POINT_SPRITE capability. This is similar to the earlier requirement to enable the GL_VERTEX_PROGRAM_POINT_SIZE capability.

Note that testing this in WebKit requires ANGLE issue http://code.google.com/p/angleproject/issues/detail?id=35 to be fixed and the version of ANGLE in WebKit to be updated.
Comment 1 danceoffwithyourpantsoff 2010-10-20 02:31:09 PDT
(In reply to comment #0)
> In order to properly support the gl_PointCoord built-in variable in fragment shaders, it is necessary for the various GraphicsContext3D implementations running on desktop GL to enable the GL_POINT_SPRITE capability. This is similar to the earlier requirement to enable the GL_VERTEX_PROGRAM_POINT_SIZE capability.
> 
> Note that testing this in WebKit requires ANGLE issue http://code.google.com/p/angleproject/issues/detail?id=35 to be fixed and the version of ANGLE in WebKit to be updated.

This was recently fixed in ANGLE and rolled into Chromium, and gl_PointCoord is working now.

However, shaders that use gl_PointCoord still fail to compile in non-chromium WebKit / Safari.

Relevant:

http://code.google.com/p/chromium/issues/detail?id=59763
http://code.google.com/p/angleproject/source/detail?r=448
http://src.chromium.org/viewvc/chrome?view=rev&revision=63084
Comment 2 Zhenyao Mo 2010-10-20 10:25:03 PDT
(In reply to comment #1)
> (In reply to comment #0)
> > In order to properly support the gl_PointCoord built-in variable in fragment shaders, it is necessary for the various GraphicsContext3D implementations running on desktop GL to enable the GL_POINT_SPRITE capability. This is similar to the earlier requirement to enable the GL_VERTEX_PROGRAM_POINT_SIZE capability.
> > 
> > Note that testing this in WebKit requires ANGLE issue http://code.google.com/p/angleproject/issues/detail?id=35 to be fixed and the version of ANGLE in WebKit to be updated.
> 
> This was recently fixed in ANGLE and rolled into Chromium, and gl_PointCoord is working now.
> 
> However, shaders that use gl_PointCoord still fail to compile in non-chromium WebKit / Safari.
> 
> Relevant:
> 
> http://code.google.com/p/chromium/issues/detail?id=59763
> http://code.google.com/p/angleproject/source/detail?r=448
> http://src.chromium.org/viewvc/chrome?view=rev&revision=63084

That's because they are still using an older version of ANGLE.
Comment 3 Zhenyao Mo 2010-10-22 10:36:40 PDT
Created attachment 71574 [details]
patch

Mac port still needs to roll ANGLE for gl_pointCoord to work
Comment 4 Kenneth Russell 2010-10-25 19:08:39 PDT
Comment on attachment 71574 [details]
patch

OK, but see https://bugs.webkit.org/show_bug.cgi?id=48282 ; this only adds code which will need to be fixed later under that bug. Minimally, add a comment to that bug about this new code.
Comment 5 Zhenyao Mo 2010-10-27 10:24:57 PDT
Comment on attachment 71574 [details]
patch

Clearing flags on attachment: 71574

Committed r70666: <http://trac.webkit.org/changeset/70666>
Comment 6 Zhenyao Mo 2010-10-27 10:25:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Review Bot 2010-10-27 14:04:46 PDT
http://trac.webkit.org/changeset/70666 might have broken GTK Linux 32-bit Debug