Bug 56824

Summary: [Qt] WebGL: renderbufferStorage() fails with internal format GL_RGBA4
Product: WebKit Reporter: Jarkko Sakkinen <jarkko.j.sakkinen>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, benjamin, commit-queue, eric, jarkko.j.sakkinen, webkit.review.bot
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Fallback to GL_RGBA on desktop OpenGL.
benjamin: review-
Fixed defects that benjaminp reported. none

Description Jarkko Sakkinen 2011-03-22 05:23:43 PDT
On desktop WebGL method renderbufferStorage() fails with internal format GL_RGBA4 This is shown by the layout test LayoutTests/fast/canvas/webgl/uninitialized-test.html
Comment 1 Jarkko Sakkinen 2011-03-22 05:24:40 PDT
I'm implementing fix in the spirit of this message:
http://www.khronos.org/webgl/public-mailing-list/archives/1010/msg00126.html
Comment 2 Jarkko Sakkinen 2011-03-22 05:36:09 PDT
Created attachment 86455 [details]
Fallback to GL_RGBA on desktop OpenGL.
Comment 3 Benjamin Poulain 2011-03-22 06:11:27 PDT
Comment on attachment 86455 [details]
Fallback to GL_RGBA on desktop OpenGL.

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

> Source/WebCore/ChangeLog:10
> +

I would prefer you mention the test you are fixing with this patch in the changelog. Just so it is explicit how this change is tested.

> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:1099
> +#if !defined (QT_OPENGL_ES_2)

We usually do not put space between defined and the parenthesis.

> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:1100
> +    if (internalformat == RGBA4 || internalformat == RGB565 || internalformat == RGB5_A1)

What about DEPTH_STENCIL and DEPTH_COMPONENT16? (just saw those have special case in GraphicsContext3DOpenGL).
Comment 4 Jarkko Sakkinen 2011-03-22 06:36:02 PDT
You're right about your comments about GraphicsContext3DOpenGL. In this case we should use the same logic as there. I'll revise the patch. Thanks.
Comment 5 Jarkko Sakkinen 2011-03-22 07:44:41 PDT
Created attachment 86460 [details]
Fixed defects that benjaminp reported.
Comment 6 WebKit Commit Bot 2011-03-22 09:21:23 PDT
Comment on attachment 86460 [details]
Fixed defects that benjaminp reported.

Clearing flags on attachment: 86460

Committed r81672: <http://trac.webkit.org/changeset/81672>
Comment 7 WebKit Commit Bot 2011-03-22 09:21:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 WebKit Review Bot 2011-03-22 11:39:53 PDT
http://trac.webkit.org/changeset/81672 might have broken GTK Linux 32-bit Debug
The following tests are not passing:
inspector/debugger/debug-inlined-scripts.html