New issue
Advanced search Search tips

Issue 848104 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 848177
issue 848100
issue 848101



Sign in to add a comment

Use function pointers in Vulkan

Project Member Reported by cblume@chromium.org, May 31 2018

Issue description

Right now we statically link to the Vulkan library. And we call into that library.

This requires a developer to have the Vulkan SDK installed in order to build with Vulkan support. We want everyone to be able to build with Vulkan support so they do not make a change that breaks Vulkan support. But we do not require developers to have the Vulkan SDK installed.

So instead of statically linking to the Vulkan library, we want to dynamically link to it. This means calling into function pointers instead of calling into library functions. Those function pointers can be populated at run-time if the user's system supports Vulkan.
 

Comment 1 by cblume@chromium.org, May 31 2018

Blocking: 848177
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 8 2018

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

commit b9adeda820d9105c4a8f54bd976327862421a492
Author: Chris Blume <cblume@chromium.org>
Date: Fri Jun 08 00:23:53 2018

Use function pointers in Vulkan

Currently, we statically link to the Vulkan library. We want to
dynamically link it and not require a developer to have the Vulkan SDK
installed.

This requires using function pointers instead of directly calling the
library's functions.

This CL adds function pointers, dynamically links to the Vulkan library,
and updates all existing function calls to function pointer calls.

BUG= 848104 

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I68a5030b5f8bfe6a04b1e60c2fbdacd69dcd3ef3
Reviewed-on: https://chromium-review.googlesource.com/1080237
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565482}
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/base/threading/thread_restrictions.h
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/components/viz/common/gpu/vulkan_in_process_context_provider.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/BUILD.gn
[add] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/generate_bindings.py
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_command_buffer.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_command_pool.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_descriptor_layout.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_descriptor_pool.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_descriptor_set.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_device_queue.cc
[add] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_function_pointers.cc
[add] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_function_pointers.h
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_image_view.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_implementation_android.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_instance.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_render_pass.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_sampler.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_shader_module.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_surface.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/vulkan_swap_chain.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/gpu/vulkan/x/vulkan_implementation_x11.cc
[modify] https://crrev.com/b9adeda820d9105c4a8f54bd976327862421a492/third_party/vulkan/BUILD.gn

Status: Fixed (was: Assigned)

Sign in to add a comment