Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Issue 2125803002: gpu, cmaa: optimize COMBINE_EDGES path to reduce fragment shader tasks (Closed)

Created:
4 years, 5 months ago by dshwang
Modified:
4 years, 5 months ago
CC:
chromium-reviews, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/45a5dde9824768ca016b4abae13a05abbd99014c Cr-Commit-Position: refs/heads/master@{#404132}

Patch Set 1 #

Patch Set 2 : update comments #

Total comments: 1

Patch Set 3 : remove g_Depth uniform because frag shader controls depth by itself #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -20 lines) Patch
M gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc View 1 2 8 chunks +11 lines, -20 lines 2 comments Download

Messages

Total messages: 20 (10 generated)
dshwang
jon, adrian, could you review? zmo@, could you review as owner?
4 years, 5 months ago (2016-07-06 10:11:02 UTC) #3
dshwang
https://codereview.chromium.org/2125803002/diff/20001/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc File gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc (left): https://codereview.chromium.org/2125803002/diff/20001/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc#oldcode404 gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc:404: // detection to work correctly). It's wrong, because all ...
4 years, 5 months ago (2016-07-06 10:27:30 UTC) #5
dshwang
remove g_Depth uniform because frag shader controls depth by itself https://codereview.chromium.org/2125803002/diff/40001/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc File gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc (right): https://codereview.chromium.org/2125803002/diff/40001/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc#newcode1157 ...
4 years, 5 months ago (2016-07-06 10:41:20 UTC) #6
piman
lgtm
4 years, 5 months ago (2016-07-06 18:39:02 UTC) #8
dshwang
On 2016/07/06 18:39:02, piman wrote: > lgtm Thank you for reviewing. Filip Strugar, who is ...
4 years, 5 months ago (2016-07-07 09:26:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2125803002/40001
4 years, 5 months ago (2016-07-07 09:26:24 UTC) #11
adrian.belgun
lgtm
4 years, 5 months ago (2016-07-07 09:48:14 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2125803002/40001
4 years, 5 months ago (2016-07-07 11:02:13 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-07 12:07:10 UTC) #18
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 12:08:19 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/45a5dde9824768ca016b4abae13a05abbd99014c
Cr-Commit-Position: refs/heads/master@{#404132}

Powered by Google App Engine
This is Rietveld 408576698