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

Unified 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: Adding logging/macros headers 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
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | gpu/vulkan/tests/native_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/BUILD.gn
diff --git a/gpu/vulkan/BUILD.gn b/gpu/vulkan/BUILD.gn
index 274071fbf87bd6c4c63a0f50fd7cc84d3204c744..e566af981db0b8d05fa7f9b3e7b3fde42960d0e8 100644
--- a/gpu/vulkan/BUILD.gn
+++ b/gpu/vulkan/BUILD.gn
@@ -3,32 +3,64 @@
# found in the LICENSE file.
import("//build/config/ui.gni")
+import("//testing/test.gni")
-config("vulkan_config") {
- defines = [ "ENABLE_VULKAN" ]
- if (use_x11) {
- defines += [ "VK_USE_PLATFORM_XLIB_KHR" ]
- }
-}
+if (enable_vulkan) {
+ component("vulkan") {
+ output_name = "vulkan_wrapper"
-component("vulkan") {
- output_name = "vulkan_wrapper"
+ if (is_linux) {
+ assert(use_x11, "Vulkan only support x11 at this point.")
+ sources = [
+ "vulkan_command_buffer.cc",
+ "vulkan_command_buffer.h",
+ "vulkan_command_pool.cc",
+ "vulkan_command_pool.h",
+ "vulkan_export.h",
+ "vulkan_image_view.cc",
+ "vulkan_image_view.h",
+ "vulkan_implementation.cc",
+ "vulkan_implementation.h",
+ "vulkan_platform.h",
+ "vulkan_render_pass.cc",
+ "vulkan_render_pass.h",
+ "vulkan_surface.cc",
+ "vulkan_surface.h",
+ "vulkan_swap_chain.cc",
+ "vulkan_swap_chain.h",
+ ]
- 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" ]
+ defines = [ "VULKAN_IMPLEMENTATION" ]
+
+ 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)
+ }
- configs += [ "//build/config:precompiled_headers" ]
- defines = [ "VULKAN_IMPLEMENTATION" ]
+ deps = [
+ "//base",
+ "//ui/base",
+ "//ui/gfx",
+ ]
- all_dependent_configs = [ ":vulkan_config" ]
- libs = [ "vulkan" ]
+ if (use_x11) {
+ deps += [ "//ui/gfx/x" ]
+ configs += [ "//build/config/linux:x11" ]
+ }
+ }
+ }
+
+ test("vulkan_tests") {
+ sources = [
+ "tests/native_window.h",
+ "tests/vulkan_test.cc",
+ "tests/vulkan_tests_main.cc",
+ ]
include_dirs = [ "/usr/include" ]
if (target_cpu == "x64") {
@@ -38,12 +70,14 @@ component("vulkan") {
}
deps = [
- "//base",
- "//ui/base",
- "//ui/gfx",
+ ":vulkan",
+ "//base/test:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
]
if (use_x11) {
+ sources += [ "tests/native_window_x11.cc" ]
deps += [ "//ui/gfx/x" ]
configs += [ "//build/config/linux:x11" ]
}
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | gpu/vulkan/tests/native_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698