Bug 164493 - [WebGL2] Implement texStorage2D()
Summary: [WebGL2] Implement texStorage2D()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-07 16:12 PST by Myles C. Maxfield
Modified: 2016-11-18 20:39 PST (History)
8 users (show)

See Also:


Attachments
WIP (13.55 KB, patch)
2016-11-07 16:12 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
WIP (14.00 KB, patch)
2016-11-08 00:23 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Needs tests (25.66 KB, patch)
2016-11-15 16:42 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Needs tests (31.64 KB, patch)
2016-11-15 17:12 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (40.32 KB, patch)
2016-11-18 14:13 PST, Myles C. Maxfield
dino: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Patch for committing (41.37 KB, patch)
2016-11-18 14:32 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch for committing (41.37 KB, patch)
2016-11-18 15:08 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-yosemite (1.68 MB, application/zip)
2016-11-18 15:21 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2016-11-07 16:12:30 PST
[WebGL2] Implement texStorage{2D,3D}()
Comment 1 Myles C. Maxfield 2016-11-07 16:12:48 PST
Created attachment 294097 [details]
WIP
Comment 2 Myles C. Maxfield 2016-11-08 00:23:51 PST
Created attachment 294141 [details]
WIP
Comment 3 Myles C. Maxfield 2016-11-15 16:42:09 PST
Created attachment 294901 [details]
Needs tests
Comment 4 Myles C. Maxfield 2016-11-15 17:12:44 PST
Created attachment 294904 [details]
Needs tests
Comment 5 WebKit Commit Bot 2016-11-16 14:11:55 PST
Attachment 294904 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Myles C. Maxfield 2016-11-18 14:13:12 PST
Created attachment 295189 [details]
Patch
Comment 7 Dean Jackson 2016-11-18 14:21:51 PST
Comment on attachment 295189 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Create a new validation functionw which only accepts sized internalFormats.

functionw

> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:317
> +    if (width < 0 || height < 0) {

Is == 0 valid?

> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:429
> +    {

Why do you do this?

> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:448
> +        Vector<char> data(size);
> +        memset(data.data(), 0, size);

I didn't check the answer to this last time, but can we use a Uint8 array here (which I think is already zero-filled).

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4043
> +            if (textureInternalFormat == GraphicsContext3D::RGB
> +                || textureInternalFormat == GraphicsContext3D::RGBA
> +                || textureInternalFormat == GraphicsContext3D::RGB8
> +                || textureInternalFormat == GraphicsContext3D::RGBA8
> +                || !texture->isValid(target, level)) {

Maybe a static helper isRGBFormat(textureInternalFormat)?

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4078
> +            if (textureInternalFormat == GraphicsContext3D::RGB
> +                || textureInternalFormat == GraphicsContext3D::RGBA
> +                || textureInternalFormat == GraphicsContext3D::RGB8
> +                || textureInternalFormat == GraphicsContext3D::RGBA8

... because you do it here too.
Comment 8 Myles C. Maxfield 2016-11-18 14:27:13 PST
Comment on attachment 295189 [details]
Patch

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

>> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:317
>> +    if (width < 0 || height < 0) {
> 
> Is == 0 valid?

I don't see anything in either spec that disallows it.

>> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:429
>> +    {
> 
> Why do you do this?

Work around potentially-buggy drivers. We want to guarantee that the contents are zero-filled.

>> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:448
>> +        memset(data.data(), 0, size);
> 
> I didn't check the answer to this last time, but can we use a Uint8 array here (which I think is already zero-filled).

Are you referring to the JSC type, or the C type? I don't know why the JSC type would be valuable to use, and the C type would put it on the stack which is a bad idea.

>> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:4043
>> +                || !texture->isValid(target, level)) {
> 
> Maybe a static helper isRGBFormat(textureInternalFormat)?

Good idea.
Comment 9 Myles C. Maxfield 2016-11-18 14:32:25 PST
Created attachment 295194 [details]
Patch for committing
Comment 10 Myles C. Maxfield 2016-11-18 15:08:29 PST
Created attachment 295199 [details]
Patch for committing
Comment 11 Build Bot 2016-11-18 15:21:36 PST
Comment on attachment 295189 [details]
Patch

Attachment 295189 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2538830

New failing tests:
transitions/default-timing-function.html
Comment 12 Build Bot 2016-11-18 15:21:40 PST
Created attachment 295201 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 13 WebKit Commit Bot 2016-11-18 17:00:23 PST
Comment on attachment 295199 [details]
Patch for committing

Clearing flags on attachment: 295199

Committed r208910: <http://trac.webkit.org/changeset/208910>