New issue
Advanced search Search tips

Issue 757447 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

texStorage2D does not work with ASTC textures

Reported by tshe...@gmail.com, Aug 21 2017

Issue description

Steps to reproduce the problem:
1. Go to jsFiddle on in Chrome on a device that supports ASTC compressed textures: http://jsfiddle.net/yu4d439u/1/
2. Open up JS console
3. Click run

What is the expected behavior?
No error messages

What went wrong?
Error message: GL ERROR :GL_INVALID_ENUM : glTexStorage2DEXT: internalFormat was GL_COMPRESSED_RGBA_ASTC_4x4_KHR

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 59.0.3071.125  Channel: stable
OS Version: 7.0
Flash Version: 

It might be helpful to note that this issue seems quite similar to the one reported here for S3TC textures: https://bugs.chromium.org/p/chromium/issues/detail?id=605129

I'm running this on a Galaxy Tab S3. Firefox 55.02 on the same device doesn't show the same problem.

There's no problem loading ETC textures in Chrome on the same device. That can be demonstrated here: https://tsherif.github.io/picogl.js/examples/compressed-textures.html

In Firefox, you'll see four cubes, two with "S3TC Unsupported" and "PVRTC Unsupported " in red, "ASTC Supported" and "ETC Supported" in green. In Chrome, the "ASTC Supported" cube will be missing because example will detect that ASTC is supported, but then fail to load it using texStorage2D/texSubImage2D.
 

Comment 1 by tshe...@gmail.com, Aug 22 2017

Note that I implemented a workaround in PicoGL, so the PicoGL link won't demonstrate the problem anymore.

I did, however, update the jsfiddle to test for compatibility of both ETC and ASTC textures with texStorage2D, and to print to the "results" section rather than requiring opening up the console: http://jsfiddle.net/yu4d439u/7/ 

If you open it in Chrome and Firefox on an Android device that supports ASTC textures, you'll see the difference.
Status: Available (was: Unconfirmed)
Reproduces on Pixel phone

Comment 3 by kbr@chromium.org, Aug 23 2017

Owner: kainino@chromium.org
Status: Assigned (was: Available)
Kai, could you look more deeply into this?

Status: Started (was: Assigned)
I think I've found the issue. Patch incoming.
Patch here:
https://chromium-review.googlesource.com/c/chromium/src/+/644721

But while writing the tests I may have discovered an unrelated issue, with compressedTexSubImage2D for ASTC formats.
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b44b777c2aa3c60d5dd0b44dd4776d1254b0592f

commit b44b777c2aa3c60d5dd0b44dd4776d1254b0592f
Author: Kai Ninomiya <kainino@chromium.org>
Date: Thu Aug 31 19:15:37 2017

fix texStorage2D validation for ASTC formats

Bug:  757447 
Test: https://github.com/KhronosGroup/WebGL/pull/2499
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Id432ad0b27d73d0e161e299214e843b2c6f9c2c2
Reviewed-on: https://chromium-review.googlesource.com/644721
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498947}
[modify] https://crrev.com/b44b777c2aa3c60d5dd0b44dd4776d1254b0592f/gpu/command_buffer/service/feature_info.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/090bee23b1ba3c81612fa2be3c759b4fbd95dc2a

commit 090bee23b1ba3c81612fa2be3c759b4fbd95dc2a
Author: Kai Ninomiya <kainino@chromium.org>
Date: Thu Aug 31 22:20:22 2017

Add support for ASTC formats in texSubImage

Bug:  757447 
Test: https://github.com/KhronosGroup/WebGL/pull/2499
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I6005e9b3983773a040803a0b473ad3e703337e50
Reviewed-on: https://chromium-review.googlesource.com/646686
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499042}
[modify] https://crrev.com/090bee23b1ba3c81612fa2be3c759b4fbd95dc2a/gpu/command_buffer/service/gles2_cmd_decoder.cc

Status: Fixed (was: Started)

Sign in to add a comment