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

Unified Diff: gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc

Issue 2125803002: gpu, cmaa: optimize COMBINE_EDGES path to reduce fragment shader tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
index 65eca9ad36afcc8233508bcb22a70cae8970dcdb..671b2565ce31e0b6e932121154309e3ffbcfe25d 100644
--- a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
+++ b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc
@@ -399,9 +399,7 @@ void ApplyFramebufferAttachmentCMAAINTELResourceManager::ApplyCMAAEffectTexture(
}
// - Combine RightBottom (.xy) edges from previous pass into
- // RightBottomLeftTop (.xyzw) edges and output it into the mask (have to
- // fill in the whole buffer including empty ones for the line length
- // detection to work correctly).
dshwang 2016/07/06 10:27:30 It's wrong, because all edge information is genera
+ // RightBottomLeftTop (.xyzw) edges and output it into the mask.
// - On all pixels with any edge, input buffer into a temporary color buffer
// needed for correct blending in the next pass (other pixels not needed
// so not copied to avoid bandwidth use).
@@ -415,13 +413,13 @@ void ApplyFramebufferAttachmentCMAAINTELResourceManager::ApplyCMAAEffectTexture(
// gl_FragDepth mini4_edge_texture_ fbo.depth
{
// Combine edges: each pixel will now contain info on all (top, right,
- // bottom, left) edges; also create depth mask as above depth and mark
- // potential Z sAND also copy source color data but only on edge pixels
+ // bottom, left) edges; also mark depth 1 value on all pixels with any edge
+ // and also copy source color data but only on edge pixels
glUseProgram(edges_combine_shader_);
- glUniform1f(0, 1.0f);
+ glUniform1f(0, 0.0f);
glUniform2f(1, 1.0f / width_, 1.0f / height_);
glDepthMask(GL_TRUE);
- glDepthFunc(GL_ALWAYS);
+ glDepthFunc(GL_LESS);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
if (!is_gles31_compatible_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698