From ceea97fc05fe66b471f521628eacf83bbd1bb554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 31 Jan 2025 23:04:46 +0100 Subject: [PATCH] Betsy: Consolidate documentation in module folder and cleanup SCsub Also remove unused `UavCrossPlatform_piece_all.glsl`. --- COPYRIGHT.txt | 14 +++++++++----- .../betsy/LICENSE.Betsy.md | 0 modules/betsy/SCsub | 19 ++++--------------- modules/betsy/UavCrossPlatform_piece_all.glsl | 16 ---------------- modules/betsy/alpha_stitch.glsl | 1 - modules/betsy/bc1.glsl | 1 - modules/betsy/bc4.glsl | 1 - modules/betsy/bc6h.glsl | 1 - thirdparty/README.md | 12 ------------ 9 files changed, 13 insertions(+), 52 deletions(-) rename thirdparty/betsy/LICENSE.md => modules/betsy/LICENSE.Betsy.md (100%) delete mode 100644 modules/betsy/UavCrossPlatform_piece_all.glsl diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 34e95d2f413..a7a09a553ba 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -61,6 +61,15 @@ Copyright: 2011, Ole Kniemeyer, MAXON, www.maxon.net 2007-2014, Juan Linietsky, Ariel Manzur License: Expat and Zlib +Files: modules/betsy/alpha_stitch.glsl + modules/betsy/bc1.glsl + modules/betsy/bc4.glsl + modules/betsy/bc6h.glsl + modules/betsy/CrossPlatformSettings_piece_all.glsl +Comment: Betsy +Copyright: 2020-2022, Matias N. Goldberg +License: Expat + Files: modules/godot_physics_2d/godot_joints_2d.cpp Comment: Chipmunk2D Joint Constraints Copyright: 2007, Scott Lembcke @@ -179,11 +188,6 @@ Comment: Basis Universal Copyright: 2019-2024, Binomial LLC. License: Apache-2.0 -Files: thirdparty/betsy/* -Comment: Betsy -Copyright: 2020-2022, Matias N. Goldberg -License: Expat - Files: thirdparty/brotli/* Comment: Brotli Copyright: 2009, 2010, 2013-2016 by the Brotli Authors. diff --git a/thirdparty/betsy/LICENSE.md b/modules/betsy/LICENSE.Betsy.md similarity index 100% rename from thirdparty/betsy/LICENSE.md rename to modules/betsy/LICENSE.Betsy.md diff --git a/modules/betsy/SCsub b/modules/betsy/SCsub index 9ed5fc4ee80..7bd0b1bb3d8 100644 --- a/modules/betsy/SCsub +++ b/modules/betsy/SCsub @@ -5,25 +5,14 @@ Import("env") Import("env_modules") env_betsy = env_modules.Clone() + +# Betsy shaders, originally from https://github.com/darksylinc/betsy env_betsy.GLSL_HEADER("bc6h.glsl") env_betsy.GLSL_HEADER("bc1.glsl") env_betsy.GLSL_HEADER("bc4.glsl") env_betsy.GLSL_HEADER("alpha_stitch.glsl") + env_betsy.Depends(Glob("*.glsl.gen.h"), ["#glsl_builders.py"]) -# Thirdparty source files -thirdparty_obj = [] -thirdparty_dir = "#thirdparty/betsy/" -env_betsy.Prepend(CPPPATH=[thirdparty_dir]) - -env_thirdparty = env_betsy.Clone() -env_thirdparty.disable_warnings() -env.modules_sources += thirdparty_obj - # Godot source files -module_obj = [] -env_betsy.add_source_files(module_obj, "*.cpp") -env.modules_sources += module_obj - -# Needed to force rebuilding the module files when the thirdparty library is updated. -env.Depends(module_obj, thirdparty_obj) +env_betsy.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/betsy/UavCrossPlatform_piece_all.glsl b/modules/betsy/UavCrossPlatform_piece_all.glsl deleted file mode 100644 index 5f074137af9..00000000000 --- a/modules/betsy/UavCrossPlatform_piece_all.glsl +++ /dev/null @@ -1,16 +0,0 @@ -#define OGRE_imageLoad2D(inImage, iuv) imageLoad(inImage, int2(iuv)) -#define OGRE_imageLoad2DArray(inImage, iuvw) imageLoad(inImage, int3(iuvw)) - -#define OGRE_imageWrite2D1(outImage, iuv, value) imageStore(outImage, int2(iuv), float4(value, 0, 0, 0)) -#define OGRE_imageWrite2D2(outImage, iuv, value) imageStore(outImage, int2(iuv), float4(value, 0, 0)) -#define OGRE_imageWrite2D4(outImage, iuv, value) imageStore(outImage, int2(iuv), value) - -#define OGRE_imageLoad3D(inImage, iuv) imageLoad(inImage, int3(iuv)) - -#define OGRE_imageWrite3D1(outImage, iuv, value) imageStore(outImage, int3(iuv), value) -#define OGRE_imageWrite3D4(outImage, iuv, value) imageStore(outImage, int3(iuv), value) - -#define OGRE_imageWrite2DArray1(outImage, iuvw, value) imageStore(outImage, int3(iuvw), value) -#define OGRE_imageWrite2DArray4(outImage, iuvw, value) imageStore(outImage, int3(iuvw), value) - -//#define sharedOnlyBarrier memoryBarrierShared();barrier(); diff --git a/modules/betsy/alpha_stitch.glsl b/modules/betsy/alpha_stitch.glsl index 4a9ee58d97b..4245b6419c7 100644 --- a/modules/betsy/alpha_stitch.glsl +++ b/modules/betsy/alpha_stitch.glsl @@ -6,7 +6,6 @@ #version 450 #include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" layout(local_size_x = 8, // local_size_y = 8, // diff --git a/modules/betsy/bc1.glsl b/modules/betsy/bc1.glsl index 96877553a5d..6b6346aacf3 100644 --- a/modules/betsy/bc1.glsl +++ b/modules/betsy/bc1.glsl @@ -7,7 +7,6 @@ dithered = "#define BC1_DITHER"; #version 450 #include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" #define FLT_MAX 340282346638528859811704183484516925440.0f diff --git a/modules/betsy/bc4.glsl b/modules/betsy/bc4.glsl index 7a68b92b851..90151f84ebf 100644 --- a/modules/betsy/bc4.glsl +++ b/modules/betsy/bc4.glsl @@ -7,7 +7,6 @@ signed = "#define SNORM"; #version 450 #include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" #VERSION_DEFINES diff --git a/modules/betsy/bc6h.glsl b/modules/betsy/bc6h.glsl index 37e7591aea2..73540876aa8 100644 --- a/modules/betsy/bc6h.glsl +++ b/modules/betsy/bc6h.glsl @@ -7,7 +7,6 @@ unsigned = "#define QUALITY"; // The "Quality" preset causes artifacting on sign #version 450 #include "CrossPlatformSettings_piece_all.glsl" -#include "UavCrossPlatform_piece_all.glsl" #VERSION_DEFINES diff --git a/thirdparty/README.md b/thirdparty/README.md index 5e264ae4dee..5c2ea489e2c 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -71,18 +71,6 @@ Files extracted from upstream source: Applied upstream PR https://github.com/BinomialLLC/basis_universal/pull/344 to fix build with our own copy of zstd (patch in `patches`). -## betsy - -- Upstream: https://github.com/darksylinc/betsy -- Version: git (cc723dcae9a6783ae572f64d12a90d60ef8d631a, 2022) -- License: MIT - -Files extracted from upstream source: - -- `bc6h.glsl`, `bc1.glsl`, `bc4.glsl`, `CrossPlatformSettings_piece_all.glsl` and `UavCrossPlatform_piece_all.glsl`. -- `LICENSE.md` - - ## brotli - Upstream: https://github.com/google/brotli