From beea3548cefc2c72961ff786110eb89c6553b367 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sat, 5 Nov 2022 17:18:46 +0800 Subject: [PATCH] util: Move texcompress template files into util/format Because these files are accessed in util/format/u_format_*.c To make sure util are self contained we need move these files Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Reviewed-by: Adam Jackson Part-of: --- src/mesa/main/tests/disable_windows_include.c | 2 -- src/mesa/main/texcompress_bptc.c | 2 +- src/mesa/main/texcompress_etc.c | 2 +- src/mesa/main/texcompress_s3tc.c | 2 +- src/mesa/meson.build | 1 - src/{mesa/main => util/format}/texcompress_bptc_tmp.h | 0 src/{mesa/main => util/format}/texcompress_etc_tmp.h | 0 src/{mesa/main => util/format}/texcompress_s3tc_tmp.h | 0 src/util/format/u_format_bptc.c | 2 +- src/util/format/u_format_etc.c | 2 +- src/util/format/u_format_s3tc.c | 2 +- 11 files changed, 6 insertions(+), 9 deletions(-) rename src/{mesa/main => util/format}/texcompress_bptc_tmp.h (100%) rename src/{mesa/main => util/format}/texcompress_etc_tmp.h (100%) rename src/{mesa/main => util/format}/texcompress_s3tc_tmp.h (100%) diff --git a/src/mesa/main/tests/disable_windows_include.c b/src/mesa/main/tests/disable_windows_include.c index 0e5d3bd248d..9f40c7eac5e 100644 --- a/src/mesa/main/tests/disable_windows_include.c +++ b/src/mesa/main/tests/disable_windows_include.c @@ -113,13 +113,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/mesa/main/texcompress_bptc.c b/src/mesa/main/texcompress_bptc.c index d70e35ffedd..09e2a64f763 100644 --- a/src/mesa/main/texcompress_bptc.c +++ b/src/mesa/main/texcompress_bptc.c @@ -29,7 +29,7 @@ #include #include "texcompress.h" #include "texcompress_bptc.h" -#include "texcompress_bptc_tmp.h" +#include "util/format/texcompress_bptc_tmp.h" #include "texstore.h" #include "image.h" #include "mtypes.h" diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c index f14b1670728..607686ef6dd 100644 --- a/src/mesa/main/texcompress_etc.c +++ b/src/mesa/main/texcompress_etc.c @@ -101,7 +101,7 @@ static const int etc2_modifier_tables_non_opaque[8][4] = { /* define etc1_parse_block and etc. */ #define UINT8_TYPE GLubyte #define TAG(x) x -#include "texcompress_etc_tmp.h" +#include "util/format/texcompress_etc_tmp.h" #undef TAG #undef UINT8_TYPE diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c index f862c7e9475..585fa8b9062 100644 --- a/src/mesa/main/texcompress_s3tc.c +++ b/src/mesa/main/texcompress_s3tc.c @@ -36,7 +36,7 @@ #include "mtypes.h" #include "texcompress.h" #include "texcompress_s3tc.h" -#include "texcompress_s3tc_tmp.h" +#include "util/format/texcompress_s3tc_tmp.h" #include "texstore.h" #include "format_unpack.h" #include "util/format_srgb.h" diff --git a/src/mesa/meson.build b/src/mesa/meson.build index 6bb41f47f90..dc48401da7b 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -213,7 +213,6 @@ files_libmesa = files( 'main/texcompress_cpal.h', 'main/texcompress_etc.c', 'main/texcompress_etc.h', - 'main/texcompress_etc_tmp.h', 'main/texcompress_fxt1.c', 'main/texcompress_fxt1.h', 'main/texcompress_rgtc.c', diff --git a/src/mesa/main/texcompress_bptc_tmp.h b/src/util/format/texcompress_bptc_tmp.h similarity index 100% rename from src/mesa/main/texcompress_bptc_tmp.h rename to src/util/format/texcompress_bptc_tmp.h diff --git a/src/mesa/main/texcompress_etc_tmp.h b/src/util/format/texcompress_etc_tmp.h similarity index 100% rename from src/mesa/main/texcompress_etc_tmp.h rename to src/util/format/texcompress_etc_tmp.h diff --git a/src/mesa/main/texcompress_s3tc_tmp.h b/src/util/format/texcompress_s3tc_tmp.h similarity index 100% rename from src/mesa/main/texcompress_s3tc_tmp.h rename to src/util/format/texcompress_s3tc_tmp.h diff --git a/src/util/format/u_format_bptc.c b/src/util/format/u_format_bptc.c index ef25951527b..b4605e13fe3 100644 --- a/src/util/format/u_format_bptc.c +++ b/src/util/format/u_format_bptc.c @@ -29,7 +29,7 @@ #include "util/format_srgb.h" #include "util/u_math.h" -#include "../../mesa/main/texcompress_bptc_tmp.h" +#include "util/format/texcompress_bptc_tmp.h" void util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, diff --git a/src/util/format/u_format_etc.c b/src/util/format/u_format_etc.c index 3ad695518ef..2b5d97f32fa 100644 --- a/src/util/format/u_format_etc.c +++ b/src/util/format/u_format_etc.c @@ -6,7 +6,7 @@ /* define etc1_parse_block and etc. */ #define UINT8_TYPE uint8_t #define TAG(x) x -#include "../../mesa/main/texcompress_etc_tmp.h" +#include "util/format/texcompress_etc_tmp.h" #undef TAG #undef UINT8_TYPE diff --git a/src/util/format/u_format_s3tc.c b/src/util/format/u_format_s3tc.c index ab7fac67cb4..f4c4cff47fa 100644 --- a/src/util/format/u_format_s3tc.c +++ b/src/util/format/u_format_s3tc.c @@ -27,8 +27,8 @@ #include "util/format/u_format_s3tc.h" #include "util/format_srgb.h" #include "util/u_math.h" -#include "../../mesa/main/texcompress_s3tc_tmp.h" +#include "util/format/texcompress_s3tc_tmp.h" util_format_dxtn_fetch_t util_format_dxt1_rgb_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgb_dxt1; util_format_dxtn_fetch_t util_format_dxt1_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt1;