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

Unified Diff: gpu/vulkan/BUILD.gn

Issue 1726303002: Added initial Vulkan build files as well as a basic implementation file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed hack to bypass loader Created 4 years, 9 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
Index: gpu/vulkan/BUILD.gn
diff --git a/gpu/vulkan/BUILD.gn b/gpu/vulkan/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..274071fbf87bd6c4c63a0f50fd7cc84d3204c744
--- /dev/null
+++ b/gpu/vulkan/BUILD.gn
@@ -0,0 +1,51 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/ui.gni")
+
+config("vulkan_config") {
+ defines = [ "ENABLE_VULKAN" ]
+ if (use_x11) {
+ defines += [ "VK_USE_PLATFORM_XLIB_KHR" ]
+ }
+}
+
+component("vulkan") {
+ output_name = "vulkan_wrapper"
+
+ if (is_linux && enable_vulkan) {
+ assert(use_x11, "Vulkan only support x11 at this point.")
+ sources = [
+ "vulkan_export.h",
+ "vulkan_implementation.cc",
+ "vulkan_implementation.h",
+ "vulkan_surface.cc",
+ "vulkan_surface.h",
+ ]
+
+ configs += [ "//build/config:precompiled_headers" ]
Nico 2016/03/09 02:43:33 (nit: atm this target is so small that using this
+ defines = [ "VULKAN_IMPLEMENTATION" ]
+
+ all_dependent_configs = [ ":vulkan_config" ]
+ libs = [ "vulkan" ]
+
+ include_dirs = [ "/usr/include" ]
+ if (target_cpu == "x64") {
+ lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ]
+ } else {
+ assert(false, "Unsupported vulkan target: " + target_cpu)
+ }
+
+ deps = [
+ "//base",
+ "//ui/base",
+ "//ui/gfx",
+ ]
+
+ if (use_x11) {
+ deps += [ "//ui/gfx/x" ]
+ configs += [ "//build/config/linux:x11" ]
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698