WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 185272
[WebGL] WEBGL_compressed_texture_astc support
https://bugs.webkit.org/show_bug.cgi?id=185272
Summary
[WebGL] WEBGL_compressed_texture_astc support
Justin Fan
Reported
2018-05-03 16:02:53 PDT
ASTC compressed textures are not supported in software, although iOS hardware supports it as of the A8 (iPhone 6).
Attachments
Patch
(334.93 KB, patch)
2018-05-03 18:35 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch
(40.60 KB, patch)
2018-05-03 18:59 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews115 for mac-sierra
(3.27 MB, application/zip)
2018-05-04 08:26 PDT
,
EWS Watchlist
no flags
Details
Patch
(336.06 KB, patch)
2018-05-04 16:25 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch
(334.43 KB, patch)
2018-05-06 17:36 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch
(328.38 KB, patch)
2018-05-07 17:21 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch
(328.98 KB, patch)
2018-05-08 16:51 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch
(329.00 KB, patch)
2018-05-08 17:13 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch
(328.33 KB, patch)
2018-05-08 18:32 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch
(328.32 KB, patch)
2018-05-09 12:44 PDT
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-05-03 16:03:26 PDT
<
rdar://problem/39958547
>
Justin Fan
Comment 2
2018-05-03 16:06:29 PDT
<
rdar://problem/15745737
>
Radar WebKit Bug Importer
Comment 3
2018-05-03 16:07:04 PDT
<
rdar://problem/39958669
>
Justin Fan
Comment 4
2018-05-03 16:13:25 PDT
<
rdar://problem/15745737
>
Justin Fan
Comment 5
2018-05-03 18:35:21 PDT
Created
attachment 339500
[details]
Patch
Justin Fan
Comment 6
2018-05-03 18:59:50 PDT
Created
attachment 339503
[details]
Patch
EWS Watchlist
Comment 7
2018-05-04 08:26:52 PDT
Comment on
attachment 339503
[details]
Patch
Attachment 339503
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/7564245
New failing tests: imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_menuitem-element.html
EWS Watchlist
Comment 8
2018-05-04 08:26:53 PDT
Created
attachment 339545
[details]
Archive of layout-test-results from ews115 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-sierra Platform: Mac OS X 10.12.6
Justin Fan
Comment 9
2018-05-04 11:15:11 PDT
Failing test was not caused by my patch (also fails on master), but may have found a regression from changes in HistoryItem. Filing a new bug.
Myles C. Maxfield
Comment 10
2018-05-04 16:16:28 PDT
Comment on
attachment 339503
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339503&action=review
I think you forgot to include the test.
> Source/WebCore/ChangeLog:10 > + Test: fast/canvas/webgl/webgl-compressed-texture-astc.html
This patch doesn't seem to include the test.
> Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp:81 > + || context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_ldr" }));
Shouldn't we do this in the constructor and convert it to a bitfield?
> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:5429 > + case Extensions3D::COMPRESSED_RGBA_ASTC_4x4_KHR: > + case Extensions3D::COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: > + { > + const int kBlockSize = 16; > + const int kBlockWidth = 4; > + const int kBlockHeight = 4; > + bytesRequired = ((width + kBlockWidth - 1) / kBlockWidth) * ((height + kBlockHeight - 1) / kBlockHeight) * kBlockSize; > + } > + break;
Can't we do this using a lookup table?
Justin Fan
Comment 11
2018-05-04 16:25:57 PDT
Created
attachment 339607
[details]
Patch
Justin Fan
Comment 12
2018-05-06 17:36:34 PDT
Created
attachment 339698
[details]
Patch
Dean Jackson
Comment 13
2018-05-07 13:30:23 PDT
Comment on
attachment 339698
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339698&action=review
> Source/WebCore/WebCore.xcodeproj/project.pbxproj:4109 > + D0A20D572092A0A700E0C259 /* WebGLCompressedTextureASTC.h in Headers */ = {isa = PBXBuildFile; fileRef = D0A20D542092A0A600E0C259 /* WebGLCompressedTextureASTC.h */; }; > + D0A20D582092A0A700E0C259 /* WebGLCompressedTextureASTC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A20D562092A0A600E0C259 /* WebGLCompressedTextureASTC.cpp */; };
Technically, you could just add this to Sources.txt rather than to the Xcode project. I plan to move all the WebGL stuff into Sources.txt at some point.
> Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp:28 > +#include "config.h" > +#if ENABLE(WEBGL) > +#include "WebGLCompressedTextureASTC.h"
Nit: Should be: #include "config.h" #include "WebGLCompressedTextureASTC.h" #if ENABLE(WEBGL)
> Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp:89 > + { > + Vector<String> result; > + > + if (m_isHDRSupported) > + result.append(ASCIILiteral { "hdr" }); > + if (m_isLDRSupported) > + result.append(ASCIILiteral { "ldr" }); > + > + return result; > + }
Nit: de-indent
> Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp:95 > + return RuntimeEnabledFeatures::sharedFeatures().webGLCompressedTextureASTCSupportEnabled() > + && (context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_hdr" }) > + || context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_ldr" }));
Nit: We don't indent that third line.
> Source/WebCore/html/canvas/WebGLCompressedTextureASTC.h:41 > + static bool supported(const WebGLRenderingContextBase&); > +private:
Nit: Empty line here.
> LayoutTests/ChangeLog:9 > + * fast/canvas/webgl/resources/js-test-post.js: Added.
It's weird that we didn't already have these files. Are you sure they are not there?
> LayoutTests/ChangeLog:28 > + * fast/canvas/webgl/resources/js-test-pre.js: Added. > + (window.console.log): > + (window.console.error): > + (initNonKhronosFramework): > + (this.initTestingHarness): > + (getUrlOptions): > + (typeof.quietMode.string_appeared_here.quietMode): > + (nonKhronosFrameworkNotifyDone): > + (reportTestResultsToHarness): > + (reportSkippedTestResultsToHarness): > + (notifyFinishedToHarness): > + (bufferedLogToConsole): > + (_flushBufferedLogsToConsole): > + (enableJSTestPreVerboseLogging): > + (description): > + (_addSpan): > + (debug): > + (escapeHTML): > + (TestFailedException):
I usually remove all the function names in the ChangeLog, and just leave the line saying you added a file (for JS files).
Justin Fan
Comment 14
2018-05-07 17:21:29 PDT
Created
attachment 339777
[details]
Patch
Myles C. Maxfield
Comment 15
2018-05-08 15:58:59 PDT
Comment on
attachment 339777
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339777&action=review
> Source/WebCore/html/canvas/WebGLCompressedTextureASTC.h:43 > + bool m_isHDRSupported : 1;
I thought the style checker required that these be unsigned ints
> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:5398 > + BlockParameters(4, 4, kASTCBlockSize),
You should use { } notation to construct the structs instead of constructors
Justin Fan
Comment 16
2018-05-08 16:51:29 PDT
Created
attachment 339901
[details]
Patch
Tim Horton
Comment 17
2018-05-08 17:00:50 PDT
Comment on
attachment 339901
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339901&action=review
> Source/WebCore/ChangeLog:5 > + Hooked up ASTC support in WebGL. Requires OpenGL ES 3 context to work. > + Also added in Khronos' ASTC test from version 1.0.4 beta of their conformance test suite, > + although again, this requires OpenGL ES 3 context for WebKit to detect proper support.
Pretty weird to have multiple lines here. This is usually a title, description goes down below the test.
> Source/WebCore/ChangeLog:6 > +
https://bugs.webkit.org/show_bug.cgi?id=185272
Radar, also?
> Source/WebCore/html/canvas/WebGLCompressedTextureASTC.cpp:95 > + && (context.graphicsContext3D()->getExtensions().supports(ASCIILiteral { "GL_KHR_texture_compression_astc_hdr" })
Maybe slurp context.graphicsContext3D()->getExtensions() into a local? Or maybe not.
Myles C. Maxfield
Comment 18
2018-05-08 17:09:57 PDT
Comment on
attachment 339901
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339901&action=review
>> Source/WebCore/ChangeLog:5 >> + although again, this requires OpenGL ES 3 context for WebKit to detect proper support. > > Pretty weird to have multiple lines here. This is usually a title, description goes down below the test.
Yeah, Tim is right. The prose should go below the radar line
Justin Fan
Comment 19
2018-05-08 17:13:11 PDT
Created
attachment 339905
[details]
Patch
Justin Fan
Comment 20
2018-05-08 18:32:09 PDT
Created
attachment 339910
[details]
Patch
Myles C. Maxfield
Comment 21
2018-05-09 12:35:13 PDT
Comment on
attachment 339910
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339910&action=review
> Source/WebCore/ChangeLog:5 > + <
rdar://15745737
>
<
rdar://problem/15745737
>
> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:5385 > +
:(
> LayoutTests/ChangeLog:5 > + <
rdar://15745737
>
Ditto.
Justin Fan
Comment 22
2018-05-09 12:44:59 PDT
Created
attachment 340005
[details]
Patch
WebKit Commit Bot
Comment 23
2018-05-09 13:24:29 PDT
Comment on
attachment 340005
[details]
Patch Clearing flags on attachment: 340005 Committed
r231590
: <
https://trac.webkit.org/changeset/231590
>
WebKit Commit Bot
Comment 24
2018-05-09 13:24:31 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug