Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 535198 Add support for GL_INTEL_framebuffer_CMAA into Chrome
Starred by 10 users Project Member Reported by robert.b...@intel.com, Sep 23 2015 Back to list
Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature


Sign in to add a comment
In follow up to #524285 which enables the use of this for WebGL in Chromium/blink we are planning to enable this extension in Mesa.

 
Comment 1 by kbr@chromium.org, Sep 23 2015
Blockedon: chromium:524285
Comment 2 by kbr@chromium.org, Sep 23 2015
This is great to hear. Does this mean it will be available on older Intel GPUs with a Mesa upgrade?

Cc: yunchao...@intel.com
Hi robert,
Could you add me into cc list? Thanks
Cc: jin.a.y...@intel.com
Cc: kalyan.k...@intel.com
Comment 7 by vmi...@chromium.org, Nov 24 2015
Labels: -Type-Bug Type-Feature
Project Member Comment 9 by bugdroid1@chromium.org, Jun 17 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe

commit 8a992f1e4ceca6d3d933614953cfc4d80bf3dffe
Author: adrian.belgun <adrian.belgun@intel.com>
Date: Fri Jun 17 16:29:05 2016

gpu: Implement GL_INTEL_framebuffer_CMAA via shaders in the GPU Service

Based on OpenGLES code developed by Filip Strugar and Jon Kennedy.

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"

