Commit eb1f6af3 authored by Khushal's avatar Khushal Committed by Commit Bot

gpu: Fix error with tracking fences for the primary plane.

We were incorrectly using fences from the video buffer for initializing
the fences used for the primary plane. While this was hitting a debug
assert it didn't cause any errors in the metric since the primary plane
is always scheduled last, so the fences eventually used in the metric
did belong to the primary plane.

R=vikassoni@chromium.org

Bug: 1100442
Change-Id: I7412c4f81d6356849a1b3b42c9af94c06d565882
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2344007
Auto-Submit: Khushal <khushalsagar@chromium.org>
Commit-Queue: vikas soni <vikassoni@chromium.org>
Reviewed-by: default avatarvikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796310}
parent 43f9e9cf
......@@ -325,9 +325,11 @@ bool GLSurfaceEGLSurfaceControl::ScheduleOverlayPlane(
// its the primary plane.
is_primary_plane = !scoped_hardware_buffer->is_video();
DCHECK(!is_primary_plane || !primary_plane_fences_);
primary_plane_fences_.emplace();
primary_plane_fences_->available_fence =
scoped_hardware_buffer->TakeAvailableFence();
if (is_primary_plane) {
primary_plane_fences_.emplace();
primary_plane_fences_->available_fence =
scoped_hardware_buffer->TakeAvailableFence();
}
auto* a_surface = surface_state.surface->surface();
DCHECK_EQ(pending_frame_resources_.count(a_surface), 0u);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment