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

Side by Side Diff: gpu/vulkan/BUILD.gn

Issue 1776453003: Added initial implementation of Vulkan Render Passes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_vulkan
Patch Set: Fix SwapBuffers() present layout, test in unittests instead of injections 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/ui.gni") 5 import("//build/config/ui.gni")
6 import("//testing/test.gni")
6 7
7 config("vulkan_config") { 8 if (enable_vulkan) {
8 defines = [ "ENABLE_VULKAN" ] 9 config("vulkan_config") {
9 if (use_x11) { 10 defines = [ "ENABLE_VULKAN" ]
10 defines += [ "VK_USE_PLATFORM_XLIB_KHR" ] 11 if (use_x11) {
12 defines += [ "VK_USE_PLATFORM_XLIB_KHR" ]
13 }
11 } 14 }
12 }
13 15
14 component("vulkan") { 16 component("vulkan") {
15 output_name = "vulkan_wrapper" 17 output_name = "vulkan_wrapper"
16 18
17 if (is_linux && enable_vulkan) { 19 if (is_linux) {
18 assert(use_x11, "Vulkan only support x11 at this point.") 20 assert(use_x11, "Vulkan only support x11 at this point.")
21 sources = [
22 "vulkan_command_buffer.cc",
23 "vulkan_command_buffer.h",
24 "vulkan_command_pool.cc",
25 "vulkan_command_pool.h",
26 "vulkan_export.h",
27 "vulkan_implementation.cc",
28 "vulkan_implementation.h",
29 "vulkan_surface.cc",
30 "vulkan_surface.h",
31 "vulkan_swap_chain.cc",
32 "vulkan_swap_chain.h",
33 ]
34
35 configs += [ "//build/config:precompiled_headers" ]
36 defines = [ "VULKAN_IMPLEMENTATION" ]
37
38 all_dependent_configs = [ ":vulkan_config" ]
39 libs = [ "vulkan" ]
40
41 include_dirs = [ "/usr/include" ]
42 if (target_cpu == "x64") {
43 lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ]
44 } else {
45 assert(false, "Unsupported vulkan target: " + target_cpu)
46 }
47
48 deps = [
49 "//base",
50 "//ui/base",
51 "//ui/gfx",
52 ]
53
54 if (use_x11) {
55 deps += [ "//ui/gfx/x" ]
56 configs += [ "//build/config/linux:x11" ]
57 }
58 }
59 }
60
61 test("vulkan_tests") {
19 sources = [ 62 sources = [
20 "vulkan_export.h", 63 "tests/native_window.h",
21 "vulkan_implementation.cc", 64 "tests/vulkan_test.cc",
22 "vulkan_implementation.h", 65 "tests/vulkan_tests_main.cc",
23 "vulkan_surface.cc",
24 "vulkan_surface.h",
25 ] 66 ]
26 67
27 configs += [ "//build/config:precompiled_headers" ]
28 defines = [ "VULKAN_IMPLEMENTATION" ]
29
30 all_dependent_configs = [ ":vulkan_config" ]
31 libs = [ "vulkan" ]
32
33 include_dirs = [ "/usr/include" ] 68 include_dirs = [ "/usr/include" ]
34 if (target_cpu == "x64") { 69 if (target_cpu == "x64") {
35 lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ] 70 lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ]
36 } else { 71 } else {
37 assert(false, "Unsupported vulkan target: " + target_cpu) 72 assert(false, "Unsupported vulkan target: " + target_cpu)
38 } 73 }
39 74
40 deps = [ 75 deps = [
41 "//base", 76 ":vulkan",
42 "//ui/base", 77 "//base/test:test_support",
43 "//ui/gfx", 78 "//testing/gmock",
79 "//testing/gtest",
44 ] 80 ]
45 81
46 if (use_x11) { 82 if (use_x11) {
83 sources += [ "tests/native_window_x11.cc" ]
47 deps += [ "//ui/gfx/x" ] 84 deps += [ "//ui/gfx/x" ]
48 configs += [ "//build/config/linux:x11" ] 85 configs += [ "//build/config/linux:x11" ]
49 } 86 }
50 } 87 }
51 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698