From 3d49b2fe65f6843052d4172e3f5207f779819578 Mon Sep 17 00:00:00 2001
From: Allan MacKinnon <allanmac@google.com>
Date: Tue, 30 Apr 2019 21:01:13 +0000
Subject: [PATCH] [graphics][compute] Add graphics/lib/compute/common and
 common/vk to build

Test: fx build src/graphics/lib/compute/common

Change-Id: I6e49f2a9dec89515e00dd863d988bb26af207a86
---
 src/BUILD.gn                                |  1 +
 src/graphics/BUILD.gn                       |  9 ++++++
 src/graphics/lib/BUILD.gn                   |  9 ++++++
 src/graphics/lib/compute/BUILD.gn           | 10 ++++++
 src/graphics/lib/compute/common/BUILD.gn    | 15 +++++++++
 src/graphics/lib/compute/common/vk/BUILD.gn | 35 +++++++++++++++++++++
 6 files changed, 79 insertions(+)
 create mode 100644 src/graphics/BUILD.gn
 create mode 100644 src/graphics/lib/BUILD.gn
 create mode 100644 src/graphics/lib/compute/BUILD.gn
 create mode 100644 src/graphics/lib/compute/common/BUILD.gn
 create mode 100644 src/graphics/lib/compute/common/vk/BUILD.gn

diff --git a/src/BUILD.gn b/src/BUILD.gn
index f134d7f332c..8ef3c9e28be 100644
--- a/src/BUILD.gn
+++ b/src/BUILD.gn
@@ -10,6 +10,7 @@ group("src") {
     "connectivity",
     "developer",
     "identity",
+    "graphics",
     "ledger",
     "lib",
     "media",
diff --git a/src/graphics/BUILD.gn b/src/graphics/BUILD.gn
new file mode 100644
index 00000000000..f7fe67f9aa9
--- /dev/null
+++ b/src/graphics/BUILD.gn
@@ -0,0 +1,9 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+group("graphics") {
+  deps = [
+    "lib"
+  ]
+}
diff --git a/src/graphics/lib/BUILD.gn b/src/graphics/lib/BUILD.gn
new file mode 100644
index 00000000000..aecf9839092
--- /dev/null
+++ b/src/graphics/lib/BUILD.gn
@@ -0,0 +1,9 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+group("lib") {
+  deps = [
+    "compute"
+  ]
+}
diff --git a/src/graphics/lib/compute/BUILD.gn b/src/graphics/lib/compute/BUILD.gn
new file mode 100644
index 00000000000..94f373488ea
--- /dev/null
+++ b/src/graphics/lib/compute/BUILD.gn
@@ -0,0 +1,10 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+group("compute") {
+  deps = [
+    "common",
+    "common/vk",
+  ]
+}
diff --git a/src/graphics/lib/compute/common/BUILD.gn b/src/graphics/lib/compute/common/BUILD.gn
new file mode 100644
index 00000000000..6b64745bb69
--- /dev/null
+++ b/src/graphics/lib/compute/common/BUILD.gn
@@ -0,0 +1,15 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("common") {
+  public = [
+    "macros.h",
+    "util.h"
+  ]
+  sources = [
+    "macros.h",
+    "util.h",
+    "util.c"
+  ]
+}
diff --git a/src/graphics/lib/compute/common/vk/BUILD.gn b/src/graphics/lib/compute/common/vk/BUILD.gn
new file mode 100644
index 00000000000..f91a4a74cca
--- /dev/null
+++ b/src/graphics/lib/compute/common/vk/BUILD.gn
@@ -0,0 +1,35 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("vk") {
+  public = [
+    "vk_assert.h",
+    "vk_barrier.h",
+    "vk_cache.h",
+    "vk_debug.h",
+    "vk_find_mem_type_idx.h",
+    "vk_shader_info_amd.h",
+  ]
+  sources = [
+    "vk_assert.c",
+    "vk_assert.h",
+    "vk_barrier.c",
+    "vk_barrier.h",
+    "vk_cache.c",
+    "vk_cache.h",
+    "vk_debug.c",
+    "vk_debug.h",
+    "vk_find_mem_type_idx.c",
+    "vk_find_mem_type_idx.h",
+    "vk_shader_info_amd.c",
+    "vk_shader_info_amd.h",
+  ]
+  include_dirs = [
+    "//src/graphics/lib/compute"
+  ]
+  deps = [
+    "//src/graphics/lib/compute/common",
+    "//third_party/vulkan_loader_and_validation_layers:vulkan"
+  ]
+}
-- 
GitLab