GenerateMipmap doesn't work correctly with sRGB formats |
|||||||||||
Issue descriptionHere are some notes from Using glGenerateMipmap: Win8-ShuttleB-GPU-HD4600: Always sRGB Win8-ShuttleA-GPU-HD7770: Always linear Mac-MacMini6.2-GPU-HD4000: Always linear Mac-MacMini4.1-GPU-GeForce320M: Inverted on some cases
,
Aug 5 2016
,
Aug 6 2016
Some discussions on what the test should look like: https://github.com/KhronosGroup/WebGL/pull/1951.
,
Sep 19 2016
,
Sep 19 2016
Yizhou is working on this issue. But she is not a Chromium project member. So I assign this issue to me to update the status.
,
Sep 29 2016
,
Sep 30 2016
Yizhou, you're now a Chromium project member so let me assign this bug to you directly.
,
Sep 30 2016
@kbr and @zmo, thanks for your efforts to give Yizhou chromium project member privilege.
,
Sep 30 2016
Please note that we will be off from Oct 1st to 7th due to National Day Holiday in PRC, so the response to patch/issue might be delayed.
,
Sep 30 2016
@kbr @zmo Thanks a lot!
,
Oct 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b53abd7b3c59d221641d07fd25ab26d2ca2f8a22 commit b53abd7b3c59d221641d07fd25ab26d2ca2f8a22 Author: j.isorce <j.isorce@samsung.com> Date: Mon Oct 03 08:50:50 2016 GpuControlListEntry might need more info for gl_version as well BUG= 651576 , 634519 R=kbr@chromium.org, zmo@chromium.org CQ_INCLUDE_TRYBOTS=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 Review-Url: https://codereview.chromium.org/2379153002 Cr-Commit-Position: refs/heads/master@{#422393} [modify] https://crrev.com/b53abd7b3c59d221641d07fd25ab26d2ca2f8a22/gpu/config/gpu_control_list.cc [modify] https://crrev.com/b53abd7b3c59d221641d07fd25ab26d2ca2f8a22/gpu/config/gpu_control_list_entry_unittest.cc
,
Oct 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da573a8ab571bb73d3539a66abbe5c2efd47d7b7 commit da573a8ab571bb73d3539a66abbe5c2efd47d7b7 Author: yizhou.jiang <yizhou.jiang@intel.com> Date: Tue Oct 11 06:21:01 2016 emulate srgb format for generateMipmap First, do sampling for a srgb texture, converting it to a linear texture. Then generateMipmap in rgb format, and do another sampling to convert rgb texture to srgb one. BUG= 634519 TEST=conformance2/textures/misc/tex-srgb-mipmap.html CQ_INCLUDE_TRYBOTS=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 Review-Url: https://codereview.chromium.org/2318313004 Cr-Commit-Position: refs/heads/master@{#424377} [modify] https://crrev.com/da573a8ab571bb73d3539a66abbe5c2efd47d7b7/AUTHORS [modify] https://crrev.com/da573a8ab571bb73d3539a66abbe5c2efd47d7b7/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py [modify] https://crrev.com/da573a8ab571bb73d3539a66abbe5c2efd47d7b7/gpu/command_buffer/service/gles2_cmd_decoder.cc [modify] https://crrev.com/da573a8ab571bb73d3539a66abbe5c2efd47d7b7/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc [modify] https://crrev.com/da573a8ab571bb73d3539a66abbe5c2efd47d7b7/gpu/command_buffer/service/gles2_cmd_srgb_converter.h [modify] https://crrev.com/da573a8ab571bb73d3539a66abbe5c2efd47d7b7/gpu/config/gpu_driver_bug_list_json.cc [modify] https://crrev.com/da573a8ab571bb73d3539a66abbe5c2efd47d7b7/gpu/config/gpu_driver_bug_workaround_type.h
,
Oct 12 2016
This issue is fixed now.
,
Oct 12 2016
Excellent work Yizhou! Thank you for fixing this!
,
Oct 12 2016
I did want to add one comment: This implementation is going to reduce the quality of the mipmaps. The conversion from sRGB to 8-bit linear is going to reduce the precision of the texture, and the conversion back (after the downsampling) will do the same thing. Obviously, this is a workaround, so having any implementation is better than nothing, but it's worth considering a solution that doesn't introduce a comb filter to the image.
,
Oct 13 2016
@brianosman, @zmo and @kbr, any suggestion about the internalformat during conversion, except RGBA8? I think we can simply use a internalformat with high precision in this patch.
,
Oct 13 2016
Brian, thanks for the feedback. Yes, we should address this precision loss issue, otherwise it's not of much use for quality sensitive clients. I would suggest RGBA16F or RGBA32F. The vram requirement is limited to the function, so it should not be a concern.
,
Oct 24 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0500571c0a41d977f64653eeaed4809351205a35 commit 0500571c0a41d977f64653eeaed4809351205a35 Author: yizhou.jiang <yizhou.jiang@intel.com> Date: Mon Oct 24 04:27:04 2016 optimize precision for conversion from srgb to linear Convertion from sRGB to 8-bit linear is going to reduce the precision of the texture, and the downsampling will do the same thing. We should set texture internalformat to rgba32f to optimize precision. BUG= 634519 TEST=conformance2/textures/misc/tex-srgb-mipmap.html CQ_INCLUDE_TRYBOTS=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 Review-Url: https://codereview.chromium.org/2420813002 Cr-Commit-Position: refs/heads/master@{#427014} [modify] https://crrev.com/0500571c0a41d977f64653eeaed4809351205a35/gpu/command_buffer/service/feature_info.h [modify] https://crrev.com/0500571c0a41d977f64653eeaed4809351205a35/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc
,
Dec 1 2016
By the way, tex-srgb-mipmap.html is failing on Windows
,
Dec 2 2016
@zmo I’ll have a look at this issue. From: zmo via monorail [mailto:monorail+v2.3927685578@chromium.org] Sent: Friday, December 2, 2016 7:59 AM To: Jiang, Yizhou <yizhou.jiang@intel.com> Subject: Issue 634519 in chromium: GenerateMipmap doesn't work correctly with sRGB formats
,
Dec 2 2016
That's almost certainly related to ccameron@ landing support for EXT_texture_sRGB_decode in command buffer. I added a note to a related bug that's tracking that work, because it also broke Skia's sRGB mipmap testing: https://bugs.chromium.org/p/chromium/issues/detail?id=655247
,
Dec 2 2016
Chris: see comment 19-21
,
Dec 2 2016
See issue 670487 -- I reverted all of the changes. I've re-landed only r435852 so far, which is just a logic re-organization (and really really should have no effect).
,
Dec 2 2016
Is this working on TOT now (after r435852)?
,
Dec 5 2016
tex-srgb-mipmap.html is in WebGL 2.0.1, the bots didn't test it before. So it is not a regression. When I fixed the bug for blitFramebuffer for srgb conversion in MacOS, Yizhou fixed this failure on MacOS too, because the implementation is similar. But we didn't look into Windows and Linux at that time. Now the bots begin to test against WebGL 2.0.1, so the failures on Windows/Linux are exposed. Yizhou is looking into this issue now. After offline discussion with Qiankun and Yizhou, it just need to add some entries into gpu/config/gpu_driver_bug_list_json.cc for Windows and Linux, with some minor revisions based on her original patch at https://codereview.chromium.org/2318313004.
,
Dec 5 2016
Sounds good. Thanks for taking care of this.
,
Dec 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6ea4c3f4c102ac86c83a72109496962c660560a9 commit 6ea4c3f4c102ac86c83a72109496962c660560a9 Author: qiankun.miao <qiankun.miao@intel.com> Date: Mon Dec 05 19:04:54 2016 Update expectation for tex-srgb-mipmap.html on Linux Mesa It should only fail on Linux Intel with ANGLE. BUG= 634519 CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2552623003 Cr-Commit-Position: refs/heads/master@{#436371} [modify] https://crrev.com/6ea4c3f4c102ac86c83a72109496962c660560a9/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc15e2a59cd6f9f124b5b55ee4f14348ab6717ee commit bc15e2a59cd6f9f124b5b55ee4f14348ab6717ee Author: yizhou.jiang <yizhou.jiang@intel.com> Date: Fri Dec 09 01:11:33 2016 Extend more runtime envs for generateMipmap srgb emulation Add entries for windows, chromeos, and linux mesa in gpu_driver_bug_list. Generate shaders according to different gl contexts. BUG= 634519 CQ_INCLUDE_TRYBOTS=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 Review-Url: https://codereview.chromium.org/2548363002 Cr-Commit-Position: refs/heads/master@{#437398} [modify] https://crrev.com/bc15e2a59cd6f9f124b5b55ee4f14348ab6717ee/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py [modify] https://crrev.com/bc15e2a59cd6f9f124b5b55ee4f14348ab6717ee/gpu/command_buffer/service/gles2_cmd_decoder.cc [modify] https://crrev.com/bc15e2a59cd6f9f124b5b55ee4f14348ab6717ee/gpu/command_buffer/service/gles2_cmd_srgb_converter.cc [modify] https://crrev.com/bc15e2a59cd6f9f124b5b55ee4f14348ab6717ee/gpu/config/gpu_driver_bug_list_json.cc
,
Dec 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/967f5de147c2fcc4fd166d321dae8b472c35d6fc commit 967f5de147c2fcc4fd166d321dae8b472c35d6fc Author: qiankun.miao <qiankun.miao@intel.com> Date: Fri Dec 09 20:29:19 2016 Enable generateMipmap srgb emulation for Linux AMD BUG= 634519 CQ_INCLUDE_TRYBOTS=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 Review-Url: https://codereview.chromium.org/2564813002 Cr-Commit-Position: refs/heads/master@{#437624} [modify] https://crrev.com/967f5de147c2fcc4fd166d321dae8b472c35d6fc/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py [modify] https://crrev.com/967f5de147c2fcc4fd166d321dae8b472c35d6fc/gpu/config/gpu_driver_bug_list_json.cc
,
Apr 25 2017
,
Jun 2 2018
Fix this bug.
,
Jun 4 2018
I think this bug has been fix. @yizhou, could you verify it?
,
Jun 4 2018
@yunchao, I've tested on canary on mac os hasswell 4870 and win8 broadwell, the cts test passed.
,
Jun 4 2018
,
Nov 27
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by zmo@chromium.org
, Aug 4 2016