New issue
Advanced search Search tips

Issue 920000 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 2
Type: Bug



Sign in to add a comment

[Fuchsia] content_shell fails to run with vulkan enabled

Project Member Reported by sergeyu@chromium.org, Jan 8

Issue description

1. Build content_shell_fuchsia
2. Run it on a physical device with the following flags: --enable-features=VizDisplayCompositor,UseSkiaRenderer,UseSkiaDeferredDisplayList,UiGpuRasterization   --enable-oop-rasterization --enable-vulkan --enable-gpu-rasterization  --enable-raster-to-sk-image --use-raster-context-provider  --force-gpu-rasterization --use-gl=swiftshader

Currently it fails to initialize Vulkan with the following error in the log: 
[2307777:32235465:0108/214935.011774:ERROR:GrVkInterface.cpp(424)] ../../third_party/skia/src/gpu/vk/GrVkInterface.cpp:424 GrVkInterface::validate() failed.

After that content_shell also crashes in viz::SkiaOutputSurfaceImplOnGpu::Reshape() after CreateSkSurfaceForVulkan() fails to initialize sk_surface_ . Somehow we fallback to the GL implementation of GrGpu interface (i.e. GrGlGpu), while gpu_service_->is_using_vulkan() still returns true.

So there are 3 separate issues:
 1. vkGetPhysicalDeviceProperties() returns physicalDeviceVersion >= 1.1.0, but we still fail to get vkGetImageMemoryRequirements2, GetBufferMemoryRequirements2 and GetImageSparseMemoryRequirements2. These are device-level functions so they are expected to be exist when physicalDeviceVersion >= 1.1.0. This may be a Vulkan driver bug.
 2. When Vulkan initialization fails we get into a state when SkiaOutputSurfaceImplOnGpu still thinks that it's using Vulkan while gr_context() refers to GrGlGpu (instead of GrVkGpu).
 3. SkiaOutputSurfaceImplOnGpu::Reshape() doesn't handle the failure to initialize SkSurface.
 
Description: Show this description
Filed https://fuchsia.atlassian.net/browse/MA-539 for the failure to resolve vkGetImageMemoryRequirements2
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 11

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

commit fa8930c92b40ffc48dffbcd2a1a0f6eb37260cfd
Author: Sergey Ulanov <sergeyu@chromium.org>
Date: Fri Jan 11 00:10:37 2019

Add DCHECK to verify results of SkSurface::MakeFromBackendRenderTarget()

CreateSkSurfaceForVulkan() in SkiaOutputSurfaceImplOnGpu wasn't handling
the case when MakeFromBackendRenderTarget() fails, while calling code
expects sk_surface_ to be set after CreateSkSurfaceForVulkan()
completes. Add a DCHECK to verify that CreateSkSurfaceForVulkan() always
succeeds. This would make it easier to debug the linked bug.

Bug:  920000 
Change-Id: Ieed3191b836eb690a6896833824faa5c86707f8f
Reviewed-on: https://chromium-review.googlesource.com/c/1404374
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621815}
[modify] https://crrev.com/fa8930c92b40ffc48dffbcd2a1a0f6eb37260cfd/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 11

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

commit fc1afbf0ee77877255a017b10aaab43657cbf8c2
Author: Sergey Ulanov <sergeyu@chromium.org>
Date: Fri Jan 11 01:28:54 2019

Create Vulkan instance with apiVersion=1.1 instead of 1.0

In future Skia will support only Vulkan >= 1.1, so chromium will need to
initialize 1.1 instances.

Bug:  920000 
Change-Id: I210cc43f8b4a4452f19b90add25492610782fd2d
Reviewed-on: https://chromium-review.googlesource.com/c/1405815
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621846}
[modify] https://crrev.com/fc1afbf0ee77877255a017b10aaab43657cbf8c2/components/viz/common/gpu/vulkan_in_process_context_provider.cc
[modify] https://crrev.com/fc1afbf0ee77877255a017b10aaab43657cbf8c2/gpu/vulkan/vulkan_instance.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 11

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

commit 46cfb416b356c286fbed34315494fe260bf3283f
Author: Sergey Ulanov <sergeyu@chromium.org>
Date: Fri Jan 11 04:02:07 2019

Handle GrContext::MakeVulkan() failures in VulkanInProcessContextProvider

GrContext::MakeVulkan() may fail and return nullptr.
VulkanInProcessContextProvider::Initialize() wasn't handling this case
properly. Fixed it to return false in that case. Also updated
RasterDecoderContextState to DCHECK that the vk_context_provider is
properly initialize (i.e. gr_context != nullptr).

Bug:  920000 
Change-Id: If20df461d63b596210fb077c19919f7b3504e9cd
Reviewed-on: https://chromium-review.googlesource.com/c/1404334
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621899}
[modify] https://crrev.com/46cfb416b356c286fbed34315494fe260bf3283f/components/viz/common/gpu/vulkan_in_process_context_provider.cc
[modify] https://crrev.com/46cfb416b356c286fbed34315494fe260bf3283f/gpu/command_buffer/service/raster_decoder_context_state.cc

Status: Fixed (was: Started)

Sign in to add a comment