Bug 126455 - [WebGL] glScissor Test is not accounted for when generating internal rendering textures
Summary: [WebGL] glScissor Test is not accounted for when generating internal renderin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-03 13:27 PST by Brent Fulgham
Modified: 2014-01-03 13:42 PST (History)
6 users (show)

See Also:


Attachments
Patch (1.96 KB, patch)
2014-01-03 13:34 PST, Brent Fulgham
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-01-03 13:27:06 PST
Our WebGL implementation uses a texture handle part of the drawing operations to put the final rendered scene into the HTML Canvas. If a WebGL program is using the glScissor feature, this impacts our texture generation.

This bug manifests as regions of the screen being filled with random data, rather than the intended scene to be displayed.

We should check the status of the GL_SCISSOR_TEST and GL_DITHER features, disable them for our internal drawing, and then re-enable them (if needed) before returning to the JS program.
Comment 2 Brent Fulgham 2014-01-03 13:34:25 PST
Created attachment 220333 [details]
Patch
Comment 3 WebKit Commit Bot 2014-01-03 13:37:03 PST
Attachment 220333 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:200:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:201:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:202:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:202:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:219:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:221:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:219:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:221:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
Total errors found: 8 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brent Fulgham 2014-01-03 13:37:41 PST
(In reply to comment #3)
> Attachment 220333 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp', '--commit-queue']" exit_code: 1
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:200:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:201:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:202:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:202:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:219:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:221:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:219:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
> ERROR: Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:221:  Wrong number of spaces before statement. (expected: 12)  [whitespace/indent] [4]
> Total errors found: 8 in 2 files
> 

These are very much false positives. The whole section of code is indented 4 spaces. What is check-webkit-style thinking?
Comment 5 Brent Fulgham 2014-01-03 13:42:16 PST
Committed r161285: <http://trac.webkit.org/changeset/161285>