瀏覽代碼

Betsy: Consolidate documentation in module folder and cleanup SCsub

Also remove unused `UavCrossPlatform_piece_all.glsl`.
Rémi Verschelde 5 月之前
父節點
當前提交
ceea97fc05

+ 9 - 5
COPYRIGHT.txt

@@ -61,6 +61,15 @@ Copyright: 2011, Ole Kniemeyer, MAXON, www.maxon.net
  2007-2014, Juan Linietsky, Ariel Manzur
  2007-2014, Juan Linietsky, Ariel Manzur
 License: Expat and Zlib
 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
 Files: modules/godot_physics_2d/godot_joints_2d.cpp
 Comment: Chipmunk2D Joint Constraints
 Comment: Chipmunk2D Joint Constraints
 Copyright: 2007, Scott Lembcke
 Copyright: 2007, Scott Lembcke
@@ -179,11 +188,6 @@ Comment: Basis Universal
 Copyright: 2019-2024, Binomial LLC.
 Copyright: 2019-2024, Binomial LLC.
 License: Apache-2.0
 License: Apache-2.0
 
 
-Files: thirdparty/betsy/*
-Comment: Betsy
-Copyright: 2020-2022, Matias N. Goldberg
-License: Expat
-
 Files: thirdparty/brotli/*
 Files: thirdparty/brotli/*
 Comment: Brotli
 Comment: Brotli
 Copyright: 2009, 2010, 2013-2016 by the Brotli Authors.
 Copyright: 2009, 2010, 2013-2016 by the Brotli Authors.

+ 0 - 0
thirdparty/betsy/LICENSE.md → modules/betsy/LICENSE.Betsy.md


+ 4 - 15
modules/betsy/SCsub

@@ -5,25 +5,14 @@ Import("env")
 Import("env_modules")
 Import("env_modules")
 
 
 env_betsy = env_modules.Clone()
 env_betsy = env_modules.Clone()
+
+# Betsy shaders, originally from https://github.com/darksylinc/betsy
 env_betsy.GLSL_HEADER("bc6h.glsl")
 env_betsy.GLSL_HEADER("bc6h.glsl")
 env_betsy.GLSL_HEADER("bc1.glsl")
 env_betsy.GLSL_HEADER("bc1.glsl")
 env_betsy.GLSL_HEADER("bc4.glsl")
 env_betsy.GLSL_HEADER("bc4.glsl")
 env_betsy.GLSL_HEADER("alpha_stitch.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
+env_betsy.Depends(Glob("*.glsl.gen.h"), ["#glsl_builders.py"])
 
 
 # Godot source files
 # 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")

+ 0 - 16
modules/betsy/UavCrossPlatform_piece_all.glsl

@@ -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();

+ 0 - 1
modules/betsy/alpha_stitch.glsl

@@ -6,7 +6,6 @@
 #version 450
 #version 450
 
 
 #include "CrossPlatformSettings_piece_all.glsl"
 #include "CrossPlatformSettings_piece_all.glsl"
-#include "UavCrossPlatform_piece_all.glsl"
 
 
 layout(local_size_x = 8, //
 layout(local_size_x = 8, //
 		local_size_y = 8, //
 		local_size_y = 8, //

+ 0 - 1
modules/betsy/bc1.glsl

@@ -7,7 +7,6 @@ dithered = "#define BC1_DITHER";
 #version 450
 #version 450
 
 
 #include "CrossPlatformSettings_piece_all.glsl"
 #include "CrossPlatformSettings_piece_all.glsl"
-#include "UavCrossPlatform_piece_all.glsl"
 
 
 #define FLT_MAX 340282346638528859811704183484516925440.0f
 #define FLT_MAX 340282346638528859811704183484516925440.0f
 
 

+ 0 - 1
modules/betsy/bc4.glsl

@@ -7,7 +7,6 @@ signed = "#define SNORM";
 #version 450
 #version 450
 
 
 #include "CrossPlatformSettings_piece_all.glsl"
 #include "CrossPlatformSettings_piece_all.glsl"
-#include "UavCrossPlatform_piece_all.glsl"
 
 
 #VERSION_DEFINES
 #VERSION_DEFINES
 
 

+ 0 - 1
modules/betsy/bc6h.glsl

@@ -7,7 +7,6 @@ unsigned = "#define QUALITY"; // The "Quality" preset causes artifacting on sign
 #version 450
 #version 450
 
 
 #include "CrossPlatformSettings_piece_all.glsl"
 #include "CrossPlatformSettings_piece_all.glsl"
-#include "UavCrossPlatform_piece_all.glsl"
 
 
 #VERSION_DEFINES
 #VERSION_DEFINES
 
 

+ 0 - 12
thirdparty/README.md

@@ -71,18 +71,6 @@ Files extracted from upstream source:
 Applied upstream PR https://github.com/BinomialLLC/basis_universal/pull/344 to
 Applied upstream PR https://github.com/BinomialLLC/basis_universal/pull/344 to
 fix build with our own copy of zstd (patch in `patches`).
 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
 ## brotli
 
 
 - Upstream: https://github.com/google/brotli
 - Upstream: https://github.com/google/brotli