nouveau: Add stubs for an image layout library called NIL
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:11:49 +0000 (20:11 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:54 +0000 (21:31 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/meson.build
src/nouveau/nil/meson.build [new file with mode: 0644]
src/nouveau/nil/nil.c [new file with mode: 0644]
src/nouveau/nil/nil.h [new file with mode: 0644]
src/nouveau/vulkan/meson.build

index bc0e42f..29a18fc 100644 (file)
@@ -27,5 +27,6 @@ endif
 
 subdir('codegen')
 if with_nouveau_vk
+  subdir('nil')
   subdir('vulkan')
 endif
diff --git a/src/nouveau/nil/meson.build b/src/nouveau/nil/meson.build
new file mode 100644 (file)
index 0000000..d2231a0
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright © 2022 Collabora Ltd
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+libnil_files = files(
+  'nil.c',
+  'nil.h',
+)
+
+_libnil = static_library(
+  'nil',
+  libnil_files,
+  include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium],
+  dependencies : idep_mesautil,
+  c_args : [no_override_init_args],
+  gnu_symbol_visibility : 'hidden',
+)
+
+idep_nil = declare_dependency(
+  include_directories : include_directories('.'),
+  link_with : _libnil,
+)
diff --git a/src/nouveau/nil/nil.c b/src/nouveau/nil/nil.c
new file mode 100644 (file)
index 0000000..8cf6c8d
--- /dev/null
@@ -0,0 +1 @@
+#include "nil.h"
diff --git a/src/nouveau/nil/nil.h b/src/nouveau/nil/nil.h
new file mode 100644 (file)
index 0000000..5f577be
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef NIL_H
+#define NIL_H
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#include "util/macros.h"
+#include "util/format/u_format.h"
+
+#endif /* NIL_H */
index d3bece3..8adc407 100644 (file)
@@ -77,6 +77,7 @@ nvk_entrypoints = custom_target(
 
 nvk_deps = [
   dep_libdrm,
+  idep_nil,
   idep_nir,
   idep_nouveau_ws,
   idep_nvidia_headers,