Co-Authored-By: Filip Strugar <filip.strugar@intel.com>
Co-Authored-By: Jon Kennedy <jon.kennedy@intel.com>
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2055713003
Cr-Commit-Position: refs/heads/master@{#400438}

[modify] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/gpu/command_buffer/service/BUILD.gn
[modify] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/gpu/command_buffer/service/feature_info.h
[add] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
[add] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h
[modify] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/gpu/command_buffer_service.gypi
[modify] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/ui/gl/gl_switches.cc
[modify] https://crrev.com/8a992f1e4ceca6d3d933614953cfc4d80bf3dffe/ui/gl/gl_switches.h

Cc: kbr@chromium.org piman@chromium.org
Summary: Add support for GL_INTEL_framebuffer_CMAA into Chrome (was: Add support for GL_INTEL_framebuffer_CMAA to Mesa)
kbr@ / piman@ with the CMAA support landed under a runtime flag what would you recommend as the next steps for enabling this for wider testing?
Comment 11 by kbr@chromium.org, Jun 21 2016
Cc: zmo@chromium.org vmi...@chromium.org
Owner: robert.b...@intel.com
Not sure. CC'ing vmiura@ for input. Perhaps a Finch experiment enabling this flag for a certain percentage of users that have Intel GPUs?

One note: we will not want to enable this on dual-GPU MacBook Pros, as it will break the ability to use the discrete GPU's MSAA support.

What platforms did you have in mind to enable this for?

Cc: senorblanco@chromium.org
#11 - ChromeOS would be the first target as Chromebooks with Intel CPU use only Intel GPU.
In the case which chrome://gpu detects only Intel GPU, we can enable it on any platforms. WDYT?
My recommendation would be to start out by turning it on for samus beta/dev channel only. I think that would intersect well with the set of people that would report issues.
Comment 14 by kbr@chromium.org, Jun 23 2016
In that case I would recommend you phrase this as a "GPU driver bug workaround" similarly to use_client_side_arrays_for_stream_buffers in src/gpu/config/gpu_driver_bug_list_json.cc and src/gpu/config/gpu_driver_bug_workaround_type.h , and add an entry targeting the specific OS and GPU type to gpu_driver_bug_list_json.cc.

zmo@ may have more comments as the primary author of this code.

Project Member Comment 15 by bugdroid1@chromium.org, Jun 24 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/51124f583264facb83b4e2544cdb10785bd581b6

commit 51124f583264facb83b4e2544cdb10785bd581b6
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Fri Jun 24 13:43:57 2016

gpu, cmaa: remove redundant teximage binding

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2093553005
Cr-Commit-Position: refs/heads/master@{#401857}

[modify] https://crrev.com/51124f583264facb83b4e2544cdb10785bd581b6/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Current CMAA has some weird behavior and fails 3 WebGL conformance tests
https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/multisample-corruption.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/bugs/gl-fragcoord-multisampling-bug.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/context/premultiplyalpha-test.html

I'll fix them by several CLs, which are separated by logical commit. The full changes is here; https://github.com/ds-hwang/chromium-crosswalk/commits/cmaa

The changes shows how flexible CMAA logic is and how to change the logic to meet chromium requirements.
I'll apply the same changes to Intel internal driver.
Comment 18 by kbr@chromium.org, Jun 28 2016
Cc: xinghua....@intel.com qiankun....@intel.com
Thanks Dongseong, that's very nice!

CC'ing other folks from Intel's Web Graphics team, where we have discussed needing to modify the WebGL conformance tests to allow CMAA. It's great that this might not be needed.

Comment 19 by yang...@intel.com, Jun 28 2016
Thank kbr for CC'ing us! According to our last discussion, only "conformance/context/context-attributes-alpha-depth-stencil-antialias.html" needs a fix in case (It was already done by Xinghua as https://github.com/KhronosGroup/WebGL/pull/1730 and https://github.com/KhronosGroup/WebGL/pull/1741), and others should be fixed in CMAA algorithm. These have been well synced internally before these patches from Dongseong, and the base patch from Adrian.

Comment 20 by zmo@chromium.org, Jun 29 2016
This is great progress.  As kbr suggested in #14, using driver bug workaround mechanism is the easiest to gradually roll out this feature.  You can turn it on in chrome by default, with a driver bug workaround entry to disable the feature in general, and gradually add exceptions to that entry to roll the feature out to various platforms you feel comfortable.
Project Member Comment 21 by bugdroid1@chromium.org, Jun 29 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d46d1e224b05b216700efff90d4e7374b958d2d

commit 2d46d1e224b05b216700efff90d4e7374b958d2d
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Wed Jun 29 12:06:33 2016

gpu, cmaa: bottom to top is always y-direction.

Current shader regards y-direction as either bottom-to-top or top-to-bottom case by case.
It causes lots of difficulty to read the code. Make it consistent.

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2106933002
Cr-Commit-Position: refs/heads/master@{#402783}

[modify] https://crrev.com/2d46d1e224b05b216700efff90d4e7374b958d2d/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Project Member Comment 22 by bugdroid1@chromium.org, Jun 29 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/679dd4bf7fd35ac9bbc30d33e908f88f93e28d95

commit 679dd4bf7fd35ac9bbc30d33e908f88f93e28d95
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Wed Jun 29 13:21:12 2016

gpu, cmaa: blend color like bilinear filter

This CL fixes two points
* blend color like bilinear filter. Current implementation is strange hackish
  blend.
* Revert blurCoeff to the original value as the comments explain. The value
  might be changed to make hackish blend look good. After revert, CMAA looks
  much more similar to MSAA

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2104003002
Cr-Commit-Position: refs/heads/master@{#402788}

[modify] https://crrev.com/679dd4bf7fd35ac9bbc30d33e908f88f93e28d95/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Yang, thanks for clarifying. Intel engineers found 4 conformance tests failure on an internal project, and figured out
* 3 tests due to CMAA issue
* 1 test because the test heavily depends on MSAA

So Xinghua handled conformance test part and I handled CMAA part.

Robert is working on enabling it on Pixel 2015 as Kenneth and zmo@ suggested. Kenneth, zmo@, piman@, Thank you for kind collaboration!
Project Member Comment 24 by bugdroid1@chromium.org, Jun 29 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87e9d26652d2f34e76f5dfa0ea0f2d8c78f5b268

commit 87e9d26652d2f34e76f5dfa0ea0f2d8c78f5b268
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Wed Jun 29 13:59:38 2016

gpu, cmaa: Don't blend large L shape because it would be the intended shape with high probability.

Large L shape is as follows;
_ _         |     |         _ _
  X|       X|     |X       |X
   |     ¯¯¯¯     ¯¯¯¯     |

We don't want to blur the corner of a rectangle.

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2109603003
Cr-Commit-Position: refs/heads/master@{#402796}

[modify] https://crrev.com/87e9d26652d2f34e76f5dfa0ea0f2d8c78f5b268/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Cc: martina....@intel.com jon.kenn...@intel.com dongseon...@intel.com
bugdroid1@ has to report one more change after Comment 15 #c15, but missed it for some reason. Let me report instead.

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

commit d81b3eaa8645508f2a4b208490ded879265b2a8d
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Fri Jun 24 17:15:21 2016

gpu, cmaa: Stringify shaders

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2091643003
Cr-Commit-Position: refs/heads/master@{#401886}

[modify] https://crrev.com/d81b3eaa8645508f2a4b208490ded879265b2a8d/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Project Member Comment 27 by bugdroid1@chromium.org, Jun 29 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/994b8ad38039a9d1c432ef081788a47be90354e7

commit 994b8ad38039a9d1c432ef081788a47be90354e7
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Wed Jun 29 18:34:53 2016

gpu, cmaa: don't blend the leftmost and bottom-most edges.

texelFetch() on out of range (i.e. outside of x = [0, width) or y = [0, height))
gives an undefined value. COMBINE_EDGES pass fetches (-1 , _) or (_, -1) texel,
which is an undefiend value. So COMBINE_EDGES can mislead the left most
edge is dominant edge after comparing the undefined value and the left most
pixel.

This CL fixes 3 WebGL conformance tests
https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/multisample-corruption.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/bugs/gl-fragcoord-multisampling-bug.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/context/premultiplyalpha-test.html

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2103893003
Cr-Commit-Position: refs/heads/master@{#402877}

[modify] https://crrev.com/994b8ad38039a9d1c432ef081788a47be90354e7/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Project Member Comment 28 by bugdroid1@chromium.org, Jun 29 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6da3ecce0e3397264b9412efadef70ede93e8ba8

commit 6da3ecce0e3397264b9412efadef70ede93e8ba8
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Wed Jun 29 19:12:56 2016

gpu, cmaa: don't blend the rightmost and topmost edges.

texelFetch() on out of range (i.e. outside of x = [0, width) or y = [0, height))
gives an undefined value. DETECT_EDGES2 pass fetches (width, _) or (_, height) texel,
which is an undefiend value. So DETECT_EDGES2 can mislead the right most
edge is dominant edge after comparing the undefined value and the right most
pixel.

This CL fixes parts of 3 WebGL conformance tests
https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/multisample-corruption.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/bugs/gl-fragcoord-multisampling-bug.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/context/premultiplyalpha-test.html

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2110543002
Cr-Commit-Position: refs/heads/master@{#402890}

[modify] https://crrev.com/6da3ecce0e3397264b9412efadef70ede93e8ba8/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Project Member Comment 29 by bugdroid1@chromium.org, Jun 29 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0885aff9905de9b96b197c353d4f438c173b5834

commit 0885aff9905de9b96b197c353d4f438c173b5834
Author: robert.bradford <robert.bradford@intel.com>
Date: Wed Jun 29 19:57:31 2016

gpu: Use workarounds to selectively enable CMAA

To get wider testing of the impact of using CMAA for WebGL selectively
enable it by default for "Broadwell GT2" ChromeOS devices.

This was achieved by adding a workaround disabling CMAA on all devices
with an exception for the GPU found in ChromeOS devices like samus.

BUG=535198
TEST=Boot samus device and with added logging observe that CMAA is
activated for WebGL. Use --gpu-testing-device-id/--gpu-testing-vendor-id
to override the device ID and observe "disable_framebuffer_cmaa" listed
under "Driver Bug Workarounds."
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2112513003
Cr-Commit-Position: refs/heads/master@{#402913}

[modify] https://crrev.com/0885aff9905de9b96b197c353d4f438c173b5834/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/0885aff9905de9b96b197c353d4f438c173b5834/gpu/command_buffer/service/feature_info.h
[modify] https://crrev.com/0885aff9905de9b96b197c353d4f438c173b5834/gpu/config/gpu_driver_bug_list_json.cc
[modify] https://crrev.com/0885aff9905de9b96b197c353d4f438c173b5834/gpu/config/gpu_driver_bug_workaround_type.h
[modify] https://crrev.com/0885aff9905de9b96b197c353d4f438c173b5834/ui/gl/gl_switches.cc
[modify] https://crrev.com/0885aff9905de9b96b197c353d4f438c173b5834/ui/gl/gl_switches.h

Project Member Comment 31 by bugdroid1@chromium.org, Jul 5 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58b7cc33f7817c8aeae707e1a440e4b170ad1f65

commit 58b7cc33f7817c8aeae707e1a440e4b170ad1f65
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Tue Jul 05 12:36:43 2016

gpu, cmaa: don't blend the left/right/top/bottom-most edges in the BLUR_EDGES path.

textureGatherOffset() on out of range (i.e. outside of x = [0, width) or y = [0, height))
gives an undefined value. BLUR_EDGES pass can fetche (-1,_), (_,-1), (w,_), (_,h) texel,
which is an undefiend value. So BLUR_EDGES can mislead the left most
edge is dominant edge after comparing the undefined value and the left most
pixel.

This CL fixes parts of 2 WebGL conformance tests
https://www.khronos.org/registry/webgl/sdk/tests/conformance/context/context-size-change.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/misc/copy-tex-image-and-sub-image-2d.html

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2120983002
Cr-Commit-Position: refs/heads/master@{#403773}

[modify] https://crrev.com/58b7cc33f7817c8aeae707e1a440e4b170ad1f65/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Many patches handle undefined value due to out of range texture lookup.

Let me point out the spec about it. https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.0.pdf
p74, Texle Fetches in 2.11. VERTEX SHADERS 

The results of the texel fetch are undefined if any of the following conditions hold:
...
* the texel coordinates (i, j, k) refer to a texel outside the defined extents of the specified level of detail, where any of
i < 0 i ≥ wt
j < 0 j ≥ ht
k < 0 k ≥ dt
and the size parameters wt, ht, and dt refer to the width, height, and depth of the image, as defined in section 3.8.3.
Project Member Comment 33 by bugdroid1@chromium.org, Jul 5 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9df37c48526a8f6b350687e34e75b2eca1961736

commit 9df37c48526a8f6b350687e34e75b2eca1961736
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Tue Jul 05 20:04:19 2016

gpu, cmaa: Don't blend isolated L shape because it's not a closed geometry.

Isolated L shape means neighbor pixels doesn't have any edges continuing
current two edge, as follows;
  _                                   _
  X|          X|         |X          |X
              ¯¯         ¯¯
We don't want to blur an open geometry.

This CL fixes 2 WebGL conformance tests
https://www.khronos.org/registry/webgl/sdk/tests/conformance/context/context-size-change.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/misc/copy-tex-image-and-sub-image-2d.html

Yang Gu checked all WebGL conformance tests are passed with CMAA.

BUG=535198
TEST=Run a WebGL app with Chrome started with "--enable-cmaa-shaders"
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2120293002
Cr-Commit-Position: refs/heads/master@{#403821}

[modify] https://crrev.com/9df37c48526a8f6b350687e34e75b2eca1961736/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Blockedon: 557848
I'm working on two optimization.

1. COMBINE_EDGES runs on only edge fragments.
https://codereview.chromium.org/2125803002/

The fragment shader of CMAA is heavy but CMAA is not expensive. It's because CMAA runs the fragment shader only on edge fragments via early Z rejection. The edge framents is only fractional on the whole screen.
CMAA consists of in terms of GPU cost;
* DETECT_EDGES1 : cheap shader on the whole screen.
* DETECT_EDGES2 : cheap shader on the only edges.
* COMBINE_EDGES : cheap shader on the only edges. <- fixed by the above CL
* DETECT_EDGES2 : heavy shader on the only edges.

2. Don't copy
CMAA has to copy [1] unless internal_format != GL_RGBA8, because glBindImageTexture supports only GL_RGBA8 immutable texture. [2]
[1] https://cs.chromium.org/chromium/src/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc?q=intel+cmaa&sq=package:chromium&dr=CSs&l=249
[2] https://www.khronos.org/opengles/sdk/docs/man31/html/glBindImageTexture.xhtml

issue 557848 will make drawingbuffer immutable texture.
https://codereview.chromium.org/2125023002/
Project Member Comment 36 by bugdroid1@chromium.org, Jul 7 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/45a5dde9824768ca016b4abae13a05abbd99014c

commit 45a5dde9824768ca016b4abae13a05abbd99014c
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Thu Jul 07 12:06:45 2016

gpu, cmaa: optimize COMBINE_EDGES path to reduce fragment shader tasks

The fragment shader of CMAA is heavy but CMAA is not expensive. It's because
CMAA runs the fragment shader only on edge fragments via early Z rejection.
The edge framents is only fractional on the whole screen.
However, COMBINE_EDGES path runs the fragment shadre on all screen fragments.
It's redundant because combined edges in COMBINE_EDGES path must be subset of
the edges, which DETECT_EDGES1 finds. So COMBINE_EDGES must be performed inside
the area, which DETECT_EDGES1 marks depth value 1 on the depth buffer.

For your information, CMAA consists of in terms of GPU cost;
* DETECT_EDGES1 : cheap shader on the whole screen.
* DETECT_EDGES2 : cheap shader on the only edges.
* COMBINE_EDGES : cheap shader on the only edges. <- fixed in this CL
* BLUR_EDGES : heavy shader on the only edges.

Performance data:
Measure FPS for NoAA, MSAA, CMAA-before and CMAA-after on http://akirodic.com/p/jellyfish/ with 50 jellyfishes
The test machine is Intel Haswell, Intel(R) Core(TM) i7-4900MQ CPU @ 2.80GHz
FPS is measured by --show-fps-counter --enable-logging=stderr --vmodule="head*=1"
NoAA        25.2 FPS
MSAA        10.6 FPS
CMAA-before 19.9 FPS
CMAA-after  21.3 FPS

BUG=535198
TEST=Run a WebGL app on Chromebook Pixel 2015
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2125803002
Cr-Commit-Position: refs/heads/master@{#404132}

[modify] https://crrev.com/45a5dde9824768ca016b4abae13a05abbd99014c/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Project Member Comment 37 by bugdroid1@chromium.org, Jul 7 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ae22291b584735f8458ce123ceac88d8567f53cd

commit ae22291b584735f8458ce123ceac88d8567f53cd
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Thu Jul 07 22:23:25 2016

Reland "webgl: use immutable texture for the default FBO."

Original CL: https://codereview.chromium.org/1449043005

Use immutable texture for the default FBO like chromium compositor.

In theory, it speeds up drawing speed, because immutable texture skips texture
validation on drawing call.

In addition, immutable texture allows GL_INTEL_framebuffer_CMAA more optimization.

BUG= 557848 , 535198
TEST=gl_tests GLCopyTextureCHROMIUMTest.ImmutableTexture
https://www.khronos.org/registry/webgl/sdk/tests/conformance/renderbuffers/framebuffer-state-restoration.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/misc/texture-size-cube-maps.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb8-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg32f-rg-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg8-rg-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb5_a1-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb9_e5-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba32f-rgba-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb32f-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb9_e5-rgb-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba16f-rgba-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba8-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r8ui-red_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r16f-red-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg16f-rg-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r8-red-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg8ui-rg_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg16f-rg-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r16f-red-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb8ui-rgb_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb16f-rgb-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb565-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r32f-red-float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba4-rgba-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba16f-rgba-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba4-rgba-unsigned_short_4_4_4_4.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb565-rgb-unsigned_short_5_6_5.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba8ui-rgba_integer-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb16f-rgb-half_float.html
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-srgb8-rgb-unsigned_byte.html
https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/readpixel.html
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2125023002
Cr-Commit-Position: refs/heads/master@{#404260}

[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
[modify] https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp

I have CL to enable for all Broadwell & Braswell PCI-IDs: https://codereview.chromium.org/2165553002/

Just waiting for cyan performance results after DS's latest changes.
Project Member Comment 39 by bugdroid1@chromium.org, Jul 25 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b9374a3373f1f29f4f6a6762e1cddc9aec78549

commit 3b9374a3373f1f29f4f6a6762e1cddc9aec78549
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Mon Jul 25 13:49:40 2016

gpu, cmaa: avoid == for float in GLSL

According to the GLSL spec, GLSL float can represent exact integers between 0 and 2048.
However, some drivers might not respect the spec. So use uint for == operator.

In detail,
1. GLSL uses IEEE 754 float or half float.
https://www.opengl.org/wiki/Data_Type_(GLSL)#Scalars
2. IEEE 754 half float preserves integers between 0 and 2048 exactly represented.
https://en.wikipedia.org/wiki/Half-precision_floating-point_format#Precision_limitations_on_integer_values

BUG=535198
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/2170933002
Cr-Commit-Position: refs/heads/master@{#407466}

[modify] https://crrev.com/3b9374a3373f1f29f4f6a6762e1cddc9aec78549/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Blockedon: 634945
Project Member Comment 41 by bugdroid1@chromium.org, Aug 25 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58b5a5253da3242e0ff3bc2e7b963e55efc5bbd4

commit 58b5a5253da3242e0ff3bc2e7b963e55efc5bbd4
Author: robert.bradford <robert.bradford@intel.com>
Date: Thu Aug 25 14:46:15 2016

gpu: Enable CMAA for all Broadwell and Braswell ChromeOS devices

Extend the GPU workaround exception list to enable CMAA on all Broadwell
and Braswell GPUs. Using CMAA in place of MSAA for WebGL gives a
performance benefit.

BUG=535198
TEST=Boot cyan and observe that workaround is no longer listed.
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/2165553002
Cr-Commit-Position: refs/heads/master@{#414435}

[modify] https://crrev.com/58b5a5253da3242e0ff3bc2e7b963e55efc5bbd4/gpu/config/gpu_driver_bug_list_json.cc

Please hold on, this breaks Camera app on Samus on 53. See crbug.com/642290.
Comment 43 by kbr@chromium.org, Aug 31 2016
Blockedon: 642290
Project Member Comment 44 by bugdroid1@chromium.org, Oct 10
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47347f7cbee3bb0b1f6fec119281c2bcd23ef617

commit 47347f7cbee3bb0b1f6fec119281c2bcd23ef617
Author: adrian.belgun <adrian.belgun@intel.com>
Date: Mon Oct 10 15:42:42 2016

gpu: Enable CMAA for all Braswell, Broadwell and Skylake ChromeOS devices

Extend the GPU workaround exception list to enable CMAA on all Braswell,
Broadwell and Skylake GPUs. Using CMAA in place of MSAA for WebGL gives a
performance benefit.

This patch changes the way the platform filtering is done. Intead of
"device_id", "gl_renderer" is used.

BUG=535198
TEST=Boot cyan and observe that workaround is no longer listed.
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/2393323003
Cr-Commit-Position: refs/heads/master@{#424156}

[modify] https://crrev.com/47347f7cbee3bb0b1f6fec119281c2bcd23ef617/gpu/config/gpu_driver_bug_list_json.cc

Blocking: 656618
Project Member Comment 46 by bugdroid1@chromium.org, Oct 17
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/730f8089f791fa31a3ee2a7f5059a1052b129d21

commit 730f8089f791fa31a3ee2a7f5059a1052b129d21
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Mon Oct 17 15:26:02 2016

gpu: Clarify the sized texture format is available only if ES3 context or immutable texture is supported.

This clarification makes it possible that gles2 decoder tracks true internal format of immutable texture. So this CL removes internal_format hack in GLES2DecoderImpl::TexStorageImpl()

In addition, it makes CMAA skip redundant copy path because CMAA can know true internal format.

BUG=535198
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/2117183006
Cr-Commit-Position: refs/heads/master@{#425684}

[modify] https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21/gpu/command_buffer/service/feature_info.h
[modify] https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21/gpu/command_buffer/service/framebuffer_manager_unittest.cc
[modify] https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21/gpu/command_buffer/service/texture_manager.cc
[modify] https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21/gpu/command_buffer/service/texture_manager.h
[modify] https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21/gpu/command_buffer/tests/gl_texture_storage_unittest.cc

Blockedon: 657532
Project Member Comment 48 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d269ce2fafd0ed7ee09507cc295f1cae12b01db

commit 8d269ce2fafd0ed7ee09507cc295f1cae12b01db
Author: mcasas <mcasas@chromium.org>
Date: Tue Oct 25 01:46:55 2016

Revert of gpu: Clarify sized texture format is available only if ES3 context or immutable texture is supported (patchset #7 id:160001 of https://codereview.chromium.org/2117183006/ )

Reason for revert:
Broke playing back recorded data as detailed
in https://crbug.com/657532.  The bug has
step-by-step notes on how to repro (see also #4
in there).

Locally reverting of this CL restores the functionality.

Original issue's description:
> gpu: Clarify the sized texture format is available only if ES3 context or immutable texture is supported.
>
> This clarification makes it possible that gles2 decoder tracks true internal format of immutable texture. So this CL removes internal_format hack in GLES2DecoderImpl::TexStorageImpl()
>
> In addition, it makes CMAA skip redundant copy path because CMAA can know true internal format.
>
> BUG=535198
> 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
>
> Committed: https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21
> Cr-Commit-Position: refs/heads/master@{#425684}

TBR=dongseong.hwang@chromium.org,zmo@chromium.org,kbr@chromium.org,dongseong.hwang@intel.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=535198

Review-Url: https://codereview.chromium.org/2443123004
Cr-Commit-Position: refs/heads/master@{#427229}

[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/feature_info.h
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/framebuffer_manager_unittest.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/texture_manager.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/texture_manager.h
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/tests/gl_texture_storage_unittest.cc

Project Member Comment 49 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d269ce2fafd0ed7ee09507cc295f1cae12b01db

commit 8d269ce2fafd0ed7ee09507cc295f1cae12b01db
Author: mcasas <mcasas@chromium.org>
Date: Tue Oct 25 01:46:55 2016

Revert of gpu: Clarify sized texture format is available only if ES3 context or immutable texture is supported (patchset #7 id:160001 of https://codereview.chromium.org/2117183006/ )

Reason for revert:
Broke playing back recorded data as detailed
in https://crbug.com/657532.  The bug has
step-by-step notes on how to repro (see also #4
in there).

Locally reverting of this CL restores the functionality.

Original issue's description:
> gpu: Clarify the sized texture format is available only if ES3 context or immutable texture is supported.
>
> This clarification makes it possible that gles2 decoder tracks true internal format of immutable texture. So this CL removes internal_format hack in GLES2DecoderImpl::TexStorageImpl()
>
> In addition, it makes CMAA skip redundant copy path because CMAA can know true internal format.
>
> BUG=535198
> 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
>
> Committed: https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21
> Cr-Commit-Position: refs/heads/master@{#425684}

TBR=dongseong.hwang@chromium.org,zmo@chromium.org,kbr@chromium.org,dongseong.hwang@intel.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=535198

Review-Url: https://codereview.chromium.org/2443123004
Cr-Commit-Position: refs/heads/master@{#427229}

[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/feature_info.h
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/framebuffer_manager_unittest.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/texture_manager.cc
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/service/texture_manager.h
[modify] https://crrev.com/8d269ce2fafd0ed7ee09507cc295f1cae12b01db/gpu/command_buffer/tests/gl_texture_storage_unittest.cc

Project Member Comment 50 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a5d6052cdc38c8d12bb7d4686177d67809b1f66e

commit a5d6052cdc38c8d12bb7d4686177d67809b1f66e
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Tue Oct 25 12:29:55 2016

gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests

Add new unittests for glApplyScreenSpaceAntialiasingCHROMIUM, which check the
conformance with GL_INTEL_framebuffer_CMAA spec [1].

Many tests are very similar to tests of GLCopyTextureCHROMIUMTest.

[1] https://www.khronos.org/registry/gles/extensions/INTEL/framebuffer_CMAA.txt

BUG=535198
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/2432413003
Cr-Commit-Position: refs/heads/master@{#427326}

[modify] https://crrev.com/a5d6052cdc38c8d12bb7d4686177d67809b1f66e/gpu/BUILD.gn
[modify] https://crrev.com/a5d6052cdc38c8d12bb7d4686177d67809b1f66e/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_screen_space_antialiasing.txt
[modify] https://crrev.com/a5d6052cdc38c8d12bb7d4686177d67809b1f66e/gpu/command_buffer/service/gles2_cmd_decoder.cc
[add] https://crrev.com/a5d6052cdc38c8d12bb7d4686177d67809b1f66e/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc

Project Member Comment 51 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/617925a43f4d461d7e36ea74b70511fdd61f10b7

commit 617925a43f4d461d7e36ea74b70511fdd61f10b7
Author: ajuma <ajuma@chromium.org>
Date: Tue Oct 25 14:00:58 2016

Revert of gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests (patchset #4 id:60001 of https://codereview.chromium.org/2432413003/ )

Reason for revert:
The tests added here are crashing on an assertion on multiple GPU Debug bots. For example:
https://build.chromium.org/p/chromium.gpu/builders/Mac%2010.10%20Retina%20Debug%20%28AMD%29/builds/18115
https://build.chromium.org/p/chromium.gpu/builders/Win7%20Debug%20%28NVIDIA%29/builds/45966

Snippet from the log:
[548:3764:1025/061243:2681579:FATAL:gles2_implementation_impl_autogen.h(606)] Check failed: textures[i] != 0.
Backtrace:
	base::debug::StackTrace::StackTrace [0x00A7B3E7+23]
	logging::LogMessage::~LogMessage [0x00ACD4EB+59]
	gpu::gles2::GLES2Implementation::DeleteTextures [0x03DB1732+626]
	GLES2DeleteTextures [0x03EB5954+36]
	gpu::GLApplyScreenSpaceAntialiasingCHROMIUMTest::TearDown [0x00442AC8+24]

Original issue's description:
> gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests
>
> Add new unittests for glApplyScreenSpaceAntialiasingCHROMIUM, which check the
> conformance with GL_INTEL_framebuffer_CMAA spec [1].
>
> Many tests are very similar to tests of GLCopyTextureCHROMIUMTest.
>
> [1] https://www.khronos.org/registry/gles/extensions/INTEL/framebuffer_CMAA.txt
>
> BUG=535198
> 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
>
> Committed: https://crrev.com/a5d6052cdc38c8d12bb7d4686177d67809b1f66e
> Cr-Commit-Position: refs/heads/master@{#427326}

TBR=dongseong.hwang@chromium.org,piman@chromium.org,adrian.belgun@intel.com,dongseong.hwang@intel.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=535198

Review-Url: https://codereview.chromium.org/2451803002
Cr-Commit-Position: refs/heads/master@{#427335}

[modify] https://crrev.com/617925a43f4d461d7e36ea74b70511fdd61f10b7/gpu/BUILD.gn
[modify] https://crrev.com/617925a43f4d461d7e36ea74b70511fdd61f10b7/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_screen_space_antialiasing.txt
[modify] https://crrev.com/617925a43f4d461d7e36ea74b70511fdd61f10b7/gpu/command_buffer/service/gles2_cmd_decoder.cc
[delete] https://crrev.com/de0c68245451c26502f3c7ff676a4bc513eb82e3/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc

Project Member Comment 52 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/460cac969e2e9ac38a2611be1a32db0361d88bfb

commit 460cac969e2e9ac38a2611be1a32db0361d88bfb
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Tue Oct 25 21:16:41 2016

Reland of gpu: Clarify sized texture format is available (https://codereview.chromium.org/2117183006)

Reason for revert:
r425684 causes blank video of mediaStream playback in MacOSX, because MacOSX
relies on the hack, which the CL removed. This CL remains the hack only in MacOSX.

BUG=535198,  657532 

> Revert of gpu: Clarify sized texture format is available only if ES3 context or immutable texture is supported (patchset #7 id:160001 of https://codereview.chromium.org/2117183006/ )
>
> Reason for revert:
> Broke playing back recorded data as detailed
> in https://crbug.com/657532.  The bug has
> step-by-step notes on how to repro (see also #4
> in there).
>
> Locally reverting of this CL restores the functionality.
>
> Original issue's description:
> > gpu: Clarify the sized texture format is available only if ES3 context or immutable texture is supported.
> >
> > This clarification makes it possible that gles2 decoder tracks true internal format of immutable texture. So this CL removes internal_format hack in GLES2DecoderImpl::TexStorageImpl()
> >
> > In addition, it makes CMAA skip redundant copy path because CMAA can know true internal format.
> >
> > BUG=535198
> > 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
> >
> > Committed: https://crrev.com/730f8089f791fa31a3ee2a7f5059a1052b129d21
> > Cr-Commit-Position: refs/heads/master@{#425684}
>
> TBR=dongseong.hwang@chromium.org,zmo@chromium.org,kbr@chromium.org,dongseong.hwang@intel.com
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=535198
>
> Review-Url: https://codereview.chromium.org/2443123004
> Cr-Commit-Position: refs/heads/master@{#427229}
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/2448083003
Cr-Commit-Position: refs/heads/master@{#427473}

[modify] https://crrev.com/460cac969e2e9ac38a2611be1a32db0361d88bfb/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/460cac969e2e9ac38a2611be1a32db0361d88bfb/gpu/command_buffer/service/feature_info.h
[modify] https://crrev.com/460cac969e2e9ac38a2611be1a32db0361d88bfb/gpu/command_buffer/service/framebuffer_manager_unittest.cc
[modify] https://crrev.com/460cac969e2e9ac38a2611be1a32db0361d88bfb/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/460cac969e2e9ac38a2611be1a32db0361d88bfb/gpu/command_buffer/service/texture_manager.cc
[modify] https://crrev.com/460cac969e2e9ac38a2611be1a32db0361d88bfb/gpu/command_buffer/service/texture_manager.h
[modify] https://crrev.com/460cac969e2e9ac38a2611be1a32db0361d88bfb/gpu/command_buffer/tests/gl_texture_storage_unittest.cc

Project Member Comment 53 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e727a7e700cfdce175091ca742a4b32592330e25

commit e727a7e700cfdce175091ca742a4b32592330e25
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Tue Oct 25 21:18:40 2016

Reland of gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests (https://codereview.chromium.org/2432413003/)

Reason for revert:
New unittests crash due to deleting null texture. This CL handles it to reland.

BUG=535198

> Revert of gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests (patchset #4 id:60001 of https://codereview.chromium.org/2432413003/ )
>
> Reason for revert:
> The tests added here are crashing on an assertion on multiple GPU Debug bots. For example:
> https://build.chromium.org/p/chromium.gpu/builders/Mac%2010.10%20Retina%20Debug%20%28AMD%29/builds/18115
> https://build.chromium.org/p/chromium.gpu/builders/Win7%20Debug%20%28NVIDIA%29/builds/45966
>
> Snippet from the log:
> [548:3764:1025/061243:2681579:FATAL:gles2_implementation_impl_autogen.h(606)] Check failed: textures[i] != 0.
> Backtrace:
>     base::debug::StackTrace::StackTrace [0x00A7B3E7+23]
>     logging::LogMessage::~LogMessage [0x00ACD4EB+59]
>     gpu::gles2::GLES2Implementation::DeleteTextures [0x03DB1732+626]
>     GLES2DeleteTextures [0x03EB5954+36]
>     gpu::GLApplyScreenSpaceAntialiasingCHROMIUMTest::TearDown [0x00442AC8+24]
>
> Original issue's description:
> > gpu, cmaa: add glApplyScreenSpaceAntialiasingCHROMIUM unittests
> >
> > Add new unittests for glApplyScreenSpaceAntialiasingCHROMIUM, which check the
> > conformance with GL_INTEL_framebuffer_CMAA spec [1].
> >
> > Many tests are very similar to tests of GLCopyTextureCHROMIUMTest.
> >
> > [1] https://www.khronos.org/registry/gles/extensions/INTEL/framebuffer_CMAA.txt
> >
> > BUG=535198
> > 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
> >
> > Committed: https://crrev.com/a5d6052cdc38c8d12bb7d4686177d67809b1f66e
> > Cr-Commit-Position: refs/heads/master@{#427326}
>
> TBR=dongseong.hwang@chromium.org,piman@chromium.org,adrian.belgun@intel.com,dongseong.hwang@intel.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=535198
>
> Review-Url: https://codereview.chromium.org/2451803002
> Cr-Commit-Position: refs/heads/master@{#427335}
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/2449933002
Cr-Commit-Position: refs/heads/master@{#427475}

[modify] https://crrev.com/e727a7e700cfdce175091ca742a4b32592330e25/gpu/BUILD.gn
[modify] https://crrev.com/e727a7e700cfdce175091ca742a4b32592330e25/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_screen_space_antialiasing.txt
[modify] https://crrev.com/e727a7e700cfdce175091ca742a4b32592330e25/gpu/command_buffer/service/gles2_cmd_decoder.cc
[add] https://crrev.com/e727a7e700cfdce175091ca742a4b32592330e25/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc

Status: Fixed
All implementation, test, and optimization are done. Thank you everyone for helping this feature landed.
Status: Started
need more optimization, so reopen
Project Member Comment 56 by bugdroid1@chromium.org, Oct 28
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03f407d98f729b83f76b18fb5497abfc55abe5c5

commit 03f407d98f729b83f76b18fb5497abfc55abe5c5
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Fri Oct 28 18:57:19 2016

webgl, cmaa: choose immutable texture instead of BGRA support for WebGL1

Rationale
* WebGL1 API needs neither immutable texture nor BGRA.
* WebGL1 implementation doesn't need BGRA
* WebGL1 implementation needs immutable texture for CMAA.

CMAA prefers RGBA8 as input. If RGBA is input, CMAA impl has to copy. It's why
WebGL allocates immutable texture as default FBO if possible.

BUG=535198
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/2454383002
Cr-Commit-Position: refs/heads/master@{#428446}

[modify] https://crrev.com/03f407d98f729b83f76b18fb5497abfc55abe5c5/gpu/command_buffer/service/feature_info.cc

Owner: dongseon...@intel.com
Blockedon: 659438
Project Member Comment 59 by bugdroid1@chromium.org, Oct 31
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6cd0a67f8256ecb9e0fb899528bdffc74f0e7042

commit 6cd0a67f8256ecb9e0fb899528bdffc74f0e7042
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Mon Oct 31 21:37:47 2016

Reland "gpu, cmaa: reduce one-copy", "gpu, cmaa: copy RGBA8 texture via glCopyTexSubImage2D() instead of imageStore()."

Original CL:
https://codereview.chromium.org/2298613010 : use glCopyTexSubImage2D, and fix Pri1 bug
https://codereview.chromium.org/2405893002 : optimize further

Revert CL:
https://codereview.chromium.org/2456913002 : glCopyTexSubImage2D regresses performance and optimization CL is reverted due to conflict.

Changes:
- fix Pri1 bug as-is
- optimize further as-is
- don't introduce glCopyTexSubImage2D, and use the existing copy shader.

BUG=535198,  642290 ,  659438 
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/2465963002
Cr-Commit-Position: refs/heads/master@{#428826}

[modify] https://crrev.com/6cd0a67f8256ecb9e0fb899528bdffc74f0e7042/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
[modify] https://crrev.com/6cd0a67f8256ecb9e0fb899528bdffc74f0e7042/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h

Project Member Comment 60 by bugdroid1@chromium.org, Nov 2
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c8b1229552985d8ed976b8d47e66ff983afceac

commit 0c8b1229552985d8ed976b8d47e66ff983afceac
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Wed Nov 02 08:38:25 2016

gpu, cmaa: reuse CopyTextureCHROMIUMResourceManager

In addition, prevent from using glCopyTexSubImage2D in
CopyTextureCHROMIUMResourceManager on Intel ChromeOS, because copy via
glDrawArrays is much faster in IA ChromeOS. However, glCopyTexSubImage2D is
faster in Android.

It looks Mesa bug, so I filed this issue to Mesa bugzilla; https://bugs.freedesktop.org/show_bug.cgi?id=98478

Perf data >
 test site: http://webglsamples.org/aquarium/aquarium.html
                                               glCopyTexSubImage2D glDrawArrays
 4k fish on Chromebook Pixel 2015 (Broadwell):      22 FPS           32.6 FPS
 4k fish on Ubuntu and Haswell:                     23 FPS           30.9 FPS
 500 fish on Android OnePlus One (Adreno 330):      25 FPS           22.5 FPS

BUG=535198
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/2460973002
Cr-Commit-Position: refs/heads/master@{#429240}

[modify] https://crrev.com/0c8b1229552985d8ed976b8d47e66ff983afceac/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
[modify] https://crrev.com/0c8b1229552985d8ed976b8d47e66ff983afceac/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h
[modify] https://crrev.com/0c8b1229552985d8ed976b8d47e66ff983afceac/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
[modify] https://crrev.com/0c8b1229552985d8ed976b8d47e66ff983afceac/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/0c8b1229552985d8ed976b8d47e66ff983afceac/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc

Project Member Comment 61 by bugdroid1@chromium.org, Nov 8
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/12cc0e01ea62888ed2b84b3aeda6293194c819d4

commit 12cc0e01ea62888ed2b84b3aeda6293194c819d4
Author: qiankun.miao <qiankun.miao@intel.com>
Date: Tue Nov 08 03:18:03 2016

Set correct internalformat info for TexStorageEXT according context type

For ES2 context, EXT_texture_storage enables TexStorageEXT. In the
extension spec, it says for OpenGL ES
"
The TexImage* calls in the TexStorage* pseudocode are modified so that
the <internalformat>, <format> and <type> parameters are taken from the
<format>, <format> and <type> columns (respectively).
"
See https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_storage.txt.

So, when we set texture level info, internalformat should be adjusted to
format in es2 context.

BUG=535198
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/2458103002
Cr-Commit-Position: refs/heads/master@{#430501}

[modify] https://crrev.com/12cc0e01ea62888ed2b84b3aeda6293194c819d4/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/12cc0e01ea62888ed2b84b3aeda6293194c819d4/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc

Project Member Comment 62 by bugdroid1@chromium.org, Jan 12
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b85620a5e701039630f96339a6d1b4ceb5b14f0

commit 5b85620a5e701039630f96339a6d1b4ceb5b14f0
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Thu Jan 12 19:39:05 2017

gpu, cmaa: improve |do_copy| condition logic

ImageTexture binding is supported for only immutable texture [1]
[1] https://www.khronos.org/opengles/sdk/docs/man31/html/glBindImageTexture.xhtml

CMAA needs to use ImageTexture binding, so it checkes internal format is RGBA8.
However, in GLES2 context, immutable texture can have RGBA internal format, because of
https://codereview.chromium.org/2458103002/
This CL makes it check immutable texture directly.

BUG=535198
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/2543123003
Cr-Commit-Position: refs/heads/master@{#443326}

[modify] https://crrev.com/5b85620a5e701039630f96339a6d1b4ceb5b14f0/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
[modify] https://crrev.com/5b85620a5e701039630f96339a6d1b4ceb5b14f0/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h
[modify] https://crrev.com/5b85620a5e701039630f96339a6d1b4ceb5b14f0/gpu/command_buffer/service/gles2_cmd_decoder.cc

Project Member Comment 63 by bugdroid1@chromium.org, Feb 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8d862a9d32dca327a856d7f01e7b300ff4105b0

commit d8d862a9d32dca327a856d7f01e7b300ff4105b0
Author: qiankun.miao <qiankun.miao@intel.com>
Date: Thu Feb 16 09:58:21 2017

CMAA: Avoid DCHECK failure for unsupported internalformats

CMAA implementation replies on CopyTextureCHROMIUM extension which only
supports part of ES3 formats. Skip CMAA for those unsupported formats.

BUG=535198,  687180 
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/2697503002
Cr-Commit-Position: refs/heads/master@{#450920}

[modify] https://crrev.com/d8d862a9d32dca327a856d7f01e7b300ff4105b0/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/d8d862a9d32dca327a856d7f01e7b300ff4105b0/gpu/command_buffer/tests/gl_apply_screen_space_antialiasing_CHROMIUM_unittest.cc

Project Member Comment 64 by bugdroid1@chromium.org, Feb 24
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1424a997d92b500ccd797d4ee690246e40182b4

commit b1424a997d92b500ccd797d4ee690246e40182b4
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Fri Feb 24 02:22:31 2017

Set correct internalformat info for TexStorageEXT for WebGL1 context

WebGL1 context must behave like ES2 context, which crrev.com/2458103002 defines.

BUG=535198, 628064
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/2548733002
Cr-Commit-Position: refs/heads/master@{#452718}

[modify] https://crrev.com/b1424a997d92b500ccd797d4ee690246e40182b4/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/b1424a997d92b500ccd797d4ee690246e40182b4/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc

Project Member Comment 65 by bugdroid1@chromium.org, Mar 7
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d2609f6aa6f0a9f8ae238b8af06770337d726eb

commit 8d2609f6aa6f0a9f8ae238b8af06770337d726eb
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Tue Mar 07 19:11:09 2017

cmaa, gpu: use R8 image texture when GL_NV_image_formats is available.

Recently Mesa supports GL_NV_image_formats extension for r8 image texture for ES 3.1.
https://bugs.freedesktop.org/show_bug.cgi?id=98480
So CMAA can use R8 texture, instead of RGBA8.

In addition, CMAA implementation checks R8 support tests, and it slows down GPU
initialization. Remove all unnecessary tests and just check certain extensions.

BUG=535198,  642290 
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

Review-Url: https://codereview.chromium.org/2693653002
Cr-Commit-Position: refs/heads/master@{#455170}

[modify] https://crrev.com/8d2609f6aa6f0a9f8ae238b8af06770337d726eb/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/8d2609f6aa6f0a9f8ae238b8af06770337d726eb/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
[modify] https://crrev.com/8d2609f6aa6f0a9f8ae238b8af06770337d726eb/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h
[modify] https://crrev.com/8d2609f6aa6f0a9f8ae238b8af06770337d726eb/gpu/command_buffer/service/gles2_cmd_decoder.cc

Project Member Comment 66 by bugdroid1@chromium.org, Mar 9
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/870bce2d5e6ed3ba5d7b513b69d55fdb26efc2d6

commit 870bce2d5e6ed3ba5d7b513b69d55fdb26efc2d6
Author: zmo <zmo@chromium.org>
Date: Thu Mar 09 18:39:22 2017

Revert of cmaa, gpu: use R8 image texture when GL_NV_image_formats is available. (patchset #4 id:60001 of https://codereview.chromium.org/2693653002/ )

Reason for revert:
This breaks:
https://build.chromium.org/p/chromium.gpu/builders/Linux%20Debug%20%28NVIDIA%...

Error from the output:
[4533:4533:0307/120003.054303:1731388651:ERROR:gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc(647)]
ApplyFramebufferAttachmentCMAAINTEL: shader compilation failed:
GL_FRAGMENT_SHADER shader compilation failed: 0(1) : error C0000: syntax error,
unexpected $undefined at token "<undefined>"
0(1) : error C0155: integer constant overflow
0(4) : warning C7022: unrecognized profile specifier "highp"
0(4) : warning C7022: unrecognized profile specifier "precision"

Original issue's description:
> cmaa, gpu: use R8 image texture when GL_NV_image_formats is available.
>
> Recently Mesa supports GL_NV_image_formats extension for r8 image texture for ES 3.1.
> https://bugs.freedesktop.org/show_bug.cgi?id=98480
> So CMAA can use R8 texture, instead of RGBA8.
>
> In addition, CMAA implementation checks R8 support tests, and it slows down GPU
> initialization. Remove all unnecessary tests and just check certain extensions.
>
> BUG=535198,  642290 
> 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
>
> Review-Url: https://codereview.chromium.org/2693653002
> Cr-Commit-Position: refs/heads/master@{#455170}
> Committed: https://chromium.googlesource.com/chromium/src/+/8d2609f6aa6f0a9f8ae238b8af06770337d726eb

TBR=dongseong.hwang@chromium.org,piman@chromium.org,kbr@chromium.org,machenbach@chromium.org,dongseong.hwang@intel.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=535198,  642290 

Review-Url: https://codereview.chromium.org/2738213003
Cr-Commit-Position: refs/heads/master@{#455805}

[modify] https://crrev.com/870bce2d5e6ed3ba5d7b513b69d55fdb26efc2d6/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/870bce2d5e6ed3ba5d7b513b69d55fdb26efc2d6/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
[modify] https://crrev.com/870bce2d5e6ed3ba5d7b513b69d55fdb26efc2d6/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h
[modify] https://crrev.com/870bce2d5e6ed3ba5d7b513b69d55fdb26efc2d6/gpu/command_buffer/service/gles2_cmd_decoder.cc

Project Member Comment 67 by bugdroid1@chromium.org, Mar 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/96e2b1d93e12bca0b76edb58a83ec9898dc80962

commit 96e2b1d93e12bca0b76edb58a83ec9898dc80962
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Thu Mar 16 00:19:12 2017

Reland cmaa, gpu: use R8 image texture when GL_NV_image_formats is available.

Original CLs:
https://codereview.chromium.org/2693653002/

Notable Changes:
- Fix the bug about std::ostringstream.

BUG=535198,  642290 
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

Review-Url: https://codereview.chromium.org/2752953002
Cr-Commit-Position: refs/heads/master@{#457277}

[modify] https://crrev.com/96e2b1d93e12bca0b76edb58a83ec9898dc80962/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/96e2b1d93e12bca0b76edb58a83ec9898dc80962/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
[modify] https://crrev.com/96e2b1d93e12bca0b76edb58a83ec9898dc80962/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h
[modify] https://crrev.com/96e2b1d93e12bca0b76edb58a83ec9898dc80962/gpu/command_buffer/service/gles2_cmd_decoder.cc

Project Member Comment 68 by bugdroid1@chromium.org, Mar 16
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec33def4335bb0b84d81a75fafac70d2acc6b280

commit ec33def4335bb0b84d81a75fafac70d2acc6b280
Author: dongseong.hwang <dongseong.hwang@intel.com>
Date: Thu Mar 16 00:30:10 2017

cmaa: remove dead code in shader.

BUG=535198
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

Review-Url: https://codereview.chromium.org/2750223002
Cr-Commit-Position: refs/heads/master@{#457283}

[modify] https://crrev.com/ec33def4335bb0b84d81a75fafac70d2acc6b280/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Project Member Comment 69 by bugdroid1@chromium.org, Yesterday (25 hours ago)
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87ff6dd93ccb11c339b9f9278b6d2ce18a05f32d

commit 87ff6dd93ccb11c339b9f9278b6d2ce18a05f32d
Author: xinghua.cao <xinghua.cao@intel.com>
Date: Fri Apr 28 06:04:31 2017

Avoid to resolve CMAA for read and draw without content changed or with content committed.

CMAA will be triggered by every readPixels call, even content does not be  changed or committed.

BUG=535198

TEST=conformance/readinging/fbo-remains-unchanged-after-read-pixels.html

Review-Url: https://codereview.chromium.org/2597933002
Cr-Commit-Position: refs/heads/master@{#467915}

[modify] https://crrev.com/87ff6dd93ccb11c339b9f9278b6d2ce18a05f32d/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Sign in to add a comment