New issue
Advanced search Search tips

Issue 801007 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 754872



Sign in to add a comment

CopyOutputRequest scaling/I420 broken with texture size rounding enabled

Project Member Reported by m...@chromium.org, Jan 11 2018

Issue description

A recent commit (pasted below) revealed that CopyOutputRequest scaling and I420 conversion were broken. The result image is vertically translated wrong, with green bars appearing at the top of the resulting 
YUV video image.

commit 07fe0b6e0939a8aa223d8fb526a8040b39441858
Author: danakj <danakj@chromium.org>
Date:   Wed Jan 3 09:01:34 2018

    Reduce fragmentation of gpu memory by rounding RenderPass textures.
    

 

Comment 1 by m...@chromium.org, Jan 11 2018

After days of diagnosing the issue, it seems this was all caused by two things:

1. The I420 converter should not be doing extra calculations to determine the source texture rect (flipping of Y coordinates is done upstream).

2. GL_SCISSOR_TEST was enabled (causing the lack of data, or green bars, at the top of the result). By luck, the draw operations were never being cropped before; but with texture size rounding, the scissor rect impacted the drawing ops for scaling.
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 11 2018

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

commit f5e97c7c18f90cefd0948e547e2e4253e411f5b5
Author: Yuri Wiitala <miu@chromium.org>
Date: Thu Jan 11 22:54:50 2018

GLRendererCopier: Fix for erroneous green bars in CopyOutputResult.

A recent change (commit 07fe0b6e0939a8aa223d8fb526a8040b39441858)
modified all RenderPass texture size allocations to be rounded-up in 64
pixel increments. This revealed problems in the GLRendererCopier impl,
which have been fixed by explicitly accounting for both flipped and non-
flipped source textures, and also ensuring that the GL scissor is
disabled during scaling draw operations.

Bug:  801007 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ia8309d9d882da8f0c8c7acdd7ddfe7c4ea311f49
Reviewed-on: https://chromium-review.googlesource.com/861154
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528793}
[modify] https://crrev.com/f5e97c7c18f90cefd0948e547e2e4253e411f5b5/components/viz/common/gl_helper_scaling.cc
[modify] https://crrev.com/f5e97c7c18f90cefd0948e547e2e4253e411f5b5/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/f5e97c7c18f90cefd0948e547e2e4253e411f5b5/components/viz/service/display/gl_renderer_copier.cc
[modify] https://crrev.com/f5e97c7c18f90cefd0948e547e2e4253e411f5b5/components/viz/service/display/gl_renderer_copier.h
[modify] https://crrev.com/f5e97c7c18f90cefd0948e547e2e4253e411f5b5/components/viz/service/display/gl_renderer_copier_pixeltest.cc
[modify] https://crrev.com/f5e97c7c18f90cefd0948e547e2e4253e411f5b5/components/viz/service/display/gl_renderer_copier_unittest.cc
[modify] https://crrev.com/f5e97c7c18f90cefd0948e547e2e4253e411f5b5/components/viz/service/display/renderer_pixeltest.cc

Comment 3 by m...@chromium.org, Jan 11 2018

Status: Fixed (was: Started)

Sign in to add a comment