Bug 125383 - [WinCairo] OpenGL compile error.
Summary: [WinCairo] OpenGL compile error.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 125464 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-07 02:21 PST by peavo
Modified: 2013-12-11 12:04 PST (History)
8 users (show)

See Also:


Attachments
Patch (1.47 KB, patch)
2013-12-07 02:26 PST, peavo
no flags Details | Formatted Diff | Diff
Patch (1.27 KB, patch)
2013-12-09 11:34 PST, peavo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2013-12-07 02:21:56 PST
Compiling GraphicsContext3DOpenGLCommon.cpp on WinCairo fails, because GL_HALF_FLOAT_ARB is undefined.
It's defined in <GL/glext.h>, but when I include that, I get other compile errors.
Comment 1 peavo 2013-12-07 02:26:46 PST
Created attachment 218655 [details]
Patch
Comment 2 Brent Fulgham 2013-12-08 00:00:54 PST
Comment on attachment 218655 [details]
Patch

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

> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:1368
> +#if !PLATFORM(WIN) || defined(GL_HALF_FLOAT_ARB)

Can you file a bug for the break in a Windows with GLext.h included, and add a FIXME here? Then I'll r+ this as a build fix.
Comment 3 peavo 2013-12-09 11:34:48 PST
Created attachment 218782 [details]
Patch
Comment 4 peavo 2013-12-09 11:37:22 PST
On second thought, I think it's better to define GL_HALF_FLOAT_ARB when OPENGL_ES_2 is used.
It doesn't seem we're meant to include <GL/glext.h> when OPENGL_ES_2 is used, rather <GLES2/gl2ext.h>.
Comment 5 WebKit Commit Bot 2013-12-09 12:14:53 PST
Comment on attachment 218782 [details]
Patch

Clearing flags on attachment: 218782

Committed r160324: <http://trac.webkit.org/changeset/160324>
Comment 6 WebKit Commit Bot 2013-12-09 12:14:55 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Alex Christensen 2013-12-09 12:16:44 PST
*** Bug 125464 has been marked as a duplicate of this bug. ***
Comment 8 Ralph T 2013-12-11 11:38:33 PST
Oops, I filed this patch for the same issue. I think it affects all GL ES 2.0 targets, not just Windows.

https://bugs.webkit.org/show_bug.cgi?id=125541

I'll update my patch to weaken the #if guard to just #if USE(OPENGL_ES_2).
Comment 9 Ralph T 2013-12-11 11:57:32 PST
(In reply to comment #8)
> Oops, I filed this patch for the same issue. I think it affects all GL ES 2.0 targets, not just Windows.
> 
> https://bugs.webkit.org/show_bug.cgi?id=125541
> 
> I'll update my patch to weaken the #if guard to just #if USE(OPENGL_ES_2).

Oops, actually that would be wrong; I didn't realize that HALF_FLOAT_OES and HALF_FLOAT_ARB are different values -- an actual GLES 2 implementation wants HALF_FLOAT_OES (0x8D61). I think my other patch is still OK, though it's weird to have guards around the same thing in two places.

Does the Windows GL ES 2 implementation really want HALF_FLOAT_ARB?
Comment 10 Ralph T 2013-12-11 12:04:59 PST
If you're using the ANGLE in the WebKit tree then it will bail in glTexImage2D if you use the GL_HALF_FLOAT_ARB constant (look in src/libGLESv2/libGLESv2.cpp for HALF_FLOAT_OES). It doesn't seem to support half float vertices at all.

Maybe you're using some vendor OpenGL ICD, in which case it'd be fine. I'm not sure how the Windows build is set up.

Sorry for so many comments.