panfrost: Move pandecode into lib/
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
diff --git a/src/panfrost/bifrost/test/bi_submit.c b/src/panfrost/bifrost/test/bi_submit.c
index 38539c0..f11fea3 100644
--- a/src/panfrost/bifrost/test/bi_submit.c
+++ b/src/panfrost/bifrost/test/bi_submit.c
@@ -27,7 +27,7 @@
#include "bit.h"
#include "panfrost/lib/decode.h"
#include "drm-uapi/panfrost_drm.h"
-#include "panfrost/encoder/pan_encoder.h"
+#include "panfrost/lib/pan_encoder.h"
/* Standalone compiler tests submitting jobs directly to the hardware. Uses the
* `bit` prefix for `BIfrost Tests` and because bit sounds wicked cool. */
diff --git a/src/panfrost/bifrost/test/bit.h b/src/panfrost/bifrost/test/bit.h
index 50bbf00..74d988a 100644
--- a/src/panfrost/bifrost/test/bit.h
+++ b/src/panfrost/bifrost/test/bit.h
@@ -28,8 +28,8 @@
#define __BIFROST_TEST_H
#include "panfrost/include/panfrost-job.h"
-#include "panfrost/encoder/pan_device.h"
-#include "panfrost/encoder/pan_bo.h"
+#include "panfrost/lib/pan_device.h"
+#include "panfrost/lib/pan_bo.h"
#include "bifrost_compile.h"
#include "bifrost/compiler.h"
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/lib/decode.c
similarity index 100%
rename from src/panfrost/pandecode/decode.c
rename to src/panfrost/lib/decode.c
diff --git a/src/panfrost/pandecode/decode.h b/src/panfrost/lib/decode.h
similarity index 98%
rename from src/panfrost/pandecode/decode.h
rename to src/panfrost/lib/decode.h
index 61345a2..2b9bcb2 100644
--- a/src/panfrost/pandecode/decode.h
+++ b/src/panfrost/lib/decode.h
@@ -26,7 +26,7 @@
#ifndef __PAN_DECODE_H__
#define __PAN_DECODE_H__
-#include "public.h"
+#include "wrap.h"
#include "util/list.h"
extern FILE *pandecode_dump_stream;
diff --git a/src/panfrost/pandecode/common.c b/src/panfrost/lib/decode_common.c
similarity index 100%
rename from src/panfrost/pandecode/common.c
rename to src/panfrost/lib/decode_common.c
diff --git a/src/panfrost/lib/meson.build b/src/panfrost/lib/meson.build
index a6b39ba..f25b18f 100644
--- a/src/panfrost/lib/meson.build
+++ b/src/panfrost/lib/meson.build
@@ -37,6 +37,11 @@
'pan_props.c',
)
+libpanfrost_decode_files = files(
+ 'decode_common.c',
+ 'decode.c',
+)
+
libpanfrost_lib = static_library(
'panfrost_lib',
[libpanfrost_lib_files],
@@ -46,3 +51,12 @@
dependencies: [dep_libdrm, idep_nir],
build_by_default : false,
)
+
+libpanfrost_decode = static_library(
+ 'panfrost_decode',
+ [libpanfrost_decode_files],
+ include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost],
+ c_args : [no_override_init_args],
+ gnu_symbol_visibility : 'hidden',
+ build_by_default : false,
+)
diff --git a/src/panfrost/pandecode/public.h b/src/panfrost/lib/wrap.h
similarity index 100%
rename from src/panfrost/pandecode/public.h
rename to src/panfrost/lib/wrap.h
diff --git a/src/panfrost/meson.build b/src/panfrost/meson.build
index 8615bca..2d257bc 100644
--- a/src/panfrost/meson.build
+++ b/src/panfrost/meson.build
@@ -31,7 +31,6 @@
subdir('util')
subdir('midgard')
subdir('bifrost')
-subdir('pandecode')
subdir('lib')
files_bifrost = files(
diff --git a/src/panfrost/pandecode/meson.build b/src/panfrost/pandecode/meson.build
deleted file mode 100644
index e4bc6aa..0000000
--- a/src/panfrost/pandecode/meson.build
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright © 2018 Rob Clark
-# Copyright © 2019 Collabora
-
-# 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.
-
-libpanfrost_decode_files = files(
- 'common.c',
- 'decode.c',
-)
-
-libpanfrost_decode = static_library(
- 'panfrost_decode',
- [libpanfrost_decode_files],
- include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost],
- c_args : [no_override_init_args],
- gnu_symbol_visibility : 'hidden',
- build_by_default : false,
-)