From 5d11b095e87b9f8ac52611dfc7cf76d908f363e9 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 3 Feb 2024 12:06:27 -0400 Subject: [PATCH 001/104] Fix loading code-signed games on Windows with non-ascii paths. Use DroppedFile (renamed to NativeFile in love 12) instead of C file APIs. NativeFile properly handles unicode file paths on Windows. --- src/modules/filesystem/physfs/PhysfsIo.cpp | 78 ++++++++-------------- src/modules/filesystem/physfs/PhysfsIo.h | 72 ++++++++++++-------- 2 files changed, 69 insertions(+), 81 deletions(-) diff --git a/src/modules/filesystem/physfs/PhysfsIo.cpp b/src/modules/filesystem/physfs/PhysfsIo.cpp index cdcea8dd2..adb392393 100644 --- a/src/modules/filesystem/physfs/PhysfsIo.cpp +++ b/src/modules/filesystem/physfs/PhysfsIo.cpp @@ -18,7 +18,6 @@ * 3. This notice may not be removed or altered from any source distribution. **/ -#include #include #include "PhysfsIo.h" @@ -32,14 +31,15 @@ namespace physfs bool StripSuffixIo::determineStrippedLength() { - if (!file) { + if (!file) return false; - } - const int64_t fullSize = fullLength(); - int64_t chunkSize = std::min(fullSize, (int64_t)8192); + + const int64 fullSize = file->getSize(); + + int64 chunkSize = std::min(fullSize, (int64) 8192); std::string buffer; buffer.reserve(chunkSize); - int64_t i = fullSize - chunkSize; + int64 i = fullSize - chunkSize; // I don't think we really need to go through the whole file. The main known use // case for this functionality is to skip windows codesign signatures, which are // from what I have seen ~12KB or so, but trying is better than just failing. @@ -64,7 +64,7 @@ bool StripSuffixIo::determineStrippedLength() } if (i == 0) break; - i = std::max((int64_t)0, i - chunkSize); + i = std::max((int64)0, i - chunkSize); } if (i > 0) @@ -75,7 +75,7 @@ bool StripSuffixIo::determineStrippedLength() // The comment length (u16) is located 20 bytes from the start of the EOCD record if (seek(i + 20) == 0) return false; - uint8_t buffer[2]; + uint8 buffer[2]; const auto n = read(buffer, 2); if (n <= 0) return false; @@ -96,17 +96,17 @@ bool StripSuffixIo::determineStrippedLength() return true; } -int64_t StripSuffixIo::read(void* buf, uint64_t len) +int64 StripSuffixIo::read(void *buf, uint64 len) { if (!file) { PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); return -1; } - const auto ret = std::fread(buf, 1, len, file); - if (ret == 0) + int64 r = file->read(buf, (int64) len); + if (r == 0) { - if (std::feof(file)) + if (file->isEOF()) { PHYSFS_setErrorCode(PHYSFS_ERR_OK); return 0; @@ -117,85 +117,59 @@ int64_t StripSuffixIo::read(void* buf, uint64_t len) return -1; } } - else if (ret < len && std::ferror(file)) - { - PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); - return -1; - } PHYSFS_setErrorCode(PHYSFS_ERR_OK); - return ret; + return r; } -int64_t StripSuffixIo::write(const void* /*buf*/, uint64_t /*len*/) +int64 StripSuffixIo::write(const void */*buf*/, uint64 /*len*/) { PHYSFS_setErrorCode(PHYSFS_ERR_READ_ONLY); return -1; } -int64_t StripSuffixIo::seek(uint64_t offset) +int64 StripSuffixIo::seek(uint64 offset) { if (!file) { PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); return 0; } - const auto ret = std::fseek(file, offset, SEEK_SET); - PHYSFS_setErrorCode(ret != 0 ? PHYSFS_ERR_OS_ERROR : PHYSFS_ERR_OK); - return ret == 0 ? 1 : 0; + bool success = file->seek(offset); + PHYSFS_setErrorCode(success ? PHYSFS_ERR_OK : PHYSFS_ERR_OS_ERROR); + return success ? 1 : 0; } -int64_t StripSuffixIo::tell() +int64 StripSuffixIo::tell() { if (!file) { PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); return -1; } - return std::ftell(file); + return file->tell(); } -int64_t StripSuffixIo::length() +int64 StripSuffixIo::length() { return strippedLength_; } -int64_t StripSuffixIo::flush() +int64 StripSuffixIo::flush() { if (!file) { PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); return 0; } - return std::fflush(file) == 0 ? 1 : 0; -} - -int64_t StripSuffixIo::fullLength() -{ - assert(file); - const auto cur = std::ftell(file); - if (cur == -1) + try { - PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); - return -1; - } - if (std::fseek(file, 0, SEEK_END) != 0) - { - PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); - return -1; + return file->flush() ? 1 : 0; } - const auto len = std::ftell(file); - if (len == -1) + catch (love::Exception &) { PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); - return -1; - } - if (std::fseek(file, cur, SEEK_SET) != 0) - { - // We do have the length now, but something is wrong, so we return an error anyways - PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); - return -1; + return 0; } - return len; } } // physfs diff --git a/src/modules/filesystem/physfs/PhysfsIo.h b/src/modules/filesystem/physfs/PhysfsIo.h index 35b92cc6c..423d671e5 100644 --- a/src/modules/filesystem/physfs/PhysfsIo.h +++ b/src/modules/filesystem/physfs/PhysfsIo.h @@ -21,11 +21,11 @@ #ifndef LOVE_FILESYSTEM_PHYSFS_PHYSFSIO_H #define LOVE_FILESYSTEM_PHYSFS_PHYSFSIO_H -#include -#include -#include - #include "libraries/physfs/physfs.h" +#include "common/int.h" +#include "filesystem/DroppedFile.h" + +#include namespace love { @@ -61,54 +61,54 @@ struct PhysfsIo : PHYSFS_Io private: // Returns: number of bytes read, 0 on EOF, -1 on failure - static PHYSFS_sint64 staticRead(struct PHYSFS_Io* io, void* buf, PHYSFS_uint64 len) + static PHYSFS_sint64 staticRead(struct PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) { return derived(io)->read(buf, len); } // Returns: number of bytes written, -1 on failure - static PHYSFS_sint64 staticWrite(struct PHYSFS_Io* io, const void* buf, PHYSFS_uint64 len) + static PHYSFS_sint64 staticWrite(struct PHYSFS_Io *io, const void *buf, PHYSFS_uint64 len) { return derived(io)->write(buf, len); } // Returns: non-zero on success, zero on error - static int staticSeek(struct PHYSFS_Io* io, PHYSFS_uint64 offset) + static int staticSeek(struct PHYSFS_Io *io, PHYSFS_uint64 offset) { return derived(io)->seek(offset); } // Returns: current offset from start, -1 on error - static PHYSFS_sint64 staticTell(struct PHYSFS_Io* io) + static PHYSFS_sint64 staticTell(struct PHYSFS_Io *io) { return derived(io)->tell(); } // Returns: total size in bytes, -1 on error - static PHYSFS_sint64 staticLength(struct PHYSFS_Io* io) + static PHYSFS_sint64 staticLength(struct PHYSFS_Io *io) { return derived(io)->length(); } - static struct PHYSFS_Io* staticDuplicate(struct PHYSFS_Io* io) + static struct PHYSFS_Io *staticDuplicate(struct PHYSFS_Io *io) { // Just use copy constructor return new Derived(*derived(io)); } // Returns: non-zero on success, zero on error - static int staticFlush(struct PHYSFS_Io* io) + static int staticFlush(struct PHYSFS_Io *io) { return derived(io)->flush(); } - static void staticDestroy(struct PHYSFS_Io* io) + static void staticDestroy(struct PHYSFS_Io *io) { // Just use destructor delete derived(io); } - static Derived* derived(PHYSFS_Io* io) + static Derived* derived(PHYSFS_Io *io) { return static_cast(reinterpret_cast(io->opaque)); } @@ -116,46 +116,60 @@ struct PhysfsIo : PHYSFS_Io struct StripSuffixIo : public PhysfsIo { - static const uint32_t version = 0; + static const uint32 version = 0; std::string filename; - FILE* file = nullptr; + DroppedFile *file = nullptr; // The constructor is private in favor of this function to prevent stack allocation // because Physfs will take ownership of this object and call destroy on it later. - static StripSuffixIo* create(std::string f) { return new StripSuffixIo(f); } + static StripSuffixIo *create(const std::string &f) { return new StripSuffixIo(f); } virtual ~StripSuffixIo() { if (file) { - std::fclose(file); + file->release(); } } - StripSuffixIo(const StripSuffixIo& other) + StripSuffixIo(const StripSuffixIo &other) : StripSuffixIo(other.filename) { } bool determineStrippedLength(); - int64_t read(void* buf, uint64_t len); - int64_t write(const void* buf, uint64_t len); - int64_t seek(uint64_t offset); - int64_t tell(); - int64_t length(); - int64_t flush(); + int64 read(void *buf, uint64 len); + int64 write(const void *buf, uint64 len); + int64 seek(uint64 offset); + int64 tell(); + int64 length(); + int64 flush(); private: - StripSuffixIo(std::string f) - : filename(std::move(f)) - , file(std::fopen(filename.c_str(), "rb")) + StripSuffixIo(const std::string &f) + : filename(f) + , file(new DroppedFile(f)) { - } + bool success = false; - int64_t fullLength(); + try + { + success = file->open(File::MODE_READ); + } + catch (love::Exception &) + { + success = false; + } + + if (!success) + { + file->release(); + file = nullptr; + } + } int64_t strippedLength_ = -1; }; From 8d73622311195e1600f48829610814eed7269e61 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 4 Feb 2024 23:18:40 -0400 Subject: [PATCH 002/104] Fix compilation --- src/modules/filesystem/physfs/PhysfsIo.cpp | 2 +- src/modules/filesystem/physfs/PhysfsIo.h | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/modules/filesystem/physfs/PhysfsIo.cpp b/src/modules/filesystem/physfs/PhysfsIo.cpp index adb392393..ec4ed6860 100644 --- a/src/modules/filesystem/physfs/PhysfsIo.cpp +++ b/src/modules/filesystem/physfs/PhysfsIo.cpp @@ -134,7 +134,7 @@ int64 StripSuffixIo::seek(uint64 offset) PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); return 0; } - bool success = file->seek(offset); + bool success = file->seek(offset, Stream::SEEKORIGIN_BEGIN); PHYSFS_setErrorCode(success ? PHYSFS_ERR_OK : PHYSFS_ERR_OS_ERROR); return success ? 1 : 0; } diff --git a/src/modules/filesystem/physfs/PhysfsIo.h b/src/modules/filesystem/physfs/PhysfsIo.h index 423d671e5..4952460e1 100644 --- a/src/modules/filesystem/physfs/PhysfsIo.h +++ b/src/modules/filesystem/physfs/PhysfsIo.h @@ -23,7 +23,7 @@ #include "libraries/physfs/physfs.h" #include "common/int.h" -#include "filesystem/DroppedFile.h" +#include "filesystem/NativeFile.h" #include @@ -119,7 +119,7 @@ struct StripSuffixIo : public PhysfsIo static const uint32 version = 0; std::string filename; - DroppedFile *file = nullptr; + NativeFile *file = nullptr; // The constructor is private in favor of this function to prevent stack allocation // because Physfs will take ownership of this object and call destroy on it later. @@ -151,23 +151,14 @@ struct StripSuffixIo : public PhysfsIo StripSuffixIo(const std::string &f) : filename(f) - , file(new DroppedFile(f)) + , file(nullptr) { - bool success = false; - try { - success = file->open(File::MODE_READ); + file = new NativeFile(f, File::MODE_READ); } catch (love::Exception &) { - success = false; - } - - if (!success) - { - file->release(); - file = nullptr; } } From d125921c2455dae95f059943b177469c72489e88 Mon Sep 17 00:00:00 2001 From: EngineerSmith <56016593+EngineerSmith@users.noreply.github.com> Date: Fri, 9 Feb 2024 00:29:12 +0000 Subject: [PATCH 003/104] Added container type to w_hash --- src/modules/data/wrap_DataModule.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/modules/data/wrap_DataModule.cpp b/src/modules/data/wrap_DataModule.cpp index 0b6ecff16..eafd37931 100644 --- a/src/modules/data/wrap_DataModule.cpp +++ b/src/modules/data/wrap_DataModule.cpp @@ -302,25 +302,37 @@ int w_decode(lua_State *L) int w_hash(lua_State *L) { - const char *fstr = luaL_checkstring(L, 1); + ContainerType ctype = luax_checkcontainertype(L, 1); + const char *fstr = luaL_checkstring(L, 2); HashFunction::Function function; if (!HashFunction::getConstant(fstr, function)) return luax_enumerror(L, "hash function", HashFunction::getConstants(function), fstr); HashFunction::Value hashvalue; - if (lua_isstring(L, 2)) + if (lua_isstring(L, 3)) { size_t rawsize = 0; - const char *rawbytes = luaL_checklstring(L, 2, &rawsize); + const char *rawbytes = luaL_checklstring(L, 3, &rawsize); luax_catchexcept(L, [&](){ love::data::hash(function, rawbytes, rawsize, hashvalue); }); } else { - Data *rawdata = luax_checktype(L, 2); + Data *rawdata = luax_checktype(L, 3); luax_catchexcept(L, [&](){ love::data::hash(function, rawdata, hashvalue); }); } - lua_pushlstring(L, hashvalue.data, hashvalue.size); + if (ctype == CONTAINER_DATA) + { + Data* d = nullptr; + luax_catchexcept(L, [&]() { d = instance()->newByteData(hashvalue.size); }); + memcpy(d->getData(), hashvalue.data, hashvalue.size); + + luax_pushtype(L, Data::type, d); + d->release(); + } + else + lua_pushlstring(L, hashvalue.data, hashvalue.size); + return 1; } From 666fd886313a735c8c471bdb5112516a220942a3 Mon Sep 17 00:00:00 2001 From: EngineerSmith <56016593+EngineerSmith@users.noreply.github.com> Date: Fri, 9 Feb 2024 00:55:57 +0000 Subject: [PATCH 004/104] Altered tests to account for additional container argument in love.data.hash --- testing/tests/data.lua | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/testing/tests/data.lua b/testing/tests/data.lua index 0e21a7713..06a68ed50 100644 --- a/testing/tests/data.lua +++ b/testing/tests/data.lua @@ -196,19 +196,33 @@ end -- love.data.hash love.test.data.hash = function(test) -- setup all the different hashing types - local str1 = love.data.hash('md5', 'helloworld') - local str2 = love.data.hash('sha1', 'helloworld') - local str3 = love.data.hash('sha224', 'helloworld') - local str4 = love.data.hash('sha256', 'helloworld') - local str5 = love.data.hash('sha384', 'helloworld') - local str6 = love.data.hash('sha512', 'helloworld') + local str1 = love.data.hash('string', 'md5', 'helloworld') + local str2 = love.data.hash('string', 'sha1', 'helloworld') + local str3 = love.data.hash('string', 'sha224', 'helloworld') + local str4 = love.data.hash('string', 'sha256', 'helloworld') + local str5 = love.data.hash('string', 'sha384', 'helloworld') + local str6 = love.data.hash('string', 'sha512', 'helloworld') + local data1 = love.data.hash('data', 'md5', 'helloworld') + local data2 = love.data.hash('data', 'sha1', 'helloworld') + local data3 = love.data.hash('data', 'sha224', 'helloworld') + local data4 = love.data.hash('data', 'sha256', 'helloworld') + local data5 = love.data.hash('data', 'sha384', 'helloworld') + local data6 = love.data.hash('data', 'sha512', 'helloworld') -- check encoded hash value matches what's expected for that algo - test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", str1), 'check md5 encode') - test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", str2), 'check sha1 encode') - test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", str3), 'check sha224 encode') - test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", str4), 'check sha256 encode') - test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", str5), 'check sha384 encode') - test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", str6), 'check sha512 encode') + -- test container string + test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", str1), 'check md5 encode container string') + test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", str2), 'check sha1 encode container string') + test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", str3), 'check sha224 encode container string') + test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", str4), 'check sha256 encode container string') + test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", str5), 'check sha384 encode container string') + test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", str6), 'check sha512 encode container string') + -- test container data + test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", data1), 'check md5 encode container data') + test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", data2), 'check sha1 encode container data') + test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", data3), 'check sha224 encode container data') + test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", data4), 'check sha256 encode container data') + test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", data5), 'check sha384 encode container data') + test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", data6), 'check sha512 encode container data') end From f00a86dc9f909a9f4c7f86dee933a106d5287e69 Mon Sep 17 00:00:00 2001 From: EngineerSmith <56016593+EngineerSmith@users.noreply.github.com> Date: Fri, 9 Feb 2024 01:15:45 +0000 Subject: [PATCH 005/104] Added change to changes.txt --- changes.txt | 1 + testing/tests/data.lua | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/changes.txt b/changes.txt index 83966c68f..8e0fb7af1 100644 --- a/changes.txt +++ b/changes.txt @@ -101,6 +101,7 @@ Released: N/A * Changed RevoluteJoint:getMotorTorque and WheelJoint:getMotorTorque to take 'dt' as a parameter instead of 'inverse_dt'. * Changed love.math.perlinNoise and simplexNoise to use higher precision numbers for its internal calculations. * Changed t.accelerometerjoystick startup flag in love.conf to unset by default. +* Changed love.data.hash to take in a container type * Renamed 'display' field to 'displayindex' in love.window.setMode/updateMode/getMode and love.conf. * Renamed love.graphics Text objects to TextBatch. diff --git a/testing/tests/data.lua b/testing/tests/data.lua index 06a68ed50..21b66b609 100644 --- a/testing/tests/data.lua +++ b/testing/tests/data.lua @@ -210,19 +210,19 @@ love.test.data.hash = function(test) local data6 = love.data.hash('data', 'sha512', 'helloworld') -- check encoded hash value matches what's expected for that algo -- test container string - test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", str1), 'check md5 encode container string') - test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", str2), 'check sha1 encode container string') - test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", str3), 'check sha224 encode container string') - test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", str4), 'check sha256 encode container string') - test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", str5), 'check sha384 encode container string') - test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", str6), 'check sha512 encode container string') + test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", str1), 'check string md5 encode') + test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", str2), 'check string sha1 encode') + test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", str3), 'check string sha224 encode') + test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", str4), 'check string sha256 encode') + test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", str5), 'check string sha384 encode') + test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", str6), 'check string sha512 encode') -- test container data - test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", data1), 'check md5 encode container data') - test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", data2), 'check sha1 encode container data') - test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", data3), 'check sha224 encode container data') - test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", data4), 'check sha256 encode container data') - test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", data5), 'check sha384 encode container data') - test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", data6), 'check sha512 encode container data') + test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", data1), 'check data md5 encode') + test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", data2), 'check data sha1 encode') + test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", data3), 'check data sha224 encode') + test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", data4), 'check data sha256 encode') + test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", data5), 'check data sha384 encode') + test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", data6), 'check data sha512 encode') end From 94d58641441ce0d5941e056c11d37392d7dee14f Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 10 Feb 2024 12:13:22 -0400 Subject: [PATCH 006/104] update year for copyright notice --- CMakeLists.txt | 2 +- extra/windows/love.rc | Bin 3632 -> 3632 bytes license.txt | 2 +- platform/xcode/macosx/love-macosx.plist | 2 +- src/common/Color.h | 2 +- src/common/Data.cpp | 2 +- src/common/Data.h | 2 +- src/common/EnumMap.h | 2 +- src/common/Exception.cpp | 2 +- src/common/Exception.h | 2 +- src/common/Matrix.cpp | 2 +- src/common/Matrix.h | 2 +- src/common/Module.cpp | 2 +- src/common/Module.h | 2 +- src/common/Object.cpp | 2 +- src/common/Object.h | 2 +- src/common/Optional.h | 2 +- src/common/Reference.cpp | 2 +- src/common/Reference.h | 2 +- src/common/Stream.cpp | 2 +- src/common/Stream.h | 2 +- src/common/StringMap.cpp | 2 +- src/common/StringMap.h | 2 +- src/common/Variant.cpp | 2 +- src/common/Variant.h | 2 +- src/common/Vector.cpp | 2 +- src/common/Vector.h | 2 +- src/common/android.cpp | 2 +- src/common/android.h | 2 +- src/common/b64.cpp | 2 +- src/common/b64.h | 2 +- src/common/config.h | 2 +- src/common/delay.cpp | 2 +- src/common/delay.h | 2 +- src/common/deprecation.cpp | 2 +- src/common/deprecation.h | 2 +- src/common/floattypes.cpp | 2 +- src/common/floattypes.h | 2 +- src/common/int.h | 2 +- src/common/ios.h | 2 +- src/common/ios.mm | 2 +- src/common/macosx.h | 2 +- src/common/macosx.mm | 2 +- src/common/math.h | 2 +- src/common/memory.cpp | 2 +- src/common/memory.h | 2 +- src/common/pixelformat.cpp | 2 +- src/common/pixelformat.h | 2 +- src/common/runtime.cpp | 2 +- src/common/runtime.h | 2 +- src/common/types.cpp | 2 +- src/common/types.h | 2 +- src/common/utf8.cpp | 2 +- src/common/utf8.h | 2 +- src/common/version.h | 2 +- src/libraries/ddsparse/ddsinfo.h | 2 +- src/libraries/ddsparse/ddsparse.cpp | 2 +- src/libraries/ddsparse/ddsparse.h | 2 +- src/libraries/enet/lua-enet.h | 2 +- src/libraries/luasocket/luasocket.cpp | 2 +- src/libraries/luasocket/luasocket.h | 2 +- src/love.cpp | 2 +- src/modules/audio/Audio.cpp | 2 +- src/modules/audio/Audio.h | 2 +- src/modules/audio/Effect.cpp | 2 +- src/modules/audio/Effect.h | 2 +- src/modules/audio/Filter.cpp | 2 +- src/modules/audio/Filter.h | 2 +- src/modules/audio/RecordingDevice.cpp | 2 +- src/modules/audio/RecordingDevice.h | 2 +- src/modules/audio/Source.cpp | 2 +- src/modules/audio/Source.h | 2 +- src/modules/audio/null/Audio.cpp | 2 +- src/modules/audio/null/Audio.h | 2 +- src/modules/audio/null/RecordingDevice.cpp | 2 +- src/modules/audio/null/RecordingDevice.h | 2 +- src/modules/audio/null/Source.cpp | 2 +- src/modules/audio/null/Source.h | 2 +- src/modules/audio/openal/Audio.cpp | 2 +- src/modules/audio/openal/Audio.h | 2 +- src/modules/audio/openal/Effect.cpp | 2 +- src/modules/audio/openal/Effect.h | 2 +- src/modules/audio/openal/Filter.cpp | 2 +- src/modules/audio/openal/Filter.h | 2 +- src/modules/audio/openal/Pool.cpp | 2 +- src/modules/audio/openal/Pool.h | 2 +- src/modules/audio/openal/RecordingDevice.cpp | 2 +- src/modules/audio/openal/RecordingDevice.h | 2 +- src/modules/audio/openal/Source.cpp | 2 +- src/modules/audio/openal/Source.h | 2 +- src/modules/audio/wrap_Audio.cpp | 2 +- src/modules/audio/wrap_Audio.h | 2 +- src/modules/audio/wrap_RecordingDevice.cpp | 2 +- src/modules/audio/wrap_RecordingDevice.h | 2 +- src/modules/audio/wrap_Source.cpp | 2 +- src/modules/audio/wrap_Source.h | 2 +- src/modules/data/ByteData.cpp | 2 +- src/modules/data/ByteData.h | 2 +- src/modules/data/CompressedData.cpp | 2 +- src/modules/data/CompressedData.h | 2 +- src/modules/data/Compressor.cpp | 2 +- src/modules/data/Compressor.h | 2 +- src/modules/data/DataModule.cpp | 2 +- src/modules/data/DataModule.h | 2 +- src/modules/data/DataView.cpp | 2 +- src/modules/data/DataView.h | 2 +- src/modules/data/HashFunction.cpp | 2 +- src/modules/data/HashFunction.h | 2 +- src/modules/data/wrap_ByteData.cpp | 2 +- src/modules/data/wrap_ByteData.h | 2 +- src/modules/data/wrap_CompressedData.cpp | 2 +- src/modules/data/wrap_CompressedData.h | 2 +- src/modules/data/wrap_Data.cpp | 2 +- src/modules/data/wrap_Data.h | 2 +- src/modules/data/wrap_Data.lua | 2 +- src/modules/data/wrap_DataModule.cpp | 2 +- src/modules/data/wrap_DataModule.h | 2 +- src/modules/data/wrap_DataView.cpp | 2 +- src/modules/data/wrap_DataView.h | 2 +- src/modules/event/Event.cpp | 2 +- src/modules/event/Event.h | 2 +- src/modules/event/sdl/Event.cpp | 2 +- src/modules/event/sdl/Event.h | 2 +- src/modules/event/wrap_Event.cpp | 2 +- src/modules/event/wrap_Event.h | 2 +- src/modules/event/wrap_Event.lua | 2 +- src/modules/filesystem/DroppedFile.cpp | 2 +- src/modules/filesystem/DroppedFile.h | 2 +- src/modules/filesystem/File.cpp | 2 +- src/modules/filesystem/File.h | 2 +- src/modules/filesystem/FileData.cpp | 2 +- src/modules/filesystem/FileData.h | 2 +- src/modules/filesystem/Filesystem.cpp | 2 +- src/modules/filesystem/Filesystem.h | 2 +- src/modules/filesystem/physfs/File.cpp | 2 +- src/modules/filesystem/physfs/File.h | 2 +- src/modules/filesystem/physfs/Filesystem.cpp | 2 +- src/modules/filesystem/physfs/Filesystem.h | 2 +- src/modules/filesystem/physfs/PhysfsIo.cpp | 2 +- src/modules/filesystem/physfs/PhysfsIo.h | 2 +- src/modules/filesystem/wrap_DroppedFile.cpp | 2 +- src/modules/filesystem/wrap_DroppedFile.h | 2 +- src/modules/filesystem/wrap_File.cpp | 2 +- src/modules/filesystem/wrap_File.h | 2 +- src/modules/filesystem/wrap_FileData.cpp | 2 +- src/modules/filesystem/wrap_FileData.h | 2 +- src/modules/filesystem/wrap_Filesystem.cpp | 2 +- src/modules/filesystem/wrap_Filesystem.h | 2 +- src/modules/font/BMFontRasterizer.cpp | 2 +- src/modules/font/BMFontRasterizer.h | 2 +- src/modules/font/Font.cpp | 2 +- src/modules/font/Font.h | 2 +- src/modules/font/GlyphData.cpp | 2 +- src/modules/font/GlyphData.h | 2 +- src/modules/font/ImageRasterizer.cpp | 2 +- src/modules/font/ImageRasterizer.h | 2 +- src/modules/font/Rasterizer.cpp | 2 +- src/modules/font/Rasterizer.h | 2 +- src/modules/font/TrueTypeRasterizer.cpp | 2 +- src/modules/font/TrueTypeRasterizer.h | 2 +- src/modules/font/freetype/Font.cpp | 2 +- src/modules/font/freetype/Font.h | 2 +- .../font/freetype/TrueTypeRasterizer.cpp | 2 +- .../font/freetype/TrueTypeRasterizer.h | 2 +- src/modules/font/wrap_Font.cpp | 2 +- src/modules/font/wrap_Font.h | 2 +- src/modules/font/wrap_GlyphData.cpp | 2 +- src/modules/font/wrap_GlyphData.h | 2 +- src/modules/font/wrap_Rasterizer.cpp | 2 +- src/modules/font/wrap_Rasterizer.h | 2 +- src/modules/graphics/Buffer.cpp | 2 +- src/modules/graphics/Buffer.h | 2 +- src/modules/graphics/Canvas.cpp | 2 +- src/modules/graphics/Canvas.h | 2 +- src/modules/graphics/Deprecations.cpp | 2 +- src/modules/graphics/Deprecations.h | 2 +- src/modules/graphics/Drawable.cpp | 2 +- src/modules/graphics/Drawable.h | 2 +- src/modules/graphics/Font.cpp | 2 +- src/modules/graphics/Font.h | 2 +- src/modules/graphics/Graphics.cpp | 2 +- src/modules/graphics/Graphics.h | 2 +- src/modules/graphics/Image.cpp | 2 +- src/modules/graphics/Image.h | 2 +- src/modules/graphics/Mesh.cpp | 2 +- src/modules/graphics/Mesh.h | 2 +- src/modules/graphics/ParticleSystem.cpp | 2 +- src/modules/graphics/ParticleSystem.h | 2 +- src/modules/graphics/Polyline.cpp | 2 +- src/modules/graphics/Polyline.h | 2 +- src/modules/graphics/Quad.cpp | 2 +- src/modules/graphics/Quad.h | 2 +- src/modules/graphics/Resource.h | 2 +- src/modules/graphics/Shader.cpp | 2 +- src/modules/graphics/Shader.h | 2 +- src/modules/graphics/ShaderStage.cpp | 2 +- src/modules/graphics/ShaderStage.h | 2 +- src/modules/graphics/SpriteBatch.cpp | 2 +- src/modules/graphics/SpriteBatch.h | 2 +- src/modules/graphics/StreamBuffer.cpp | 2 +- src/modules/graphics/StreamBuffer.h | 2 +- src/modules/graphics/Text.cpp | 2 +- src/modules/graphics/Text.h | 2 +- src/modules/graphics/Texture.cpp | 2 +- src/modules/graphics/Texture.h | 2 +- src/modules/graphics/Video.cpp | 2 +- src/modules/graphics/Video.h | 2 +- src/modules/graphics/Volatile.cpp | 2 +- src/modules/graphics/Volatile.h | 2 +- src/modules/graphics/depthstencil.cpp | 2 +- src/modules/graphics/depthstencil.h | 2 +- src/modules/graphics/opengl/Buffer.cpp | 2 +- src/modules/graphics/opengl/Buffer.h | 2 +- src/modules/graphics/opengl/Canvas.cpp | 2 +- src/modules/graphics/opengl/Canvas.h | 2 +- src/modules/graphics/opengl/FenceSync.cpp | 2 +- src/modules/graphics/opengl/FenceSync.h | 2 +- src/modules/graphics/opengl/Graphics.cpp | 2 +- src/modules/graphics/opengl/Graphics.h | 2 +- src/modules/graphics/opengl/Image.cpp | 2 +- src/modules/graphics/opengl/Image.h | 2 +- src/modules/graphics/opengl/OpenGL.cpp | 2 +- src/modules/graphics/opengl/OpenGL.h | 2 +- src/modules/graphics/opengl/Shader.cpp | 2 +- src/modules/graphics/opengl/Shader.h | 2 +- src/modules/graphics/opengl/ShaderStage.cpp | 2 +- src/modules/graphics/opengl/ShaderStage.h | 2 +- src/modules/graphics/opengl/StreamBuffer.cpp | 2 +- src/modules/graphics/opengl/StreamBuffer.h | 2 +- src/modules/graphics/vertex.cpp | 2 +- src/modules/graphics/vertex.h | 2 +- src/modules/graphics/wrap_Canvas.cpp | 2 +- src/modules/graphics/wrap_Canvas.h | 2 +- src/modules/graphics/wrap_Font.cpp | 2 +- src/modules/graphics/wrap_Font.h | 2 +- src/modules/graphics/wrap_Graphics.cpp | 2 +- src/modules/graphics/wrap_Graphics.h | 2 +- src/modules/graphics/wrap_Graphics.lua | 2 +- src/modules/graphics/wrap_GraphicsShader.lua | 2 +- src/modules/graphics/wrap_Image.cpp | 2 +- src/modules/graphics/wrap_Image.h | 2 +- src/modules/graphics/wrap_Mesh.cpp | 2 +- src/modules/graphics/wrap_Mesh.h | 2 +- src/modules/graphics/wrap_ParticleSystem.cpp | 2 +- src/modules/graphics/wrap_ParticleSystem.h | 2 +- src/modules/graphics/wrap_Quad.cpp | 2 +- src/modules/graphics/wrap_Quad.h | 2 +- src/modules/graphics/wrap_Shader.cpp | 2 +- src/modules/graphics/wrap_Shader.h | 2 +- src/modules/graphics/wrap_SpriteBatch.cpp | 2 +- src/modules/graphics/wrap_SpriteBatch.h | 2 +- src/modules/graphics/wrap_Text.cpp | 2 +- src/modules/graphics/wrap_Text.h | 2 +- src/modules/graphics/wrap_Texture.cpp | 2 +- src/modules/graphics/wrap_Texture.h | 2 +- src/modules/graphics/wrap_Video.cpp | 2 +- src/modules/graphics/wrap_Video.h | 2 +- src/modules/graphics/wrap_Video.lua | 2 +- src/modules/image/CompressedImageData.cpp | 2 +- src/modules/image/CompressedImageData.h | 2 +- src/modules/image/CompressedSlice.cpp | 2 +- src/modules/image/CompressedSlice.h | 2 +- src/modules/image/FormatHandler.cpp | 2 +- src/modules/image/FormatHandler.h | 2 +- src/modules/image/Image.cpp | 2 +- src/modules/image/Image.h | 2 +- src/modules/image/ImageData.cpp | 2 +- src/modules/image/ImageData.h | 2 +- src/modules/image/ImageDataBase.cpp | 2 +- src/modules/image/ImageDataBase.h | 2 +- src/modules/image/magpie/ASTCHandler.cpp | 2 +- src/modules/image/magpie/ASTCHandler.h | 2 +- src/modules/image/magpie/EXRHandler.cpp | 2 +- src/modules/image/magpie/EXRHandler.h | 2 +- src/modules/image/magpie/KTXHandler.cpp | 2 +- src/modules/image/magpie/KTXHandler.h | 2 +- src/modules/image/magpie/PKMHandler.cpp | 2 +- src/modules/image/magpie/PKMHandler.h | 2 +- src/modules/image/magpie/PNGHandler.cpp | 2 +- src/modules/image/magpie/PNGHandler.h | 2 +- src/modules/image/magpie/PVRHandler.cpp | 2 +- src/modules/image/magpie/PVRHandler.h | 2 +- src/modules/image/magpie/STBHandler.cpp | 2 +- src/modules/image/magpie/STBHandler.h | 2 +- src/modules/image/magpie/ddsHandler.cpp | 2 +- src/modules/image/magpie/ddsHandler.h | 2 +- .../image/wrap_CompressedImageData.cpp | 2 +- src/modules/image/wrap_CompressedImageData.h | 2 +- src/modules/image/wrap_Image.cpp | 2 +- src/modules/image/wrap_Image.h | 2 +- src/modules/image/wrap_ImageData.cpp | 2 +- src/modules/image/wrap_ImageData.h | 2 +- src/modules/image/wrap_ImageData.lua | 2 +- src/modules/joystick/Joystick.cpp | 2 +- src/modules/joystick/Joystick.h | 2 +- src/modules/joystick/JoystickModule.h | 2 +- src/modules/joystick/sdl/Joystick.cpp | 2 +- src/modules/joystick/sdl/Joystick.h | 2 +- src/modules/joystick/sdl/JoystickModule.cpp | 2 +- src/modules/joystick/sdl/JoystickModule.h | 2 +- src/modules/joystick/wrap_Joystick.cpp | 2 +- src/modules/joystick/wrap_Joystick.h | 2 +- src/modules/joystick/wrap_JoystickModule.cpp | 2 +- src/modules/joystick/wrap_JoystickModule.h | 2 +- src/modules/keyboard/Keyboard.cpp | 2 +- src/modules/keyboard/Keyboard.h | 2 +- src/modules/keyboard/sdl/Keyboard.cpp | 2 +- src/modules/keyboard/sdl/Keyboard.h | 2 +- src/modules/keyboard/wrap_Keyboard.cpp | 2 +- src/modules/keyboard/wrap_Keyboard.h | 2 +- src/modules/love/arg.lua | 2 +- src/modules/love/boot.lua | 2 +- src/modules/love/callbacks.lua | 2 +- src/modules/love/jitsetup.lua | 2 +- src/modules/love/love.cpp | 2 +- src/modules/love/love.h | 2 +- src/modules/math/BezierCurve.cpp | 2 +- src/modules/math/BezierCurve.h | 2 +- src/modules/math/MathModule.cpp | 2 +- src/modules/math/MathModule.h | 2 +- src/modules/math/RandomGenerator.cpp | 2 +- src/modules/math/RandomGenerator.h | 2 +- src/modules/math/Transform.cpp | 2 +- src/modules/math/Transform.h | 2 +- src/modules/math/wrap_BezierCurve.cpp | 2 +- src/modules/math/wrap_BezierCurve.h | 2 +- src/modules/math/wrap_Math.cpp | 2 +- src/modules/math/wrap_Math.h | 2 +- src/modules/math/wrap_Math.lua | 2 +- src/modules/math/wrap_RandomGenerator.cpp | 2 +- src/modules/math/wrap_RandomGenerator.h | 2 +- src/modules/math/wrap_RandomGenerator.lua | 2 +- src/modules/math/wrap_Transform.cpp | 2 +- src/modules/math/wrap_Transform.h | 2 +- src/modules/mouse/Cursor.cpp | 2 +- src/modules/mouse/Cursor.h | 2 +- src/modules/mouse/Mouse.h | 2 +- src/modules/mouse/sdl/Cursor.cpp | 2 +- src/modules/mouse/sdl/Cursor.h | 2 +- src/modules/mouse/sdl/Mouse.cpp | 2 +- src/modules/mouse/sdl/Mouse.h | 2 +- src/modules/mouse/wrap_Cursor.cpp | 2 +- src/modules/mouse/wrap_Cursor.h | 2 +- src/modules/mouse/wrap_Mouse.cpp | 2 +- src/modules/mouse/wrap_Mouse.h | 2 +- src/modules/physics/Body.cpp | 2 +- src/modules/physics/Body.h | 2 +- src/modules/physics/Joint.cpp | 2 +- src/modules/physics/Joint.h | 2 +- src/modules/physics/Shape.cpp | 2 +- src/modules/physics/Shape.h | 2 +- src/modules/physics/box2d/Body.cpp | 2 +- src/modules/physics/box2d/Body.h | 2 +- src/modules/physics/box2d/ChainShape.cpp | 2 +- src/modules/physics/box2d/ChainShape.h | 2 +- src/modules/physics/box2d/CircleShape.cpp | 2 +- src/modules/physics/box2d/CircleShape.h | 2 +- src/modules/physics/box2d/Contact.cpp | 2 +- src/modules/physics/box2d/Contact.h | 2 +- src/modules/physics/box2d/DistanceJoint.cpp | 2 +- src/modules/physics/box2d/DistanceJoint.h | 2 +- src/modules/physics/box2d/EdgeShape.cpp | 2 +- src/modules/physics/box2d/EdgeShape.h | 2 +- src/modules/physics/box2d/Fixture.cpp | 2 +- src/modules/physics/box2d/Fixture.h | 2 +- src/modules/physics/box2d/FrictionJoint.cpp | 2 +- src/modules/physics/box2d/FrictionJoint.h | 2 +- src/modules/physics/box2d/GearJoint.cpp | 2 +- src/modules/physics/box2d/GearJoint.h | 2 +- src/modules/physics/box2d/Joint.cpp | 2 +- src/modules/physics/box2d/Joint.h | 2 +- src/modules/physics/box2d/MotorJoint.cpp | 2 +- src/modules/physics/box2d/MotorJoint.h | 2 +- src/modules/physics/box2d/MouseJoint.cpp | 2 +- src/modules/physics/box2d/MouseJoint.h | 2 +- src/modules/physics/box2d/Physics.cpp | 2 +- src/modules/physics/box2d/Physics.h | 2 +- src/modules/physics/box2d/PolygonShape.cpp | 2 +- src/modules/physics/box2d/PolygonShape.h | 2 +- src/modules/physics/box2d/PrismaticJoint.cpp | 2 +- src/modules/physics/box2d/PrismaticJoint.h | 2 +- src/modules/physics/box2d/PulleyJoint.cpp | 2 +- src/modules/physics/box2d/PulleyJoint.h | 2 +- src/modules/physics/box2d/RevoluteJoint.cpp | 2 +- src/modules/physics/box2d/RevoluteJoint.h | 2 +- src/modules/physics/box2d/RopeJoint.cpp | 2 +- src/modules/physics/box2d/RopeJoint.h | 2 +- src/modules/physics/box2d/Shape.cpp | 2 +- src/modules/physics/box2d/Shape.h | 2 +- src/modules/physics/box2d/WeldJoint.cpp | 2 +- src/modules/physics/box2d/WeldJoint.h | 2 +- src/modules/physics/box2d/WheelJoint.cpp | 2 +- src/modules/physics/box2d/WheelJoint.h | 2 +- src/modules/physics/box2d/World.cpp | 2 +- src/modules/physics/box2d/World.h | 2 +- src/modules/physics/box2d/wrap_Body.cpp | 2 +- src/modules/physics/box2d/wrap_Body.h | 2 +- src/modules/physics/box2d/wrap_ChainShape.cpp | 2 +- src/modules/physics/box2d/wrap_ChainShape.h | 2 +- .../physics/box2d/wrap_CircleShape.cpp | 2 +- src/modules/physics/box2d/wrap_CircleShape.h | 2 +- src/modules/physics/box2d/wrap_Contact.cpp | 2 +- src/modules/physics/box2d/wrap_Contact.h | 2 +- .../physics/box2d/wrap_DistanceJoint.cpp | 2 +- .../physics/box2d/wrap_DistanceJoint.h | 2 +- src/modules/physics/box2d/wrap_EdgeShape.cpp | 2 +- src/modules/physics/box2d/wrap_EdgeShape.h | 2 +- src/modules/physics/box2d/wrap_Fixture.cpp | 2 +- src/modules/physics/box2d/wrap_Fixture.h | 2 +- .../physics/box2d/wrap_FrictionJoint.cpp | 2 +- .../physics/box2d/wrap_FrictionJoint.h | 2 +- src/modules/physics/box2d/wrap_GearJoint.cpp | 2 +- src/modules/physics/box2d/wrap_GearJoint.h | 2 +- src/modules/physics/box2d/wrap_Joint.cpp | 2 +- src/modules/physics/box2d/wrap_Joint.h | 2 +- src/modules/physics/box2d/wrap_MotorJoint.cpp | 2 +- src/modules/physics/box2d/wrap_MotorJoint.h | 2 +- src/modules/physics/box2d/wrap_MouseJoint.cpp | 2 +- src/modules/physics/box2d/wrap_MouseJoint.h | 2 +- src/modules/physics/box2d/wrap_Physics.cpp | 2 +- src/modules/physics/box2d/wrap_Physics.h | 2 +- .../physics/box2d/wrap_PolygonShape.cpp | 2 +- src/modules/physics/box2d/wrap_PolygonShape.h | 2 +- .../physics/box2d/wrap_PrismaticJoint.cpp | 2 +- .../physics/box2d/wrap_PrismaticJoint.h | 2 +- .../physics/box2d/wrap_PulleyJoint.cpp | 2 +- src/modules/physics/box2d/wrap_PulleyJoint.h | 2 +- .../physics/box2d/wrap_RevoluteJoint.cpp | 2 +- .../physics/box2d/wrap_RevoluteJoint.h | 2 +- src/modules/physics/box2d/wrap_RopeJoint.cpp | 2 +- src/modules/physics/box2d/wrap_RopeJoint.h | 2 +- src/modules/physics/box2d/wrap_Shape.cpp | 2 +- src/modules/physics/box2d/wrap_Shape.h | 2 +- src/modules/physics/box2d/wrap_WeldJoint.cpp | 2 +- src/modules/physics/box2d/wrap_WeldJoint.h | 2 +- src/modules/physics/box2d/wrap_WheelJoint.cpp | 2 +- src/modules/physics/box2d/wrap_WheelJoint.h | 2 +- src/modules/physics/box2d/wrap_World.cpp | 2 +- src/modules/physics/box2d/wrap_World.h | 2 +- src/modules/sound/Decoder.cpp | 2 +- src/modules/sound/Decoder.h | 2 +- src/modules/sound/Sound.cpp | 2 +- src/modules/sound/Sound.h | 2 +- src/modules/sound/SoundData.cpp | 2 +- src/modules/sound/SoundData.h | 2 +- .../sound/lullaby/CoreAudioDecoder.cpp | 2 +- src/modules/sound/lullaby/CoreAudioDecoder.h | 2 +- src/modules/sound/lullaby/FLACDecoder.cpp | 2 +- src/modules/sound/lullaby/FLACDecoder.h | 2 +- src/modules/sound/lullaby/GmeDecoder.cpp | 2 +- src/modules/sound/lullaby/GmeDecoder.h | 2 +- src/modules/sound/lullaby/ModPlugDecoder.cpp | 2 +- src/modules/sound/lullaby/ModPlugDecoder.h | 2 +- src/modules/sound/lullaby/Mpg123Decoder.cpp | 2 +- src/modules/sound/lullaby/Mpg123Decoder.h | 2 +- src/modules/sound/lullaby/Sound.cpp | 2 +- src/modules/sound/lullaby/Sound.h | 2 +- src/modules/sound/lullaby/VorbisDecoder.cpp | 2 +- src/modules/sound/lullaby/VorbisDecoder.h | 2 +- src/modules/sound/lullaby/WaveDecoder.cpp | 2 +- src/modules/sound/lullaby/WaveDecoder.h | 2 +- src/modules/sound/wrap_Decoder.cpp | 2 +- src/modules/sound/wrap_Decoder.h | 2 +- src/modules/sound/wrap_Sound.cpp | 2 +- src/modules/sound/wrap_Sound.h | 2 +- src/modules/sound/wrap_SoundData.cpp | 2 +- src/modules/sound/wrap_SoundData.h | 2 +- src/modules/sound/wrap_SoundData.lua | 2 +- src/modules/system/System.cpp | 2 +- src/modules/system/System.h | 2 +- src/modules/system/sdl/System.cpp | 2 +- src/modules/system/sdl/System.h | 2 +- src/modules/system/wrap_System.cpp | 2 +- src/modules/system/wrap_System.h | 2 +- src/modules/thread/Channel.cpp | 2 +- src/modules/thread/Channel.h | 2 +- src/modules/thread/LuaThread.cpp | 2 +- src/modules/thread/LuaThread.h | 2 +- src/modules/thread/Thread.h | 2 +- src/modules/thread/ThreadModule.cpp | 2 +- src/modules/thread/ThreadModule.h | 2 +- src/modules/thread/sdl/Thread.cpp | 2 +- src/modules/thread/sdl/Thread.h | 2 +- src/modules/thread/sdl/threads.cpp | 2 +- src/modules/thread/sdl/threads.h | 2 +- src/modules/thread/threads.cpp | 2 +- src/modules/thread/threads.h | 2 +- src/modules/thread/wrap_Channel.h | 2 +- src/modules/thread/wrap_LuaThread.h | 2 +- src/modules/thread/wrap_ThreadModule.h | 2 +- src/modules/timer/Timer.cpp | 2 +- src/modules/timer/Timer.h | 2 +- src/modules/timer/wrap_Timer.cpp | 2 +- src/modules/timer/wrap_Timer.h | 2 +- src/modules/touch/Touch.h | 2 +- src/modules/touch/sdl/Touch.cpp | 2 +- src/modules/touch/sdl/Touch.h | 2 +- src/modules/touch/wrap_Touch.cpp | 2 +- src/modules/touch/wrap_Touch.h | 2 +- src/modules/video/Video.h | 2 +- src/modules/video/VideoStream.cpp | 2 +- src/modules/video/VideoStream.h | 2 +- src/modules/video/theora/OggDemuxer.cpp | 2 +- src/modules/video/theora/OggDemuxer.h | 2 +- .../video/theora/TheoraVideoStream.cpp | 2 +- src/modules/video/theora/TheoraVideoStream.h | 2 +- src/modules/video/theora/Video.cpp | 2 +- src/modules/video/theora/Video.h | 2 +- src/modules/video/wrap_Video.cpp | 2 +- src/modules/video/wrap_Video.h | 2 +- src/modules/video/wrap_VideoStream.cpp | 2 +- src/modules/video/wrap_VideoStream.h | 2 +- src/modules/window/Window.cpp | 2 +- src/modules/window/Window.h | 2 +- src/modules/window/sdl/Window.cpp | 2 +- src/modules/window/sdl/Window.h | 2 +- src/modules/window/wrap_Window.cpp | 2 +- src/modules/window/wrap_Window.h | 2 +- src/scripts/auto.lua | 2 +- src/scripts/nogame.lua | 2 +- src/scripts/nogame.lua.h | 4 ++-- 521 files changed, 521 insertions(+), 521 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfb44de92..3fd11f742 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (c) 2006-2023 LOVE Development Team +# Copyright (c) 2006-2024 LOVE Development Team # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages diff --git a/extra/windows/love.rc b/extra/windows/love.rc index 68ea3240e6d2ea2afe087e96eff031dfda5a9db7..1b670cdcb11ba0df30bf37fb5dada4cb861db93f 100644 GIT binary patch delta 14 UcmdlWvjGTs7)>_I@(42l03t{OmjD0& delta 14 UcmdlWvjGTs7>zf}@(42l03t#ImH+?% diff --git a/license.txt b/license.txt index 5a2351331..9e2a19b49 100644 --- a/license.txt +++ b/license.txt @@ -6,7 +6,7 @@ This distribution contains code from the following projects (full license text b - LOVE Website: https://love2d.org/ License: zlib - Copyright (c) 2006-2023 LOVE Development Team + Copyright (c) 2006-2024 LOVE Development Team - ENet Website: http://enet.bespin.org/index.html diff --git a/platform/xcode/macosx/love-macosx.plist b/platform/xcode/macosx/love-macosx.plist index 197188f38..e11e7e3dd 100644 --- a/platform/xcode/macosx/love-macosx.plist +++ b/platform/xcode/macosx/love-macosx.plist @@ -70,7 +70,7 @@ NSHighResolutionCapable NSHumanReadableCopyright - © 2006-2023 LÖVE Development Team + © 2006-2024 LÖVE Development Team NSPrincipalClass NSApplication NSSupportsAutomaticGraphicsSwitching diff --git a/src/common/Color.h b/src/common/Color.h index 6d0049723..e7dffa688 100644 --- a/src/common/Color.h +++ b/src/common/Color.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Data.cpp b/src/common/Data.cpp index 8b31599f4..9da33a2a2 100644 --- a/src/common/Data.cpp +++ b/src/common/Data.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Data.h b/src/common/Data.h index 57ffa4b14..479a4a6d6 100644 --- a/src/common/Data.h +++ b/src/common/Data.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/EnumMap.h b/src/common/EnumMap.h index 118cf389d..4a1bdd3d0 100644 --- a/src/common/EnumMap.h +++ b/src/common/EnumMap.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Exception.cpp b/src/common/Exception.cpp index eb240e381..f605d08da 100644 --- a/src/common/Exception.cpp +++ b/src/common/Exception.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Exception.h b/src/common/Exception.h index d42c5d180..28942d069 100644 --- a/src/common/Exception.h +++ b/src/common/Exception.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Matrix.cpp b/src/common/Matrix.cpp index 7721a3cae..66244adeb 100644 --- a/src/common/Matrix.cpp +++ b/src/common/Matrix.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Matrix.h b/src/common/Matrix.h index df012b4a8..0063ced70 100644 --- a/src/common/Matrix.h +++ b/src/common/Matrix.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Module.cpp b/src/common/Module.cpp index 80013fe4a..442b09a17 100644 --- a/src/common/Module.cpp +++ b/src/common/Module.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Module.h b/src/common/Module.h index 47dc999cc..f0082a489 100644 --- a/src/common/Module.h +++ b/src/common/Module.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Object.cpp b/src/common/Object.cpp index 8d2bc4027..a8bb7fe85 100644 --- a/src/common/Object.cpp +++ b/src/common/Object.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Object.h b/src/common/Object.h index dba7de13c..3ffe4653b 100644 --- a/src/common/Object.h +++ b/src/common/Object.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Optional.h b/src/common/Optional.h index 5f4345d75..21205e92b 100644 --- a/src/common/Optional.h +++ b/src/common/Optional.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Reference.cpp b/src/common/Reference.cpp index 54e42e67f..37e6113d6 100644 --- a/src/common/Reference.cpp +++ b/src/common/Reference.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Reference.h b/src/common/Reference.h index 512ba9a51..28d218b90 100644 --- a/src/common/Reference.h +++ b/src/common/Reference.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Stream.cpp b/src/common/Stream.cpp index 7138b6a5f..11094923d 100644 --- a/src/common/Stream.cpp +++ b/src/common/Stream.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Stream.h b/src/common/Stream.h index 72d3e960a..92f0cf7f6 100644 --- a/src/common/Stream.h +++ b/src/common/Stream.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/StringMap.cpp b/src/common/StringMap.cpp index 0c018bf40..4d6169e1e 100644 --- a/src/common/StringMap.cpp +++ b/src/common/StringMap.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/StringMap.h b/src/common/StringMap.h index 2b475dfa0..a11892fe0 100644 --- a/src/common/StringMap.h +++ b/src/common/StringMap.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Variant.cpp b/src/common/Variant.cpp index d5a64840f..f20d11d55 100644 --- a/src/common/Variant.cpp +++ b/src/common/Variant.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Variant.h b/src/common/Variant.h index 3a3c94e5b..0a4cd10be 100644 --- a/src/common/Variant.h +++ b/src/common/Variant.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Vector.cpp b/src/common/Vector.cpp index 1870b6a58..890528123 100644 --- a/src/common/Vector.cpp +++ b/src/common/Vector.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/Vector.h b/src/common/Vector.h index d0821679b..e74ad2441 100644 --- a/src/common/Vector.h +++ b/src/common/Vector.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/android.cpp b/src/common/android.cpp index c10ef99dc..75206ffdf 100644 --- a/src/common/android.cpp +++ b/src/common/android.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/android.h b/src/common/android.h index 5e263f713..56d5ad0ca 100644 --- a/src/common/android.h +++ b/src/common/android.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/b64.cpp b/src/common/b64.cpp index ff196cd88..57ce775b1 100644 --- a/src/common/b64.cpp +++ b/src/common/b64.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/b64.h b/src/common/b64.h index a748a0de5..471650de5 100644 --- a/src/common/b64.h +++ b/src/common/b64.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/config.h b/src/common/config.h index 94848e32c..5679849cb 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/delay.cpp b/src/common/delay.cpp index 06902f73d..5897ecf6f 100644 --- a/src/common/delay.cpp +++ b/src/common/delay.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/delay.h b/src/common/delay.h index 04105cabf..afe92e8c2 100644 --- a/src/common/delay.h +++ b/src/common/delay.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/deprecation.cpp b/src/common/deprecation.cpp index bb0e8fafc..5bc56438a 100644 --- a/src/common/deprecation.cpp +++ b/src/common/deprecation.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/deprecation.h b/src/common/deprecation.h index 46a8c4baa..fe05e531d 100644 --- a/src/common/deprecation.h +++ b/src/common/deprecation.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/floattypes.cpp b/src/common/floattypes.cpp index a387e1cbb..ae30462bb 100644 --- a/src/common/floattypes.cpp +++ b/src/common/floattypes.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/floattypes.h b/src/common/floattypes.h index 79938eab1..7572c06ac 100644 --- a/src/common/floattypes.h +++ b/src/common/floattypes.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/int.h b/src/common/int.h index 11a413607..8700eee9e 100644 --- a/src/common/int.h +++ b/src/common/int.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/ios.h b/src/common/ios.h index 2ee476454..2a27414b6 100644 --- a/src/common/ios.h +++ b/src/common/ios.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/ios.mm b/src/common/ios.mm index 398d34962..da40971e2 100644 --- a/src/common/ios.mm +++ b/src/common/ios.mm @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/macosx.h b/src/common/macosx.h index 00769aece..d75ba7720 100644 --- a/src/common/macosx.h +++ b/src/common/macosx.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/macosx.mm b/src/common/macosx.mm index 1fa3e343c..2293fc9c1 100644 --- a/src/common/macosx.mm +++ b/src/common/macosx.mm @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/math.h b/src/common/math.h index 50ff5ad8a..5f2b5e7a9 100644 --- a/src/common/math.h +++ b/src/common/math.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 81afca87b..6d883002f 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/memory.h b/src/common/memory.h index 924b5e5f9..97cf456a8 100644 --- a/src/common/memory.h +++ b/src/common/memory.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/pixelformat.cpp b/src/common/pixelformat.cpp index f77c11a5b..a08f0f2fd 100644 --- a/src/common/pixelformat.cpp +++ b/src/common/pixelformat.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/pixelformat.h b/src/common/pixelformat.h index 5cdba0ec4..ec2233b9d 100644 --- a/src/common/pixelformat.h +++ b/src/common/pixelformat.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/runtime.cpp b/src/common/runtime.cpp index 0915f7bd2..58820bdd3 100644 --- a/src/common/runtime.cpp +++ b/src/common/runtime.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/runtime.h b/src/common/runtime.h index d1980f0a2..43b94cd20 100644 --- a/src/common/runtime.h +++ b/src/common/runtime.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/types.cpp b/src/common/types.cpp index d188321f7..69a4f703d 100644 --- a/src/common/types.cpp +++ b/src/common/types.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/types.h b/src/common/types.h index 33bbf21b3..c9c21e0c4 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/utf8.cpp b/src/common/utf8.cpp index dfc1909f6..20daa9bc7 100644 --- a/src/common/utf8.cpp +++ b/src/common/utf8.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/utf8.h b/src/common/utf8.h index ba74e705d..d33686fdf 100644 --- a/src/common/utf8.h +++ b/src/common/utf8.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/common/version.h b/src/common/version.h index e99f977e6..ca2067cd5 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/libraries/ddsparse/ddsinfo.h b/src/libraries/ddsparse/ddsinfo.h index 929a13b92..81c1b98fd 100644 --- a/src/libraries/ddsparse/ddsinfo.h +++ b/src/libraries/ddsparse/ddsinfo.h @@ -1,7 +1,7 @@ /** * Simple DDS data parser for compressed 2D textures. * - * Copyright (c) 2013-2023 Sasha Szpakowski + * Copyright (c) 2013-2024 Sasha Szpakowski * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/libraries/ddsparse/ddsparse.cpp b/src/libraries/ddsparse/ddsparse.cpp index 59d770aa7..5827ceeb9 100644 --- a/src/libraries/ddsparse/ddsparse.cpp +++ b/src/libraries/ddsparse/ddsparse.cpp @@ -1,7 +1,7 @@ /** * Simple DDS data parser for compressed 2D textures. * - * Copyright (c) 2013-2023 Sasha Szpakowski + * Copyright (c) 2013-2024 Sasha Szpakowski * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/libraries/ddsparse/ddsparse.h b/src/libraries/ddsparse/ddsparse.h index 17d8b7f38..8b9544a2e 100644 --- a/src/libraries/ddsparse/ddsparse.h +++ b/src/libraries/ddsparse/ddsparse.h @@ -1,7 +1,7 @@ /** * Simple DDS data parser for compressed 2D textures. * - * Copyright (c) 2013-2023 Sasha Szpakowski + * Copyright (c) 2013-2024 Sasha Szpakowski * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/libraries/enet/lua-enet.h b/src/libraries/enet/lua-enet.h index 2112c8dd5..b2fe08152 100644 --- a/src/libraries/enet/lua-enet.h +++ b/src/libraries/enet/lua-enet.h @@ -1,5 +1,5 @@ /** -* Copyright (c) 2006-2023 LOVE Development Team +* Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/libraries/luasocket/luasocket.cpp b/src/libraries/luasocket/luasocket.cpp index e39e863e8..e895e1942 100644 --- a/src/libraries/luasocket/luasocket.cpp +++ b/src/libraries/luasocket/luasocket.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/libraries/luasocket/luasocket.h b/src/libraries/luasocket/luasocket.h index f1282ead4..5bde13bc6 100644 --- a/src/libraries/luasocket/luasocket.h +++ b/src/libraries/luasocket/luasocket.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/love.cpp b/src/love.cpp index 97673a33a..35ce322d9 100644 --- a/src/love.cpp +++ b/src/love.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Audio.cpp b/src/modules/audio/Audio.cpp index 0724139f6..1285cdbb6 100644 --- a/src/modules/audio/Audio.cpp +++ b/src/modules/audio/Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Audio.h b/src/modules/audio/Audio.h index 1b6697973..60adcc3c4 100644 --- a/src/modules/audio/Audio.h +++ b/src/modules/audio/Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Effect.cpp b/src/modules/audio/Effect.cpp index 0a3bd1243..aa2f18122 100644 --- a/src/modules/audio/Effect.cpp +++ b/src/modules/audio/Effect.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Effect.h b/src/modules/audio/Effect.h index 2d93d6a57..0eb4e307e 100644 --- a/src/modules/audio/Effect.h +++ b/src/modules/audio/Effect.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Filter.cpp b/src/modules/audio/Filter.cpp index beced0fe5..6ec622870 100644 --- a/src/modules/audio/Filter.cpp +++ b/src/modules/audio/Filter.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Filter.h b/src/modules/audio/Filter.h index f2c1344c8..de1f64d11 100644 --- a/src/modules/audio/Filter.h +++ b/src/modules/audio/Filter.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/RecordingDevice.cpp b/src/modules/audio/RecordingDevice.cpp index 9ceefa6bc..f9123eb87 100644 --- a/src/modules/audio/RecordingDevice.cpp +++ b/src/modules/audio/RecordingDevice.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/RecordingDevice.h b/src/modules/audio/RecordingDevice.h index 4d85c2f14..7ee367863 100644 --- a/src/modules/audio/RecordingDevice.h +++ b/src/modules/audio/RecordingDevice.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Source.cpp b/src/modules/audio/Source.cpp index 4877f9dcb..5e69457cb 100644 --- a/src/modules/audio/Source.cpp +++ b/src/modules/audio/Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/Source.h b/src/modules/audio/Source.h index a61ef043b..3f45ce06d 100644 --- a/src/modules/audio/Source.h +++ b/src/modules/audio/Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/null/Audio.cpp b/src/modules/audio/null/Audio.cpp index 1d5d1598b..ff5d9eb2b 100644 --- a/src/modules/audio/null/Audio.cpp +++ b/src/modules/audio/null/Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/null/Audio.h b/src/modules/audio/null/Audio.h index db73028ab..1e17a221b 100644 --- a/src/modules/audio/null/Audio.h +++ b/src/modules/audio/null/Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/null/RecordingDevice.cpp b/src/modules/audio/null/RecordingDevice.cpp index fbf80f86f..e206d87b6 100644 --- a/src/modules/audio/null/RecordingDevice.cpp +++ b/src/modules/audio/null/RecordingDevice.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/null/RecordingDevice.h b/src/modules/audio/null/RecordingDevice.h index 48d3fde7c..501007209 100644 --- a/src/modules/audio/null/RecordingDevice.h +++ b/src/modules/audio/null/RecordingDevice.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/null/Source.cpp b/src/modules/audio/null/Source.cpp index d529b0ce9..b38e97a27 100644 --- a/src/modules/audio/null/Source.cpp +++ b/src/modules/audio/null/Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/null/Source.h b/src/modules/audio/null/Source.h index 2b4880c50..03071a9db 100644 --- a/src/modules/audio/null/Source.h +++ b/src/modules/audio/null/Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Audio.cpp b/src/modules/audio/openal/Audio.cpp index c1d0c1981..60205bd9e 100644 --- a/src/modules/audio/openal/Audio.cpp +++ b/src/modules/audio/openal/Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Audio.h b/src/modules/audio/openal/Audio.h index 85df0c4ab..cc3ea9a57 100644 --- a/src/modules/audio/openal/Audio.h +++ b/src/modules/audio/openal/Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Effect.cpp b/src/modules/audio/openal/Effect.cpp index fa1b9026b..78c257584 100644 --- a/src/modules/audio/openal/Effect.cpp +++ b/src/modules/audio/openal/Effect.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Effect.h b/src/modules/audio/openal/Effect.h index 9f67ce079..92729219d 100644 --- a/src/modules/audio/openal/Effect.h +++ b/src/modules/audio/openal/Effect.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Filter.cpp b/src/modules/audio/openal/Filter.cpp index 7b0528aed..7c890b6d8 100644 --- a/src/modules/audio/openal/Filter.cpp +++ b/src/modules/audio/openal/Filter.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Filter.h b/src/modules/audio/openal/Filter.h index dc6532018..e626b89fe 100644 --- a/src/modules/audio/openal/Filter.h +++ b/src/modules/audio/openal/Filter.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Pool.cpp b/src/modules/audio/openal/Pool.cpp index 071367f70..b6342cec6 100644 --- a/src/modules/audio/openal/Pool.cpp +++ b/src/modules/audio/openal/Pool.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Pool.h b/src/modules/audio/openal/Pool.h index cc0c1866e..e8229820e 100644 --- a/src/modules/audio/openal/Pool.h +++ b/src/modules/audio/openal/Pool.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/RecordingDevice.cpp b/src/modules/audio/openal/RecordingDevice.cpp index 6b6c86326..56a74428b 100644 --- a/src/modules/audio/openal/RecordingDevice.cpp +++ b/src/modules/audio/openal/RecordingDevice.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/RecordingDevice.h b/src/modules/audio/openal/RecordingDevice.h index 09e8b41a1..fc3964cff 100644 --- a/src/modules/audio/openal/RecordingDevice.h +++ b/src/modules/audio/openal/RecordingDevice.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Source.cpp b/src/modules/audio/openal/Source.cpp index bbec6827d..dcb5f3674 100644 --- a/src/modules/audio/openal/Source.cpp +++ b/src/modules/audio/openal/Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/openal/Source.h b/src/modules/audio/openal/Source.h index ecceaf151..f719feb9e 100644 --- a/src/modules/audio/openal/Source.h +++ b/src/modules/audio/openal/Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/wrap_Audio.cpp b/src/modules/audio/wrap_Audio.cpp index 5aa12cf77..d178b866d 100644 --- a/src/modules/audio/wrap_Audio.cpp +++ b/src/modules/audio/wrap_Audio.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/wrap_Audio.h b/src/modules/audio/wrap_Audio.h index 8ddc2e027..a24687deb 100644 --- a/src/modules/audio/wrap_Audio.h +++ b/src/modules/audio/wrap_Audio.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/wrap_RecordingDevice.cpp b/src/modules/audio/wrap_RecordingDevice.cpp index 6b3f37902..cd0b691e8 100644 --- a/src/modules/audio/wrap_RecordingDevice.cpp +++ b/src/modules/audio/wrap_RecordingDevice.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/wrap_RecordingDevice.h b/src/modules/audio/wrap_RecordingDevice.h index 51753ec8e..0a8f9547d 100644 --- a/src/modules/audio/wrap_RecordingDevice.h +++ b/src/modules/audio/wrap_RecordingDevice.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/wrap_Source.cpp b/src/modules/audio/wrap_Source.cpp index d53ae0ae9..4d2f6bc8f 100644 --- a/src/modules/audio/wrap_Source.cpp +++ b/src/modules/audio/wrap_Source.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/audio/wrap_Source.h b/src/modules/audio/wrap_Source.h index 54f90aa88..d223dd0e3 100644 --- a/src/modules/audio/wrap_Source.h +++ b/src/modules/audio/wrap_Source.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/ByteData.cpp b/src/modules/data/ByteData.cpp index 4ef9a9813..ffd8c6148 100644 --- a/src/modules/data/ByteData.cpp +++ b/src/modules/data/ByteData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/ByteData.h b/src/modules/data/ByteData.h index 9eec56f61..e64ba6533 100644 --- a/src/modules/data/ByteData.h +++ b/src/modules/data/ByteData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/CompressedData.cpp b/src/modules/data/CompressedData.cpp index 22faca30e..1077a3533 100644 --- a/src/modules/data/CompressedData.cpp +++ b/src/modules/data/CompressedData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/CompressedData.h b/src/modules/data/CompressedData.h index 53ed19aa1..a7b33f49a 100644 --- a/src/modules/data/CompressedData.h +++ b/src/modules/data/CompressedData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/Compressor.cpp b/src/modules/data/Compressor.cpp index 4712a314d..8b04dbc21 100644 --- a/src/modules/data/Compressor.cpp +++ b/src/modules/data/Compressor.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/Compressor.h b/src/modules/data/Compressor.h index fd4d49ad0..64570c29a 100644 --- a/src/modules/data/Compressor.h +++ b/src/modules/data/Compressor.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/DataModule.cpp b/src/modules/data/DataModule.cpp index 9bda2cebb..a84378cf9 100644 --- a/src/modules/data/DataModule.cpp +++ b/src/modules/data/DataModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/DataModule.h b/src/modules/data/DataModule.h index d7dd2f00d..8ad189547 100644 --- a/src/modules/data/DataModule.h +++ b/src/modules/data/DataModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/DataView.cpp b/src/modules/data/DataView.cpp index 645638e7f..cb60f1e78 100644 --- a/src/modules/data/DataView.cpp +++ b/src/modules/data/DataView.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/DataView.h b/src/modules/data/DataView.h index 56ac4eff0..c253979a7 100644 --- a/src/modules/data/DataView.h +++ b/src/modules/data/DataView.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/HashFunction.cpp b/src/modules/data/HashFunction.cpp index 03c67f68f..9e3ae11d5 100644 --- a/src/modules/data/HashFunction.cpp +++ b/src/modules/data/HashFunction.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/HashFunction.h b/src/modules/data/HashFunction.h index 372852678..e42d9c559 100644 --- a/src/modules/data/HashFunction.h +++ b/src/modules/data/HashFunction.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_ByteData.cpp b/src/modules/data/wrap_ByteData.cpp index 1b4a2d919..4121f6af9 100644 --- a/src/modules/data/wrap_ByteData.cpp +++ b/src/modules/data/wrap_ByteData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_ByteData.h b/src/modules/data/wrap_ByteData.h index 4e13de0a8..b8c340df3 100644 --- a/src/modules/data/wrap_ByteData.h +++ b/src/modules/data/wrap_ByteData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_CompressedData.cpp b/src/modules/data/wrap_CompressedData.cpp index 2d2d537cd..c01d69eee 100644 --- a/src/modules/data/wrap_CompressedData.cpp +++ b/src/modules/data/wrap_CompressedData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_CompressedData.h b/src/modules/data/wrap_CompressedData.h index a16d27501..661492938 100644 --- a/src/modules/data/wrap_CompressedData.h +++ b/src/modules/data/wrap_CompressedData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_Data.cpp b/src/modules/data/wrap_Data.cpp index 6d41bdf71..9e36c6fc0 100644 --- a/src/modules/data/wrap_Data.cpp +++ b/src/modules/data/wrap_Data.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_Data.h b/src/modules/data/wrap_Data.h index c9447a0be..d66a3e645 100644 --- a/src/modules/data/wrap_Data.h +++ b/src/modules/data/wrap_Data.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_Data.lua b/src/modules/data/wrap_Data.lua index f15090a6e..eb18e66c8 100644 --- a/src/modules/data/wrap_Data.lua +++ b/src/modules/data/wrap_Data.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_DataModule.cpp b/src/modules/data/wrap_DataModule.cpp index 572b9b862..672e2d526 100644 --- a/src/modules/data/wrap_DataModule.cpp +++ b/src/modules/data/wrap_DataModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_DataModule.h b/src/modules/data/wrap_DataModule.h index c8614240e..046101d13 100644 --- a/src/modules/data/wrap_DataModule.h +++ b/src/modules/data/wrap_DataModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_DataView.cpp b/src/modules/data/wrap_DataView.cpp index 9c574bb67..b756eff0b 100644 --- a/src/modules/data/wrap_DataView.cpp +++ b/src/modules/data/wrap_DataView.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/data/wrap_DataView.h b/src/modules/data/wrap_DataView.h index a255fa255..fbcfc2efb 100644 --- a/src/modules/data/wrap_DataView.h +++ b/src/modules/data/wrap_DataView.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/event/Event.cpp b/src/modules/event/Event.cpp index 5d2fe2de2..823ecac7d 100644 --- a/src/modules/event/Event.cpp +++ b/src/modules/event/Event.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/event/Event.h b/src/modules/event/Event.h index c707cbd7c..1806ba678 100644 --- a/src/modules/event/Event.h +++ b/src/modules/event/Event.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/event/sdl/Event.cpp b/src/modules/event/sdl/Event.cpp index c1f217a9c..b0847861a 100644 --- a/src/modules/event/sdl/Event.cpp +++ b/src/modules/event/sdl/Event.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/event/sdl/Event.h b/src/modules/event/sdl/Event.h index 3c1649b5c..1e9726c0c 100644 --- a/src/modules/event/sdl/Event.h +++ b/src/modules/event/sdl/Event.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/event/wrap_Event.cpp b/src/modules/event/wrap_Event.cpp index c28a91782..156727ba8 100644 --- a/src/modules/event/wrap_Event.cpp +++ b/src/modules/event/wrap_Event.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/event/wrap_Event.h b/src/modules/event/wrap_Event.h index efb259e0c..8aeccaa6d 100644 --- a/src/modules/event/wrap_Event.h +++ b/src/modules/event/wrap_Event.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/event/wrap_Event.lua b/src/modules/event/wrap_Event.lua index a8f392d5c..52cf3bf11 100644 --- a/src/modules/event/wrap_Event.lua +++ b/src/modules/event/wrap_Event.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/DroppedFile.cpp b/src/modules/filesystem/DroppedFile.cpp index ec37c9d8a..2b7361abe 100644 --- a/src/modules/filesystem/DroppedFile.cpp +++ b/src/modules/filesystem/DroppedFile.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/DroppedFile.h b/src/modules/filesystem/DroppedFile.h index 0076e1eb8..c38a34621 100644 --- a/src/modules/filesystem/DroppedFile.h +++ b/src/modules/filesystem/DroppedFile.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/File.cpp b/src/modules/filesystem/File.cpp index 238df2c92..7c03500f7 100644 --- a/src/modules/filesystem/File.cpp +++ b/src/modules/filesystem/File.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/File.h b/src/modules/filesystem/File.h index c71b3b8af..54f4fb3f7 100644 --- a/src/modules/filesystem/File.h +++ b/src/modules/filesystem/File.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/FileData.cpp b/src/modules/filesystem/FileData.cpp index bc61cd5fd..806fcd7c6 100644 --- a/src/modules/filesystem/FileData.cpp +++ b/src/modules/filesystem/FileData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/FileData.h b/src/modules/filesystem/FileData.h index 694c61ec3..5c214eae4 100644 --- a/src/modules/filesystem/FileData.h +++ b/src/modules/filesystem/FileData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/Filesystem.cpp b/src/modules/filesystem/Filesystem.cpp index 395c87e01..cbc53fb74 100644 --- a/src/modules/filesystem/Filesystem.cpp +++ b/src/modules/filesystem/Filesystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/Filesystem.h b/src/modules/filesystem/Filesystem.h index ccd91264f..7d20fcee8 100644 --- a/src/modules/filesystem/Filesystem.h +++ b/src/modules/filesystem/Filesystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/physfs/File.cpp b/src/modules/filesystem/physfs/File.cpp index 85d1969b8..ad4339545 100644 --- a/src/modules/filesystem/physfs/File.cpp +++ b/src/modules/filesystem/physfs/File.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/physfs/File.h b/src/modules/filesystem/physfs/File.h index 0156e7552..bbec01b92 100644 --- a/src/modules/filesystem/physfs/File.h +++ b/src/modules/filesystem/physfs/File.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index d3c650269..b1613b049 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/physfs/Filesystem.h b/src/modules/filesystem/physfs/Filesystem.h index 716e892bc..658cf644b 100644 --- a/src/modules/filesystem/physfs/Filesystem.h +++ b/src/modules/filesystem/physfs/Filesystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/physfs/PhysfsIo.cpp b/src/modules/filesystem/physfs/PhysfsIo.cpp index adb392393..4c8f037c9 100644 --- a/src/modules/filesystem/physfs/PhysfsIo.cpp +++ b/src/modules/filesystem/physfs/PhysfsIo.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/physfs/PhysfsIo.h b/src/modules/filesystem/physfs/PhysfsIo.h index 423d671e5..c997c98df 100644 --- a/src/modules/filesystem/physfs/PhysfsIo.h +++ b/src/modules/filesystem/physfs/PhysfsIo.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_DroppedFile.cpp b/src/modules/filesystem/wrap_DroppedFile.cpp index b45a67341..cc704f982 100644 --- a/src/modules/filesystem/wrap_DroppedFile.cpp +++ b/src/modules/filesystem/wrap_DroppedFile.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_DroppedFile.h b/src/modules/filesystem/wrap_DroppedFile.h index ac97c86a4..1f37fe450 100644 --- a/src/modules/filesystem/wrap_DroppedFile.h +++ b/src/modules/filesystem/wrap_DroppedFile.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_File.cpp b/src/modules/filesystem/wrap_File.cpp index 7e73b26e3..457196ef9 100644 --- a/src/modules/filesystem/wrap_File.cpp +++ b/src/modules/filesystem/wrap_File.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_File.h b/src/modules/filesystem/wrap_File.h index e935436bc..10277996f 100644 --- a/src/modules/filesystem/wrap_File.h +++ b/src/modules/filesystem/wrap_File.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_FileData.cpp b/src/modules/filesystem/wrap_FileData.cpp index 1135a5c1a..00e288fe4 100644 --- a/src/modules/filesystem/wrap_FileData.cpp +++ b/src/modules/filesystem/wrap_FileData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_FileData.h b/src/modules/filesystem/wrap_FileData.h index 0f036f365..58b870df0 100644 --- a/src/modules/filesystem/wrap_FileData.h +++ b/src/modules/filesystem/wrap_FileData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_Filesystem.cpp b/src/modules/filesystem/wrap_Filesystem.cpp index 6a448f478..7d3fc5b2c 100644 --- a/src/modules/filesystem/wrap_Filesystem.cpp +++ b/src/modules/filesystem/wrap_Filesystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/filesystem/wrap_Filesystem.h b/src/modules/filesystem/wrap_Filesystem.h index e9f2b9581..c32ab0945 100644 --- a/src/modules/filesystem/wrap_Filesystem.h +++ b/src/modules/filesystem/wrap_Filesystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/BMFontRasterizer.cpp b/src/modules/font/BMFontRasterizer.cpp index 6f94d682a..838cc62fc 100644 --- a/src/modules/font/BMFontRasterizer.cpp +++ b/src/modules/font/BMFontRasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/BMFontRasterizer.h b/src/modules/font/BMFontRasterizer.h index 54335635f..278ac29ab 100644 --- a/src/modules/font/BMFontRasterizer.h +++ b/src/modules/font/BMFontRasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/Font.cpp b/src/modules/font/Font.cpp index d44a79579..d9379f37b 100644 --- a/src/modules/font/Font.cpp +++ b/src/modules/font/Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/Font.h b/src/modules/font/Font.h index fde060f1b..36a6565d9 100644 --- a/src/modules/font/Font.h +++ b/src/modules/font/Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/GlyphData.cpp b/src/modules/font/GlyphData.cpp index ea587e316..0e3321be9 100644 --- a/src/modules/font/GlyphData.cpp +++ b/src/modules/font/GlyphData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/GlyphData.h b/src/modules/font/GlyphData.h index 0f214cb4f..4e4791538 100644 --- a/src/modules/font/GlyphData.h +++ b/src/modules/font/GlyphData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/ImageRasterizer.cpp b/src/modules/font/ImageRasterizer.cpp index 2de87b77a..91488822d 100644 --- a/src/modules/font/ImageRasterizer.cpp +++ b/src/modules/font/ImageRasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/ImageRasterizer.h b/src/modules/font/ImageRasterizer.h index 10a04da0d..833a5135c 100644 --- a/src/modules/font/ImageRasterizer.h +++ b/src/modules/font/ImageRasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/Rasterizer.cpp b/src/modules/font/Rasterizer.cpp index a5dfcef8e..588e42a2d 100644 --- a/src/modules/font/Rasterizer.cpp +++ b/src/modules/font/Rasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/Rasterizer.h b/src/modules/font/Rasterizer.h index dee0a74be..c4a4d24d9 100644 --- a/src/modules/font/Rasterizer.h +++ b/src/modules/font/Rasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/TrueTypeRasterizer.cpp b/src/modules/font/TrueTypeRasterizer.cpp index eb9a1740d..e91523281 100644 --- a/src/modules/font/TrueTypeRasterizer.cpp +++ b/src/modules/font/TrueTypeRasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/TrueTypeRasterizer.h b/src/modules/font/TrueTypeRasterizer.h index 62b225927..15e4c49ec 100644 --- a/src/modules/font/TrueTypeRasterizer.h +++ b/src/modules/font/TrueTypeRasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/freetype/Font.cpp b/src/modules/font/freetype/Font.cpp index ec7fe9c27..6bc55fa0d 100644 --- a/src/modules/font/freetype/Font.cpp +++ b/src/modules/font/freetype/Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/freetype/Font.h b/src/modules/font/freetype/Font.h index 8d023cf48..fe7972375 100644 --- a/src/modules/font/freetype/Font.h +++ b/src/modules/font/freetype/Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/freetype/TrueTypeRasterizer.cpp b/src/modules/font/freetype/TrueTypeRasterizer.cpp index e70367f5d..1e7390c92 100644 --- a/src/modules/font/freetype/TrueTypeRasterizer.cpp +++ b/src/modules/font/freetype/TrueTypeRasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/freetype/TrueTypeRasterizer.h b/src/modules/font/freetype/TrueTypeRasterizer.h index 6bcdf552d..f568e3dae 100644 --- a/src/modules/font/freetype/TrueTypeRasterizer.h +++ b/src/modules/font/freetype/TrueTypeRasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/wrap_Font.cpp b/src/modules/font/wrap_Font.cpp index ffbb720fe..d2459ccb1 100644 --- a/src/modules/font/wrap_Font.cpp +++ b/src/modules/font/wrap_Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/wrap_Font.h b/src/modules/font/wrap_Font.h index ddbe327eb..a52de0ed0 100644 --- a/src/modules/font/wrap_Font.h +++ b/src/modules/font/wrap_Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/wrap_GlyphData.cpp b/src/modules/font/wrap_GlyphData.cpp index 68a232531..a411957dd 100644 --- a/src/modules/font/wrap_GlyphData.cpp +++ b/src/modules/font/wrap_GlyphData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/wrap_GlyphData.h b/src/modules/font/wrap_GlyphData.h index e71062fe3..59a6d257e 100644 --- a/src/modules/font/wrap_GlyphData.h +++ b/src/modules/font/wrap_GlyphData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/wrap_Rasterizer.cpp b/src/modules/font/wrap_Rasterizer.cpp index 2340b6abe..88a063c15 100644 --- a/src/modules/font/wrap_Rasterizer.cpp +++ b/src/modules/font/wrap_Rasterizer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/font/wrap_Rasterizer.h b/src/modules/font/wrap_Rasterizer.h index 0359656a9..83c8a6009 100644 --- a/src/modules/font/wrap_Rasterizer.h +++ b/src/modules/font/wrap_Rasterizer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Buffer.cpp b/src/modules/graphics/Buffer.cpp index d5f1fd30f..3f438dc48 100644 --- a/src/modules/graphics/Buffer.cpp +++ b/src/modules/graphics/Buffer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Buffer.h b/src/modules/graphics/Buffer.h index fe13f2e33..611fffae9 100644 --- a/src/modules/graphics/Buffer.h +++ b/src/modules/graphics/Buffer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Canvas.cpp b/src/modules/graphics/Canvas.cpp index 6d62ad638..f49beb589 100644 --- a/src/modules/graphics/Canvas.cpp +++ b/src/modules/graphics/Canvas.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Canvas.h b/src/modules/graphics/Canvas.h index f1ff4ac34..63e111d26 100644 --- a/src/modules/graphics/Canvas.h +++ b/src/modules/graphics/Canvas.h @@ -1,5 +1,5 @@ /** -* Copyright (c) 2006-2023 LOVE Development Team +* Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Deprecations.cpp b/src/modules/graphics/Deprecations.cpp index 6fa743e76..215f933c8 100644 --- a/src/modules/graphics/Deprecations.cpp +++ b/src/modules/graphics/Deprecations.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Deprecations.h b/src/modules/graphics/Deprecations.h index 6014d1fe1..e2aeae419 100644 --- a/src/modules/graphics/Deprecations.h +++ b/src/modules/graphics/Deprecations.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Drawable.cpp b/src/modules/graphics/Drawable.cpp index 44762c9c1..5e4880913 100644 --- a/src/modules/graphics/Drawable.cpp +++ b/src/modules/graphics/Drawable.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Drawable.h b/src/modules/graphics/Drawable.h index 0703d3c62..6eb573aa8 100644 --- a/src/modules/graphics/Drawable.h +++ b/src/modules/graphics/Drawable.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Font.cpp b/src/modules/graphics/Font.cpp index 0c90ec23b..0f6b9b350 100644 --- a/src/modules/graphics/Font.cpp +++ b/src/modules/graphics/Font.cpp @@ -1,5 +1,5 @@ /** -* Copyright (c) 2006-2023 LOVE Development Team +* Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Font.h b/src/modules/graphics/Font.h index 53440eb6f..e2a29f2c2 100644 --- a/src/modules/graphics/Font.h +++ b/src/modules/graphics/Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index 9cf72a63c..efa3a2ed9 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index b56d77f12..17f89af10 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Image.cpp b/src/modules/graphics/Image.cpp index 886c9216c..a6cc91f2d 100644 --- a/src/modules/graphics/Image.cpp +++ b/src/modules/graphics/Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Image.h b/src/modules/graphics/Image.h index 2dbca4c2f..6fd3e6e51 100644 --- a/src/modules/graphics/Image.h +++ b/src/modules/graphics/Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Mesh.cpp b/src/modules/graphics/Mesh.cpp index 2d94c704f..3bb8d57c8 100644 --- a/src/modules/graphics/Mesh.cpp +++ b/src/modules/graphics/Mesh.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Mesh.h b/src/modules/graphics/Mesh.h index 8d5bf7e20..528f90cb1 100644 --- a/src/modules/graphics/Mesh.h +++ b/src/modules/graphics/Mesh.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/ParticleSystem.cpp b/src/modules/graphics/ParticleSystem.cpp index f42c97f95..e4cddd5fc 100644 --- a/src/modules/graphics/ParticleSystem.cpp +++ b/src/modules/graphics/ParticleSystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/ParticleSystem.h b/src/modules/graphics/ParticleSystem.h index 643cff5a6..a8efe0653 100644 --- a/src/modules/graphics/ParticleSystem.h +++ b/src/modules/graphics/ParticleSystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Polyline.cpp b/src/modules/graphics/Polyline.cpp index e14e0fe3e..891f76adb 100644 --- a/src/modules/graphics/Polyline.cpp +++ b/src/modules/graphics/Polyline.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Polyline.h b/src/modules/graphics/Polyline.h index b0f36321c..f1482d043 100644 --- a/src/modules/graphics/Polyline.h +++ b/src/modules/graphics/Polyline.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Quad.cpp b/src/modules/graphics/Quad.cpp index 0d218dc38..40c7a9737 100644 --- a/src/modules/graphics/Quad.cpp +++ b/src/modules/graphics/Quad.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Quad.h b/src/modules/graphics/Quad.h index eba404432..8e7d08c53 100644 --- a/src/modules/graphics/Quad.h +++ b/src/modules/graphics/Quad.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Resource.h b/src/modules/graphics/Resource.h index 17d23e893..b277e22f5 100644 --- a/src/modules/graphics/Resource.h +++ b/src/modules/graphics/Resource.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index 54a6ab62a..0389302eb 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Shader.h b/src/modules/graphics/Shader.h index 01bfa6b44..61ad0ee0d 100644 --- a/src/modules/graphics/Shader.h +++ b/src/modules/graphics/Shader.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/ShaderStage.cpp b/src/modules/graphics/ShaderStage.cpp index 24ef45254..4aabcfd57 100644 --- a/src/modules/graphics/ShaderStage.cpp +++ b/src/modules/graphics/ShaderStage.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/ShaderStage.h b/src/modules/graphics/ShaderStage.h index 3b438420a..f7fa83662 100644 --- a/src/modules/graphics/ShaderStage.h +++ b/src/modules/graphics/ShaderStage.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/SpriteBatch.cpp b/src/modules/graphics/SpriteBatch.cpp index 0241124bc..67bcb3433 100644 --- a/src/modules/graphics/SpriteBatch.cpp +++ b/src/modules/graphics/SpriteBatch.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/SpriteBatch.h b/src/modules/graphics/SpriteBatch.h index 5cae979a5..0c6f5eb61 100644 --- a/src/modules/graphics/SpriteBatch.h +++ b/src/modules/graphics/SpriteBatch.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/StreamBuffer.cpp b/src/modules/graphics/StreamBuffer.cpp index 5ebe11201..a7c694ac3 100644 --- a/src/modules/graphics/StreamBuffer.cpp +++ b/src/modules/graphics/StreamBuffer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/StreamBuffer.h b/src/modules/graphics/StreamBuffer.h index a5d84084f..721dde4bc 100644 --- a/src/modules/graphics/StreamBuffer.h +++ b/src/modules/graphics/StreamBuffer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Text.cpp b/src/modules/graphics/Text.cpp index 3bd23da73..152371cfa 100644 --- a/src/modules/graphics/Text.cpp +++ b/src/modules/graphics/Text.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Text.h b/src/modules/graphics/Text.h index a6eccab16..b197a1c23 100644 --- a/src/modules/graphics/Text.h +++ b/src/modules/graphics/Text.h @@ -1,5 +1,5 @@ /** -* Copyright (c) 2006-2023 LOVE Development Team +* Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index 0b1dd0170..7e87a7ac2 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Texture.h b/src/modules/graphics/Texture.h index a30f2acef..050087ae9 100644 --- a/src/modules/graphics/Texture.h +++ b/src/modules/graphics/Texture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Video.cpp b/src/modules/graphics/Video.cpp index beb60706a..a3a466071 100644 --- a/src/modules/graphics/Video.cpp +++ b/src/modules/graphics/Video.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Video.h b/src/modules/graphics/Video.h index cb4c7ea84..2e95480c9 100644 --- a/src/modules/graphics/Video.h +++ b/src/modules/graphics/Video.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Volatile.cpp b/src/modules/graphics/Volatile.cpp index 2ee6a7879..fc098c96a 100644 --- a/src/modules/graphics/Volatile.cpp +++ b/src/modules/graphics/Volatile.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/Volatile.h b/src/modules/graphics/Volatile.h index 73d6cce15..c72582526 100644 --- a/src/modules/graphics/Volatile.h +++ b/src/modules/graphics/Volatile.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/depthstencil.cpp b/src/modules/graphics/depthstencil.cpp index 4c717afe1..c98f3757c 100644 --- a/src/modules/graphics/depthstencil.cpp +++ b/src/modules/graphics/depthstencil.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/depthstencil.h b/src/modules/graphics/depthstencil.h index fe5f4dcd1..2f8bdd238 100644 --- a/src/modules/graphics/depthstencil.h +++ b/src/modules/graphics/depthstencil.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Buffer.cpp b/src/modules/graphics/opengl/Buffer.cpp index b907189ff..55306542f 100644 --- a/src/modules/graphics/opengl/Buffer.cpp +++ b/src/modules/graphics/opengl/Buffer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Buffer.h b/src/modules/graphics/opengl/Buffer.h index efaf7a397..5f0606f8b 100644 --- a/src/modules/graphics/opengl/Buffer.h +++ b/src/modules/graphics/opengl/Buffer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Canvas.cpp b/src/modules/graphics/opengl/Canvas.cpp index b43d87464..398d88637 100644 --- a/src/modules/graphics/opengl/Canvas.cpp +++ b/src/modules/graphics/opengl/Canvas.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Canvas.h b/src/modules/graphics/opengl/Canvas.h index 4576cb5f0..0972ade60 100644 --- a/src/modules/graphics/opengl/Canvas.h +++ b/src/modules/graphics/opengl/Canvas.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/FenceSync.cpp b/src/modules/graphics/opengl/FenceSync.cpp index c687db846..21f0af67d 100644 --- a/src/modules/graphics/opengl/FenceSync.cpp +++ b/src/modules/graphics/opengl/FenceSync.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/FenceSync.h b/src/modules/graphics/opengl/FenceSync.h index fad96d14f..a126b5a11 100644 --- a/src/modules/graphics/opengl/FenceSync.h +++ b/src/modules/graphics/opengl/FenceSync.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 2c108f9ce..66420164e 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Graphics.h b/src/modules/graphics/opengl/Graphics.h index 7ce62056a..375a0ae2a 100644 --- a/src/modules/graphics/opengl/Graphics.h +++ b/src/modules/graphics/opengl/Graphics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Image.cpp b/src/modules/graphics/opengl/Image.cpp index d905d932a..a2afc7c48 100644 --- a/src/modules/graphics/opengl/Image.cpp +++ b/src/modules/graphics/opengl/Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Image.h b/src/modules/graphics/opengl/Image.h index 9efb7837e..09d0134c5 100644 --- a/src/modules/graphics/opengl/Image.h +++ b/src/modules/graphics/opengl/Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 6bf80f3c1..11ca484e6 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/OpenGL.h b/src/modules/graphics/opengl/OpenGL.h index b2142f96e..44767678a 100644 --- a/src/modules/graphics/opengl/OpenGL.h +++ b/src/modules/graphics/opengl/OpenGL.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index ef16655a5..49dcda2e0 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/Shader.h b/src/modules/graphics/opengl/Shader.h index 35873b240..686ad9dbd 100644 --- a/src/modules/graphics/opengl/Shader.h +++ b/src/modules/graphics/opengl/Shader.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/ShaderStage.cpp b/src/modules/graphics/opengl/ShaderStage.cpp index 1ad5e0514..fe0d010f7 100644 --- a/src/modules/graphics/opengl/ShaderStage.cpp +++ b/src/modules/graphics/opengl/ShaderStage.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/ShaderStage.h b/src/modules/graphics/opengl/ShaderStage.h index 248cd32c2..862afb21b 100644 --- a/src/modules/graphics/opengl/ShaderStage.h +++ b/src/modules/graphics/opengl/ShaderStage.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/StreamBuffer.cpp b/src/modules/graphics/opengl/StreamBuffer.cpp index db520e612..c074f4935 100644 --- a/src/modules/graphics/opengl/StreamBuffer.cpp +++ b/src/modules/graphics/opengl/StreamBuffer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/opengl/StreamBuffer.h b/src/modules/graphics/opengl/StreamBuffer.h index 613e102ce..7ae02bfeb 100644 --- a/src/modules/graphics/opengl/StreamBuffer.h +++ b/src/modules/graphics/opengl/StreamBuffer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/vertex.cpp b/src/modules/graphics/vertex.cpp index 140ee2063..e95e590a3 100644 --- a/src/modules/graphics/vertex.cpp +++ b/src/modules/graphics/vertex.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/vertex.h b/src/modules/graphics/vertex.h index bdafffc57..79e62d88c 100644 --- a/src/modules/graphics/vertex.h +++ b/src/modules/graphics/vertex.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Canvas.cpp b/src/modules/graphics/wrap_Canvas.cpp index c4bc7aa64..539ccaf5a 100644 --- a/src/modules/graphics/wrap_Canvas.cpp +++ b/src/modules/graphics/wrap_Canvas.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Canvas.h b/src/modules/graphics/wrap_Canvas.h index 257df87e8..a918a165f 100644 --- a/src/modules/graphics/wrap_Canvas.h +++ b/src/modules/graphics/wrap_Canvas.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Font.cpp b/src/modules/graphics/wrap_Font.cpp index b93287c22..3e5de083c 100644 --- a/src/modules/graphics/wrap_Font.cpp +++ b/src/modules/graphics/wrap_Font.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Font.h b/src/modules/graphics/wrap_Font.h index 39635d92b..c07c56bd5 100644 --- a/src/modules/graphics/wrap_Font.h +++ b/src/modules/graphics/wrap_Font.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index ae574bb89..8bfefd32b 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Graphics.h b/src/modules/graphics/wrap_Graphics.h index 0ffa926b4..96548d6a3 100644 --- a/src/modules/graphics/wrap_Graphics.h +++ b/src/modules/graphics/wrap_Graphics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Graphics.lua b/src/modules/graphics/wrap_Graphics.lua index 1c7e50264..bf52b7c38 100644 --- a/src/modules/graphics/wrap_Graphics.lua +++ b/src/modules/graphics/wrap_Graphics.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_GraphicsShader.lua b/src/modules/graphics/wrap_GraphicsShader.lua index daf11eadc..7f5ce377d 100644 --- a/src/modules/graphics/wrap_GraphicsShader.lua +++ b/src/modules/graphics/wrap_GraphicsShader.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Image.cpp b/src/modules/graphics/wrap_Image.cpp index bba2e7e1e..75c8bda2c 100644 --- a/src/modules/graphics/wrap_Image.cpp +++ b/src/modules/graphics/wrap_Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Image.h b/src/modules/graphics/wrap_Image.h index f8fffa216..f29f87b02 100644 --- a/src/modules/graphics/wrap_Image.h +++ b/src/modules/graphics/wrap_Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Mesh.cpp b/src/modules/graphics/wrap_Mesh.cpp index 359133a69..c4b83078f 100644 --- a/src/modules/graphics/wrap_Mesh.cpp +++ b/src/modules/graphics/wrap_Mesh.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Mesh.h b/src/modules/graphics/wrap_Mesh.h index fb08cade4..5d98de51d 100644 --- a/src/modules/graphics/wrap_Mesh.h +++ b/src/modules/graphics/wrap_Mesh.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_ParticleSystem.cpp b/src/modules/graphics/wrap_ParticleSystem.cpp index cffdc47d9..fe04768c2 100644 --- a/src/modules/graphics/wrap_ParticleSystem.cpp +++ b/src/modules/graphics/wrap_ParticleSystem.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_ParticleSystem.h b/src/modules/graphics/wrap_ParticleSystem.h index dff5c5024..c828e9e0d 100644 --- a/src/modules/graphics/wrap_ParticleSystem.h +++ b/src/modules/graphics/wrap_ParticleSystem.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Quad.cpp b/src/modules/graphics/wrap_Quad.cpp index 6d65f247a..9328123b4 100644 --- a/src/modules/graphics/wrap_Quad.cpp +++ b/src/modules/graphics/wrap_Quad.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Quad.h b/src/modules/graphics/wrap_Quad.h index bf8e401e1..02cf333fa 100644 --- a/src/modules/graphics/wrap_Quad.h +++ b/src/modules/graphics/wrap_Quad.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Shader.cpp b/src/modules/graphics/wrap_Shader.cpp index b31fac826..c6754866b 100644 --- a/src/modules/graphics/wrap_Shader.cpp +++ b/src/modules/graphics/wrap_Shader.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Shader.h b/src/modules/graphics/wrap_Shader.h index d71ad141f..ca6d2f2e5 100644 --- a/src/modules/graphics/wrap_Shader.h +++ b/src/modules/graphics/wrap_Shader.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_SpriteBatch.cpp b/src/modules/graphics/wrap_SpriteBatch.cpp index b6da3e649..bd85d5dd9 100644 --- a/src/modules/graphics/wrap_SpriteBatch.cpp +++ b/src/modules/graphics/wrap_SpriteBatch.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_SpriteBatch.h b/src/modules/graphics/wrap_SpriteBatch.h index d7f0c09a2..e7c13bc15 100644 --- a/src/modules/graphics/wrap_SpriteBatch.h +++ b/src/modules/graphics/wrap_SpriteBatch.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Text.cpp b/src/modules/graphics/wrap_Text.cpp index b1c5aa3c4..2f878fe3f 100644 --- a/src/modules/graphics/wrap_Text.cpp +++ b/src/modules/graphics/wrap_Text.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Text.h b/src/modules/graphics/wrap_Text.h index 37e8072af..f0f962f18 100644 --- a/src/modules/graphics/wrap_Text.h +++ b/src/modules/graphics/wrap_Text.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Texture.cpp b/src/modules/graphics/wrap_Texture.cpp index 1dbee5cac..40cba8e9c 100644 --- a/src/modules/graphics/wrap_Texture.cpp +++ b/src/modules/graphics/wrap_Texture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Texture.h b/src/modules/graphics/wrap_Texture.h index 94c62dfb0..aae3f97dd 100644 --- a/src/modules/graphics/wrap_Texture.h +++ b/src/modules/graphics/wrap_Texture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Video.cpp b/src/modules/graphics/wrap_Video.cpp index d97b97eaa..8320434a6 100644 --- a/src/modules/graphics/wrap_Video.cpp +++ b/src/modules/graphics/wrap_Video.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Video.h b/src/modules/graphics/wrap_Video.h index 39f6e5e45..700a4bba1 100644 --- a/src/modules/graphics/wrap_Video.h +++ b/src/modules/graphics/wrap_Video.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/graphics/wrap_Video.lua b/src/modules/graphics/wrap_Video.lua index ae8097b95..eaf7a0631 100644 --- a/src/modules/graphics/wrap_Video.lua +++ b/src/modules/graphics/wrap_Video.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/CompressedImageData.cpp b/src/modules/image/CompressedImageData.cpp index f26331823..7a674688d 100644 --- a/src/modules/image/CompressedImageData.cpp +++ b/src/modules/image/CompressedImageData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/CompressedImageData.h b/src/modules/image/CompressedImageData.h index 862555021..09a001d35 100644 --- a/src/modules/image/CompressedImageData.h +++ b/src/modules/image/CompressedImageData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/CompressedSlice.cpp b/src/modules/image/CompressedSlice.cpp index eac4ccc31..e1532f8de 100644 --- a/src/modules/image/CompressedSlice.cpp +++ b/src/modules/image/CompressedSlice.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/CompressedSlice.h b/src/modules/image/CompressedSlice.h index ecf75f5e1..cd2975dde 100644 --- a/src/modules/image/CompressedSlice.h +++ b/src/modules/image/CompressedSlice.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/FormatHandler.cpp b/src/modules/image/FormatHandler.cpp index a88103cb1..c5dfe3511 100644 --- a/src/modules/image/FormatHandler.cpp +++ b/src/modules/image/FormatHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/FormatHandler.h b/src/modules/image/FormatHandler.h index e97a697fa..dbf7cd579 100644 --- a/src/modules/image/FormatHandler.h +++ b/src/modules/image/FormatHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/Image.cpp b/src/modules/image/Image.cpp index d5f58e997..33a39fc0c 100644 --- a/src/modules/image/Image.cpp +++ b/src/modules/image/Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/Image.h b/src/modules/image/Image.h index 894e7a208..5e5b39389 100644 --- a/src/modules/image/Image.h +++ b/src/modules/image/Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/ImageData.cpp b/src/modules/image/ImageData.cpp index 50dc7a0f3..ffd1640bb 100644 --- a/src/modules/image/ImageData.cpp +++ b/src/modules/image/ImageData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/ImageData.h b/src/modules/image/ImageData.h index 24a66dc93..686868f3d 100644 --- a/src/modules/image/ImageData.h +++ b/src/modules/image/ImageData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/ImageDataBase.cpp b/src/modules/image/ImageDataBase.cpp index 1e7248c9c..d5266f03c 100644 --- a/src/modules/image/ImageDataBase.cpp +++ b/src/modules/image/ImageDataBase.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/ImageDataBase.h b/src/modules/image/ImageDataBase.h index 0f4f523ee..baf34e93f 100644 --- a/src/modules/image/ImageDataBase.h +++ b/src/modules/image/ImageDataBase.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/ASTCHandler.cpp b/src/modules/image/magpie/ASTCHandler.cpp index 81b0972ec..605e944c6 100644 --- a/src/modules/image/magpie/ASTCHandler.cpp +++ b/src/modules/image/magpie/ASTCHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/ASTCHandler.h b/src/modules/image/magpie/ASTCHandler.h index 5bd43bbad..7ba1dc76b 100644 --- a/src/modules/image/magpie/ASTCHandler.h +++ b/src/modules/image/magpie/ASTCHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/EXRHandler.cpp b/src/modules/image/magpie/EXRHandler.cpp index f880899b4..58ab4ae97 100644 --- a/src/modules/image/magpie/EXRHandler.cpp +++ b/src/modules/image/magpie/EXRHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/EXRHandler.h b/src/modules/image/magpie/EXRHandler.h index af6204f64..ee951f935 100644 --- a/src/modules/image/magpie/EXRHandler.h +++ b/src/modules/image/magpie/EXRHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/KTXHandler.cpp b/src/modules/image/magpie/KTXHandler.cpp index 07cc5e1b8..07679faac 100644 --- a/src/modules/image/magpie/KTXHandler.cpp +++ b/src/modules/image/magpie/KTXHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/KTXHandler.h b/src/modules/image/magpie/KTXHandler.h index 344c50c63..54f6aaca4 100644 --- a/src/modules/image/magpie/KTXHandler.h +++ b/src/modules/image/magpie/KTXHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/PKMHandler.cpp b/src/modules/image/magpie/PKMHandler.cpp index cff15003d..0408aa66a 100644 --- a/src/modules/image/magpie/PKMHandler.cpp +++ b/src/modules/image/magpie/PKMHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/PKMHandler.h b/src/modules/image/magpie/PKMHandler.h index 7a45049aa..2d5eac7bd 100644 --- a/src/modules/image/magpie/PKMHandler.h +++ b/src/modules/image/magpie/PKMHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/PNGHandler.cpp b/src/modules/image/magpie/PNGHandler.cpp index cedc3ca01..833327dcb 100644 --- a/src/modules/image/magpie/PNGHandler.cpp +++ b/src/modules/image/magpie/PNGHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/PNGHandler.h b/src/modules/image/magpie/PNGHandler.h index 2f4ee97cd..7e07e84e4 100644 --- a/src/modules/image/magpie/PNGHandler.h +++ b/src/modules/image/magpie/PNGHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/PVRHandler.cpp b/src/modules/image/magpie/PVRHandler.cpp index 467c40d80..5756ecfb8 100644 --- a/src/modules/image/magpie/PVRHandler.cpp +++ b/src/modules/image/magpie/PVRHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/PVRHandler.h b/src/modules/image/magpie/PVRHandler.h index 077e26a1d..182840007 100644 --- a/src/modules/image/magpie/PVRHandler.h +++ b/src/modules/image/magpie/PVRHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/STBHandler.cpp b/src/modules/image/magpie/STBHandler.cpp index d133d91fd..3da086846 100644 --- a/src/modules/image/magpie/STBHandler.cpp +++ b/src/modules/image/magpie/STBHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/STBHandler.h b/src/modules/image/magpie/STBHandler.h index d78e15e08..eeb10fbfb 100644 --- a/src/modules/image/magpie/STBHandler.h +++ b/src/modules/image/magpie/STBHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/ddsHandler.cpp b/src/modules/image/magpie/ddsHandler.cpp index b090803e7..a9ec2a3fd 100644 --- a/src/modules/image/magpie/ddsHandler.cpp +++ b/src/modules/image/magpie/ddsHandler.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/magpie/ddsHandler.h b/src/modules/image/magpie/ddsHandler.h index 3679f86df..882db8b28 100644 --- a/src/modules/image/magpie/ddsHandler.h +++ b/src/modules/image/magpie/ddsHandler.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/wrap_CompressedImageData.cpp b/src/modules/image/wrap_CompressedImageData.cpp index 15f8908e2..943c2fd96 100644 --- a/src/modules/image/wrap_CompressedImageData.cpp +++ b/src/modules/image/wrap_CompressedImageData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/wrap_CompressedImageData.h b/src/modules/image/wrap_CompressedImageData.h index 041511a71..473e99eb1 100644 --- a/src/modules/image/wrap_CompressedImageData.h +++ b/src/modules/image/wrap_CompressedImageData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/wrap_Image.cpp b/src/modules/image/wrap_Image.cpp index 15b4409e7..91a4e9792 100644 --- a/src/modules/image/wrap_Image.cpp +++ b/src/modules/image/wrap_Image.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/wrap_Image.h b/src/modules/image/wrap_Image.h index 86daafd79..cd60f6741 100644 --- a/src/modules/image/wrap_Image.h +++ b/src/modules/image/wrap_Image.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/wrap_ImageData.cpp b/src/modules/image/wrap_ImageData.cpp index 754ad01c5..86cc3e8df 100644 --- a/src/modules/image/wrap_ImageData.cpp +++ b/src/modules/image/wrap_ImageData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/wrap_ImageData.h b/src/modules/image/wrap_ImageData.h index 6d797068b..bd5e1beba 100644 --- a/src/modules/image/wrap_ImageData.h +++ b/src/modules/image/wrap_ImageData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/image/wrap_ImageData.lua b/src/modules/image/wrap_ImageData.lua index ccea6ce90..bc9be0b90 100644 --- a/src/modules/image/wrap_ImageData.lua +++ b/src/modules/image/wrap_ImageData.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/Joystick.cpp b/src/modules/joystick/Joystick.cpp index 4f05158a0..cb5b0a8bf 100644 --- a/src/modules/joystick/Joystick.cpp +++ b/src/modules/joystick/Joystick.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/Joystick.h b/src/modules/joystick/Joystick.h index c267decdc..9e6e627bf 100644 --- a/src/modules/joystick/Joystick.h +++ b/src/modules/joystick/Joystick.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/JoystickModule.h b/src/modules/joystick/JoystickModule.h index dc890efa9..8b21a46e5 100644 --- a/src/modules/joystick/JoystickModule.h +++ b/src/modules/joystick/JoystickModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/sdl/Joystick.cpp b/src/modules/joystick/sdl/Joystick.cpp index 5d860cceb..1ccb1c016 100644 --- a/src/modules/joystick/sdl/Joystick.cpp +++ b/src/modules/joystick/sdl/Joystick.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/sdl/Joystick.h b/src/modules/joystick/sdl/Joystick.h index 99c489bdc..a9255065b 100644 --- a/src/modules/joystick/sdl/Joystick.h +++ b/src/modules/joystick/sdl/Joystick.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/sdl/JoystickModule.cpp b/src/modules/joystick/sdl/JoystickModule.cpp index de45fe0ff..8c5bc2d61 100644 --- a/src/modules/joystick/sdl/JoystickModule.cpp +++ b/src/modules/joystick/sdl/JoystickModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/sdl/JoystickModule.h b/src/modules/joystick/sdl/JoystickModule.h index 39b9548df..a7d057acf 100644 --- a/src/modules/joystick/sdl/JoystickModule.h +++ b/src/modules/joystick/sdl/JoystickModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/wrap_Joystick.cpp b/src/modules/joystick/wrap_Joystick.cpp index fb088370c..3eb756658 100644 --- a/src/modules/joystick/wrap_Joystick.cpp +++ b/src/modules/joystick/wrap_Joystick.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/wrap_Joystick.h b/src/modules/joystick/wrap_Joystick.h index b80dcd71a..2f3bdc96a 100644 --- a/src/modules/joystick/wrap_Joystick.h +++ b/src/modules/joystick/wrap_Joystick.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/wrap_JoystickModule.cpp b/src/modules/joystick/wrap_JoystickModule.cpp index 5a98f6d0a..b0c6e8289 100644 --- a/src/modules/joystick/wrap_JoystickModule.cpp +++ b/src/modules/joystick/wrap_JoystickModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/joystick/wrap_JoystickModule.h b/src/modules/joystick/wrap_JoystickModule.h index c84d05915..1344fb0a5 100644 --- a/src/modules/joystick/wrap_JoystickModule.h +++ b/src/modules/joystick/wrap_JoystickModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/keyboard/Keyboard.cpp b/src/modules/keyboard/Keyboard.cpp index 9bf8dee7a..02c1903fa 100644 --- a/src/modules/keyboard/Keyboard.cpp +++ b/src/modules/keyboard/Keyboard.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/keyboard/Keyboard.h b/src/modules/keyboard/Keyboard.h index 491d79ce1..41466e00e 100644 --- a/src/modules/keyboard/Keyboard.h +++ b/src/modules/keyboard/Keyboard.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/keyboard/sdl/Keyboard.cpp b/src/modules/keyboard/sdl/Keyboard.cpp index 3fae7c793..37f7090e0 100644 --- a/src/modules/keyboard/sdl/Keyboard.cpp +++ b/src/modules/keyboard/sdl/Keyboard.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/keyboard/sdl/Keyboard.h b/src/modules/keyboard/sdl/Keyboard.h index 13638faa7..495fdf72c 100644 --- a/src/modules/keyboard/sdl/Keyboard.h +++ b/src/modules/keyboard/sdl/Keyboard.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/keyboard/wrap_Keyboard.cpp b/src/modules/keyboard/wrap_Keyboard.cpp index 559595427..a054b98e5 100644 --- a/src/modules/keyboard/wrap_Keyboard.cpp +++ b/src/modules/keyboard/wrap_Keyboard.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/keyboard/wrap_Keyboard.h b/src/modules/keyboard/wrap_Keyboard.h index 8983393ef..462d3fa74 100644 --- a/src/modules/keyboard/wrap_Keyboard.h +++ b/src/modules/keyboard/wrap_Keyboard.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/love/arg.lua b/src/modules/love/arg.lua index a26660afa..530c0502a 100644 --- a/src/modules/love/arg.lua +++ b/src/modules/love/arg.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/love/boot.lua b/src/modules/love/boot.lua index 038cab634..7ab3a9a60 100644 --- a/src/modules/love/boot.lua +++ b/src/modules/love/boot.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/love/callbacks.lua b/src/modules/love/callbacks.lua index 305a127f4..ee721867a 100644 --- a/src/modules/love/callbacks.lua +++ b/src/modules/love/callbacks.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/love/jitsetup.lua b/src/modules/love/jitsetup.lua index 296ba6c22..0049cc8dc 100644 --- a/src/modules/love/jitsetup.lua +++ b/src/modules/love/jitsetup.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/love/love.cpp b/src/modules/love/love.cpp index 0202a8526..2db50a217 100644 --- a/src/modules/love/love.cpp +++ b/src/modules/love/love.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/love/love.h b/src/modules/love/love.h index be63092c0..1ee3f6b0f 100644 --- a/src/modules/love/love.h +++ b/src/modules/love/love.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/BezierCurve.cpp b/src/modules/math/BezierCurve.cpp index 0ec79d6ac..5dde2f80c 100644 --- a/src/modules/math/BezierCurve.cpp +++ b/src/modules/math/BezierCurve.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/BezierCurve.h b/src/modules/math/BezierCurve.h index 0235f105a..4e0420cb7 100644 --- a/src/modules/math/BezierCurve.h +++ b/src/modules/math/BezierCurve.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/MathModule.cpp b/src/modules/math/MathModule.cpp index 02a41477f..84053b83c 100644 --- a/src/modules/math/MathModule.cpp +++ b/src/modules/math/MathModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/MathModule.h b/src/modules/math/MathModule.h index 82f45a4f8..517ab56e6 100644 --- a/src/modules/math/MathModule.h +++ b/src/modules/math/MathModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/RandomGenerator.cpp b/src/modules/math/RandomGenerator.cpp index 29359b58b..3c7439a64 100644 --- a/src/modules/math/RandomGenerator.cpp +++ b/src/modules/math/RandomGenerator.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/RandomGenerator.h b/src/modules/math/RandomGenerator.h index 58e1990fd..749dc097a 100644 --- a/src/modules/math/RandomGenerator.h +++ b/src/modules/math/RandomGenerator.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/Transform.cpp b/src/modules/math/Transform.cpp index a53d71d73..00bb74e20 100644 --- a/src/modules/math/Transform.cpp +++ b/src/modules/math/Transform.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/Transform.h b/src/modules/math/Transform.h index 40068b77a..e340b0bb2 100644 --- a/src/modules/math/Transform.h +++ b/src/modules/math/Transform.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_BezierCurve.cpp b/src/modules/math/wrap_BezierCurve.cpp index 53167c1a1..c1be7a4b6 100644 --- a/src/modules/math/wrap_BezierCurve.cpp +++ b/src/modules/math/wrap_BezierCurve.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_BezierCurve.h b/src/modules/math/wrap_BezierCurve.h index d748b8253..9ed9ac59f 100644 --- a/src/modules/math/wrap_BezierCurve.h +++ b/src/modules/math/wrap_BezierCurve.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_Math.cpp b/src/modules/math/wrap_Math.cpp index 90ee5e909..20f7c7c00 100644 --- a/src/modules/math/wrap_Math.cpp +++ b/src/modules/math/wrap_Math.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_Math.h b/src/modules/math/wrap_Math.h index 8d5bbe2b4..ca40caba1 100644 --- a/src/modules/math/wrap_Math.h +++ b/src/modules/math/wrap_Math.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_Math.lua b/src/modules/math/wrap_Math.lua index e56a8450e..d5d2a03e7 100644 --- a/src/modules/math/wrap_Math.lua +++ b/src/modules/math/wrap_Math.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_RandomGenerator.cpp b/src/modules/math/wrap_RandomGenerator.cpp index ebe7fdffc..007cad60c 100644 --- a/src/modules/math/wrap_RandomGenerator.cpp +++ b/src/modules/math/wrap_RandomGenerator.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_RandomGenerator.h b/src/modules/math/wrap_RandomGenerator.h index a1459da9c..9bbe807e6 100644 --- a/src/modules/math/wrap_RandomGenerator.h +++ b/src/modules/math/wrap_RandomGenerator.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_RandomGenerator.lua b/src/modules/math/wrap_RandomGenerator.lua index 4e96f5f61..e394833ec 100644 --- a/src/modules/math/wrap_RandomGenerator.lua +++ b/src/modules/math/wrap_RandomGenerator.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_Transform.cpp b/src/modules/math/wrap_Transform.cpp index 3ac5b2f78..b622e1dad 100644 --- a/src/modules/math/wrap_Transform.cpp +++ b/src/modules/math/wrap_Transform.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/math/wrap_Transform.h b/src/modules/math/wrap_Transform.h index 830794807..80f3a1e15 100644 --- a/src/modules/math/wrap_Transform.h +++ b/src/modules/math/wrap_Transform.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/Cursor.cpp b/src/modules/mouse/Cursor.cpp index 6f537de91..dada2b616 100644 --- a/src/modules/mouse/Cursor.cpp +++ b/src/modules/mouse/Cursor.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/Cursor.h b/src/modules/mouse/Cursor.h index 69e220f9a..352c6b392 100644 --- a/src/modules/mouse/Cursor.h +++ b/src/modules/mouse/Cursor.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/Mouse.h b/src/modules/mouse/Mouse.h index d57c49406..6a118a876 100644 --- a/src/modules/mouse/Mouse.h +++ b/src/modules/mouse/Mouse.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/sdl/Cursor.cpp b/src/modules/mouse/sdl/Cursor.cpp index 6e17c00cf..8355ed73d 100644 --- a/src/modules/mouse/sdl/Cursor.cpp +++ b/src/modules/mouse/sdl/Cursor.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/sdl/Cursor.h b/src/modules/mouse/sdl/Cursor.h index 9f6b37a0f..b72d46131 100644 --- a/src/modules/mouse/sdl/Cursor.h +++ b/src/modules/mouse/sdl/Cursor.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/sdl/Mouse.cpp b/src/modules/mouse/sdl/Mouse.cpp index 8ff555ea2..d9407519c 100644 --- a/src/modules/mouse/sdl/Mouse.cpp +++ b/src/modules/mouse/sdl/Mouse.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/sdl/Mouse.h b/src/modules/mouse/sdl/Mouse.h index abab2d61b..7969781a7 100644 --- a/src/modules/mouse/sdl/Mouse.h +++ b/src/modules/mouse/sdl/Mouse.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/wrap_Cursor.cpp b/src/modules/mouse/wrap_Cursor.cpp index fc3bed46e..dc4a871cf 100644 --- a/src/modules/mouse/wrap_Cursor.cpp +++ b/src/modules/mouse/wrap_Cursor.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/wrap_Cursor.h b/src/modules/mouse/wrap_Cursor.h index 963bb8802..14304c489 100644 --- a/src/modules/mouse/wrap_Cursor.h +++ b/src/modules/mouse/wrap_Cursor.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/wrap_Mouse.cpp b/src/modules/mouse/wrap_Mouse.cpp index 999be9969..caedeae5d 100644 --- a/src/modules/mouse/wrap_Mouse.cpp +++ b/src/modules/mouse/wrap_Mouse.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/mouse/wrap_Mouse.h b/src/modules/mouse/wrap_Mouse.h index 9cc285ee5..f39564eb6 100644 --- a/src/modules/mouse/wrap_Mouse.h +++ b/src/modules/mouse/wrap_Mouse.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/Body.cpp b/src/modules/physics/Body.cpp index fc93a401e..ec7214594 100644 --- a/src/modules/physics/Body.cpp +++ b/src/modules/physics/Body.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/Body.h b/src/modules/physics/Body.h index 97b578e63..eca01fd3f 100644 --- a/src/modules/physics/Body.h +++ b/src/modules/physics/Body.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/Joint.cpp b/src/modules/physics/Joint.cpp index 8b12e78a5..83cb91789 100644 --- a/src/modules/physics/Joint.cpp +++ b/src/modules/physics/Joint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/Joint.h b/src/modules/physics/Joint.h index 89b3fb2d4..d30c4aec7 100644 --- a/src/modules/physics/Joint.h +++ b/src/modules/physics/Joint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/Shape.cpp b/src/modules/physics/Shape.cpp index fe184b829..712b10830 100644 --- a/src/modules/physics/Shape.cpp +++ b/src/modules/physics/Shape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/Shape.h b/src/modules/physics/Shape.h index ca5a5f7a9..49ae39229 100644 --- a/src/modules/physics/Shape.h +++ b/src/modules/physics/Shape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Body.cpp b/src/modules/physics/box2d/Body.cpp index 7c566d2f8..149e23b39 100644 --- a/src/modules/physics/box2d/Body.cpp +++ b/src/modules/physics/box2d/Body.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Body.h b/src/modules/physics/box2d/Body.h index 141ea54b4..d7d16ab53 100644 --- a/src/modules/physics/box2d/Body.h +++ b/src/modules/physics/box2d/Body.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/ChainShape.cpp b/src/modules/physics/box2d/ChainShape.cpp index 8fc2f013b..1f35893c8 100644 --- a/src/modules/physics/box2d/ChainShape.cpp +++ b/src/modules/physics/box2d/ChainShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/ChainShape.h b/src/modules/physics/box2d/ChainShape.h index c1ce28bed..6358d086b 100644 --- a/src/modules/physics/box2d/ChainShape.h +++ b/src/modules/physics/box2d/ChainShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/CircleShape.cpp b/src/modules/physics/box2d/CircleShape.cpp index 545620f81..5a0c11df3 100644 --- a/src/modules/physics/box2d/CircleShape.cpp +++ b/src/modules/physics/box2d/CircleShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/CircleShape.h b/src/modules/physics/box2d/CircleShape.h index 438034bb8..20bfcffac 100644 --- a/src/modules/physics/box2d/CircleShape.h +++ b/src/modules/physics/box2d/CircleShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Contact.cpp b/src/modules/physics/box2d/Contact.cpp index 5b110dcc3..4e8c654ad 100644 --- a/src/modules/physics/box2d/Contact.cpp +++ b/src/modules/physics/box2d/Contact.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Contact.h b/src/modules/physics/box2d/Contact.h index 23445125d..3d4e38d35 100644 --- a/src/modules/physics/box2d/Contact.h +++ b/src/modules/physics/box2d/Contact.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/DistanceJoint.cpp b/src/modules/physics/box2d/DistanceJoint.cpp index 0ed115b20..d9123133e 100644 --- a/src/modules/physics/box2d/DistanceJoint.cpp +++ b/src/modules/physics/box2d/DistanceJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/DistanceJoint.h b/src/modules/physics/box2d/DistanceJoint.h index 382efbbf6..13bbaefa6 100644 --- a/src/modules/physics/box2d/DistanceJoint.h +++ b/src/modules/physics/box2d/DistanceJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/EdgeShape.cpp b/src/modules/physics/box2d/EdgeShape.cpp index 9abd0398f..0e0f99edf 100644 --- a/src/modules/physics/box2d/EdgeShape.cpp +++ b/src/modules/physics/box2d/EdgeShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/EdgeShape.h b/src/modules/physics/box2d/EdgeShape.h index 0920d1553..74b0113da 100644 --- a/src/modules/physics/box2d/EdgeShape.h +++ b/src/modules/physics/box2d/EdgeShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Fixture.cpp b/src/modules/physics/box2d/Fixture.cpp index fca40b697..7a0685987 100644 --- a/src/modules/physics/box2d/Fixture.cpp +++ b/src/modules/physics/box2d/Fixture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Fixture.h b/src/modules/physics/box2d/Fixture.h index 8b541b8c9..e441e5abb 100644 --- a/src/modules/physics/box2d/Fixture.h +++ b/src/modules/physics/box2d/Fixture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/FrictionJoint.cpp b/src/modules/physics/box2d/FrictionJoint.cpp index af0066e30..80ec092df 100644 --- a/src/modules/physics/box2d/FrictionJoint.cpp +++ b/src/modules/physics/box2d/FrictionJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/FrictionJoint.h b/src/modules/physics/box2d/FrictionJoint.h index 145bbf78d..d8d7391be 100644 --- a/src/modules/physics/box2d/FrictionJoint.h +++ b/src/modules/physics/box2d/FrictionJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/GearJoint.cpp b/src/modules/physics/box2d/GearJoint.cpp index af7ddcdb0..c38f23b35 100644 --- a/src/modules/physics/box2d/GearJoint.cpp +++ b/src/modules/physics/box2d/GearJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/GearJoint.h b/src/modules/physics/box2d/GearJoint.h index f6199de0b..2c434ea1a 100644 --- a/src/modules/physics/box2d/GearJoint.h +++ b/src/modules/physics/box2d/GearJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Joint.cpp b/src/modules/physics/box2d/Joint.cpp index bcea675b6..25b7480bd 100644 --- a/src/modules/physics/box2d/Joint.cpp +++ b/src/modules/physics/box2d/Joint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Joint.h b/src/modules/physics/box2d/Joint.h index 73e89222d..213896067 100644 --- a/src/modules/physics/box2d/Joint.h +++ b/src/modules/physics/box2d/Joint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/MotorJoint.cpp b/src/modules/physics/box2d/MotorJoint.cpp index bff22662c..9ee884634 100644 --- a/src/modules/physics/box2d/MotorJoint.cpp +++ b/src/modules/physics/box2d/MotorJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/MotorJoint.h b/src/modules/physics/box2d/MotorJoint.h index ef0faf0c0..a3a875c42 100644 --- a/src/modules/physics/box2d/MotorJoint.h +++ b/src/modules/physics/box2d/MotorJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/MouseJoint.cpp b/src/modules/physics/box2d/MouseJoint.cpp index c0e3b6faa..675b5028c 100644 --- a/src/modules/physics/box2d/MouseJoint.cpp +++ b/src/modules/physics/box2d/MouseJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/MouseJoint.h b/src/modules/physics/box2d/MouseJoint.h index 684ae382e..f190b797f 100644 --- a/src/modules/physics/box2d/MouseJoint.h +++ b/src/modules/physics/box2d/MouseJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Physics.cpp b/src/modules/physics/box2d/Physics.cpp index a3e3240e5..b542c580d 100644 --- a/src/modules/physics/box2d/Physics.cpp +++ b/src/modules/physics/box2d/Physics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Physics.h b/src/modules/physics/box2d/Physics.h index ffabaf2e0..50ad4158e 100644 --- a/src/modules/physics/box2d/Physics.h +++ b/src/modules/physics/box2d/Physics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/PolygonShape.cpp b/src/modules/physics/box2d/PolygonShape.cpp index b486c58cf..144dd66b0 100644 --- a/src/modules/physics/box2d/PolygonShape.cpp +++ b/src/modules/physics/box2d/PolygonShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/PolygonShape.h b/src/modules/physics/box2d/PolygonShape.h index 9a632ae6d..c696a0d0a 100644 --- a/src/modules/physics/box2d/PolygonShape.h +++ b/src/modules/physics/box2d/PolygonShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/PrismaticJoint.cpp b/src/modules/physics/box2d/PrismaticJoint.cpp index dba52f8e2..ecaad09d1 100644 --- a/src/modules/physics/box2d/PrismaticJoint.cpp +++ b/src/modules/physics/box2d/PrismaticJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/PrismaticJoint.h b/src/modules/physics/box2d/PrismaticJoint.h index 0c774367b..939caa0b3 100644 --- a/src/modules/physics/box2d/PrismaticJoint.h +++ b/src/modules/physics/box2d/PrismaticJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/PulleyJoint.cpp b/src/modules/physics/box2d/PulleyJoint.cpp index afc1c0d88..b4c73f782 100644 --- a/src/modules/physics/box2d/PulleyJoint.cpp +++ b/src/modules/physics/box2d/PulleyJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/PulleyJoint.h b/src/modules/physics/box2d/PulleyJoint.h index 61be4cfef..6c3ad5aea 100644 --- a/src/modules/physics/box2d/PulleyJoint.h +++ b/src/modules/physics/box2d/PulleyJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/RevoluteJoint.cpp b/src/modules/physics/box2d/RevoluteJoint.cpp index 269cb548f..a8a9204fa 100644 --- a/src/modules/physics/box2d/RevoluteJoint.cpp +++ b/src/modules/physics/box2d/RevoluteJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/RevoluteJoint.h b/src/modules/physics/box2d/RevoluteJoint.h index 9c8367824..f68a51271 100644 --- a/src/modules/physics/box2d/RevoluteJoint.h +++ b/src/modules/physics/box2d/RevoluteJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/RopeJoint.cpp b/src/modules/physics/box2d/RopeJoint.cpp index 40a044653..c2029a53f 100644 --- a/src/modules/physics/box2d/RopeJoint.cpp +++ b/src/modules/physics/box2d/RopeJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/RopeJoint.h b/src/modules/physics/box2d/RopeJoint.h index d073321f2..56caebd14 100644 --- a/src/modules/physics/box2d/RopeJoint.h +++ b/src/modules/physics/box2d/RopeJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Shape.cpp b/src/modules/physics/box2d/Shape.cpp index e65807582..052cce442 100644 --- a/src/modules/physics/box2d/Shape.cpp +++ b/src/modules/physics/box2d/Shape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/Shape.h b/src/modules/physics/box2d/Shape.h index 4bef2c6d7..0222dd340 100644 --- a/src/modules/physics/box2d/Shape.h +++ b/src/modules/physics/box2d/Shape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/WeldJoint.cpp b/src/modules/physics/box2d/WeldJoint.cpp index 862056f49..74835548e 100644 --- a/src/modules/physics/box2d/WeldJoint.cpp +++ b/src/modules/physics/box2d/WeldJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/WeldJoint.h b/src/modules/physics/box2d/WeldJoint.h index 9e373b6e1..e71237274 100644 --- a/src/modules/physics/box2d/WeldJoint.h +++ b/src/modules/physics/box2d/WeldJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/WheelJoint.cpp b/src/modules/physics/box2d/WheelJoint.cpp index d5ac09a93..0ca3fa552 100644 --- a/src/modules/physics/box2d/WheelJoint.cpp +++ b/src/modules/physics/box2d/WheelJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/WheelJoint.h b/src/modules/physics/box2d/WheelJoint.h index 6f7b6be4c..465915382 100644 --- a/src/modules/physics/box2d/WheelJoint.h +++ b/src/modules/physics/box2d/WheelJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/World.cpp b/src/modules/physics/box2d/World.cpp index 33fbe359e..8c4578779 100644 --- a/src/modules/physics/box2d/World.cpp +++ b/src/modules/physics/box2d/World.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/World.h b/src/modules/physics/box2d/World.h index 83ad1eabf..e6ba1009e 100644 --- a/src/modules/physics/box2d/World.h +++ b/src/modules/physics/box2d/World.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Body.cpp b/src/modules/physics/box2d/wrap_Body.cpp index adb940d27..f560200d7 100644 --- a/src/modules/physics/box2d/wrap_Body.cpp +++ b/src/modules/physics/box2d/wrap_Body.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Body.h b/src/modules/physics/box2d/wrap_Body.h index bf2398d0b..66e657b31 100644 --- a/src/modules/physics/box2d/wrap_Body.h +++ b/src/modules/physics/box2d/wrap_Body.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_ChainShape.cpp b/src/modules/physics/box2d/wrap_ChainShape.cpp index 28b9c01a4..fbb450c42 100644 --- a/src/modules/physics/box2d/wrap_ChainShape.cpp +++ b/src/modules/physics/box2d/wrap_ChainShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_ChainShape.h b/src/modules/physics/box2d/wrap_ChainShape.h index ce283df01..ce40c0de8 100644 --- a/src/modules/physics/box2d/wrap_ChainShape.h +++ b/src/modules/physics/box2d/wrap_ChainShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_CircleShape.cpp b/src/modules/physics/box2d/wrap_CircleShape.cpp index f9ec8394a..9fdcc6348 100644 --- a/src/modules/physics/box2d/wrap_CircleShape.cpp +++ b/src/modules/physics/box2d/wrap_CircleShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_CircleShape.h b/src/modules/physics/box2d/wrap_CircleShape.h index 9e9ef36fc..7e0ccacbd 100644 --- a/src/modules/physics/box2d/wrap_CircleShape.h +++ b/src/modules/physics/box2d/wrap_CircleShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Contact.cpp b/src/modules/physics/box2d/wrap_Contact.cpp index d18d39402..e00f7e287 100644 --- a/src/modules/physics/box2d/wrap_Contact.cpp +++ b/src/modules/physics/box2d/wrap_Contact.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Contact.h b/src/modules/physics/box2d/wrap_Contact.h index 3dd811344..40f8d4235 100644 --- a/src/modules/physics/box2d/wrap_Contact.h +++ b/src/modules/physics/box2d/wrap_Contact.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_DistanceJoint.cpp b/src/modules/physics/box2d/wrap_DistanceJoint.cpp index d81cd24e0..7f9ab8a87 100644 --- a/src/modules/physics/box2d/wrap_DistanceJoint.cpp +++ b/src/modules/physics/box2d/wrap_DistanceJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_DistanceJoint.h b/src/modules/physics/box2d/wrap_DistanceJoint.h index 583e60a01..86a5f1b85 100644 --- a/src/modules/physics/box2d/wrap_DistanceJoint.h +++ b/src/modules/physics/box2d/wrap_DistanceJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_EdgeShape.cpp b/src/modules/physics/box2d/wrap_EdgeShape.cpp index 275109e3f..272fc36df 100644 --- a/src/modules/physics/box2d/wrap_EdgeShape.cpp +++ b/src/modules/physics/box2d/wrap_EdgeShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_EdgeShape.h b/src/modules/physics/box2d/wrap_EdgeShape.h index 35f07cd34..c92e92c3f 100644 --- a/src/modules/physics/box2d/wrap_EdgeShape.h +++ b/src/modules/physics/box2d/wrap_EdgeShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Fixture.cpp b/src/modules/physics/box2d/wrap_Fixture.cpp index 4056874c9..1bf5ea2d0 100644 --- a/src/modules/physics/box2d/wrap_Fixture.cpp +++ b/src/modules/physics/box2d/wrap_Fixture.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Fixture.h b/src/modules/physics/box2d/wrap_Fixture.h index 0d31d6fa0..c38d79597 100644 --- a/src/modules/physics/box2d/wrap_Fixture.h +++ b/src/modules/physics/box2d/wrap_Fixture.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_FrictionJoint.cpp b/src/modules/physics/box2d/wrap_FrictionJoint.cpp index 14caa958b..fcb3230a8 100644 --- a/src/modules/physics/box2d/wrap_FrictionJoint.cpp +++ b/src/modules/physics/box2d/wrap_FrictionJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_FrictionJoint.h b/src/modules/physics/box2d/wrap_FrictionJoint.h index 16561bfa7..490e819e3 100644 --- a/src/modules/physics/box2d/wrap_FrictionJoint.h +++ b/src/modules/physics/box2d/wrap_FrictionJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_GearJoint.cpp b/src/modules/physics/box2d/wrap_GearJoint.cpp index 905a619f6..b7d0966cc 100644 --- a/src/modules/physics/box2d/wrap_GearJoint.cpp +++ b/src/modules/physics/box2d/wrap_GearJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_GearJoint.h b/src/modules/physics/box2d/wrap_GearJoint.h index 9469750b2..eb58da935 100644 --- a/src/modules/physics/box2d/wrap_GearJoint.h +++ b/src/modules/physics/box2d/wrap_GearJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Joint.cpp b/src/modules/physics/box2d/wrap_Joint.cpp index 71ed39225..8139ff39a 100644 --- a/src/modules/physics/box2d/wrap_Joint.cpp +++ b/src/modules/physics/box2d/wrap_Joint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Joint.h b/src/modules/physics/box2d/wrap_Joint.h index 47e976daa..e9794525b 100644 --- a/src/modules/physics/box2d/wrap_Joint.h +++ b/src/modules/physics/box2d/wrap_Joint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_MotorJoint.cpp b/src/modules/physics/box2d/wrap_MotorJoint.cpp index 62513b120..3001d4df3 100644 --- a/src/modules/physics/box2d/wrap_MotorJoint.cpp +++ b/src/modules/physics/box2d/wrap_MotorJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_MotorJoint.h b/src/modules/physics/box2d/wrap_MotorJoint.h index 3d684041d..464b2b09b 100644 --- a/src/modules/physics/box2d/wrap_MotorJoint.h +++ b/src/modules/physics/box2d/wrap_MotorJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_MouseJoint.cpp b/src/modules/physics/box2d/wrap_MouseJoint.cpp index 32e351d8c..1d84f6d20 100644 --- a/src/modules/physics/box2d/wrap_MouseJoint.cpp +++ b/src/modules/physics/box2d/wrap_MouseJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_MouseJoint.h b/src/modules/physics/box2d/wrap_MouseJoint.h index c36a8f241..a45f79167 100644 --- a/src/modules/physics/box2d/wrap_MouseJoint.h +++ b/src/modules/physics/box2d/wrap_MouseJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Physics.cpp b/src/modules/physics/box2d/wrap_Physics.cpp index 7f88d4067..565d9005b 100644 --- a/src/modules/physics/box2d/wrap_Physics.cpp +++ b/src/modules/physics/box2d/wrap_Physics.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Physics.h b/src/modules/physics/box2d/wrap_Physics.h index 0d8b93b5f..0b56b17bd 100644 --- a/src/modules/physics/box2d/wrap_Physics.h +++ b/src/modules/physics/box2d/wrap_Physics.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_PolygonShape.cpp b/src/modules/physics/box2d/wrap_PolygonShape.cpp index 522b1bf9f..2b4c59218 100644 --- a/src/modules/physics/box2d/wrap_PolygonShape.cpp +++ b/src/modules/physics/box2d/wrap_PolygonShape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_PolygonShape.h b/src/modules/physics/box2d/wrap_PolygonShape.h index 0eda5f054..c281dfe13 100644 --- a/src/modules/physics/box2d/wrap_PolygonShape.h +++ b/src/modules/physics/box2d/wrap_PolygonShape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_PrismaticJoint.cpp b/src/modules/physics/box2d/wrap_PrismaticJoint.cpp index 9221834b1..56158fdc9 100644 --- a/src/modules/physics/box2d/wrap_PrismaticJoint.cpp +++ b/src/modules/physics/box2d/wrap_PrismaticJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_PrismaticJoint.h b/src/modules/physics/box2d/wrap_PrismaticJoint.h index b66651652..307a1d1df 100644 --- a/src/modules/physics/box2d/wrap_PrismaticJoint.h +++ b/src/modules/physics/box2d/wrap_PrismaticJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_PulleyJoint.cpp b/src/modules/physics/box2d/wrap_PulleyJoint.cpp index d41e64031..7e376f4b8 100644 --- a/src/modules/physics/box2d/wrap_PulleyJoint.cpp +++ b/src/modules/physics/box2d/wrap_PulleyJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_PulleyJoint.h b/src/modules/physics/box2d/wrap_PulleyJoint.h index e365478fb..2cec64fbe 100644 --- a/src/modules/physics/box2d/wrap_PulleyJoint.h +++ b/src/modules/physics/box2d/wrap_PulleyJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_RevoluteJoint.cpp b/src/modules/physics/box2d/wrap_RevoluteJoint.cpp index 39b77ae53..2cdad19f1 100644 --- a/src/modules/physics/box2d/wrap_RevoluteJoint.cpp +++ b/src/modules/physics/box2d/wrap_RevoluteJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_RevoluteJoint.h b/src/modules/physics/box2d/wrap_RevoluteJoint.h index 9347606fd..66e4b3386 100644 --- a/src/modules/physics/box2d/wrap_RevoluteJoint.h +++ b/src/modules/physics/box2d/wrap_RevoluteJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_RopeJoint.cpp b/src/modules/physics/box2d/wrap_RopeJoint.cpp index d91445288..c3fef9faf 100644 --- a/src/modules/physics/box2d/wrap_RopeJoint.cpp +++ b/src/modules/physics/box2d/wrap_RopeJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_RopeJoint.h b/src/modules/physics/box2d/wrap_RopeJoint.h index c264c710c..2b0fd7414 100644 --- a/src/modules/physics/box2d/wrap_RopeJoint.h +++ b/src/modules/physics/box2d/wrap_RopeJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Shape.cpp b/src/modules/physics/box2d/wrap_Shape.cpp index 497f5d95f..6b1e172f5 100644 --- a/src/modules/physics/box2d/wrap_Shape.cpp +++ b/src/modules/physics/box2d/wrap_Shape.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_Shape.h b/src/modules/physics/box2d/wrap_Shape.h index e5cd01cbe..04f208de8 100644 --- a/src/modules/physics/box2d/wrap_Shape.h +++ b/src/modules/physics/box2d/wrap_Shape.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_WeldJoint.cpp b/src/modules/physics/box2d/wrap_WeldJoint.cpp index 8e1a4f411..de6dadeae 100644 --- a/src/modules/physics/box2d/wrap_WeldJoint.cpp +++ b/src/modules/physics/box2d/wrap_WeldJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_WeldJoint.h b/src/modules/physics/box2d/wrap_WeldJoint.h index 234c7350c..f9a3e1132 100644 --- a/src/modules/physics/box2d/wrap_WeldJoint.h +++ b/src/modules/physics/box2d/wrap_WeldJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_WheelJoint.cpp b/src/modules/physics/box2d/wrap_WheelJoint.cpp index 6f3576835..cb0fdaba1 100644 --- a/src/modules/physics/box2d/wrap_WheelJoint.cpp +++ b/src/modules/physics/box2d/wrap_WheelJoint.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_WheelJoint.h b/src/modules/physics/box2d/wrap_WheelJoint.h index 827863d02..5bfdd48af 100644 --- a/src/modules/physics/box2d/wrap_WheelJoint.h +++ b/src/modules/physics/box2d/wrap_WheelJoint.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_World.cpp b/src/modules/physics/box2d/wrap_World.cpp index e1c38de1a..ffc8b8fa5 100644 --- a/src/modules/physics/box2d/wrap_World.cpp +++ b/src/modules/physics/box2d/wrap_World.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/physics/box2d/wrap_World.h b/src/modules/physics/box2d/wrap_World.h index cf0660299..e65f83b7b 100644 --- a/src/modules/physics/box2d/wrap_World.h +++ b/src/modules/physics/box2d/wrap_World.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/Decoder.cpp b/src/modules/sound/Decoder.cpp index a50acf5e8..89b5f1323 100644 --- a/src/modules/sound/Decoder.cpp +++ b/src/modules/sound/Decoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/Decoder.h b/src/modules/sound/Decoder.h index 0d20e70e2..c008f0419 100644 --- a/src/modules/sound/Decoder.h +++ b/src/modules/sound/Decoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/Sound.cpp b/src/modules/sound/Sound.cpp index 99ff80992..617d7f5bc 100644 --- a/src/modules/sound/Sound.cpp +++ b/src/modules/sound/Sound.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/Sound.h b/src/modules/sound/Sound.h index ef196f852..5dd0c909b 100644 --- a/src/modules/sound/Sound.h +++ b/src/modules/sound/Sound.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/SoundData.cpp b/src/modules/sound/SoundData.cpp index 59d33092d..19a47a5a6 100644 --- a/src/modules/sound/SoundData.cpp +++ b/src/modules/sound/SoundData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/SoundData.h b/src/modules/sound/SoundData.h index e27947663..e47f1b08a 100644 --- a/src/modules/sound/SoundData.h +++ b/src/modules/sound/SoundData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/CoreAudioDecoder.cpp b/src/modules/sound/lullaby/CoreAudioDecoder.cpp index 21f35c78a..91ff54a16 100644 --- a/src/modules/sound/lullaby/CoreAudioDecoder.cpp +++ b/src/modules/sound/lullaby/CoreAudioDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/CoreAudioDecoder.h b/src/modules/sound/lullaby/CoreAudioDecoder.h index 586c29eb1..52c974a17 100644 --- a/src/modules/sound/lullaby/CoreAudioDecoder.h +++ b/src/modules/sound/lullaby/CoreAudioDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/FLACDecoder.cpp b/src/modules/sound/lullaby/FLACDecoder.cpp index 0602bed25..49bf7995a 100644 --- a/src/modules/sound/lullaby/FLACDecoder.cpp +++ b/src/modules/sound/lullaby/FLACDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/FLACDecoder.h b/src/modules/sound/lullaby/FLACDecoder.h index 7733c5839..94715c913 100644 --- a/src/modules/sound/lullaby/FLACDecoder.h +++ b/src/modules/sound/lullaby/FLACDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/GmeDecoder.cpp b/src/modules/sound/lullaby/GmeDecoder.cpp index f5412cf4e..7074516a1 100644 --- a/src/modules/sound/lullaby/GmeDecoder.cpp +++ b/src/modules/sound/lullaby/GmeDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/GmeDecoder.h b/src/modules/sound/lullaby/GmeDecoder.h index 44d9a8674..24b23f5bd 100644 --- a/src/modules/sound/lullaby/GmeDecoder.h +++ b/src/modules/sound/lullaby/GmeDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/ModPlugDecoder.cpp b/src/modules/sound/lullaby/ModPlugDecoder.cpp index b8bd884a9..ca1860b4a 100644 --- a/src/modules/sound/lullaby/ModPlugDecoder.cpp +++ b/src/modules/sound/lullaby/ModPlugDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/ModPlugDecoder.h b/src/modules/sound/lullaby/ModPlugDecoder.h index 1c0215e4c..75a75cf64 100644 --- a/src/modules/sound/lullaby/ModPlugDecoder.h +++ b/src/modules/sound/lullaby/ModPlugDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/Mpg123Decoder.cpp b/src/modules/sound/lullaby/Mpg123Decoder.cpp index c358fe664..56970be14 100644 --- a/src/modules/sound/lullaby/Mpg123Decoder.cpp +++ b/src/modules/sound/lullaby/Mpg123Decoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/Mpg123Decoder.h b/src/modules/sound/lullaby/Mpg123Decoder.h index e951c554b..e92b69b98 100644 --- a/src/modules/sound/lullaby/Mpg123Decoder.h +++ b/src/modules/sound/lullaby/Mpg123Decoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/Sound.cpp b/src/modules/sound/lullaby/Sound.cpp index be4c65b3e..432bf0a81 100644 --- a/src/modules/sound/lullaby/Sound.cpp +++ b/src/modules/sound/lullaby/Sound.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/Sound.h b/src/modules/sound/lullaby/Sound.h index 2c0243c32..eb590b988 100644 --- a/src/modules/sound/lullaby/Sound.h +++ b/src/modules/sound/lullaby/Sound.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/VorbisDecoder.cpp b/src/modules/sound/lullaby/VorbisDecoder.cpp index f3159f8a9..cde88c4af 100644 --- a/src/modules/sound/lullaby/VorbisDecoder.cpp +++ b/src/modules/sound/lullaby/VorbisDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/VorbisDecoder.h b/src/modules/sound/lullaby/VorbisDecoder.h index ac173e9c5..e200e13a7 100644 --- a/src/modules/sound/lullaby/VorbisDecoder.h +++ b/src/modules/sound/lullaby/VorbisDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/WaveDecoder.cpp b/src/modules/sound/lullaby/WaveDecoder.cpp index 1c60d5a64..0407a4f30 100644 --- a/src/modules/sound/lullaby/WaveDecoder.cpp +++ b/src/modules/sound/lullaby/WaveDecoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/lullaby/WaveDecoder.h b/src/modules/sound/lullaby/WaveDecoder.h index f48115990..7e1a66cb1 100644 --- a/src/modules/sound/lullaby/WaveDecoder.h +++ b/src/modules/sound/lullaby/WaveDecoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/wrap_Decoder.cpp b/src/modules/sound/wrap_Decoder.cpp index 28b85d42d..a208b639d 100644 --- a/src/modules/sound/wrap_Decoder.cpp +++ b/src/modules/sound/wrap_Decoder.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/wrap_Decoder.h b/src/modules/sound/wrap_Decoder.h index 974ec5306..55533f2c3 100644 --- a/src/modules/sound/wrap_Decoder.h +++ b/src/modules/sound/wrap_Decoder.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/wrap_Sound.cpp b/src/modules/sound/wrap_Sound.cpp index 78d9f3852..39eb5eb11 100644 --- a/src/modules/sound/wrap_Sound.cpp +++ b/src/modules/sound/wrap_Sound.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/wrap_Sound.h b/src/modules/sound/wrap_Sound.h index 995b626c0..c2fc31c41 100644 --- a/src/modules/sound/wrap_Sound.h +++ b/src/modules/sound/wrap_Sound.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/wrap_SoundData.cpp b/src/modules/sound/wrap_SoundData.cpp index b9f7f1b71..94adb395b 100644 --- a/src/modules/sound/wrap_SoundData.cpp +++ b/src/modules/sound/wrap_SoundData.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/wrap_SoundData.h b/src/modules/sound/wrap_SoundData.h index 218fbefea..84fac0145 100644 --- a/src/modules/sound/wrap_SoundData.h +++ b/src/modules/sound/wrap_SoundData.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/sound/wrap_SoundData.lua b/src/modules/sound/wrap_SoundData.lua index 4e074101e..ebc2c8879 100644 --- a/src/modules/sound/wrap_SoundData.lua +++ b/src/modules/sound/wrap_SoundData.lua @@ -3,7 +3,7 @@ R"luastring"--( -- There is a matching delimiter at the bottom of the file. --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp index b79265922..7ae8cccf1 100644 --- a/src/modules/system/System.cpp +++ b/src/modules/system/System.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/system/System.h b/src/modules/system/System.h index 861b4abce..607e3b2d1 100644 --- a/src/modules/system/System.h +++ b/src/modules/system/System.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/system/sdl/System.cpp b/src/modules/system/sdl/System.cpp index 0738dcb25..496c4418a 100644 --- a/src/modules/system/sdl/System.cpp +++ b/src/modules/system/sdl/System.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/system/sdl/System.h b/src/modules/system/sdl/System.h index 720f2f1a4..f817a7aaf 100644 --- a/src/modules/system/sdl/System.h +++ b/src/modules/system/sdl/System.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/system/wrap_System.cpp b/src/modules/system/wrap_System.cpp index d0d2db79b..0c63aa0ac 100644 --- a/src/modules/system/wrap_System.cpp +++ b/src/modules/system/wrap_System.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/system/wrap_System.h b/src/modules/system/wrap_System.h index b89e3b111..94e0d1a81 100644 --- a/src/modules/system/wrap_System.h +++ b/src/modules/system/wrap_System.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/Channel.cpp b/src/modules/thread/Channel.cpp index 7c20158e2..0b352d9c1 100644 --- a/src/modules/thread/Channel.cpp +++ b/src/modules/thread/Channel.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/Channel.h b/src/modules/thread/Channel.h index 76a98d6f6..90222a440 100644 --- a/src/modules/thread/Channel.h +++ b/src/modules/thread/Channel.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/LuaThread.cpp b/src/modules/thread/LuaThread.cpp index 79bc4d0c0..f3c10003e 100644 --- a/src/modules/thread/LuaThread.cpp +++ b/src/modules/thread/LuaThread.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/LuaThread.h b/src/modules/thread/LuaThread.h index 4e7cc8c8d..5142751fe 100644 --- a/src/modules/thread/LuaThread.h +++ b/src/modules/thread/LuaThread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/Thread.h b/src/modules/thread/Thread.h index b761190bd..19c8cd5da 100644 --- a/src/modules/thread/Thread.h +++ b/src/modules/thread/Thread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/ThreadModule.cpp b/src/modules/thread/ThreadModule.cpp index f48af26ea..bdd864f45 100644 --- a/src/modules/thread/ThreadModule.cpp +++ b/src/modules/thread/ThreadModule.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/ThreadModule.h b/src/modules/thread/ThreadModule.h index 819b05557..36d2eb8ba 100644 --- a/src/modules/thread/ThreadModule.h +++ b/src/modules/thread/ThreadModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/sdl/Thread.cpp b/src/modules/thread/sdl/Thread.cpp index aa69b9276..f9f59e932 100644 --- a/src/modules/thread/sdl/Thread.cpp +++ b/src/modules/thread/sdl/Thread.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/sdl/Thread.h b/src/modules/thread/sdl/Thread.h index 3545e1b16..a01926b63 100644 --- a/src/modules/thread/sdl/Thread.h +++ b/src/modules/thread/sdl/Thread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/sdl/threads.cpp b/src/modules/thread/sdl/threads.cpp index 64fd5063d..5c0a1d9e6 100644 --- a/src/modules/thread/sdl/threads.cpp +++ b/src/modules/thread/sdl/threads.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/sdl/threads.h b/src/modules/thread/sdl/threads.h index 8c2726566..6e1e00089 100644 --- a/src/modules/thread/sdl/threads.h +++ b/src/modules/thread/sdl/threads.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/threads.cpp b/src/modules/thread/threads.cpp index cf76dcbf9..2e76865dc 100644 --- a/src/modules/thread/threads.cpp +++ b/src/modules/thread/threads.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/threads.h b/src/modules/thread/threads.h index e5d8bd059..d20c7e4ec 100644 --- a/src/modules/thread/threads.h +++ b/src/modules/thread/threads.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/wrap_Channel.h b/src/modules/thread/wrap_Channel.h index 81284cb95..e5f14d764 100644 --- a/src/modules/thread/wrap_Channel.h +++ b/src/modules/thread/wrap_Channel.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/wrap_LuaThread.h b/src/modules/thread/wrap_LuaThread.h index edbaa1fa8..61c8bc979 100644 --- a/src/modules/thread/wrap_LuaThread.h +++ b/src/modules/thread/wrap_LuaThread.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/thread/wrap_ThreadModule.h b/src/modules/thread/wrap_ThreadModule.h index a31eafda2..8c14455f3 100644 --- a/src/modules/thread/wrap_ThreadModule.h +++ b/src/modules/thread/wrap_ThreadModule.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/timer/Timer.cpp b/src/modules/timer/Timer.cpp index 55bc5080d..1ea19eb25 100644 --- a/src/modules/timer/Timer.cpp +++ b/src/modules/timer/Timer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/timer/Timer.h b/src/modules/timer/Timer.h index c3a7f43bb..42511ae9b 100644 --- a/src/modules/timer/Timer.h +++ b/src/modules/timer/Timer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/timer/wrap_Timer.cpp b/src/modules/timer/wrap_Timer.cpp index 8f9c18a20..9896c4902 100644 --- a/src/modules/timer/wrap_Timer.cpp +++ b/src/modules/timer/wrap_Timer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/timer/wrap_Timer.h b/src/modules/timer/wrap_Timer.h index 7f9897396..0f2daaa41 100644 --- a/src/modules/timer/wrap_Timer.h +++ b/src/modules/timer/wrap_Timer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/touch/Touch.h b/src/modules/touch/Touch.h index 2fdf8d6cd..3af7d79da 100644 --- a/src/modules/touch/Touch.h +++ b/src/modules/touch/Touch.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/touch/sdl/Touch.cpp b/src/modules/touch/sdl/Touch.cpp index cd5915233..0d0473729 100644 --- a/src/modules/touch/sdl/Touch.cpp +++ b/src/modules/touch/sdl/Touch.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/touch/sdl/Touch.h b/src/modules/touch/sdl/Touch.h index f0465f8a8..302b5ed5e 100644 --- a/src/modules/touch/sdl/Touch.h +++ b/src/modules/touch/sdl/Touch.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/touch/wrap_Touch.cpp b/src/modules/touch/wrap_Touch.cpp index e9df11861..69b72cae3 100644 --- a/src/modules/touch/wrap_Touch.cpp +++ b/src/modules/touch/wrap_Touch.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/touch/wrap_Touch.h b/src/modules/touch/wrap_Touch.h index 0e9097a34..5cb4dbab3 100644 --- a/src/modules/touch/wrap_Touch.h +++ b/src/modules/touch/wrap_Touch.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/Video.h b/src/modules/video/Video.h index 98aa1d3a0..e17fe6428 100644 --- a/src/modules/video/Video.h +++ b/src/modules/video/Video.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/VideoStream.cpp b/src/modules/video/VideoStream.cpp index 4e48e9419..7a597b909 100644 --- a/src/modules/video/VideoStream.cpp +++ b/src/modules/video/VideoStream.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/VideoStream.h b/src/modules/video/VideoStream.h index 2b65ab3cb..fc6996d42 100644 --- a/src/modules/video/VideoStream.h +++ b/src/modules/video/VideoStream.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/theora/OggDemuxer.cpp b/src/modules/video/theora/OggDemuxer.cpp index 30455afa9..390dadf35 100644 --- a/src/modules/video/theora/OggDemuxer.cpp +++ b/src/modules/video/theora/OggDemuxer.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/theora/OggDemuxer.h b/src/modules/video/theora/OggDemuxer.h index 2cb31259c..65edff46f 100644 --- a/src/modules/video/theora/OggDemuxer.h +++ b/src/modules/video/theora/OggDemuxer.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/theora/TheoraVideoStream.cpp b/src/modules/video/theora/TheoraVideoStream.cpp index a54ccb42d..3711466f9 100644 --- a/src/modules/video/theora/TheoraVideoStream.cpp +++ b/src/modules/video/theora/TheoraVideoStream.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/theora/TheoraVideoStream.h b/src/modules/video/theora/TheoraVideoStream.h index 79b6c30db..ae45ab517 100644 --- a/src/modules/video/theora/TheoraVideoStream.h +++ b/src/modules/video/theora/TheoraVideoStream.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/theora/Video.cpp b/src/modules/video/theora/Video.cpp index 73a8dd714..64a5d37b5 100644 --- a/src/modules/video/theora/Video.cpp +++ b/src/modules/video/theora/Video.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/theora/Video.h b/src/modules/video/theora/Video.h index 0bd5265f1..e286f1579 100644 --- a/src/modules/video/theora/Video.h +++ b/src/modules/video/theora/Video.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/wrap_Video.cpp b/src/modules/video/wrap_Video.cpp index 8329c9aa6..32b59c45e 100644 --- a/src/modules/video/wrap_Video.cpp +++ b/src/modules/video/wrap_Video.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/wrap_Video.h b/src/modules/video/wrap_Video.h index 16eaa4542..5c12ac558 100644 --- a/src/modules/video/wrap_Video.h +++ b/src/modules/video/wrap_Video.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/wrap_VideoStream.cpp b/src/modules/video/wrap_VideoStream.cpp index 34f1ae3c2..bbf75e822 100644 --- a/src/modules/video/wrap_VideoStream.cpp +++ b/src/modules/video/wrap_VideoStream.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/video/wrap_VideoStream.h b/src/modules/video/wrap_VideoStream.h index 39c03c125..4fa5fd4d5 100644 --- a/src/modules/video/wrap_VideoStream.h +++ b/src/modules/video/wrap_VideoStream.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/window/Window.cpp b/src/modules/window/Window.cpp index 49abcc1d6..44e165ea6 100644 --- a/src/modules/window/Window.cpp +++ b/src/modules/window/Window.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/window/Window.h b/src/modules/window/Window.h index 8b010bace..f7614dc99 100644 --- a/src/modules/window/Window.h +++ b/src/modules/window/Window.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index e9175f3d4..1c8684793 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/window/sdl/Window.h b/src/modules/window/sdl/Window.h index 02b9e788a..054f33f15 100644 --- a/src/modules/window/sdl/Window.h +++ b/src/modules/window/sdl/Window.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/window/wrap_Window.cpp b/src/modules/window/wrap_Window.cpp index bc0a8c364..b073551b9 100644 --- a/src/modules/window/wrap_Window.cpp +++ b/src/modules/window/wrap_Window.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/modules/window/wrap_Window.h b/src/modules/window/wrap_Window.h index 382ce7c65..6c1069ebf 100644 --- a/src/modules/window/wrap_Window.h +++ b/src/modules/window/wrap_Window.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/scripts/auto.lua b/src/scripts/auto.lua index ce59487f6..f1080fc8a 100644 --- a/src/scripts/auto.lua +++ b/src/scripts/auto.lua @@ -7,7 +7,7 @@ local max_width = 18 local pattern = [[ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages diff --git a/src/scripts/nogame.lua b/src/scripts/nogame.lua index 99cb0f703..8e83851db 100644 --- a/src/scripts/nogame.lua +++ b/src/scripts/nogame.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2006-2023 LOVE Development Team +Copyright (c) 2006-2024 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/src/scripts/nogame.lua.h b/src/scripts/nogame.lua.h index 5c16e28aa..5f540369f 100644 --- a/src/scripts/nogame.lua.h +++ b/src/scripts/nogame.lua.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2006-2023 LOVE Development Team + * Copyright (c) 2006-2024 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages @@ -27,7 +27,7 @@ const unsigned char nogame_lua[] = 0x2d, 0x2d, 0x5b, 0x5b, 0x0a, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x30, 0x36, - 0x2d, 0x32, 0x30, 0x32, 0x31, 0x20, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x2d, 0x32, 0x30, 0x32, 0x34, 0x20, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x54, 0x65, 0x61, 0x6d, 0x0a, 0x0a, 0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, From 6d4e812605f1b32533a44706062bba6ea9039056 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 10 Feb 2024 12:56:57 -0400 Subject: [PATCH 007/104] Update readme --- readme.md | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/readme.md b/readme.md index 13947320e..cf11f6f80 100644 --- a/readme.md +++ b/readme.md @@ -11,12 +11,13 @@ If you need further help, feel free to ask on our [forums][forums], our [Discord Repository ---------- -We use the 'main' branch for patch development of the current major release, and therefore it should not be considered stable. -There may also be a branch for the next major version in development, which is named after that version. +We use the 'main' branch for development of the next major release, and therefore it should not be considered stable. + +There are also branches for currently released major versions, which may have fixes and changes meant for upcoming patch releases within that major version. We tag all our releases (since we started using mercurial and git), and have binary downloads available for them. -Experimental changes are developed in a separate [love-experiments][love-experiments] repository. +Experimental changes are sometimes developed in a separate [love-experiments][love-experiments] repository. Builds ------ @@ -32,12 +33,11 @@ There are also unstable/nightly builds: Test Suite ---------- -The test suite in `testing/` covers all the LÖVE APIs, and tests them the same way developers use them. You can view current test coverage from any [12.0-dev action][12devworkflows]. -You can run the suite locally like you would run a normal LÖVE project, i.e.: -`love testing/main.lua` +The test suite in `testing/` covers all the LÖVE APIs, and tests them the same way developers use them. You can view current test coverage from any [action][workflows]. +You can run the suite locally like you would run a normal LÖVE project, e.g.: +`love testing` See the [readme][testsuite] in the testing folder for more info. -You can contribute to the test suite [here][testsuitemain] Contributing ------------ @@ -70,7 +70,6 @@ Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the ### iOS Building for iOS requires macOS and Xcode. -#### LÖVE 11.4 and newer Download the `love-apple-dependencies` zip file corresponding to the LÖVE version being used from the [Releases page][dependencies-ios], unzip it, and place the `iOS/libraries` subfolder into love's `platform/xcode/ios` folder. @@ -80,14 +79,6 @@ Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the See `readme-iOS.rtf` for more information. -#### LÖVE 11.3 and older -Download the `ios-libraries` zip file corresponding to the LÖVE version being used from the [Releases page][dependencies-ios], -unzip it, and place the `include` and `libraries` subfolders into love's `platform/xcode/ios` folder. - -Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target. - -See `readme-iOS.rtf` for more information. - ### Android Visit the [Android build repository][android-repository] for build instructions. @@ -117,6 +108,5 @@ Dependencies [codestyle]: https://love2d.org/wiki/Code_Style [android-repository]: https://github.com/love2d/love-android [releases]: https://github.com/love2d/love/releases -[testsuite]: https://github.com/love2d/love/tree/12.0-development/testing -[testsuitemain]: https://github.com/ellraiser/love-test -[12devworkflows]: https://github.com/love2d/love/actions/workflows/main.yml?query=branch%3A12.0-development +[testsuite]: https://github.com/love2d/love/tree/main/testing +[workflows]: https://github.com/love2d/love/actions/workflows/main.yml?query=branch%3Amain From 4cd0360a92c6b5068319a8959676bf76a7374a88 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 10 Feb 2024 13:28:52 -0400 Subject: [PATCH 008/104] CI: Windows builds use VS2022 toolchain --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 34749a762..1d6e6cd27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: continuous-integration on: [push, pull_request] jobs: - linux-os: + Linux: runs-on: ubuntu-22.04 permissions: checks: write @@ -140,7 +140,7 @@ jobs: echo "${{ steps.report1.outputs.failed }} opengl tests failed" echo "${{ steps.report2.outputs.failed }} opengles tests failed" exit 1 - windows-os: + Windows: runs-on: windows-latest permissions: checks: write @@ -267,7 +267,7 @@ jobs: CFLAGS: /Zi CXXFLAGS: /Zi LDFLAGS: /DEBUG:FULL /OPT:REF /OPT:ICF - run: cmake -Bbuild -Smegasource -T v142 -A ${{ matrix.platform }} --install-prefix %CD%\install -DCMAKE_PDB_OUTPUT_DIRECTORY=%CD%\pdb ${{ steps.vars.outputs.moredef }} + run: cmake -Bbuild -Smegasource -T v143 -A ${{ matrix.platform }} --install-prefix %CD%\install -DCMAKE_PDB_OUTPUT_DIRECTORY=%CD%\pdb ${{ steps.vars.outputs.moredef }} - name: Install run: cmake --build build --target PACKAGE --config Release -j2 - name: Copy LuaJIT lua51.pdb From 7a55f5fb23bebd77b56ce9c46edd80aa5c362f44 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 10 Feb 2024 13:44:17 -0400 Subject: [PATCH 009/104] CI: remove strawberry perl deletion workaround for Windows --- .github/workflows/main.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d6e6cd27..171ed9c3a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -255,13 +255,6 @@ jobs: if: steps.vars.outputs.angle == '1' working-directory: angle run: 7z x angle-win-${{ steps.vars.outputs.arch }}.zip - - name: Delete Strawbery Perl - # https://github.com/actions/runner-images/issues/6627 - # In particular, this is not pretty, but even CMAKE_IGNORE_PREFIX_PATH - # cannot help in this case. Delete the whole folder! - run: | - rmdir /s /q C:\Strawberry - exit /b 0 - name: Configure env: CFLAGS: /Zi From 7823ed476af6dc614f4d690d22ee56ca05b716d8 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 10 Feb 2024 19:01:48 -0400 Subject: [PATCH 010/104] Avoid non-ASCII characters in printed help text. --- src/love.cpp | 4 ++-- src/modules/love/boot.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/love.cpp b/src/love.cpp index 1a2a861c2..a94779753 100644 --- a/src/love.cpp +++ b/src/love.cpp @@ -150,11 +150,11 @@ enum DoneAction static void print_usage() { // when editing this message, change it at boot.lua too - printf("LÖVE is an *awesome* framework you can use to make 2D games in Lua\n" + printf("LOVE is an *awesome* framework you can use to make 2D games in Lua\n" "https://love2d.org\n" "\n" "usage:\n" - " love --version prints LÖVE version and quits\n" + " love --version prints LOVE version and quits\n" " love --help prints this message and quits\n" " love path/to/gamedir runs the game from the given directory which contains a main.lua file\n" " love path/to/packagedgame.love runs the packaged game from the provided .love file\n" diff --git a/src/modules/love/boot.lua b/src/modules/love/boot.lua index 70349c799..5ff38a13c 100644 --- a/src/modules/love/boot.lua +++ b/src/modules/love/boot.lua @@ -136,11 +136,11 @@ function love.boot() if not can_has_game then -- when editing this message, change it at love.cpp too - print([[LÖVE is an *awesome* framework you can use to make 2D games in Lua + print([[LOVE is an *awesome* framework you can use to make 2D games in Lua https://love2d.org usage: - love --version prints LÖVE version and quits + love --version prints LOVE version and quits love --help prints this message and quits love path/to/gamedir runs the game from the given directory which contains a main.lua file love path/to/packagedgame.love runs the packaged game from the provided .love file From fd2724226af9bc2fc93b46e904ec379dbb1245e6 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 10 Feb 2024 22:52:28 -0400 Subject: [PATCH 011/104] CI: Re-add step to avoid Strawberry Perl messing with the build. --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 171ed9c3a..e0c95566e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -255,6 +255,13 @@ jobs: if: steps.vars.outputs.angle == '1' working-directory: angle run: 7z x angle-win-${{ steps.vars.outputs.arch }}.zip + - name: Remove Strawbery Perl From Path + # https://github.com/actions/runner-images/issues/6627 + # In particular, this is not pretty, but even CMAKE_IGNORE_PREFIX_PATH + # cannot help in this case. + run: | + move /y C:\Strawberry C:\Strawberry_not_in_PATH + exit /b 0 - name: Configure env: CFLAGS: /Zi From 25e008e20c4163cdb7224495c88a21228f4e2c2f Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 10 Feb 2024 23:17:10 -0400 Subject: [PATCH 012/104] metal: remove a redundant memcpy when uploading pixels to a texture. --- src/modules/graphics/metal/Texture.mm | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modules/graphics/metal/Texture.mm b/src/modules/graphics/metal/Texture.mm index d9dc0c574..52132d4e5 100644 --- a/src/modules/graphics/metal/Texture.mm +++ b/src/modules/graphics/metal/Texture.mm @@ -226,8 +226,6 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) length:size options:MTLResourceStorageModeShared]; - memcpy(buffer.contents, data, size); - id encoder = gfx->useBlitEncoder(); int z = 0; From ec177d51d15b281ed97ca474a02aa61fd26953f9 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 12 Feb 2024 20:06:55 -0400 Subject: [PATCH 013/104] deprecate love.window.close. --- src/modules/window/wrap_Window.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/window/wrap_Window.cpp b/src/modules/window/wrap_Window.cpp index bdaa06c17..19efd9991 100644 --- a/src/modules/window/wrap_Window.cpp +++ b/src/modules/window/wrap_Window.cpp @@ -348,6 +348,7 @@ int w_isOpen(lua_State *L) int w_close(lua_State *L) { + luax_markdeprecated(L, 1, "love.window.close", API_FUNCTION, DEPRECATED_NO_REPLACEMENT, nullptr); luax_catchexcept(L, [&]() { instance()->close(); }); return 0; } From 1bdb5ded50cd035cac033dd0105c34f5872bbaae Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 12 Feb 2024 20:32:44 -0400 Subject: [PATCH 014/104] CI: update action versions --- .github/workflows/main.yml | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0c95566e..301ff5c97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,12 +25,12 @@ jobs: libcurl4-openssl-dev libfuse2 wmctrl openbox mesa-vulkan-drivers \ libvulkan1 vulkan-tools vulkan-validationlayers - name: Checkout love-appimage-source - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: love2d/love-appimage-source ref: 12.x - name: Checkout LÖVE - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: love2d-${{ github.sha }} - name: Get Dependencies for AppImage @@ -74,7 +74,7 @@ jobs: run: | 7z a -tzip test-output-linux-opengl.zip love2d-${{ github.sha }}/testing/output/ - name: Artifact Test Output (opengl) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-output-linux-opengl-${{ steps.report1.outputs.conclusion }} path: test-output-linux-opengl.zip @@ -95,7 +95,7 @@ jobs: run: | 7z a -tzip test-output-linux-opengles.zip love2d-${{ github.sha }}/testing/output/ - name: Artifact Test Output (opengles) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-output-linux-opengles-${{ steps.report2.outputs.conclusion }} path: test-output-linux-opengles.zip @@ -114,7 +114,7 @@ jobs: # run: | # 7z a -tzip test-output-linux-vulkan.zip love2d-${{ github.sha }}/testing/output/ # - name: Artifact Test Output (vulkan) -# uses: actions/upload-artifact@v3 +# uses: actions/upload-artifact@v4 # with: # name: test-output-linux-vulkan # path: test-output-linux-vulkan.zip @@ -125,12 +125,12 @@ jobs: kill $XVFBPID kill $OPENBOXPID - name: Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: love-linux-x86_64.AppImage path: love-${{ github.sha }}.AppImage - name: Artifact Debug Symbols - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: love-x86_64-AppImage-debug path: love-${{ github.sha }}.AppImage-debug.tar.gz @@ -216,13 +216,13 @@ jobs: type log.txt exit /b ${{ steps.windbg.outputs.ERRORLEVEL }} - name: Setup Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Download source_index.py run: curl -Lo source_index.py https://gist.github.com/MikuAuahDark/d9c099f5714e09a765496471c2827a55/raw/df34956052035f3473c5f01861dfb53930d06843/source_index.py - name: Clone Megasource - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: megasource repository: love2d/megasource @@ -238,11 +238,11 @@ jobs: commit = result.stdout.split()[0] with open(os.environ["GITHUB_OUTPUT"], "w", encoding="UTF-8") as f: f.write(f"commit={commit}") - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: megasource/libs/love - name: Download ANGLE - uses: robinraju/release-downloader@v1.7 + uses: robinraju/release-downloader@v1.9 if: steps.vars.outputs.angle == '1' with: repository: MikuAuahDark/angle-winbuild @@ -285,7 +285,7 @@ jobs: --source %CD%\build\libs\LuaJIT https://raw.githubusercontent.com/love2d/megasource/${{ steps.megasource.outputs.commit }}/libs/LuaJIT ^ pdb\Release\*.pdb - name: Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }} path: | @@ -294,12 +294,12 @@ jobs: if-no-files-found: ${{ steps.vars.outputs.nofiles }} - name: Artifact JIT Modules if: steps.vars.outputs.jitmodules == '1' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: love-windows-jitmodules path: build/libs/LuaJIT/src/jit/*.lua - name: Artifact PDB - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg path: pdb/Release/*.pdb @@ -336,7 +336,7 @@ jobs: 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengl.zip megasource/libs/love/testing/output/ - name: Artifact Test Output (opengl) if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-output-windows-${{ steps.vars.outputs.arch }}-opengl-${{ steps.report1.outputs.conclusion }} path: test-output-windows-${{ steps.vars.outputs.arch }}-opengl.zip @@ -361,7 +361,7 @@ jobs: 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengles.zip megasource/libs/love/testing/output/ - name: Artifact Test Output (opengles) if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-output-windows-${{ steps.vars.outputs.arch }}-opengles-${{ steps.report2.outputs.conclusion }} path: test-output-windows-${{ steps.vars.outputs.arch }}-opengles.zip @@ -403,7 +403,7 @@ jobs: # 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan.zip megasource/libs/love/testing/output/ # - name: Artifact Test Output (vulkan) # if: steps.vars.outputs.arch != 'ARM64' -# uses: actions/upload-artifact@v3 +# uses: actions/upload-artifact@v4 # with: # name: test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan # path: test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan.zip @@ -414,9 +414,9 @@ jobs: pull-requests: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Clone Dependencies - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: apple-dependencies repository: love2d/love-apple-dependencies @@ -434,7 +434,7 @@ jobs: run: ditto -c -k --sequesterRsrc --keepParent love-macos/love.app love-macos.zip - name: Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: love-macos path: love-macos.zip @@ -455,7 +455,7 @@ jobs: run: | 7z a -tzip test-output-macos-opengl.zip ./testing/output/ - name: Artifact Test Output - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-output-macos-opengl-${{ steps.report1.outputs.conclusion }} path: test-output-macos-opengl.zip @@ -468,9 +468,9 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Clone Dependencies - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: apple-dependencies repository: love2d/love-apple-dependencies From cbf7e5680acd58ffe67910adc407a06e8617596e Mon Sep 17 00:00:00 2001 From: EngineerSmith <56016593+EngineerSmith@users.noreply.github.com> Date: Tue, 13 Feb 2024 01:01:18 +0000 Subject: [PATCH 015/104] Added old functionality back, and marked it as deprecated --- src/modules/data/wrap_DataModule.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/modules/data/wrap_DataModule.cpp b/src/modules/data/wrap_DataModule.cpp index eafd37931..d77186563 100644 --- a/src/modules/data/wrap_DataModule.cpp +++ b/src/modules/data/wrap_DataModule.cpp @@ -302,22 +302,37 @@ int w_decode(lua_State *L) int w_hash(lua_State *L) { - ContainerType ctype = luax_checkcontainertype(L, 1); - const char *fstr = luaL_checkstring(L, 2); + int narg = 0; // used to change the arg position when using the deprecated function variant + + ContainerType ctype = CONTAINER_STRING; HashFunction::Function function; + + const char *str = luaL_checkstring(L, 1); + if (!getConstant(str, ctype)) + { + if (HashFunction::getConstant(str, function)) + { // check if the argument at 1 is a hash function; deprecated function variant + luax_markdeprecated(L, 1, "love.data.hash", API_FUNCTION_VARIANT, DEPRECATED_REPLACED, "variant with container return type parameter"); + narg = -1; + } + else + luax_enumerror(L, "container type", getConstants(ctype), str); + } + + const char *fstr = luaL_checkstring(L, 2 + narg); if (!HashFunction::getConstant(fstr, function)) return luax_enumerror(L, "hash function", HashFunction::getConstants(function), fstr); HashFunction::Value hashvalue; - if (lua_isstring(L, 3)) + if (lua_isstring(L, 3 + narg)) { size_t rawsize = 0; - const char *rawbytes = luaL_checklstring(L, 3, &rawsize); + const char *rawbytes = luaL_checklstring(L, 3 + narg, &rawsize); luax_catchexcept(L, [&](){ love::data::hash(function, rawbytes, rawsize, hashvalue); }); } else { - Data *rawdata = luax_checktype(L, 3); + Data *rawdata = luax_checktype(L, 3 + narg); luax_catchexcept(L, [&](){ love::data::hash(function, rawdata, hashvalue); }); } From 2aa4e4b3ea1522961f51d44a9f01f33b1db43030 Mon Sep 17 00:00:00 2001 From: EngineerSmith <56016593+EngineerSmith@users.noreply.github.com> Date: Tue, 13 Feb 2024 01:20:10 +0000 Subject: [PATCH 016/104] Updated changes.txt --- changes.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changes.txt b/changes.txt index 8e0fb7af1..359a4cb34 100644 --- a/changes.txt +++ b/changes.txt @@ -101,7 +101,7 @@ Released: N/A * Changed RevoluteJoint:getMotorTorque and WheelJoint:getMotorTorque to take 'dt' as a parameter instead of 'inverse_dt'. * Changed love.math.perlinNoise and simplexNoise to use higher precision numbers for its internal calculations. * Changed t.accelerometerjoystick startup flag in love.conf to unset by default. -* Changed love.data.hash to take in a container type +* Changed love.data.hash to take in a container type. * Renamed 'display' field to 'displayindex' in love.window.setMode/updateMode/getMode and love.conf. * Renamed love.graphics Text objects to TextBatch. @@ -121,6 +121,7 @@ Released: N/A * Deprecated t.accelerometerjoystick in love.conf (replaced by love.sensor module). * Deprecated the variants of Mesh:attachAttribute and SpriteBatch:attachAttribute which accept a Mesh (replaced by variants which accept a Buffer). * Deprecated Texture:newImageData (replaced by love.graphics.readbackTexture). +* Deprecated love.data.hash (replaced by function variant, which takes container type). * Removed the variant of SpriteBatch:setColor() which turns off all previously set colors. * Removed the no-argument variant of love.graphics.setColorMask. From 1084d94f9053d8106fc3e656818c734566169011 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 17 Feb 2024 13:16:10 -0400 Subject: [PATCH 017/104] Fix missing sRGB<->Linear pixel format swaps for DXT and BC formats. --- src/common/pixelformat.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/pixelformat.cpp b/src/common/pixelformat.cpp index fe3e0c8e3..205694d01 100644 --- a/src/common/pixelformat.cpp +++ b/src/common/pixelformat.cpp @@ -342,6 +342,10 @@ PixelFormat getSRGBPixelFormat(PixelFormat format) { case PIXELFORMAT_RGBA8_UNORM: return PIXELFORMAT_RGBA8_sRGB; case PIXELFORMAT_BGRA8_UNORM: return PIXELFORMAT_BGRA8_sRGB; + case PIXELFORMAT_DXT1_UNORM: return PIXELFORMAT_DXT1_sRGB; + case PIXELFORMAT_DXT3_UNORM: return PIXELFORMAT_DXT3_sRGB; + case PIXELFORMAT_DXT5_UNORM: return PIXELFORMAT_DXT5_sRGB; + case PIXELFORMAT_BC7_UNORM: return PIXELFORMAT_BC7_sRGB; case PIXELFORMAT_PVR1_RGB2_UNORM: return PIXELFORMAT_PVR1_RGB2_sRGB; case PIXELFORMAT_PVR1_RGB4_UNORM: return PIXELFORMAT_PVR1_RGB4_sRGB; case PIXELFORMAT_PVR1_RGBA2_UNORM: return PIXELFORMAT_PVR1_RGBA2_sRGB; @@ -374,6 +378,10 @@ PixelFormat getLinearPixelFormat(PixelFormat format) { case PIXELFORMAT_RGBA8_sRGB: return PIXELFORMAT_RGBA8_UNORM; case PIXELFORMAT_BGRA8_sRGB: return PIXELFORMAT_BGRA8_UNORM; + case PIXELFORMAT_DXT1_sRGB: return PIXELFORMAT_DXT1_UNORM; + case PIXELFORMAT_DXT3_sRGB: return PIXELFORMAT_DXT3_UNORM; + case PIXELFORMAT_DXT5_sRGB: return PIXELFORMAT_DXT5_UNORM; + case PIXELFORMAT_BC7_sRGB: return PIXELFORMAT_BC7_UNORM; case PIXELFORMAT_PVR1_RGB2_sRGB: return PIXELFORMAT_PVR1_RGB2_UNORM; case PIXELFORMAT_PVR1_RGB4_sRGB: return PIXELFORMAT_PVR1_RGB4_UNORM; case PIXELFORMAT_PVR1_RGBA2_sRGB: return PIXELFORMAT_PVR1_RGBA2_UNORM; From 81d0c720a20c10f38bbd4c91fe70e6475a99ad30 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 17 Feb 2024 14:00:31 -0400 Subject: [PATCH 018/104] Fix compressed texture uploads using the wrong pixel format. --- src/modules/graphics/Texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index 6f8a2f5c9..9ae1c5b27 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -458,7 +458,7 @@ void Texture::uploadImageData(love::image::ImageDataBase *d, int level, int slic lock.setLock(id->getMutex()); Rect rect = {x, y, d->getWidth(), d->getHeight()}; - uploadByteData(d->getFormat(), d->getData(), d->getSize(), level, slice, rect); + uploadByteData(format, d->getData(), d->getSize(), level, slice, rect); } void Texture::replacePixels(love::image::ImageDataBase *d, int slice, int mipmap, int x, int y, bool reloadmipmaps) From d880c485023d9a83108979bd90a0cb6cf0bf18c4 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 17 Feb 2024 14:10:38 -0400 Subject: [PATCH 019/104] Clean up some internal texture data upload parameters. --- src/modules/graphics/Texture.cpp | 8 +++++--- src/modules/graphics/Texture.h | 2 +- src/modules/graphics/metal/Texture.h | 2 +- src/modules/graphics/metal/Texture.mm | 6 +++--- src/modules/graphics/opengl/Texture.cpp | 10 +++++----- src/modules/graphics/opengl/Texture.h | 2 +- src/modules/graphics/vulkan/Texture.cpp | 2 +- src/modules/graphics/vulkan/Texture.h | 2 +- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index 9ae1c5b27..7120cf658 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -458,7 +458,7 @@ void Texture::uploadImageData(love::image::ImageDataBase *d, int level, int slic lock.setLock(id->getMutex()); Rect rect = {x, y, d->getWidth(), d->getHeight()}; - uploadByteData(format, d->getData(), d->getSize(), level, slice, rect); + uploadByteData(d->getData(), d->getSize(), level, slice, rect); } void Texture::replacePixels(love::image::ImageDataBase *d, int slice, int mipmap, int x, int y, bool reloadmipmaps) @@ -477,7 +477,9 @@ void Texture::replacePixels(love::image::ImageDataBase *d, int slice, int mipmap if (getHandle() == 0) return; - if (d->getFormat() != getPixelFormat()) + // ImageData format might be linear but intended to be used as sRGB, so we + // don't error if only the sRGBness is different. + if (getLinearPixelFormat(d->getFormat()) != getLinearPixelFormat(getPixelFormat())) throw love::Exception("Pixel formats must match."); if (mipmap < 0 || mipmap >= getMipmapCount()) @@ -533,7 +535,7 @@ void Texture::replacePixels(const void *data, size_t size, int slice, int mipmap Graphics::flushBatchedDrawsGlobal(); - uploadByteData(format, data, size, mipmap, slice, rect); + uploadByteData(data, size, mipmap, slice, rect); if (reloadmipmaps && mipmap == 0 && getMipmapCount() > 1) generateMipmaps(); diff --git a/src/modules/graphics/Texture.h b/src/modules/graphics/Texture.h index 9b48007a5..68dc52eb6 100644 --- a/src/modules/graphics/Texture.h +++ b/src/modules/graphics/Texture.h @@ -313,7 +313,7 @@ class Texture : public Drawable, public Resource void setGraphicsMemorySize(int64 size); void uploadImageData(love::image::ImageDataBase *d, int level, int slice, int x, int y); - virtual void uploadByteData(PixelFormat pixelformat, const void *data, size_t size, int level, int slice, const Rect &r) = 0; + virtual void uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) = 0; bool supportsGenerateMipmaps(const char *&outReason) const; virtual void generateMipmapsInternal() = 0; diff --git a/src/modules/graphics/metal/Texture.h b/src/modules/graphics/metal/Texture.h index c0259cd35..015c779ee 100644 --- a/src/modules/graphics/metal/Texture.h +++ b/src/modules/graphics/metal/Texture.h @@ -55,7 +55,7 @@ class Texture final : public love::graphics::Texture private: - void uploadByteData(PixelFormat pixelformat, const void *data, size_t size, int level, int slice, const Rect &r) override; + void uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) override; void generateMipmapsInternal() override; id texture; diff --git a/src/modules/graphics/metal/Texture.mm b/src/modules/graphics/metal/Texture.mm index 52132d4e5..065254918 100644 --- a/src/modules/graphics/metal/Texture.mm +++ b/src/modules/graphics/metal/Texture.mm @@ -149,7 +149,7 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) emptydata.resize(getPixelFormatSliceSize(format, w, h)); Rect r = {0, 0, getPixelWidth(mip), getPixelHeight(mip)}; - uploadByteData(format, emptydata.data(), emptydata.size(), mip, slice, r); + uploadByteData(emptydata.data(), emptydata.size(), mip, slice, r); } else if (isRenderTarget()) { @@ -219,7 +219,7 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) sampler = nil; }} -void Texture::uploadByteData(PixelFormat pixelformat, const void *data, size_t size, int level, int slice, const Rect &r) +void Texture::uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) { @autoreleasepool { auto gfx = Graphics::getInstance(); id buffer = [gfx->device newBufferWithBytes:data @@ -237,7 +237,7 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) MTLBlitOption options = MTLBlitOptionNone; - switch (pixelformat) + switch (format) { case PIXELFORMAT_PVR1_RGB2_UNORM: case PIXELFORMAT_PVR1_RGB4_UNORM: diff --git a/src/modules/graphics/opengl/Texture.cpp b/src/modules/graphics/opengl/Texture.cpp index 79357094d..1aa7e6787 100644 --- a/src/modules/graphics/opengl/Texture.cpp +++ b/src/modules/graphics/opengl/Texture.cpp @@ -356,7 +356,7 @@ void Texture::createTexture() int slices = texType == TEXTURE_VOLUME ? getDepth(mip) : layers; slices = texType == TEXTURE_CUBE ? 6 : slices; for (int i = 0; i < slices; i++) - uploadByteData(format, emptydata.data(), emptydata.size(), mip, i, r); + uploadByteData(emptydata.data(), emptydata.size(), mip, i, r); } } @@ -466,19 +466,19 @@ void Texture::unloadVolatile() setGraphicsMemorySize(0); } -void Texture::uploadByteData(PixelFormat pixelformat, const void *data, size_t size, int level, int slice, const Rect &r) +void Texture::uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) { OpenGL::TempDebugGroup debuggroup("Texture data upload"); gl.bindTextureToUnit(this, 0, false); - OpenGL::TextureFormat fmt = OpenGL::convertPixelFormat(pixelformat, false); + OpenGL::TextureFormat fmt = OpenGL::convertPixelFormat(format, false); GLenum gltarget = OpenGL::getGLTextureType(texType); if (texType == TEXTURE_CUBE) gltarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + slice; - if (isPixelFormatCompressed(pixelformat)) + if (isPixelFormatCompressed(format)) { if (texType == TEXTURE_2D || texType == TEXTURE_CUBE) { @@ -566,7 +566,7 @@ void Texture::copyFromBuffer(love::graphics::Buffer *source, size_t sourceoffset // glTexSubImage and friends copy from the active pixel_unpack_buffer by // treating the pointer as a byte offset. const uint8 *byteoffset = (const uint8 *)(ptrdiff_t)sourceoffset; - uploadByteData(format, byteoffset, size, mipmap, slice, rect); + uploadByteData(byteoffset, size, mipmap, slice, rect); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); diff --git a/src/modules/graphics/opengl/Texture.h b/src/modules/graphics/opengl/Texture.h index ce27a274c..65f247026 100644 --- a/src/modules/graphics/opengl/Texture.h +++ b/src/modules/graphics/opengl/Texture.h @@ -63,7 +63,7 @@ class Texture final : public love::graphics::Texture, public Volatile private: void createTexture(); - void uploadByteData(PixelFormat pixelformat, const void *data, size_t size, int level, int slice, const Rect &r) override; + void uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) override; void generateMipmapsInternal() override; diff --git a/src/modules/graphics/vulkan/Texture.cpp b/src/modules/graphics/vulkan/Texture.cpp index 5f6c6ad27..267847e7c 100644 --- a/src/modules/graphics/vulkan/Texture.cpp +++ b/src/modules/graphics/vulkan/Texture.cpp @@ -472,7 +472,7 @@ void Texture::generateMipmapsInternal() 1, &barrier); } -void Texture::uploadByteData(PixelFormat pixelformat, const void *data, size_t size, int level, int slice, const Rect &r) +void Texture::uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) { VkBuffer stagingBuffer; VmaAllocation vmaAllocation; diff --git a/src/modules/graphics/vulkan/Texture.h b/src/modules/graphics/vulkan/Texture.h index 0cdbf364f..4ec79be3c 100644 --- a/src/modules/graphics/vulkan/Texture.h +++ b/src/modules/graphics/vulkan/Texture.h @@ -59,7 +59,7 @@ class Texture final VkImageView getRenderTargetView(int mip, int layer); VkSampleCountFlagBits getMsaaSamples() const; - void uploadByteData(PixelFormat pixelformat, const void *data, size_t size, int level, int slice, const Rect &r) override; + void uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) override; void generateMipmapsInternal() override; From 007090af14d68b339657e8898b2c707dc438ffab Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 18 Feb 2024 17:06:40 -0400 Subject: [PATCH 020/104] ImageData: remove automatic mutex locks. --- src/modules/font/BMFontRasterizer.cpp | 1 + src/modules/font/ImageRasterizer.cpp | 5 +- src/modules/graphics/GraphicsReadback.cpp | 1 + src/modules/graphics/Texture.cpp | 6 -- .../graphics/opengl/GraphicsReadback.cpp | 2 - src/modules/image/ImageData.cpp | 10 ---- src/modules/image/wrap_ImageData.cpp | 56 ++---------------- src/modules/image/wrap_ImageData.lua | 59 +++++-------------- src/modules/window/sdl/Window.cpp | 8 +-- 9 files changed, 25 insertions(+), 123 deletions(-) diff --git a/src/modules/font/BMFontRasterizer.cpp b/src/modules/font/BMFontRasterizer.cpp index a735869ef..b08c2a621 100644 --- a/src/modules/font/BMFontRasterizer.cpp +++ b/src/modules/font/BMFontRasterizer.cpp @@ -343,6 +343,7 @@ GlyphData *BMFontRasterizer::getGlyphDataForIndex(int index) const uint8 *pixels = (uint8 *) g->getData(); const uint8 *ipixels = (const uint8 *) imagedata->getData(); + // Always lock the mutex since the user can't know when to do it. love::thread::Lock lock(imagedata->getMutex()); // Copy the subsection of the texture from the ImageData to the GlyphData. diff --git a/src/modules/font/ImageRasterizer.cpp b/src/modules/font/ImageRasterizer.cpp index 7f227017b..00adc5f96 100644 --- a/src/modules/font/ImageRasterizer.cpp +++ b/src/modules/font/ImageRasterizer.cpp @@ -90,7 +90,7 @@ GlyphData *ImageRasterizer::getGlyphDataForIndex(int index) const if (gm.width == 0) return g; - // We don't want another thread modifying our ImageData mid-copy. + // Always lock the mutex since the user can't know when to do it. love::thread::Lock lock(imageData->getMutex()); Color32 *gdpixels = (Color32 *) g->getData(); @@ -118,9 +118,6 @@ void ImageRasterizer::load(const uint32 *glyphs, int glyphcount) int imgw = imageData->getWidth(); int imgh = imageData->getHeight(); - // We don't want another thread modifying our ImageData mid-parse. - love::thread::Lock lock(imageData->getMutex()); - // Set the only metric that matters metrics.height = imgh; diff --git a/src/modules/graphics/GraphicsReadback.cpp b/src/modules/graphics/GraphicsReadback.cpp index 303a8e54e..a1506d052 100644 --- a/src/modules/graphics/GraphicsReadback.cpp +++ b/src/modules/graphics/GraphicsReadback.cpp @@ -192,6 +192,7 @@ GraphicsReadback::Status GraphicsReadback::readbackBuffer(Buffer *buffer, size_t if (imageData.get()) { + // Always lock the mutex since the user can't know when to do it. love::thread::Lock lock(imageData->getMutex()); if (imageData->getWidth() != rect.w) diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index 7120cf658..c35d2073f 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -451,12 +451,6 @@ void Texture::drawLayer(Graphics *gfx, int layer, Quad *q, const Matrix4 &m) void Texture::uploadImageData(love::image::ImageDataBase *d, int level, int slice, int x, int y) { - love::image::ImageData *id = dynamic_cast(d); - - love::thread::EmptyLock lock; - if (id != nullptr) - lock.setLock(id->getMutex()); - Rect rect = {x, y, d->getWidth(), d->getHeight()}; uploadByteData(d->getData(), d->getSize(), level, slice, rect); } diff --git a/src/modules/graphics/opengl/GraphicsReadback.cpp b/src/modules/graphics/opengl/GraphicsReadback.cpp index 26a065317..1c903f8f7 100644 --- a/src/modules/graphics/opengl/GraphicsReadback.cpp +++ b/src/modules/graphics/opengl/GraphicsReadback.cpp @@ -68,8 +68,6 @@ GraphicsReadback::GraphicsReadback(love::graphics::Graphics *gfx, ReadbackMethod { void *dest = prepareReadbackDest(size); - love::thread::Lock lock(imageData->getMutex()); - // Direct readback without copying avoids the need for a staging buffer, // and lowers the system requirements of immediate RT readback. Texture *t = (Texture *) texture; diff --git a/src/modules/image/ImageData.cpp b/src/modules/image/ImageData.cpp index 33c7d4fc6..faff29046 100644 --- a/src/modules/image/ImageData.cpp +++ b/src/modules/image/ImageData.cpp @@ -194,10 +194,7 @@ love::filesystem::FileData *ImageData::encode(FormatHandler::EncodedFormat encod } if (encoder != nullptr) - { - thread::Lock lock(mutex); encodedimage = encoder->encode(rawimage, encodedFormat); - } if (encoder == nullptr || encodedimage.data == nullptr) throw love::Exception("No suitable image encoder for the %s pixel format.", getPixelFormatName(format)); @@ -537,8 +534,6 @@ void ImageData::setPixel(int x, int y, const Colorf &c) if (pixelSetFunction == nullptr) throw love::Exception("ImageData:setPixel does not currently support the %s pixel format.", getPixelFormatName(format)); - Lock lock(mutex); - pixelSetFunction(c, p); } @@ -553,8 +548,6 @@ void ImageData::getPixel(int x, int y, Colorf &c) const if (pixelGetFunction == nullptr) throw love::Exception("ImageData:getPixel does not currently support the %s pixel format.", getPixelFormatName(format)); - Lock lock(mutex); - pixelGetFunction(p, c); } @@ -701,9 +694,6 @@ void ImageData::paste(ImageData *src, int dx, int dy, int sx, int sy, int sw, in if (sy + sh > srcH) sh = srcH - sy; - Lock lock2(src->mutex); - Lock lock1(mutex); - uint8 *s = (uint8 *) src->getData(); uint8 *d = (uint8 *) getData(); diff --git a/src/modules/image/wrap_ImageData.cpp b/src/modules/image/wrap_ImageData.cpp index abeb0384b..7b04e7c1d 100644 --- a/src/modules/image/wrap_ImageData.cpp +++ b/src/modules/image/wrap_ImageData.cpp @@ -158,18 +158,15 @@ int w_ImageData_setPixel(lua_State *L) return 0; } -// ImageData:mapPixel. Not thread-safe! See wrap_ImageData.lua for the thread- -// safe wrapper function. -int w_ImageData__mapPixelUnsafe(lua_State *L) +int w_ImageData_mapPixel(lua_State *L) { ImageData *t = luax_checkimagedata(L, 1); luaL_checktype(L, 2, LUA_TFUNCTION); - // No optints because we assume they're done in the wrapper function. - int sx = (int) lua_tonumber(L, 3); - int sy = (int) lua_tonumber(L, 4); - int w = (int) lua_tonumber(L, 5); - int h = (int) lua_tonumber(L, 6); + int sx = luaL_optint(L, 3, 0); + int sy = luaL_optint(L, 4, 0); + int w = luaL_optint(L, 5, t->getWidth()); + int h = luaL_optint(L, 6, t->getHeight()); if (!(t->inside(sx, sy) && t->inside(sx+w-1, sy+h-1))) return luaL_error(L, "Invalid rectangle dimensions."); @@ -264,32 +261,9 @@ int w_ImageData_encode(lua_State *L) return 1; } -int w_ImageData__performAtomic(lua_State *L) -{ - ImageData *t = luax_checkimagedata(L, 1); - int err = 0; - - { - love::thread::Lock lock(t->getMutex()); - // call the function, passing any user-specified arguments. - err = lua_pcall(L, lua_gettop(L) - 2, LUA_MULTRET, 0); - } - - // Unfortunately, this eats the stack trace, too bad. - if (err != 0) - return lua_error(L); - - // The function and everything after it in the stack are eaten by the pcall, - // leaving only the ImageData object. Everything else is a return value. - return lua_gettop(L) - 1; -} - // C functions in a struct, necessary for the FFI versions of ImageData methods. struct FFI_ImageData { - void (*lockMutex)(Proxy *p); - void (*unlockMutex)(Proxy *p); - float (*float16to32)(float16 f); float16 (*float32to16)(float f); @@ -302,20 +276,6 @@ struct FFI_ImageData static FFI_ImageData ffifuncs = { - [](Proxy *p) // lockMutex - { - // We don't do any type-checking for the Proxy here since these functions - // are always called from code which has already done type checking. - ImageData *i = (ImageData *) p->object; - i->getMutex()->lock(); - }, - - [](Proxy *p) // unlockMutex - { - ImageData *i = (ImageData *) p->object; - i->getMutex()->unlock(); - }, - float16to32, float32to16, float11to32, @@ -336,12 +296,8 @@ static const luaL_Reg w_ImageData_functions[] = { "getPixel", w_ImageData_getPixel }, { "setPixel", w_ImageData_setPixel }, { "paste", w_ImageData_paste }, + { "mapPixel", w_ImageData_mapPixel }, { "encode", w_ImageData_encode }, - - // Used in the Lua wrapper code. - { "_mapPixelUnsafe", w_ImageData__mapPixelUnsafe }, - { "_performAtomic", w_ImageData__performAtomic }, - { 0, 0 } }; diff --git a/src/modules/image/wrap_ImageData.lua b/src/modules/image/wrap_ImageData.lua index 5e3651986..c3bfed49e 100644 --- a/src/modules/image/wrap_ImageData.lua +++ b/src/modules/image/wrap_ImageData.lua @@ -38,29 +38,6 @@ local function clamp01(x) return min(max(x, 0), 1) end --- Implement thread-safe ImageData:mapPixel regardless of whether the FFI is --- used or not. -function ImageData:mapPixel(func, ix, iy, iw, ih) - local idw, idh = self:getDimensions() - - ix = ix or 0 - iy = iy or 0 - iw = iw or idw - ih = ih or idh - - if type(ix) ~= "number" then error("bad argument #2 to ImageData:mapPixel (expected number)", 2) end - if type(iy) ~= "number" then error("bad argument #3 to ImageData:mapPixel (expected number)", 2) end - if type(iw) ~= "number" then error("bad argument #4 to ImageData:mapPixel (expected number)", 2) end - if type(ih) ~= "number" then error("bad argument #5 to ImageData:mapPixel (expected number)", 2) end - - if type(func) ~= "function" then error("bad argument #1 to ImageData:mapPixel (expected function)", 2) end - if not (inside(ix, iy, idw, idh) and inside(ix+iw-1, iy+ih-1, idw, idh)) then error("Invalid rectangle dimensions", 2) end - - -- performAtomic and mapPixelUnsafe have Lua-C API and FFI versions. - self:_performAtomic(self._mapPixelUnsafe, self, func, ix, iy, iw, ih) -end - - -- Everything below this point is efficient FFI replacements for existing -- ImageData functionality. @@ -84,9 +61,6 @@ typedef uint16_t float10; typedef struct FFI_ImageData { - void (*lockMutex)(Proxy *p); - void (*unlockMutex)(Proxy *p); - float (*float16to32)(float16 f); float16 (*float32to16)(float f); @@ -381,20 +355,23 @@ local objectcache = setmetatable({}, { -- Overwrite existing functions with new FFI versions. -function ImageData:_performAtomic(...) - ffifuncs.lockMutex(self) - local success, err = pcall(...) - ffifuncs.unlockMutex(self) - - if not success then - error(err, 3) - end -end - -function ImageData:_mapPixelUnsafe(func, ix, iy, iw, ih) +function ImageData:mapPixel(func, ix, iy, iw, ih) local p = objectcache[self] local idw, idh = p.width, p.height + ix = ix or 0 + iy = iy or 0 + iw = iw or idw + ih = ih or idh + + if type(ix) ~= "number" then error("bad argument #2 to ImageData:mapPixel (expected number)", 2) end + if type(iy) ~= "number" then error("bad argument #3 to ImageData:mapPixel (expected number)", 2) end + if type(iw) ~= "number" then error("bad argument #4 to ImageData:mapPixel (expected number)", 2) end + if type(ih) ~= "number" then error("bad argument #5 to ImageData:mapPixel (expected number)", 2) end + + if type(func) ~= "function" then error("bad argument #1 to ImageData:mapPixel (expected function)", 2) end + if not (inside(ix, iy, idw, idh) and inside(ix+iw-1, iy+ih-1, idw, idh)) then error("Invalid rectangle dimensions", 2) end + if p.pointer == nil then error("ImageData:mapPixel does not currently support the "..p.format.." pixel format.", 2) end ix = floor(ix) @@ -427,12 +404,8 @@ function ImageData:getPixel(x, y) if p.pointer == nil then error("ImageData:getPixel does not currently support the "..p.format.." pixel format.", 2) end - ffifuncs.lockMutex(self) local pixel = p.pointer[y * p.width + x] - local r, g, b, a = p.tolua(pixel) - ffifuncs.unlockMutex(self) - - return r, g, b, a + return p.tolua(pixel) end function ImageData:setPixel(x, y, r, g, b, a) @@ -457,9 +430,7 @@ function ImageData:setPixel(x, y, r, g, b, a) if p.pointer == nil then error("ImageData:setPixel does not currently support the "..p.format.." pixel format.", 2) end - ffifuncs.lockMutex(self) p.fromlua(p.pointer[y * p.width + x], r, g, b, a) - ffifuncs.unlockMutex(self) end function ImageData:getWidth() diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 3f3a5a868..2cc4a588b 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -1065,13 +1065,7 @@ bool Window::setIcon(love::image::ImageData *imgd) int bytesperpixel = (int) getPixelFormatBlockSize(imgd->getFormat()); int pitch = w * bytesperpixel; - SDL_Surface *sdlicon = nullptr; - - { - // We don't want another thread modifying the ImageData mid-copy. - love::thread::Lock lock(imgd->getMutex()); - sdlicon = SDL_CreateRGBSurfaceFrom(imgd->getData(), w, h, bytesperpixel * 8, pitch, rmask, gmask, bmask, amask); - } + SDL_Surface *sdlicon = SDL_CreateRGBSurfaceFrom(imgd->getData(), w, h, bytesperpixel * 8, pitch, rmask, gmask, bmask, amask); if (!sdlicon) return false; From ae6800e0e0bf84daa0f0e51cab6f8229e413fef8 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 18 Feb 2024 17:07:24 -0400 Subject: [PATCH 021/104] Add Data:performAtomic to lock a mutex while using a Data object. --- src/common/Data.cpp | 17 +++++++++++++++++ src/common/Data.h | 24 +++++++++++++++++++----- src/modules/data/wrap_Data.cpp | 22 ++++++++++++++++++++++ src/modules/image/ImageData.cpp | 5 ----- src/modules/image/ImageData.h | 4 ---- 5 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/common/Data.cpp b/src/common/Data.cpp index 9da33a2a2..d3f7bdd6d 100644 --- a/src/common/Data.cpp +++ b/src/common/Data.cpp @@ -20,10 +20,27 @@ // LOVE #include "Data.h" +#include "thread/threads.h" namespace love { love::Type Data::type("Data", &Object::type); +Data::~Data() +{ + delete mutex; +} + +static void createMutex(love::thread::Mutex **mutexAddress) +{ + *mutexAddress = love::thread::newMutex(); +} + +love::thread::Mutex *Data::getMutex() +{ + std::call_once(mutexCreated, createMutex, &mutex); + return mutex; +} + } // love diff --git a/src/common/Data.h b/src/common/Data.h index 479a4a6d6..bb19b66cb 100644 --- a/src/common/Data.h +++ b/src/common/Data.h @@ -22,15 +22,20 @@ #define LOVE_DATA_H // LOVE -#include "config.h" #include "Object.h" // C #include +#include namespace love { +namespace thread +{ +class Mutex; +} + /** * This class is a simple abstraction over all objects which contain data. **/ @@ -40,10 +45,8 @@ class Data : public Object static love::Type type; - /** - * Destructor. - **/ - virtual ~Data() {} + Data() {}; + virtual ~Data(); /** * Creates a duplicate of Data derived class instance. @@ -60,6 +63,17 @@ class Data : public Object **/ virtual size_t getSize() const = 0; + /** + * Gets the Mutex associated with this Data object. Creates it in a thread- + * safe manner if necessary. + **/ + love::thread::Mutex *getMutex(); + +private: + + love::thread::Mutex *mutex = nullptr; + std::once_flag mutexCreated; + }; // Data } // love diff --git a/src/modules/data/wrap_Data.cpp b/src/modules/data/wrap_Data.cpp index 586daae1e..f9b144ebd 100644 --- a/src/modules/data/wrap_Data.cpp +++ b/src/modules/data/wrap_Data.cpp @@ -20,6 +20,7 @@ #include "wrap_Data.h" #include "common/int.h" +#include "thread/threads.h" // Put the Lua code directly into a raw string literal. static const char data_lua[] = @@ -78,6 +79,26 @@ int w_Data_getSize(lua_State *L) return 1; } +int w_Data_performAtomic(lua_State *L) +{ + Data *t = luax_checkdata(L, 1); + int err = 0; + + { + love::thread::Lock lock(t->getMutex()); + // call the function, passing any user-specified arguments. + err = lua_pcall(L, lua_gettop(L) - 2, LUA_MULTRET, 0); + } + + // Unfortunately, this eats the stack trace, too bad. + if (err != 0) + return lua_error(L); + + // The function and everything after it in the stack are eaten by the pcall, + // leaving only the Data object. Everything else is a return value. + return lua_gettop(L) - 1; +} + template static int w_Data_getT(lua_State* L) { @@ -170,6 +191,7 @@ const luaL_Reg w_Data_functions[] = { "getPointer", w_Data_getPointer }, { "getFFIPointer", w_Data_getFFIPointer }, { "getSize", w_Data_getSize }, + { "performAtomic", w_Data_performAtomic }, { "getFloat", w_Data_getFloat }, { "getDouble", w_Data_getDouble }, { "getInt8", w_Data_getInt8 }, diff --git a/src/modules/image/ImageData.cpp b/src/modules/image/ImageData.cpp index faff29046..7c2c5205c 100644 --- a/src/modules/image/ImageData.cpp +++ b/src/modules/image/ImageData.cpp @@ -764,11 +764,6 @@ void ImageData::paste(ImageData *src, int dx, int dy, int sx, int sy, int sw, in } } -love::thread::Mutex *ImageData::getMutex() const -{ - return mutex; -} - size_t ImageData::getPixelSize() const { return getPixelFormatBlockSize(format); diff --git a/src/modules/image/ImageData.h b/src/modules/image/ImageData.h index 552d3b0a2..5eb800f4d 100644 --- a/src/modules/image/ImageData.h +++ b/src/modules/image/ImageData.h @@ -110,8 +110,6 @@ class ImageData : public ImageDataBase **/ love::filesystem::FileData *encode(FormatHandler::EncodedFormat format, const char *filename, bool writefile) const; - love::thread::Mutex *getMutex() const; - // Implements ImageDataBase. ImageData *clone() const override; void *getData() const override; @@ -142,8 +140,6 @@ class ImageData : public ImageDataBase // The actual data. unsigned char *data = nullptr; - love::thread::MutexRef mutex; - // The format handler that was used to decode the ImageData. We need to know // this so we can properly delete memory allocated by the decoder. StrongRef decodeHandler; From d2eca731d4b9a42870a8ddefc01f8d6bf67769bf Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 18 Feb 2024 17:22:31 -0400 Subject: [PATCH 022/104] Remove Data:getInt64 and ByteData:setInt64. Lua numbers don't cover the full range for 64 bit integers, so those methods couldn't be reliable. --- src/modules/data/wrap_ByteData.cpp | 12 ------------ src/modules/data/wrap_Data.cpp | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/src/modules/data/wrap_ByteData.cpp b/src/modules/data/wrap_ByteData.cpp index 4bdf4c3eb..e15924d64 100644 --- a/src/modules/data/wrap_ByteData.cpp +++ b/src/modules/data/wrap_ByteData.cpp @@ -135,16 +135,6 @@ int w_ByteData_setUInt32(lua_State *L) return w_ByteData_setT(L); } -int w_ByteData_setInt64(lua_State *L) -{ - return w_ByteData_setT(L); -} - -int w_ByteData_setUInt64(lua_State *L) -{ - return w_ByteData_setT(L); -} - static const luaL_Reg w_ByteData_functions[] = { { "clone", w_ByteData_clone }, @@ -157,8 +147,6 @@ static const luaL_Reg w_ByteData_functions[] = { "setUInt16", w_ByteData_setUInt16 }, { "setInt32", w_ByteData_setInt32 }, { "setUInt32", w_ByteData_setUInt32 }, - { "setInt64", w_ByteData_setInt64 }, - { "setUInt64", w_ByteData_setUInt64 }, { 0, 0 } }; diff --git a/src/modules/data/wrap_Data.cpp b/src/modules/data/wrap_Data.cpp index f9b144ebd..97ff37469 100644 --- a/src/modules/data/wrap_Data.cpp +++ b/src/modules/data/wrap_Data.cpp @@ -160,16 +160,6 @@ int w_Data_getUInt32(lua_State* L) return w_Data_getT(L); } -int w_Data_getInt64(lua_State* L) -{ - return w_Data_getT(L); -} - -int w_Data_getUInt64(lua_State* L) -{ - return w_Data_getT(L); -} - // C functions in a struct, necessary for the FFI versions of Data methods. struct FFI_Data { @@ -200,8 +190,6 @@ const luaL_Reg w_Data_functions[] = { "getUInt16", w_Data_getUInt16 }, { "getInt32", w_Data_getInt32 }, { "getUInt32", w_Data_getUInt32 }, - { "getInt64", w_Data_getInt64 }, - { "getUInt64", w_Data_getUInt64 }, { 0, 0 } }; From c7e4dafd88498a73466d68fabbf146ca223d9f31 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 19 Feb 2024 12:11:15 -0400 Subject: [PATCH 023/104] CI: pull megasource's main branch --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 301ff5c97..510da5467 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -226,7 +226,7 @@ jobs: with: path: megasource repository: love2d/megasource - ref: 12.x + ref: main - id: megasource name: Get Megasource Commit SHA shell: python From 1e97e09b285c1eb85683e39bfc52b36166d4a676 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 24 Feb 2024 15:21:38 -0400 Subject: [PATCH 024/104] Rework internal module registration to happen in constructors. --- src/common/Module.cpp | 5 ++++- src/common/Module.h | 18 ++++++++---------- src/common/runtime.cpp | 3 --- src/modules/audio/Audio.cpp | 4 ++++ src/modules/audio/Audio.h | 7 ++++--- src/modules/audio/null/Audio.cpp | 8 ++------ src/modules/audio/null/Audio.h | 3 --- src/modules/audio/openal/Audio.cpp | 8 ++------ src/modules/audio/openal/Audio.h | 3 --- src/modules/data/DataModule.cpp | 1 + src/modules/data/DataModule.h | 4 ---- src/modules/event/Event.cpp | 5 +++++ src/modules/event/Event.h | 7 ++++--- src/modules/event/sdl/Event.cpp | 6 +----- src/modules/event/sdl/Event.h | 3 --- src/modules/filesystem/Filesystem.cpp | 3 ++- src/modules/filesystem/Filesystem.h | 8 ++++---- src/modules/filesystem/physfs/Filesystem.cpp | 8 ++------ src/modules/filesystem/physfs/Filesystem.h | 3 --- src/modules/font/Font.cpp | 3 ++- src/modules/font/Font.h | 7 +++---- src/modules/font/freetype/Font.cpp | 6 +----- src/modules/font/freetype/Font.h | 3 --- src/modules/graphics/Graphics.cpp | 5 +++-- src/modules/graphics/Graphics.h | 5 +---- src/modules/graphics/metal/Graphics.h | 3 --- src/modules/graphics/metal/Graphics.mm | 3 ++- src/modules/graphics/opengl/Graphics.cpp | 8 ++------ src/modules/graphics/opengl/Graphics.h | 3 --- src/modules/graphics/vulkan/Graphics.cpp | 6 +----- src/modules/graphics/vulkan/Graphics.h | 1 - src/modules/image/Image.cpp | 6 +----- src/modules/image/Image.h | 4 ---- src/modules/joystick/JoystickModule.h | 9 ++++++--- src/modules/joystick/sdl/JoystickModule.cpp | 6 +----- src/modules/joystick/sdl/JoystickModule.h | 3 --- src/modules/keyboard/Keyboard.cpp | 5 +++++ src/modules/keyboard/Keyboard.h | 7 ++++--- src/modules/keyboard/sdl/Keyboard.cpp | 8 ++------ src/modules/keyboard/sdl/Keyboard.h | 3 --- src/modules/math/MathModule.cpp | 3 ++- src/modules/math/MathModule.h | 11 ----------- src/modules/mouse/Mouse.h | 6 ++++++ src/modules/mouse/sdl/Mouse.cpp | 8 ++------ src/modules/mouse/sdl/Mouse.h | 3 --- src/modules/physics/box2d/Physics.cpp | 8 ++------ src/modules/physics/box2d/Physics.h | 4 ---- src/modules/sensor/Sensor.cpp | 5 +++++ src/modules/sensor/Sensor.h | 7 ++++--- src/modules/sensor/sdl/Sensor.cpp | 8 ++------ src/modules/sensor/sdl/Sensor.h | 3 --- src/modules/sound/Sound.cpp | 5 +++++ src/modules/sound/Sound.h | 7 ++++--- src/modules/sound/lullaby/Sound.cpp | 6 +----- src/modules/sound/lullaby/Sound.h | 3 --- src/modules/system/System.cpp | 3 ++- src/modules/system/System.h | 5 +---- src/modules/system/sdl/System.cpp | 6 +----- src/modules/system/sdl/System.h | 3 --- src/modules/thread/ThreadModule.cpp | 10 +++++----- src/modules/thread/ThreadModule.h | 5 +---- src/modules/timer/Timer.cpp | 3 ++- src/modules/timer/Timer.h | 4 ---- src/modules/touch/Touch.h | 9 ++++++--- src/modules/touch/sdl/Touch.cpp | 10 +++++----- src/modules/touch/sdl/Touch.h | 4 +--- src/modules/video/Video.h | 11 ++++++++--- src/modules/video/theora/Video.cpp | 6 +----- src/modules/video/theora/Video.h | 3 --- src/modules/window/Window.cpp | 5 +++++ src/modules/window/Window.h | 7 ++++--- src/modules/window/sdl/Window.cpp | 8 ++------ src/modules/window/sdl/Window.h | 2 -- 73 files changed, 154 insertions(+), 248 deletions(-) diff --git a/src/common/Module.cpp b/src/common/Module.cpp index a01297da0..6c168df1e 100644 --- a/src/common/Module.cpp +++ b/src/common/Module.cpp @@ -62,9 +62,12 @@ namespace love love::Type Module::type("Module", &Object::type); Module *Module::instances[] = {}; -Module::Module() +Module::Module(Module::ModuleType moduleType, const char *name) + : moduleType(moduleType) + , name(name) { initDeprecation(); + registerInstance(this); } Module::~Module() diff --git a/src/common/Module.h b/src/common/Module.h index 39abaa68e..77e95d565 100644 --- a/src/common/Module.h +++ b/src/common/Module.h @@ -62,13 +62,13 @@ class Module : public Object M_MAX_ENUM }; - Module(); + Module(ModuleType moduleType, const char *name); virtual ~Module(); /** * Gets the base type of the module. **/ - virtual ModuleType getModuleType() const = 0; + ModuleType getModuleType() const { return moduleType; } /** * Gets the name of the module. This is used in case of errors @@ -76,14 +76,7 @@ class Module : public Object * * @return The full name of the module, eg. love.graphics.opengl. **/ - virtual const char *getName() const = 0; - - /** - * Add module to internal registry. To be used /only/ in - * runtime.cpp:luax_register_module() - * @param instance The module instance. - */ - static void registerInstance(Module *instance); + const char *getName() const { return name.c_str(); } /** * Retrieve module instance from internal registry. May return NULL @@ -106,6 +99,11 @@ class Module : public Object private: + static void registerInstance(Module *instance); + + ModuleType moduleType; + std::string name; + static Module *instances[M_MAX_ENUM]; }; // Module diff --git a/src/common/runtime.cpp b/src/common/runtime.cpp index f22c94136..d9f2570dc 100644 --- a/src/common/runtime.cpp +++ b/src/common/runtime.cpp @@ -473,9 +473,6 @@ int luax_register_module(lua_State *L, const WrappedModule &m) lua_setfield(L, -3, m.name); // love.graphics = table lua_remove(L, -2); // love - // Register module instance - Module::registerInstance(m.module); - return 1; } diff --git a/src/modules/audio/Audio.cpp b/src/modules/audio/Audio.cpp index 8666802ef..336e9dff3 100644 --- a/src/modules/audio/Audio.cpp +++ b/src/modules/audio/Audio.cpp @@ -68,6 +68,10 @@ void showRecordingPermissionMissingDialog() #endif } +Audio::Audio(const char *name) + : Module(M_AUDIO, name) +{} + bool Audio::setMixWithSystem(bool mix) { #ifdef LOVE_IOS diff --git a/src/modules/audio/Audio.h b/src/modules/audio/Audio.h index 29df1aa5f..8b6eae670 100644 --- a/src/modules/audio/Audio.h +++ b/src/modules/audio/Audio.h @@ -101,9 +101,6 @@ class Audio : public Module virtual ~Audio() {} - // Implements Module. - virtual ModuleType getModuleType() const { return M_AUDIO; } - virtual Source *newSource(love::sound::Decoder *decoder) = 0; virtual Source *newSource(love::sound::SoundData *soundData) = 0; virtual Source *newSource(int sampleRate, int bitDepth, int channels, int buffers) = 0; @@ -312,6 +309,10 @@ class Audio : public Module */ virtual void setPlaybackDevice(const char *name); +protected: + + Audio(const char *name); + private: static StringMap::Entry distanceModelEntries[]; diff --git a/src/modules/audio/null/Audio.cpp b/src/modules/audio/null/Audio.cpp index eb9afda00..29f814be5 100644 --- a/src/modules/audio/null/Audio.cpp +++ b/src/modules/audio/null/Audio.cpp @@ -28,7 +28,8 @@ namespace null { Audio::Audio() - : distanceModel(DISTANCE_NONE) + : love::audio::Audio("love.audio.null") + , distanceModel(DISTANCE_NONE) { } @@ -36,11 +37,6 @@ Audio::~Audio() { } -const char *Audio::getName() const -{ - return "love.audio.null"; -} - love::audio::Source *Audio::newSource(love::sound::Decoder *) { return new Source(); diff --git a/src/modules/audio/null/Audio.h b/src/modules/audio/null/Audio.h index 5f625e4ba..8d38d4523 100644 --- a/src/modules/audio/null/Audio.h +++ b/src/modules/audio/null/Audio.h @@ -41,9 +41,6 @@ class Audio : public love::audio::Audio Audio(); virtual ~Audio(); - // Implements Module. - const char *getName() const; - // Implements Audio. love::audio::Source *newSource(love::sound::Decoder *decoder); love::audio::Source *newSource(love::sound::SoundData *soundData); diff --git a/src/modules/audio/openal/Audio.cpp b/src/modules/audio/openal/Audio.cpp index 66d8ec6d4..262b60eb2 100644 --- a/src/modules/audio/openal/Audio.cpp +++ b/src/modules/audio/openal/Audio.cpp @@ -106,7 +106,8 @@ static const char *getDeviceSpecifier(ALCdevice *device) } Audio::Audio() - : device(nullptr) + : love::audio::Audio("love.audio.openal") + , device(nullptr) , context(nullptr) , pool(nullptr) , poolThread(nullptr) @@ -256,11 +257,6 @@ Audio::~Audio() alcCloseDevice(device); } -const char *Audio::getName() const -{ - return "love.audio.openal"; -} - love::audio::Source *Audio::newSource(love::sound::Decoder *decoder) { return new Source(pool, decoder); diff --git a/src/modules/audio/openal/Audio.h b/src/modules/audio/openal/Audio.h index a05fe6e54..970d9150a 100644 --- a/src/modules/audio/openal/Audio.h +++ b/src/modules/audio/openal/Audio.h @@ -78,9 +78,6 @@ class Audio : public love::audio::Audio **/ static ALenum getFormat(int bitDepth, int channels); - // Implements Module. - const char *getName() const; - // Implements Audio. love::audio::Source *newSource(love::sound::Decoder *decoder); love::audio::Source *newSource(love::sound::SoundData *soundData); diff --git a/src/modules/data/DataModule.cpp b/src/modules/data/DataModule.cpp index a84378cf9..a3b27ed89 100644 --- a/src/modules/data/DataModule.cpp +++ b/src/modules/data/DataModule.cpp @@ -214,6 +214,7 @@ void hash(HashFunction::Function function, const char *input, uint64_t size, Has } DataModule::DataModule() + : Module(M_DATA, "love.data") { } diff --git a/src/modules/data/DataModule.h b/src/modules/data/DataModule.h index 8ad189547..f255cf07f 100644 --- a/src/modules/data/DataModule.h +++ b/src/modules/data/DataModule.h @@ -117,10 +117,6 @@ class DataModule : public Module DataModule(); virtual ~DataModule(); - // Implements Module. - ModuleType getModuleType() const override { return M_DATA; } - const char *getName() const override { return "love.data"; } - DataView *newDataView(Data *data, size_t offset, size_t size); ByteData *newByteData(size_t size); ByteData *newByteData(const void *d, size_t size); diff --git a/src/modules/event/Event.cpp b/src/modules/event/Event.cpp index 4b7b78acf..45b7c2c2b 100644 --- a/src/modules/event/Event.cpp +++ b/src/modules/event/Event.cpp @@ -38,6 +38,11 @@ Message::~Message() { } +Event::Event(const char *name) + : Module(M_EVENT, name) +{ +} + Event::~Event() { } diff --git a/src/modules/event/Event.h b/src/modules/event/Event.h index ccd610dd2..3b3c33d44 100644 --- a/src/modules/event/Event.h +++ b/src/modules/event/Event.h @@ -54,10 +54,8 @@ class Message : public Object class Event : public Module { public: - virtual ~Event(); - // Implements Module. - virtual ModuleType getModuleType() const { return M_EVENT; } + virtual ~Event(); void push(Message *msg); bool poll(Message *&msg); @@ -67,6 +65,9 @@ class Event : public Module virtual Message *wait() = 0; protected: + + Event(const char *name); + love::thread::MutexRef mutex; std::queue queue; diff --git a/src/modules/event/sdl/Event.cpp b/src/modules/event/sdl/Event.cpp index aa3321797..bf542bd98 100644 --- a/src/modules/event/sdl/Event.cpp +++ b/src/modules/event/sdl/Event.cpp @@ -105,12 +105,8 @@ static int SDLCALL watchAppEvents(void * /*udata*/, SDL_Event *event) return 1; } -const char *Event::getName() const -{ - return "love.event.sdl"; -} - Event::Event() + : love::event::Event("love.event.sdl") { if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0) throw love::Exception("Could not initialize SDL events subsystem (%s)", SDL_GetError()); diff --git a/src/modules/event/sdl/Event.h b/src/modules/event/sdl/Event.h index 1e9726c0c..8b9ab9ad7 100644 --- a/src/modules/event/sdl/Event.h +++ b/src/modules/event/sdl/Event.h @@ -42,9 +42,6 @@ class Event : public love::event::Event { public: - // Implements Module. - const char *getName() const; - Event(); virtual ~Event(); diff --git a/src/modules/filesystem/Filesystem.cpp b/src/modules/filesystem/Filesystem.cpp index b9cd7bb9d..026209c41 100644 --- a/src/modules/filesystem/Filesystem.cpp +++ b/src/modules/filesystem/Filesystem.cpp @@ -45,7 +45,8 @@ namespace filesystem love::Type Filesystem::type("filesystem", &Module::type); -Filesystem::Filesystem() +Filesystem::Filesystem(const char *name) + : Module(M_FILESYSTEM, name) { } diff --git a/src/modules/filesystem/Filesystem.h b/src/modules/filesystem/Filesystem.h index 48c54310c..91359635d 100644 --- a/src/modules/filesystem/Filesystem.h +++ b/src/modules/filesystem/Filesystem.h @@ -108,12 +108,8 @@ class Filesystem : public Module static love::Type type; - Filesystem(); virtual ~Filesystem(); - // Implements Module. - virtual ModuleType getModuleType() const { return M_FILESYSTEM; } - virtual void init(const char *arg0) = 0; virtual void setFused(bool fused) = 0; @@ -317,6 +313,10 @@ class Filesystem : public Module STRINGMAP_CLASS_DECLARE(MountPermissions); STRINGMAP_CLASS_DECLARE(LoadMode); +protected: + + Filesystem(const char *name); + private: bool getRealPathType(const std::string &path, FileType &ftype) const; diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index f4968f97e..586e064c0 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -107,7 +107,8 @@ static bool isAppCommonPath(Filesystem::CommonPath path) } Filesystem::Filesystem() - : appendIdentityToPath(false) + : love::filesystem::Filesystem("love.filesystem.physfs") + , appendIdentityToPath(false) , fused(false) , fusedSet(false) , fullPaths() @@ -128,11 +129,6 @@ Filesystem::~Filesystem() PHYSFS_deinit(); } -const char *Filesystem::getName() const -{ - return "love.filesystem.physfs"; -} - void Filesystem::init(const char *arg0) { #ifdef LOVE_ANDROID diff --git a/src/modules/filesystem/physfs/Filesystem.h b/src/modules/filesystem/physfs/Filesystem.h index f1c02d9c9..beffe3bab 100644 --- a/src/modules/filesystem/physfs/Filesystem.h +++ b/src/modules/filesystem/physfs/Filesystem.h @@ -43,9 +43,6 @@ class Filesystem final : public love::filesystem::Filesystem Filesystem(); virtual ~Filesystem(); - // Implements Module. - const char *getName() const override; - void init(const char *arg0) override; void setFused(bool fused) override; diff --git a/src/modules/font/Font.cpp b/src/modules/font/Font.cpp index 70087e38c..e81b06a75 100644 --- a/src/modules/font/Font.cpp +++ b/src/modules/font/Font.cpp @@ -34,7 +34,8 @@ namespace font // Default TrueType font, gzip-compressed. #include "NotoSans-Regular.ttf.gzip.h" -Font::Font() +Font::Font(const char *name) + : Module(M_FONT, name) { auto compressedbytes = (const char *) NotoSans_Regular_ttf_gzip; size_t compressedsize = NotoSans_Regular_ttf_gzip_len; diff --git a/src/modules/font/Font.h b/src/modules/font/Font.h index 2f6a027eb..2fb1a69ea 100644 --- a/src/modules/font/Font.h +++ b/src/modules/font/Font.h @@ -43,7 +43,6 @@ class Font : public Module public: - Font(); virtual ~Font() {} virtual Rasterizer *newRasterizer(love::filesystem::FileData *data) = 0; @@ -58,9 +57,9 @@ class Font : public Module virtual GlyphData *newGlyphData(Rasterizer *r, const std::string &glyph); virtual GlyphData *newGlyphData(Rasterizer *r, uint32 glyph); - // Implement Module. - virtual ModuleType getModuleType() const { return M_FONT; } - virtual const char *getName() const = 0; +protected: + + Font(const char *name); private: diff --git a/src/modules/font/freetype/Font.cpp b/src/modules/font/freetype/Font.cpp index 3c4a596f5..1e8f61b46 100644 --- a/src/modules/font/freetype/Font.cpp +++ b/src/modules/font/freetype/Font.cpp @@ -36,6 +36,7 @@ namespace freetype { Font::Font() + : love::font::Font("love.font.freetype") { if (FT_Init_FreeType(&library)) throw love::Exception("TrueTypeFont Loading error: FT_Init_FreeType failed"); @@ -66,11 +67,6 @@ Rasterizer *Font::newTrueTypeRasterizer(love::Data *data, int size, const font:: return new TrueTypeRasterizer(library, data, size, settings, defaultdpiscale); } -const char *Font::getName() const -{ - return "love.font.freetype"; -} - } // freetype } // font } // love diff --git a/src/modules/font/freetype/Font.h b/src/modules/font/freetype/Font.h index eacfe50b6..c946925ad 100644 --- a/src/modules/font/freetype/Font.h +++ b/src/modules/font/freetype/Font.h @@ -47,9 +47,6 @@ class Font : public love::font::Font Rasterizer *newRasterizer(love::filesystem::FileData *data) override; Rasterizer *newTrueTypeRasterizer(love::Data *data, int size, const font::TrueTypeRasterizer::Settings &settings) override; - // Implement Module - const char *getName() const override; - private: // FreeType library diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index bac8e98b8..64ddfa62e 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -180,8 +180,9 @@ Graphics::DisplayState::DisplayState() defaultSamplerState.mipmapFilter = SamplerState::MIPMAP_FILTER_LINEAR; } -Graphics::Graphics() - : width(0) +Graphics::Graphics(const char *name) + : Module(M_GRAPHICS, name) + , width(0) , height(0) , pixelWidth(0) , pixelHeight(0) diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index e377f128a..cef0d4e72 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -451,12 +451,9 @@ class Graphics : public Module } }; - Graphics(); + Graphics(const char *name); virtual ~Graphics(); - // Implements Module. - virtual ModuleType getModuleType() const { return M_GRAPHICS; } - virtual Texture *newTexture(const Texture::Settings &settings, const Texture::Slices *data = nullptr) = 0; Quad *newQuad(Quad::Viewport v, double sw, double sh); diff --git a/src/modules/graphics/metal/Graphics.h b/src/modules/graphics/metal/Graphics.h index 1f4862bf8..95721632b 100644 --- a/src/modules/graphics/metal/Graphics.h +++ b/src/modules/graphics/metal/Graphics.h @@ -60,9 +60,6 @@ class Graphics final : public love::graphics::Graphics Graphics(); virtual ~Graphics(); - // Implements Module. - const char *getName() const override { return "love.graphics.metal"; } - love::graphics::Texture *newTexture(const Texture::Settings &settings, const Texture::Slices *data = nullptr) override; love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector &format, const void *data, size_t size, size_t arraylength) override; diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index 73af1f646..99e0b5ca4 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -263,7 +263,8 @@ static inline void setSampler(id encoder, Graphics::Re Graphics *Graphics::graphicsInstance = nullptr; Graphics::Graphics() - : device(nil) + : love::graphics::Graphics("love.graphics.metal") + , device(nil) , commandQueue(nil) , commandBuffer(nil) , renderEncoder(nil) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index c505415e8..2fd7f6511 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -106,7 +106,8 @@ love::graphics::Graphics *createInstance() } Graphics::Graphics() - : windowHasStencil(false) + : love::graphics::Graphics("love.graphics.opengl") + , windowHasStencil(false) , mainVAO(0) , internalBackbufferFBO(0) , requestedBackbufferMSAA(0) @@ -147,11 +148,6 @@ Graphics::~Graphics() delete[] bufferMapMemory; } -const char *Graphics::getName() const -{ - return "love.graphics.opengl"; -} - love::graphics::StreamBuffer *Graphics::newStreamBuffer(BufferUsage type, size_t size) { return CreateStreamBuffer(type, size); diff --git a/src/modules/graphics/opengl/Graphics.h b/src/modules/graphics/opengl/Graphics.h index d053c8214..c1e9e911b 100644 --- a/src/modules/graphics/opengl/Graphics.h +++ b/src/modules/graphics/opengl/Graphics.h @@ -56,9 +56,6 @@ class Graphics final : public love::graphics::Graphics Graphics(); virtual ~Graphics(); - // Implements Module. - const char *getName() const override; - love::graphics::Texture *newTexture(const Texture::Settings &settings, const Texture::Slices *data = nullptr) override; love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector &format, const void *data, size_t size, size_t arraylength) override; diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 90daad686..16464a3b4 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -60,11 +60,6 @@ static const std::vector deviceExtensions = { constexpr uint32_t USAGES_POLL_INTERVAL = 5000; -const char *Graphics::getName() const -{ - return "love.graphics.vulkan"; -} - VkDevice Graphics::getDevice() const { return device; @@ -95,6 +90,7 @@ static void checkOptionalInstanceExtensions(OptionalInstanceExtensions& ext) } Graphics::Graphics() + : love::graphics::Graphics("love.graphics.vulkan") { if (SDL_Vulkan_LoadLibrary(nullptr)) throw love::Exception("could not find vulkan"); diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index a52bb6f42..c5b164e0c 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -274,7 +274,6 @@ class Graphics final : public love::graphics::Graphics ~Graphics(); // implementation for virtual functions - const char *getName() const override; love::graphics::Texture *newTexture(const love::graphics::Texture::Settings &settings, const love::graphics::Texture::Slices *data) override; love::graphics::Buffer *newBuffer(const love::graphics::Buffer::Settings &settings, const std::vector& format, const void *data, size_t size, size_t arraylength) override; graphics::GraphicsReadback *newReadbackInternal(ReadbackMethod method, love::graphics::Buffer *buffer, size_t offset, size_t size, data::ByteData *dest, size_t destoffset) override; diff --git a/src/modules/image/Image.cpp b/src/modules/image/Image.cpp index 33a39fc0c..8bf46a619 100644 --- a/src/modules/image/Image.cpp +++ b/src/modules/image/Image.cpp @@ -40,6 +40,7 @@ namespace image love::Type Image::type("image", &Module::type); Image::Image() + : Module(M_IMAGE, "love.image.magpie") { using namespace magpie; @@ -65,11 +66,6 @@ Image::~Image() handler->release(); } -const char *Image::getName() const -{ - return "love.image.magpie"; -} - love::image::ImageData *Image::newImageData(Data *data) { return new ImageData(data); diff --git a/src/modules/image/Image.h b/src/modules/image/Image.h index f3f393754..cac95f5d1 100644 --- a/src/modules/image/Image.h +++ b/src/modules/image/Image.h @@ -52,10 +52,6 @@ class Image : public Module Image(); virtual ~Image(); - // Implements Module. - ModuleType getModuleType() const override { return M_IMAGE; } - const char *getName() const override; - /** * Creates new ImageData from FileData. * @param data The FileData containing the encoded image data. diff --git a/src/modules/joystick/JoystickModule.h b/src/modules/joystick/JoystickModule.h index 8b21a46e5..770f8390b 100644 --- a/src/modules/joystick/JoystickModule.h +++ b/src/modules/joystick/JoystickModule.h @@ -36,9 +36,6 @@ class JoystickModule : public Module virtual ~JoystickModule() {} - // Implements Module. - ModuleType getModuleType() const override { return M_JOYSTICK; } - /** * Adds a connected Joystick device and opens it for use. * Returns NULL if the Joystick could not be added. @@ -101,6 +98,12 @@ class JoystickModule : public Module **/ virtual std::string getGamepadMappingString(const std::string &guid) const = 0; +protected: + + JoystickModule(const char *name) + : Module(M_JOYSTICK, name) + {} + }; // JoystickModule } // joystick diff --git a/src/modules/joystick/sdl/JoystickModule.cpp b/src/modules/joystick/sdl/JoystickModule.cpp index 8c5bc2d61..18d1a007f 100644 --- a/src/modules/joystick/sdl/JoystickModule.cpp +++ b/src/modules/joystick/sdl/JoystickModule.cpp @@ -40,6 +40,7 @@ namespace sdl { JoystickModule::JoystickModule() + : love::joystick::JoystickModule("love.joystick.sdl") { if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) < 0) throw love::Exception("Could not initialize SDL joystick subsystem (%s)", SDL_GetError()); @@ -69,11 +70,6 @@ JoystickModule::~JoystickModule() SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER); } -const char *JoystickModule::getName() const -{ - return "love.joystick.sdl"; -} - love::joystick::Joystick *JoystickModule::getJoystick(int joyindex) { if (joyindex < 0 || (size_t) joyindex >= activeSticks.size()) diff --git a/src/modules/joystick/sdl/JoystickModule.h b/src/modules/joystick/sdl/JoystickModule.h index a7d057acf..90a27102b 100644 --- a/src/modules/joystick/sdl/JoystickModule.h +++ b/src/modules/joystick/sdl/JoystickModule.h @@ -44,9 +44,6 @@ class JoystickModule : public love::joystick::JoystickModule JoystickModule(); virtual ~JoystickModule(); - // Implements Module. - const char *getName() const override; - // Implements JoystickModule. love::joystick::Joystick *addJoystick(int deviceindex) override; void removeJoystick(love::joystick::Joystick *joystick) override; diff --git a/src/modules/keyboard/Keyboard.cpp b/src/modules/keyboard/Keyboard.cpp index d79c0f8bb..e7c66a6e1 100644 --- a/src/modules/keyboard/Keyboard.cpp +++ b/src/modules/keyboard/Keyboard.cpp @@ -27,6 +27,11 @@ namespace love namespace keyboard { +Keyboard::Keyboard(const char *name) + : Module(M_KEYBOARD, name) +{ +} + bool Keyboard::getConstant(const char *in, Key &out) { return keys.find(in, out); diff --git a/src/modules/keyboard/Keyboard.h b/src/modules/keyboard/Keyboard.h index 7d0b2dd00..29d071911 100644 --- a/src/modules/keyboard/Keyboard.h +++ b/src/modules/keyboard/Keyboard.h @@ -533,9 +533,6 @@ class Keyboard : public Module virtual ~Keyboard() {} - // Implements Module. - virtual ModuleType getModuleType() const { return M_KEYBOARD; } - /** * Sets whether repeat keypress events should be sent if a key is held down. * Does not affect text input events. @@ -614,6 +611,10 @@ class Keyboard : public Module static bool getConstant(const char *in, ModifierKey &out); static bool getConstant(ModifierKey in, const char *&out); +protected: + + Keyboard(const char *name); + private: static StringMap::Entry keyEntries[]; diff --git a/src/modules/keyboard/sdl/Keyboard.cpp b/src/modules/keyboard/sdl/Keyboard.cpp index 27bcbfe1a..a2a57eb60 100644 --- a/src/modules/keyboard/sdl/Keyboard.cpp +++ b/src/modules/keyboard/sdl/Keyboard.cpp @@ -36,15 +36,11 @@ namespace sdl { Keyboard::Keyboard() - : key_repeat(false) + : love::keyboard::Keyboard("love.keyboard.sdl") + , key_repeat(false) { } -const char *Keyboard::getName() const -{ - return "love.keyboard.sdl"; -} - void Keyboard::setKeyRepeat(bool enable) { key_repeat = enable; diff --git a/src/modules/keyboard/sdl/Keyboard.h b/src/modules/keyboard/sdl/Keyboard.h index 42644721d..939e430a0 100644 --- a/src/modules/keyboard/sdl/Keyboard.h +++ b/src/modules/keyboard/sdl/Keyboard.h @@ -41,9 +41,6 @@ class Keyboard : public love::keyboard::Keyboard Keyboard(); - // Implements Module. - const char *getName() const; - void setKeyRepeat(bool enable); bool hasKeyRepeat() const; bool isDown(const std::vector &keylist) const; diff --git a/src/modules/math/MathModule.cpp b/src/modules/math/MathModule.cpp index 84053b83c..42fb70c2a 100644 --- a/src/modules/math/MathModule.cpp +++ b/src/modules/math/MathModule.cpp @@ -200,7 +200,8 @@ float linearToGamma(float c) } Math::Math() - : rng() + : Module(M_MATH, "love.math") + , rng() { RandomGenerator::Seed seed; seed.b64 = (uint64) time(nullptr); diff --git a/src/modules/math/MathModule.h b/src/modules/math/MathModule.h index 391052707..adf0ec0d3 100644 --- a/src/modules/math/MathModule.h +++ b/src/modules/math/MathModule.h @@ -118,17 +118,6 @@ class Math : public Module Transform *newTransform(); Transform *newTransform(float x, float y, float a, float sx, float sy, float ox, float oy, float kx, float ky); - // Implements Module. - virtual ModuleType getModuleType() const - { - return M_MATH; - } - - virtual const char *getName() const - { - return "love.math"; - } - private: RandomGenerator rng; diff --git a/src/modules/mouse/Mouse.h b/src/modules/mouse/Mouse.h index b12522de0..4ad70dc56 100644 --- a/src/modules/mouse/Mouse.h +++ b/src/modules/mouse/Mouse.h @@ -64,6 +64,12 @@ class Mouse : public Module virtual bool setRelativeMode(bool relative) = 0; virtual bool getRelativeMode() const = 0; +protected: + + Mouse(const char *name) + : Module(M_MOUSE, name) + {} + }; // Mouse } // mouse diff --git a/src/modules/mouse/sdl/Mouse.cpp b/src/modules/mouse/sdl/Mouse.cpp index 17c6c081a..ba931222e 100644 --- a/src/modules/mouse/sdl/Mouse.cpp +++ b/src/modules/mouse/sdl/Mouse.cpp @@ -56,13 +56,9 @@ static void clampToWindow(double *x, double *y) window->clampPositionInWindow(x, y); } -const char *Mouse::getName() const -{ - return "love.mouse.sdl"; -} - Mouse::Mouse() - : curCursor(nullptr) + : love::mouse::Mouse("love.mouse.sdl") + , curCursor(nullptr) { // SDL may need the video subsystem in order to clean up the cursor when // quitting. Subsystems are reference-counted. diff --git a/src/modules/mouse/sdl/Mouse.h b/src/modules/mouse/sdl/Mouse.h index 7409dd979..a74dd334d 100644 --- a/src/modules/mouse/sdl/Mouse.h +++ b/src/modules/mouse/sdl/Mouse.h @@ -39,9 +39,6 @@ class Mouse : public love::mouse::Mouse { public: - // Implements Module. - const char *getName() const override; - Mouse(); virtual ~Mouse(); diff --git a/src/modules/physics/box2d/Physics.cpp b/src/modules/physics/box2d/Physics.cpp index 4a22636d5..c3b3d5189 100644 --- a/src/modules/physics/box2d/Physics.cpp +++ b/src/modules/physics/box2d/Physics.cpp @@ -35,7 +35,8 @@ namespace box2d float Physics::meter = Physics::DEFAULT_METER; Physics::Physics() - : blockAllocator() + : Module(M_PHYSICS, "love.physics.box2d") + , blockAllocator() { meter = DEFAULT_METER; } @@ -44,11 +45,6 @@ Physics::~Physics() { } -const char *Physics::getName() const -{ - return "love.physics.box2d"; -} - World *Physics::newWorld(float gx, float gy, bool sleep) { return new World(b2Vec2(gx, gy), sleep); diff --git a/src/modules/physics/box2d/Physics.h b/src/modules/physics/box2d/Physics.h index 6db4aefc0..41da7d0fd 100644 --- a/src/modules/physics/box2d/Physics.h +++ b/src/modules/physics/box2d/Physics.h @@ -65,10 +65,6 @@ class Physics : public Module Physics(); virtual ~Physics(); - // Implements Module. - const char *getName() const; - virtual ModuleType getModuleType() const { return M_PHYSICS; } - /** * Creates a new World. * @param gx Gravity along x-axis. diff --git a/src/modules/sensor/Sensor.cpp b/src/modules/sensor/Sensor.cpp index fde8dbb57..7e991baa1 100644 --- a/src/modules/sensor/Sensor.cpp +++ b/src/modules/sensor/Sensor.cpp @@ -26,6 +26,11 @@ namespace love namespace sensor { +Sensor::Sensor(const char *name) + : Module(M_SENSOR, name) +{ +} + STRINGMAP_CLASS_BEGIN(Sensor, Sensor::SensorType, Sensor::SENSOR_MAX_ENUM, sensorType) { { "accelerometer", Sensor::SENSOR_ACCELEROMETER }, diff --git a/src/modules/sensor/Sensor.h b/src/modules/sensor/Sensor.h index cb10883b6..bf79d1d87 100644 --- a/src/modules/sensor/Sensor.h +++ b/src/modules/sensor/Sensor.h @@ -43,9 +43,6 @@ class Sensor: public Module virtual ~Sensor() {} - // Implements Module. - ModuleType getModuleType() const override { return M_SENSOR; } - /** * Check the availability of the sensor. **/ @@ -75,6 +72,10 @@ class Sensor: public Module STRINGMAP_CLASS_DECLARE(SensorType); +protected: + + Sensor(const char *name); + }; // Sensor } // sensor diff --git a/src/modules/sensor/sdl/Sensor.cpp b/src/modules/sensor/sdl/Sensor.cpp index cfd03f265..f70558ec9 100644 --- a/src/modules/sensor/sdl/Sensor.cpp +++ b/src/modules/sensor/sdl/Sensor.cpp @@ -33,7 +33,8 @@ namespace sdl { Sensor::Sensor() -: sensors() + : love::sensor::Sensor("love.sensor.sdl") + , sensors() { if (SDL_InitSubSystem(SDL_INIT_SENSOR) < 0) throw love::Exception("Could not initialize SDL sensor subsystem (%s)", SDL_GetError()); @@ -44,11 +45,6 @@ Sensor::~Sensor() SDL_QuitSubSystem(SDL_INIT_SENSOR); } -const char *Sensor::getName() const -{ - return "love.sensor.sdl"; -} - bool Sensor::hasSensor(SensorType type) { for (int i = 0; i < SDL_NumSensors(); i++) diff --git a/src/modules/sensor/sdl/Sensor.h b/src/modules/sensor/sdl/Sensor.h index a1222867b..02491add7 100644 --- a/src/modules/sensor/sdl/Sensor.h +++ b/src/modules/sensor/sdl/Sensor.h @@ -43,9 +43,6 @@ class Sensor : public love::sensor::Sensor Sensor(); ~Sensor() override; - // Implements Module. - const char *getName() const override; - bool hasSensor(SensorType type) override; bool isEnabled(SensorType type) override; void setEnabled(SensorType type, bool enable) override; diff --git a/src/modules/sound/Sound.cpp b/src/modules/sound/Sound.cpp index 617d7f5bc..f4f3da271 100644 --- a/src/modules/sound/Sound.cpp +++ b/src/modules/sound/Sound.cpp @@ -27,6 +27,11 @@ namespace sound love::Type Sound::type("Sound", &Module::type); +Sound::Sound(const char *name) + : Module(M_SOUND, name) +{ +} + Sound::~Sound() { } diff --git a/src/modules/sound/Sound.h b/src/modules/sound/Sound.h index 1d2a2f9a1..3b0685b08 100644 --- a/src/modules/sound/Sound.h +++ b/src/modules/sound/Sound.h @@ -46,9 +46,6 @@ class Sound : public Module virtual ~Sound(); - // Implements Module. - virtual ModuleType getModuleType() const { return M_SOUND; } - /** * Creates new SoundData from a decoder. Fully expands the * encoded sound data into raw sound data. Not recommended @@ -89,6 +86,10 @@ class Sound : public Module **/ virtual Decoder *newDecoder(Stream *stream, int bufferSize) = 0; +protected: + + Sound(const char *name); + }; // Sound } // sound diff --git a/src/modules/sound/lullaby/Sound.cpp b/src/modules/sound/lullaby/Sound.cpp index 33c5c8b08..a5fe66411 100644 --- a/src/modules/sound/lullaby/Sound.cpp +++ b/src/modules/sound/lullaby/Sound.cpp @@ -59,6 +59,7 @@ namespace lullaby { Sound::Sound() + : love::sound::Sound("love.sound.lullaby") { } @@ -66,11 +67,6 @@ Sound::~Sound() { } -const char *Sound::getName() const -{ - return "love.sound.lullaby"; -} - sound::Decoder *Sound::newDecoder(Stream *stream, int bufferSize) { std::vector possibleDecoders = { diff --git a/src/modules/sound/lullaby/Sound.h b/src/modules/sound/lullaby/Sound.h index 12bca5df5..13e5e1fa3 100644 --- a/src/modules/sound/lullaby/Sound.h +++ b/src/modules/sound/lullaby/Sound.h @@ -48,9 +48,6 @@ class Sound : public love::sound::Sound Sound(); virtual ~Sound(); - /// @copydoc love::Module::getName - const char *getName() const override; - /// @copydoc love::sound::Sound::newDecoder sound::Decoder *newDecoder(Stream *stream, int bufferSize) override; diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp index cad85ea07..cee7674c9 100644 --- a/src/modules/system/System.cpp +++ b/src/modules/system/System.cpp @@ -58,7 +58,8 @@ namespace love namespace system { -System::System() +System::System(const char *name) + : Module(M_SYSTEM, name) { } diff --git a/src/modules/system/System.h b/src/modules/system/System.h index 4c3c59f84..7a7ed764e 100644 --- a/src/modules/system/System.h +++ b/src/modules/system/System.h @@ -48,12 +48,9 @@ class System : public Module POWER_MAX_ENUM }; - System(); + System(const char *name); virtual ~System() {} - // Implements Module. - virtual ModuleType getModuleType() const { return M_SYSTEM; } - /** * Gets the current operating system. **/ diff --git a/src/modules/system/sdl/System.cpp b/src/modules/system/sdl/System.cpp index 334e829d2..b25f6334f 100644 --- a/src/modules/system/sdl/System.cpp +++ b/src/modules/system/sdl/System.cpp @@ -39,14 +39,10 @@ namespace sdl { System::System() + : love::system::System("love.system.sdl") { } -const char *System::getName() const -{ - return "love.system.sdl"; -} - int System::getProcessorCount() const { return SDL_GetCPUCount(); diff --git a/src/modules/system/sdl/System.h b/src/modules/system/sdl/System.h index b40bdd2d6..39787e9d4 100644 --- a/src/modules/system/sdl/System.h +++ b/src/modules/system/sdl/System.h @@ -42,9 +42,6 @@ class System : public love::system::System System(); virtual ~System() {} - // Implements Module. - const char *getName() const override; - int getProcessorCount() const override; void setClipboardText(const std::string &text) const override; diff --git a/src/modules/thread/ThreadModule.cpp b/src/modules/thread/ThreadModule.cpp index bdd864f45..3d94bae53 100644 --- a/src/modules/thread/ThreadModule.cpp +++ b/src/modules/thread/ThreadModule.cpp @@ -25,6 +25,11 @@ namespace love namespace thread { +ThreadModule::ThreadModule() + : love::Module(M_THREAD, "love.thread.sdl") +{ +} + LuaThread *ThreadModule::newThread(const std::string &name, love::Data *data) { return new LuaThread(name, data); @@ -48,10 +53,5 @@ Channel *ThreadModule::getChannel(const std::string &name) return c; } -const char *ThreadModule::getName() const -{ - return "love.thread.sdl"; -} - } // thread } // love diff --git a/src/modules/thread/ThreadModule.h b/src/modules/thread/ThreadModule.h index 36d2eb8ba..516c23392 100644 --- a/src/modules/thread/ThreadModule.h +++ b/src/modules/thread/ThreadModule.h @@ -43,15 +43,12 @@ class ThreadModule : public love::Module { public: + ThreadModule(); virtual ~ThreadModule() {} virtual LuaThread *newThread(const std::string &name, love::Data *data); virtual Channel *newChannel(); virtual Channel *getChannel(const std::string &name); - // Implements Module. - virtual const char *getName() const; - virtual ModuleType getModuleType() const { return M_THREAD; } - private: std::map> namedChannels; diff --git a/src/modules/timer/Timer.cpp b/src/modules/timer/Timer.cpp index 6e8136d97..24e98f4e6 100644 --- a/src/modules/timer/Timer.cpp +++ b/src/modules/timer/Timer.cpp @@ -43,7 +43,8 @@ namespace timer { Timer::Timer() - : currTime(0) + : Module(M_TIMER, "love.timer") + , currTime(0) , prevFpsUpdate(0) , fps(0) , averageDelta(0) diff --git a/src/modules/timer/Timer.h b/src/modules/timer/Timer.h index 42511ae9b..883a6230b 100644 --- a/src/modules/timer/Timer.h +++ b/src/modules/timer/Timer.h @@ -36,10 +36,6 @@ class Timer : public Module Timer(); virtual ~Timer() {} - // Implements Module. - ModuleType getModuleType() const override { return M_TIMER; } - const char *getName() const override { return "love.timer"; } - /** * Measures the time between this call and the previous call, * and updates internal values accordingly. diff --git a/src/modules/touch/Touch.h b/src/modules/touch/Touch.h index 3af7d79da..08b9de60a 100644 --- a/src/modules/touch/Touch.h +++ b/src/modules/touch/Touch.h @@ -51,9 +51,6 @@ class Touch : public Module virtual ~Touch() {} - // Implements Module. - virtual ModuleType getModuleType() const { return M_TOUCH; } - /** * Gets all currently active touches. **/ @@ -64,6 +61,12 @@ class Touch : public Module **/ virtual const TouchInfo &getTouch(int64 id) const = 0; +protected: + + Touch(const char *name) + : Module(M_TOUCH, name) + {} + }; // Touch } // touch diff --git a/src/modules/touch/sdl/Touch.cpp b/src/modules/touch/sdl/Touch.cpp index 0d0473729..43f85d1fa 100644 --- a/src/modules/touch/sdl/Touch.cpp +++ b/src/modules/touch/sdl/Touch.cpp @@ -33,6 +33,11 @@ namespace touch namespace sdl { +Touch::Touch() + : love::touch::Touch("love.touch.sdl") +{ +} + const std::vector &Touch::getTouches() const { return touches; @@ -49,11 +54,6 @@ const Touch::TouchInfo &Touch::getTouch(int64 id) const throw love::Exception("Invalid active touch ID: %d", id); } -const char *Touch::getName() const -{ - return "love.touch.sdl"; -} - void Touch::onEvent(Uint32 eventtype, const TouchInfo &info) { auto compare = [&](const TouchInfo &touch) -> bool diff --git a/src/modules/touch/sdl/Touch.h b/src/modules/touch/sdl/Touch.h index 302b5ed5e..8bd5c918d 100644 --- a/src/modules/touch/sdl/Touch.h +++ b/src/modules/touch/sdl/Touch.h @@ -38,14 +38,12 @@ class Touch : public love::touch::Touch { public: + Touch(); virtual ~Touch() {} const std::vector &getTouches() const override; const TouchInfo &getTouch(int64 id) const override; - // Implements Module. - const char *getName() const override; - // SDL has functions to query the state of touch presses, but unfortunately // they are updated on a different thread in some backends, which causes // issues especially if the user is iterating through the current touches diff --git a/src/modules/video/Video.h b/src/modules/video/Video.h index e9e89d13e..9cfc16298 100644 --- a/src/modules/video/Video.h +++ b/src/modules/video/Video.h @@ -35,15 +35,20 @@ namespace video class Video : public Module { public: - virtual ~Video() {} - // Implements Module - virtual ModuleType getModuleType() const { return M_VIDEO; } + virtual ~Video() {} /** * Create a VideoStream representing video frames **/ virtual VideoStream *newVideoStream(love::filesystem::File *file) = 0; + +protected: + + Video(const char *name) + : Module(M_VIDEO, name) + {} + }; // Video } // video diff --git a/src/modules/video/theora/Video.cpp b/src/modules/video/theora/Video.cpp index 64a5d37b5..f3fd0db2c 100644 --- a/src/modules/video/theora/Video.cpp +++ b/src/modules/video/theora/Video.cpp @@ -34,6 +34,7 @@ namespace theora { Video::Video() + : love::video::Video("love.video.theora") { workerThread = new Worker(); workerThread->start(); @@ -51,11 +52,6 @@ VideoStream *Video::newVideoStream(love::filesystem::File *file) return stream; } -const char *Video::getName() const -{ - return "love.video.theora"; -} - Worker::Worker() : stopping(false) { diff --git a/src/modules/video/theora/Video.h b/src/modules/video/theora/Video.h index e286f1579..744822d73 100644 --- a/src/modules/video/theora/Video.h +++ b/src/modules/video/theora/Video.h @@ -46,9 +46,6 @@ class Video : public love::video::Video Video(); virtual ~Video(); - // Implements Module - virtual const char *getName() const; - VideoStream *newVideoStream(love::filesystem::File* file); private: diff --git a/src/modules/window/Window.cpp b/src/modules/window/Window.cpp index 108ec9d0b..6b6b282da 100644 --- a/src/modules/window/Window.cpp +++ b/src/modules/window/Window.cpp @@ -43,6 +43,11 @@ bool isHighDPIAllowed() return highDPIAllowed; } +Window::Window(const char *name) + : Module(M_WINDOW, name) +{ +} + Window::~Window() { } diff --git a/src/modules/window/Window.h b/src/modules/window/Window.h index 162811898..cae80beab 100644 --- a/src/modules/window/Window.h +++ b/src/modules/window/Window.h @@ -131,9 +131,6 @@ class Window : public Module virtual ~Window(); - // Implements Module. - virtual ModuleType getModuleType() const { return M_WINDOW; } - virtual void setGraphics(graphics::Graphics *graphics) = 0; virtual bool setWindow(int width = 800, int height = 600, WindowSettings *settings = nullptr) = 0; @@ -239,6 +236,10 @@ class Window : public Module static bool getConstant(DisplayOrientation in, const char *&out); static std::vector getConstants(DisplayOrientation); +protected: + + Window(const char *name); + private: static StringMap::Entry settingEntries[]; diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 2cc4a588b..7061d110e 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -88,7 +88,8 @@ namespace sdl { Window::Window() - : open(false) + : love::window::Window("love.window.sdl") + , open(false) , mouseGrabbed(false) , window(nullptr) , glcontext(nullptr) @@ -1503,11 +1504,6 @@ void Window::requestAttention(bool continuous) // TODO: Linux? } -const char *Window::getName() const -{ - return "love.window.sdl"; -} - } // sdl } // window } // love diff --git a/src/modules/window/sdl/Window.h b/src/modules/window/sdl/Window.h index 030177d7c..ca71bc37f 100644 --- a/src/modules/window/sdl/Window.h +++ b/src/modules/window/sdl/Window.h @@ -130,8 +130,6 @@ class Window final : public love::window::Window void requestAttention(bool continuous) override; - const char *getName() const override; - private: struct ContextAttribs From 42812ad52133b162f82d6b735a4a438dbf1363c9 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 24 Feb 2024 15:45:43 -0400 Subject: [PATCH 025/104] Add texture views. Fixes #2022. Add love.graphics.newTextureView(basetexture, viewsettings). Requires GLSL4 support. Add 'viewformats' boolean setting to texture setting tables. Add Texture:hasViewFormats. The viewsettings table has the following fields: format = nil, -- set this to a pixel format to override the base format. It must have the same number of bytes per pixel as the original, and the 'viewformats' setting on the original texture must be true for this to work. Cannot be used for compressed or depth/stencil textures. type = nil, -- set this to a texture type to override the base texture type. 2d base textures can make [2d, array] views. [array, cube] base textures can make [2d, array, cube] views. mipmapstart = nil, -- set to a number to use a less detailed mipmap level as a base. mipmapcount = nil, -- set to a number to override the number of mipmaps in the texture view. layerstart = nil, -- set to a number to use a specific layer or cube face as a base. layers = nil, -- set to a number to override the number of layers in an array texture view. --- src/modules/graphics/Graphics.cpp | 24 +- src/modules/graphics/Graphics.h | 1 + src/modules/graphics/Shader.cpp | 2 +- src/modules/graphics/Texture.cpp | 277 +++++++++++++++++------ src/modules/graphics/Texture.h | 52 ++++- src/modules/graphics/metal/Graphics.h | 1 + src/modules/graphics/metal/Graphics.mm | 5 + src/modules/graphics/metal/Texture.h | 9 +- src/modules/graphics/metal/Texture.mm | 47 +++- src/modules/graphics/opengl/Graphics.cpp | 5 + src/modules/graphics/opengl/Graphics.h | 1 + src/modules/graphics/opengl/OpenGL.cpp | 2 + src/modules/graphics/opengl/Texture.cpp | 57 +++-- src/modules/graphics/opengl/Texture.h | 2 + src/modules/graphics/vulkan/Graphics.cpp | 5 + src/modules/graphics/vulkan/Graphics.h | 1 + src/modules/graphics/vulkan/Texture.cpp | 214 +++++++++-------- src/modules/graphics/vulkan/Texture.h | 10 +- src/modules/graphics/wrap_Graphics.cpp | 69 ++++++ src/modules/graphics/wrap_Texture.cpp | 8 + 20 files changed, 582 insertions(+), 210 deletions(-) diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index 64ddfa62e..daf1cdf32 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -1203,15 +1203,16 @@ bool Graphics::isRenderTargetActive() const bool Graphics::isRenderTargetActive(Texture *texture) const { + Texture *roottexture = texture->getRootViewInfo().texture; const auto &rts = states.back().renderTargets; for (const auto &rt : rts.colors) { - if (rt.texture.get() == texture) + if (rt.texture.get() && rt.texture->getRootViewInfo().texture == roottexture) return true; } - if (rts.depthStencil.texture.get() == texture) + if (rts.depthStencil.texture.get() && rts.depthStencil.texture->getRootViewInfo().texture == roottexture) return true; return false; @@ -1219,16 +1220,27 @@ bool Graphics::isRenderTargetActive(Texture *texture) const bool Graphics::isRenderTargetActive(Texture *texture, int slice) const { + const auto &rootinfo = texture->getRootViewInfo(); + slice += rootinfo.startLayer; + const auto &rts = states.back().renderTargets; for (const auto &rt : rts.colors) { - if (rt.texture.get() == texture && rt.slice == slice) - return true; + if (rt.texture.get()) + { + const auto &info = rt.texture->getRootViewInfo(); + if (rootinfo.texture == info.texture && rt.slice + info.startLayer == slice) + return true; + } } - if (rts.depthStencil.texture.get() == texture && rts.depthStencil.slice == slice) - return true; + if (rts.depthStencil.texture.get()) + { + const auto &info = rts.depthStencil.texture->getRootViewInfo(); + if (rootinfo.texture == info.texture && rts.depthStencil.slice + info.startLayer == slice) + return true; + } return false; } diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index cef0d4e72..a09985a81 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -455,6 +455,7 @@ class Graphics : public Module virtual ~Graphics(); virtual Texture *newTexture(const Texture::Settings &settings, const Texture::Slices *data = nullptr) = 0; + virtual Texture *newTextureView(Texture *base, const Texture::ViewSettings &viewsettings) = 0; Quad *newQuad(Quad::Viewport v, double sw, double sh); Font *newFont(love::font::Rasterizer *data); diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index 618219d1f..cfe9e1a6c 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -1141,7 +1141,7 @@ bool Shader::validateTexture(const UniformInfo *info, Texture *tex, bool interna else throw love::Exception("Texture must be created with the computewrite flag set to true in order to be used with a storage texture (image2D etc) shader uniform variable."); } - else if (isstoragetex && info->storageTextureFormat != getLinearPixelFormat(tex->getPixelFormat())) + else if (isstoragetex && info->storageTextureFormat != tex->getPixelFormat()) { if (internalUpdate) return false; diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index c35d2073f..fb989328d 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -166,6 +166,7 @@ Texture::Texture(Graphics *gfx, const Settings &settings, const Slices *slices) , format(settings.format) , renderTarget(settings.renderTarget) , computeWrite(settings.computeWrite) + , viewFormats(settings.viewFormats) , readable(true) , mipmapsMode(settings.mipmaps) , width(settings.width) @@ -179,6 +180,8 @@ Texture::Texture(Graphics *gfx, const Settings &settings, const Slices *slices) , samplerState() , graphicsMemorySize(0) , debugName(settings.debugName) + , rootView({this, 0, 0}) + , parentView({this, 0, 0}) { const auto &caps = gfx->getCapabilities(); int requestedMipmapCount = settings.mipmapCount; @@ -284,31 +287,7 @@ Texture::Texture(Graphics *gfx, const Settings &settings, const Slices *slices) if (isCompressed() && renderTarget) throw love::Exception("Compressed textures cannot be render targets."); - uint32 usage = PIXELFORMATUSAGEFLAGS_NONE; - if (renderTarget) - usage |= PIXELFORMATUSAGEFLAGS_RENDERTARGET; - if (readable) - usage |= PIXELFORMATUSAGEFLAGS_SAMPLE; - if (computeWrite) - usage |= PIXELFORMATUSAGEFLAGS_COMPUTEWRITE; - - if (!gfx->isPixelFormatSupported(format, (PixelFormatUsageFlags) usage)) - { - const char *fstr = "unknown"; - love::getConstant(format, fstr); - - const char *readablestr = ""; - if (readable != !isPixelFormatDepthStencil(format)) - readablestr = readable ? " readable" : " non-readable"; - - const char *rtstr = ""; - if (computeWrite) - rtstr = " as a compute shader-writable texture"; - else if (renderTarget) - rtstr = " as a render target"; - - throw love::Exception("The %s%s pixel format is not supported%s on this system.", fstr, readablestr, rtstr); - } + validatePixelFormat(gfx); if (!caps.textureTypes[texType]) { @@ -330,10 +309,149 @@ Texture::Texture(Graphics *gfx, const Settings &settings, const Slices *slices) ++textureCount; } +Texture::Texture(Graphics *gfx, Texture *base, const ViewSettings &viewsettings) + : texType(viewsettings.type.get(base->getTextureType())) + , format(viewsettings.format.get(base->getPixelFormat())) + , renderTarget(base->renderTarget) + , computeWrite(base->computeWrite) + , viewFormats(base->viewFormats) + , readable(base->readable) + , mipmapsMode(base->mipmapsMode) + , width(1) + , height(1) + , depth(1) + , layers(1) + , mipmapCount(1) + , pixelWidth(1) + , pixelHeight(1) + , requestedMSAA(base->requestedMSAA) + , samplerState(base->samplerState) + , quad(base->quad) + , graphicsMemorySize(0) + , debugName(viewsettings.debugName) + , rootView({base->rootView.texture, 0, 0}) + , parentView({base, viewsettings.mipmapStart.get(0), viewsettings.layerStart.get(0)}) +{ + width = base->getHeight(parentView.startMipmap); + height = base->getHeight(parentView.startMipmap); + + if (texType == TEXTURE_VOLUME) + depth = base->getDepth(parentView.startMipmap); + + if (texType == TEXTURE_2D_ARRAY) + { + int baselayers = base->getTextureType() == TEXTURE_CUBE ? 6 : base->getLayerCount(); + layers = viewsettings.layerCount.get(baselayers - parentView.startLayer); + } + + mipmapCount = viewsettings.mipmapCount.get(base->getMipmapCount() - parentView.startMipmap); + + pixelWidth = base->getPixelWidth(parentView.startMipmap); + pixelHeight = base->getPixelHeight(parentView.startMipmap); + + if (parentView.startMipmap < 0) + throw love::Exception("Invalid mipmap start value for texture view (out of range)."); + + if (mipmapCount < 0 || parentView.startMipmap + mipmapCount > base->getMipmapCount()) + throw love::Exception("Invalid mipmap start or count value for texture view (out of range)."); + + if (parentView.startLayer < 0) + throw love::Exception("Invalid layer start value for texture view (out of range)."); + + int baseLayerCount = base->getTextureType() == TEXTURE_CUBE ? 6 : base->getLayerCount(); + if (layers < 0 || parentView.startLayer + layers > baseLayerCount) + throw love::Exception("Invalid layer start or count value for texture view (out of range)."); + + if (texType == TEXTURE_CUBE && parentView.startLayer + 6 > baseLayerCount) + throw love::Exception("Cube texture view cannot fit in the base texture's layers with the given start layer."); + + ViewInfo nextView = { this, 0, 0 }; + while (nextView.texture != rootView.texture) + { + nextView = nextView.texture->parentView; + rootView.startMipmap += nextView.startMipmap; + rootView.startLayer += nextView.startLayer; + } + + const auto &caps = gfx->getCapabilities(); + if (!caps.features[Graphics::FEATURE_GLSL4]) + throw love::Exception("Texture views are not supported on this system (GLSL 4 support is necessary.)"); + + validatePixelFormat(gfx); + + if (!caps.textureTypes[texType]) + { + const char *textypestr = "unknown"; + Texture::getConstant(texType, textypestr); + throw love::Exception("%s textures are not supported on this system.", textypestr); + } + + if (!readable) + throw love::Exception("Texture views are not supported for non-readable textures."); + + if (base->getTextureType() == TEXTURE_2D) + { + if (texType != TEXTURE_2D && texType != TEXTURE_2D_ARRAY) + throw love::Exception("Texture views created from a 2D texture must use the 2d or array texture type."); + } + else if (base->getTextureType() == TEXTURE_2D_ARRAY || base->getTextureType() == TEXTURE_CUBE) + { + if (texType != TEXTURE_2D && texType != TEXTURE_2D_ARRAY && texType != TEXTURE_CUBE) + throw love::Exception("Texture views created from an array or cube texture must use the 2d, array, or cube texture type."); + } + else if (base->getTextureType() == TEXTURE_VOLUME) + { + if (texType != TEXTURE_VOLUME) + throw love::Exception("Texture views created from a volume texture must use the volume texture type."); + } + else + { + throw love::Exception("Unknown texture type."); + } + + auto baseformat = base->getPixelFormat(); + + if (format != baseformat) + { + if (isPixelFormatCompressed(baseformat) || isPixelFormatCompressed(format)) + throw love::Exception("Compressed textures cannot use a different pixel format in a texture view."); + + if (isPixelFormatColor(baseformat) != isPixelFormatColor(format)) + throw love::Exception("Color-format textures cannot use a depth/stencil pixel format and vice versa, in a texture view."); + + // TODO: depth[24|32f]_stencil8 -> stencil8 can work. + if (isPixelFormatDepthStencil(baseformat)) + throw love::Exception("Using a different pixel format in a texture view is not currently supported for depth or stencil formats."); + + if (!viewFormats) + throw love::Exception("Using a different pixel format in a texture view requires the original texture to be created with the 'viewformats' setting set to true."); + + size_t bytes = getPixelFormatBlockSize(format); + size_t basebytes = getPixelFormatBlockSize(baseformat); + + if (bytes != basebytes) + throw love::Exception("Texture views must have the same bits per pixel as the original texture."); + } + + const char *miperr = nullptr; + if (mipmapsMode == MIPMAPS_AUTO && !supportsGenerateMipmaps(miperr)) + mipmapsMode = MIPMAPS_MANUAL; + + rootView.texture->retain(); + parentView.texture->retain(); +} + Texture::~Texture() { - --textureCount; setGraphicsMemorySize(0); + + if (this == rootView.texture) + --textureCount; + + if (rootView.texture != this && rootView.texture != nullptr) + rootView.texture->release(); + if (parentView.texture != this && parentView.texture != nullptr) + parentView.texture->release(); } void Texture::setGraphicsMemorySize(int64 bytes) @@ -352,18 +470,18 @@ void Texture::draw(Graphics *gfx, const Matrix4 &m) void Texture::draw(Graphics *gfx, Quad *q, const Matrix4 &localTransform) { - if (!readable) - throw love::Exception("Textures with non-readable formats cannot be drawn."); - - if (renderTarget && gfx->isRenderTargetActive(this)) - throw love::Exception("Cannot render a Texture to itself."); - if (texType == TEXTURE_2D_ARRAY) { drawLayer(gfx, q->getLayer(), q, localTransform); return; } + if (!readable) + throw love::Exception("Textures with non-readable formats cannot be drawn."); + + if (renderTarget && gfx->isRenderTargetActive(this)) + throw love::Exception("Cannot render a Texture to itself."); + const Matrix4 &tm = gfx->getTransform(); bool is2D = tm.isAffine2DTransform(); @@ -582,36 +700,6 @@ void Texture::generateMipmaps() generateMipmapsInternal(); } -TextureType Texture::getTextureType() const -{ - return texType; -} - -PixelFormat Texture::getPixelFormat() const -{ - return format; -} - -Texture::MipmapsMode Texture::getMipmapsMode() const -{ - return mipmapsMode; -} - -bool Texture::isRenderTarget() const -{ - return renderTarget; -} - -bool Texture::isComputeWritable() const -{ - return computeWrite; -} - -bool Texture::isReadable() const -{ - return readable; -} - bool Texture::isCompressed() const { return isPixelFormatCompressed(format); @@ -685,28 +773,39 @@ int Texture::getRequestedMSAA() const return requestedMSAA; } -void Texture::setSamplerState(const SamplerState &s) +const SamplerState &Texture::getSamplerState() const +{ + return samplerState; +} + +SamplerState Texture::validateSamplerState(SamplerState s) const { if (!readable) - return; + return s; if (s.depthSampleMode.hasValue && !isPixelFormatDepth(format)) throw love::Exception("Only depth textures can have a depth sample compare mode."); - Graphics::flushBatchedDrawsGlobal(); + if (s.mipmapFilter != SamplerState::MIPMAP_FILTER_NONE && getMipmapCount() == 1) + s.mipmapFilter = SamplerState::MIPMAP_FILTER_NONE; - samplerState = s; + if (texType == TEXTURE_CUBE) + s.wrapU = s.wrapV = s.wrapW = SamplerState::WRAP_CLAMP; - if (samplerState.mipmapFilter != SamplerState::MIPMAP_FILTER_NONE && getMipmapCount() == 1) - samplerState.mipmapFilter = SamplerState::MIPMAP_FILTER_NONE; + if (s.minFilter == SamplerState::FILTER_LINEAR || s.magFilter == SamplerState::FILTER_LINEAR || s.mipmapFilter == SamplerState::MIPMAP_FILTER_LINEAR) + { + auto gfx = Module::getInstance(Module::M_GRAPHICS); + if (!gfx->isPixelFormatSupported(format, PIXELFORMATUSAGEFLAGS_LINEAR)) + { + s.minFilter = s.magFilter = SamplerState::FILTER_NEAREST; + if (s.mipmapFilter == SamplerState::MIPMAP_FILTER_LINEAR) + s.mipmapFilter = SamplerState::MIPMAP_FILTER_NEAREST; + } + } - if (texType == TEXTURE_CUBE) - samplerState.wrapU = samplerState.wrapV = samplerState.wrapW = SamplerState::WRAP_CLAMP; -} + Graphics::flushBatchedDrawsGlobal(); -const SamplerState &Texture::getSamplerState() const -{ - return samplerState; + return s; } Quad *Texture::getQuad() const @@ -781,6 +880,35 @@ bool Texture::validateDimensions(bool throwException) const return success; } +void Texture::validatePixelFormat(Graphics *gfx) const +{ + uint32 usage = PIXELFORMATUSAGEFLAGS_NONE; + if (renderTarget) + usage |= PIXELFORMATUSAGEFLAGS_RENDERTARGET; + if (readable) + usage |= PIXELFORMATUSAGEFLAGS_SAMPLE; + if (computeWrite) + usage |= PIXELFORMATUSAGEFLAGS_COMPUTEWRITE; + + if (!gfx->isPixelFormatSupported(format, (PixelFormatUsageFlags) usage)) + { + const char *fstr = "unknown"; + love::getConstant(format, fstr); + + const char *readablestr = ""; + if (readable != !isPixelFormatDepthStencil(format)) + readablestr = readable ? " readable" : " non-readable"; + + const char *rtstr = ""; + if (computeWrite) + rtstr = " as a compute shader-writable texture"; + else if (renderTarget) + rtstr = " as a render target"; + + throw love::Exception("The %s%s pixel format is not supported%s on this system.", fstr, readablestr, rtstr); + } +} + Texture::Slices::Slices(TextureType textype) : textureType(textype) { @@ -971,6 +1099,7 @@ static StringMap::Entry setting { "msaa", Texture::SETTING_MSAA }, { "canvas", Texture::SETTING_RENDER_TARGET }, { "computewrite", Texture::SETTING_COMPUTE_WRITE }, + { "viewformats", Texture::SETTING_VIEW_FORMATS }, { "readable", Texture::SETTING_READABLE }, { "debugname", Texture::SETTING_DEBUGNAME }, }; diff --git a/src/modules/graphics/Texture.h b/src/modules/graphics/Texture.h index 68dc52eb6..099442d50 100644 --- a/src/modules/graphics/Texture.h +++ b/src/modules/graphics/Texture.h @@ -174,6 +174,7 @@ class Texture : public Drawable, public Resource SETTING_MSAA, SETTING_RENDER_TARGET, SETTING_COMPUTE_WRITE, + SETTING_VIEW_FORMATS, SETTING_READABLE, SETTING_DEBUGNAME, SETTING_MAX_ENUM @@ -194,10 +195,22 @@ class Texture : public Drawable, public Resource int msaa = 1; bool renderTarget = false; bool computeWrite = false; + bool viewFormats = false; OptionalBool readable; std::string debugName; }; + struct ViewSettings + { + Optional format; + Optional type; + OptionalInt mipmapStart; + OptionalInt mipmapCount; + OptionalInt layerStart; + OptionalInt layerCount; + std::string debugName; + }; + struct Slices { public: @@ -228,10 +241,14 @@ class Texture : public Drawable, public Resource }; // Slices - static int64 totalGraphicsMemory; + struct ViewInfo + { + Texture *texture; + int startMipmap; + int startLayer; + }; - Texture(Graphics *gfx, const Settings &settings, const Slices *slices); - virtual ~Texture(); + static int64 totalGraphicsMemory; // Drawable. void draw(Graphics *gfx, const Matrix4 &m) override; @@ -255,13 +272,14 @@ class Texture : public Drawable, public Resource virtual ptrdiff_t getRenderTargetHandle() const = 0; virtual ptrdiff_t getSamplerHandle() const = 0; - TextureType getTextureType() const; - PixelFormat getPixelFormat() const; - MipmapsMode getMipmapsMode() const; + TextureType getTextureType() const { return texType; } + PixelFormat getPixelFormat() const { return format; } + MipmapsMode getMipmapsMode() const { return mipmapsMode; } - bool isRenderTarget() const; - bool isComputeWritable() const; - bool isReadable() const; + bool isRenderTarget() const { return renderTarget; } + bool isComputeWritable() const { return computeWrite; } + bool isReadable() const { return readable; } + bool hasViewFormats() const { return viewFormats; } bool isCompressed() const; bool isFormatLinear() const; @@ -285,11 +303,14 @@ class Texture : public Drawable, public Resource int getRequestedMSAA() const; virtual int getMSAA() const = 0; - virtual void setSamplerState(const SamplerState &s); + virtual void setSamplerState(const SamplerState &s) = 0; const SamplerState &getSamplerState() const; Quad *getQuad() const; + const ViewInfo &getRootViewInfo() const { return rootView; } + const ViewInfo &getParentViewInfo() const { return parentView; } + const std::string &getDebugName() const { return debugName; } static int getTotalMipmapCount(int w, int h); @@ -310,6 +331,10 @@ class Texture : public Drawable, public Resource protected: + Texture(Graphics *gfx, const Settings &settings, const Slices *slices); + Texture(Graphics *gfx, Texture *base, const ViewSettings &viewsettings); + virtual ~Texture(); + void setGraphicsMemorySize(int64 size); void uploadImageData(love::image::ImageDataBase *d, int level, int slice, int x, int y); @@ -318,13 +343,17 @@ class Texture : public Drawable, public Resource bool supportsGenerateMipmaps(const char *&outReason) const; virtual void generateMipmapsInternal() = 0; + SamplerState validateSamplerState(SamplerState s) const; + bool validateDimensions(bool throwException) const; + void validatePixelFormat(Graphics *gfx) const; TextureType texType; PixelFormat format; bool renderTarget; bool computeWrite; + bool viewFormats; bool readable; MipmapsMode mipmapsMode; @@ -349,6 +378,9 @@ class Texture : public Drawable, public Resource std::string debugName; + ViewInfo rootView; + ViewInfo parentView; + }; // Texture } // graphics diff --git a/src/modules/graphics/metal/Graphics.h b/src/modules/graphics/metal/Graphics.h index 95721632b..4a7ebf219 100644 --- a/src/modules/graphics/metal/Graphics.h +++ b/src/modules/graphics/metal/Graphics.h @@ -61,6 +61,7 @@ class Graphics final : public love::graphics::Graphics virtual ~Graphics(); love::graphics::Texture *newTexture(const Texture::Settings &settings, const Texture::Slices *data = nullptr) override; + love::graphics::Texture *newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) override; love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector &format, const void *data, size_t size, size_t arraylength) override; Matrix4 computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const override; diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index 99e0b5ca4..e4e9dc2af 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -433,6 +433,11 @@ static inline void setSampler(id encoder, Graphics::Re return new Texture(this, device, settings, data); } +love::graphics::Texture *Graphics::newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) +{ + return new Texture(this, device, base, viewsettings); +} + love::graphics::ShaderStage *Graphics::newShaderStageInternal(ShaderStageType stage, const std::string &cachekey, const std::string &source, bool gles) { return new ShaderStage(this, stage, source, gles, cachekey); diff --git a/src/modules/graphics/metal/Texture.h b/src/modules/graphics/metal/Texture.h index 015c779ee..01c6e57ec 100644 --- a/src/modules/graphics/metal/Texture.h +++ b/src/modules/graphics/metal/Texture.h @@ -38,6 +38,7 @@ class Texture final : public love::graphics::Texture public: Texture(love::graphics::Graphics *gfx, id device, const Settings &settings, const Slices *data); + Texture(love::graphics::Graphics *gfx, id device, love::graphics::Texture *base, const Texture::ViewSettings &viewsettings); virtual ~Texture(); void copyFromBuffer(love::graphics::Buffer *source, size_t sourceoffset, int sourcewidth, size_t size, int slice, int mipmap, const Rect &rect) override; @@ -58,11 +59,11 @@ class Texture final : public love::graphics::Texture void uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) override; void generateMipmapsInternal() override; - id texture; - id msaaTexture; - id sampler; + id texture = nil; + id msaaTexture = nil; + id sampler = nil; - int actualMSAASamples; + int actualMSAASamples = 1; }; // Texture diff --git a/src/modules/graphics/metal/Texture.mm b/src/modules/graphics/metal/Texture.mm index 065254918..b5c23c8f3 100644 --- a/src/modules/graphics/metal/Texture.mm +++ b/src/modules/graphics/metal/Texture.mm @@ -43,10 +43,6 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) Texture::Texture(love::graphics::Graphics *gfxbase, id device, const Settings &settings, const Slices *data) : love::graphics::Texture(gfxbase, settings, data) - , texture(nil) - , msaaTexture(nil) - , sampler(nil) - , actualMSAASamples(1) { @autoreleasepool { auto gfx = (Graphics *) gfxbase; @@ -80,6 +76,8 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) desc.usage |= MTLTextureUsageRenderTarget; if (computeWrite) desc.usage |= MTLTextureUsageShaderWrite; + if (viewFormats) + desc.usage |= MTLTextureUsagePixelFormatView; texture = [device newTextureWithDescriptor:desc]; @@ -212,6 +210,41 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) setSamplerState(samplerState); }} +Texture::Texture(love::graphics::Graphics *gfx, id device, love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) + : love::graphics::Texture(gfx, base, viewsettings) +{ + id basetex = ((Texture *) base)->texture; + auto formatdesc = Metal::convertPixelFormat(device, format); + int slices = texType == TEXTURE_CUBE ? 6 : getLayerCount(); + + if (formatdesc.swizzled) + { + if (@available(macOS 10.15, iOS 13, *)) + { + texture = [basetex newTextureViewWithPixelFormat:formatdesc.format + textureType:getMTLTextureType(texType, 1) + levels:NSMakeRange(parentView.startMipmap, mipmapCount) + slices:NSMakeRange(parentView.startLayer, slices) + swizzle:formatdesc.swizzle]; + } + } + else + { + texture = [basetex newTextureViewWithPixelFormat:formatdesc.format + textureType:getMTLTextureType(texType, 1) + levels:NSMakeRange(parentView.startMipmap, mipmapCount) + slices:NSMakeRange(parentView.startLayer, slices)]; + } + + if (texture == nil) + throw love::Exception("Could not create Metal texture view."); + + if (!debugName.empty()) + texture.label = @(debugName.c_str()); + + setSamplerState(samplerState); +} + Texture::~Texture() { @autoreleasepool { texture = nil; @@ -340,10 +373,8 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) if (s.depthSampleMode.hasValue && !Graphics::getInstance()->isDepthCompareSamplerSupported()) throw love::Exception("Depth comparison sampling in shaders is not supported on this system."); - // Base class does common validation and assigns samplerState. - love::graphics::Texture::setSamplerState(s); - - sampler = Graphics::getInstance()->getCachedSampler(s); + samplerState = validateSamplerState(s); + sampler = Graphics::getInstance()->getCachedSampler(samplerState); }} } // metal diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 2fd7f6511..58b4d5312 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -158,6 +158,11 @@ love::graphics::Texture *Graphics::newTexture(const Texture::Settings &settings, return new Texture(this, settings, data); } +love::graphics::Texture *Graphics::newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) +{ + return new Texture(this, base, viewsettings); +} + love::graphics::ShaderStage *Graphics::newShaderStageInternal(ShaderStageType stage, const std::string &cachekey, const std::string &source, bool gles) { return new ShaderStage(this, stage, source, gles, cachekey); diff --git a/src/modules/graphics/opengl/Graphics.h b/src/modules/graphics/opengl/Graphics.h index c1e9e911b..7736731f8 100644 --- a/src/modules/graphics/opengl/Graphics.h +++ b/src/modules/graphics/opengl/Graphics.h @@ -57,6 +57,7 @@ class Graphics final : public love::graphics::Graphics virtual ~Graphics(); love::graphics::Texture *newTexture(const Texture::Settings &settings, const Texture::Slices *data = nullptr) override; + love::graphics::Texture *newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) override; love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector &format, const void *data, size_t size, size_t arraylength) override; Matrix4 computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const override; diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 0254f184a..533c2755f 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -2506,6 +2506,8 @@ const char *OpenGL::debugSeverityString(GLenum severity) return "medium"; case GL_DEBUG_SEVERITY_LOW: return "low"; + case GL_DEBUG_SEVERITY_NOTIFICATION: + return "notification"; default: return "unknown"; } diff --git a/src/modules/graphics/opengl/Texture.cpp b/src/modules/graphics/opengl/Texture.cpp index 1aa7e6787..49f377f03 100644 --- a/src/modules/graphics/opengl/Texture.cpp +++ b/src/modules/graphics/opengl/Texture.cpp @@ -244,6 +244,25 @@ Texture::Texture(love::graphics::Graphics *gfx, const Settings &settings, const slices.clear(); } +Texture::Texture(love::graphics::Graphics *gfx, love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) + : love::graphics::Texture(gfx, base, viewsettings) + , slices(viewsettings.type.get(base->getTextureType())) + , fbo(0) + , texture(0) + , renderbuffer(0) + , framebufferStatus(GL_FRAMEBUFFER_COMPLETE) + , textureGLError(GL_NO_ERROR) + , actualSamples(1) +{ + if (!loadVolatile()) + { + if (framebufferStatus != GL_FRAMEBUFFER_COMPLETE) + throw love::Exception("Cannot create texture view (OpenGL framebuffer error: %s)", OpenGL::framebufferStatusString(framebufferStatus)); + if (textureGLError != GL_NO_ERROR) + throw love::Exception("Cannot create texture view (OpenGL error: %s)", OpenGL::errorString(textureGLError)); + } +} + Texture::~Texture() { unloadVolatile(); @@ -254,11 +273,26 @@ void Texture::createTexture() // The base class handles some validation. For example, if ImageData is // given then it must exist for all mip levels, a render target can't use // a compressed format, etc. - glGenTextures(1, &texture); + GLenum gltype = OpenGL::getGLTextureType(texType); + + if (parentView.texture != this) + { + OpenGL::TextureFormat fmt = gl.convertPixelFormat(format, false); + Texture *basetex = (Texture *) parentView.texture; + int layers = texType == TEXTURE_CUBE ? 6 : getLayerCount(); + + glTextureView(texture, gltype, basetex->texture, fmt.internalformat, + parentView.startMipmap, getMipmapCount(), + parentView.startLayer, layers); + + gl.bindTextureToUnit(this, 0, false); + setSamplerState(samplerState); + return; + } + gl.bindTextureToUnit(this, 0, false); - GLenum gltype = OpenGL::getGLTextureType(texType); if (renderTarget && GLAD_ANGLE_texture_usage) glTexParameteri(gltype, GL_TEXTURE_USAGE_ANGLE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE); @@ -371,6 +405,12 @@ bool Texture::loadVolatile() if (texture != 0 || renderbuffer != 0) return true; + if (parentView.texture != this) + { + Texture *basetex = (Texture *) parentView.texture; + basetex->loadVolatile(); + } + OpenGL::TempDebugGroup debuggroup("Texture load"); // NPOT textures don't support mipmapping without full NPOT support. @@ -593,18 +633,7 @@ void Texture::setSamplerState(const SamplerState &s) if (s.depthSampleMode.hasValue && !gl.isDepthCompareSampleSupported()) throw love::Exception("Depth comparison sampling in shaders is not supported on this system."); - // Base class does common validation and assigns samplerState. - love::graphics::Texture::setSamplerState(s); - - auto supportedflags = OpenGL::getPixelFormatUsageFlags(getPixelFormat()); - - if ((supportedflags & PIXELFORMATUSAGEFLAGS_LINEAR) == 0) - { - samplerState.magFilter = samplerState.minFilter = SamplerState::FILTER_NEAREST; - - if (samplerState.mipmapFilter == SamplerState::MIPMAP_FILTER_LINEAR) - samplerState.mipmapFilter = SamplerState::MIPMAP_FILTER_NEAREST; - } + samplerState = validateSamplerState(s); // If we only have limited NPOT support then the wrap mode must be CLAMP. if ((GLAD_ES_VERSION_2_0 && !(GLAD_ES_VERSION_3_0 || GLAD_OES_texture_npot)) diff --git a/src/modules/graphics/opengl/Texture.h b/src/modules/graphics/opengl/Texture.h index 65f247026..4e507fb2f 100644 --- a/src/modules/graphics/opengl/Texture.h +++ b/src/modules/graphics/opengl/Texture.h @@ -39,6 +39,7 @@ class Texture final : public love::graphics::Texture, public Volatile public: Texture(love::graphics::Graphics *gfx, const Settings &settings, const Slices *data); + Texture(love::graphics::Graphics *gfx, love::graphics::Texture *base, const Texture::ViewSettings &viewsettings); virtual ~Texture(); @@ -61,6 +62,7 @@ class Texture final : public love::graphics::Texture, public Volatile void readbackInternal(int slice, int mipmap, const Rect &rect, int destwidth, size_t size, void *dest); private: + void createTexture(); void uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) override; diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 16464a3b4..9b1ce0f39 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -168,6 +168,11 @@ love::graphics::Texture *Graphics::newTexture(const love::graphics::Texture::Set return new Texture(this, settings, data); } +love::graphics::Texture *Graphics::newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) +{ + return new Texture(this, base, viewsettings); +} + love::graphics::Buffer *Graphics::newBuffer(const love::graphics::Buffer::Settings &settings, const std::vector &format, const void *data, size_t size, size_t arraylength) { return new Buffer(this, settings, format, data, size, arraylength); diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index c5b164e0c..1726b200c 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -275,6 +275,7 @@ class Graphics final : public love::graphics::Graphics // implementation for virtual functions love::graphics::Texture *newTexture(const love::graphics::Texture::Settings &settings, const love::graphics::Texture::Slices *data) override; + love::graphics::Texture *newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) override; love::graphics::Buffer *newBuffer(const love::graphics::Buffer::Settings &settings, const std::vector& format, const void *data, size_t size, size_t arraylength) override; graphics::GraphicsReadback *newReadbackInternal(ReadbackMethod method, love::graphics::Buffer *buffer, size_t offset, size_t size, data::ByteData *dest, size_t destoffset) override; graphics::GraphicsReadback *newReadbackInternal(ReadbackMethod method, love::graphics::Texture *texture, int slice, int mipmap, const Rect &rect, image::ImageData *dest, int destx, int desty) override; diff --git a/src/modules/graphics/vulkan/Texture.cpp b/src/modules/graphics/vulkan/Texture.cpp index 267847e7c..46a6a01cc 100644 --- a/src/modules/graphics/vulkan/Texture.cpp +++ b/src/modules/graphics/vulkan/Texture.cpp @@ -47,11 +47,22 @@ Texture::Texture(love::graphics::Graphics *gfx, const Settings &settings, const slices.clear(); } +Texture::Texture(love::graphics::Graphics *gfx, love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) + : love::graphics::Texture(gfx, base, viewsettings) + , vgfx(dynamic_cast(gfx)) + , slices(viewsettings.type.get(base->getTextureType())) + , imageAspect(0) +{ + loadVolatile(); +} + bool Texture::loadVolatile() { allocator = vgfx->getVmaAllocator(); device = vgfx->getDevice(); + bool root = rootView.texture == this; + if (isPixelFormatDepth(format)) imageAspect |= VK_IMAGE_ASPECT_DEPTH_BIT; if (isPixelFormatStencil(format)) @@ -79,82 +90,96 @@ bool Texture::loadVolatile() usageFlags |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; } - VkImageCreateFlags createFlags = 0; - layerCount = 1; if (texType == TEXTURE_2D_ARRAY) layerCount = getLayerCount(); else if (texType == TEXTURE_CUBE) - { layerCount = 6; - createFlags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; - } - msaaSamples = vgfx->getMsaaCount(requestedMSAA); - - VkImageCreateInfo imageInfo{}; - imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - imageInfo.flags = createFlags; - imageInfo.imageType = Vulkan::getImageType(getTextureType()); - imageInfo.extent.width = static_cast(pixelWidth); - imageInfo.extent.height = static_cast(pixelHeight); - imageInfo.extent.depth = static_cast(depth); - imageInfo.arrayLayers = static_cast(layerCount); - imageInfo.mipLevels = static_cast(mipmapCount); - imageInfo.format = vulkanFormat.internalFormat; - imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL; - imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - imageInfo.usage = usageFlags; - imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - imageInfo.samples = msaaSamples; - - VmaAllocationCreateInfo imageAllocationCreateInfo{}; - - if (vmaCreateImage(allocator, &imageInfo, &imageAllocationCreateInfo, &textureImage, &textureImageAllocation, nullptr) != VK_SUCCESS) - throw love::Exception("failed to create image"); + if (root) + { + VkImageCreateFlags createFlags = 0; - auto commandBuffer = vgfx->getCommandBufferForDataTransfer(); + if (viewFormats) + createFlags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; - if (isPixelFormatDepthStencil(format)) - imageLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; - else if (computeWrite) - imageLayout = VK_IMAGE_LAYOUT_GENERAL; - else - imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + if (texType == TEXTURE_CUBE || texType == TEXTURE_2D_ARRAY) + createFlags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; - Vulkan::cmdTransitionImageLayout(commandBuffer, textureImage, - VK_IMAGE_LAYOUT_UNDEFINED, imageLayout, - 0, VK_REMAINING_MIP_LEVELS, - 0, VK_REMAINING_ARRAY_LAYERS); + msaaSamples = vgfx->getMsaaCount(requestedMSAA); - bool hasdata = slices.get(0, 0) != nullptr; + VkImageCreateInfo imageInfo{}; + imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; + imageInfo.flags = createFlags; + imageInfo.imageType = Vulkan::getImageType(getTextureType()); + imageInfo.extent.width = static_cast(pixelWidth); + imageInfo.extent.height = static_cast(pixelHeight); + imageInfo.extent.depth = static_cast(depth); + imageInfo.arrayLayers = static_cast(layerCount); + imageInfo.mipLevels = static_cast(mipmapCount); + imageInfo.format = vulkanFormat.internalFormat; + imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL; + imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + imageInfo.usage = usageFlags; + imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + imageInfo.samples = msaaSamples; - if (hasdata) - { - for (int mip = 0; mip < getMipmapCount(); mip++) - { - int sliceCount; - if (texType == TEXTURE_CUBE) - sliceCount = 6; - else - sliceCount = slices.getSliceCount(); + VmaAllocationCreateInfo imageAllocationCreateInfo{}; + + if (vmaCreateImage(allocator, &imageInfo, &imageAllocationCreateInfo, &textureImage, &textureImageAllocation, nullptr) != VK_SUCCESS) + throw love::Exception("failed to create image"); - for (int slice = 0; slice < sliceCount; slice++) + auto commandBuffer = vgfx->getCommandBufferForDataTransfer(); + + if (isPixelFormatDepthStencil(format)) + imageLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; + else if (computeWrite) + imageLayout = VK_IMAGE_LAYOUT_GENERAL; + else + imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + + Vulkan::cmdTransitionImageLayout(commandBuffer, textureImage, + VK_IMAGE_LAYOUT_UNDEFINED, imageLayout, + 0, VK_REMAINING_MIP_LEVELS, + 0, VK_REMAINING_ARRAY_LAYERS); + + bool hasdata = slices.get(0, 0) != nullptr; + + if (hasdata) + { + for (int mip = 0; mip < getMipmapCount(); mip++) { - auto id = slices.get(slice, mip); - if (id != nullptr) - uploadImageData(id, mip, slice, 0, 0); + int sliceCount; + if (texType == TEXTURE_CUBE) + sliceCount = 6; + else + sliceCount = slices.getSliceCount(); + + for (int slice = 0; slice < sliceCount; slice++) + { + auto id = slices.get(slice, mip); + if (id != nullptr) + uploadImageData(id, mip, slice, 0, 0); + } } } + else + clear(); } else - clear(); + { + Texture *roottex = (Texture *) rootView.texture; + textureImage = roottex->textureImage; + textureImageAllocation = VK_NULL_HANDLE; + imageLayout = roottex->imageLayout; + msaaSamples = roottex->msaaSamples; + } createTextureImageView(); - textureSampler = vgfx->getCachedSampler(samplerState); + setSamplerState(samplerState); - if (!isPixelFormatDepthStencil(format) && slices.getMipmapCount() <= 1 && getMipmapsMode() != MIPMAPS_NONE) + if (root && !isPixelFormatDepthStencil(format) && slices.getMipmapCount() <= 1 && getMipmapsMode() != MIPMAPS_NONE) generateMipmaps(); if (renderTarget) @@ -172,9 +197,9 @@ bool Texture::loadVolatile() viewInfo.viewType = Vulkan::getImageViewType(getTextureType()); viewInfo.format = vulkanFormat.internalFormat; viewInfo.subresourceRange.aspectMask = imageAspect; - viewInfo.subresourceRange.baseMipLevel = mip; + viewInfo.subresourceRange.baseMipLevel = mip + rootView.startMipmap; viewInfo.subresourceRange.levelCount = 1; - viewInfo.subresourceRange.baseArrayLayer = slice; + viewInfo.subresourceRange.baseArrayLayer = slice + rootView.startLayer; viewInfo.subresourceRange.layerCount = 1; viewInfo.components.r = vulkanFormat.swizzleR; viewInfo.components.g = vulkanFormat.swizzleG; @@ -189,15 +214,18 @@ bool Texture::loadVolatile() int64 memsize = 0; - for (int mip = 0; mip < getMipmapCount(); mip++) + if (root) { - int w = getPixelWidth(mip); - int h = getPixelHeight(mip); - int slices = getDepth(mip) * layerCount; - memsize += getPixelFormatSliceSize(format, w, h) * slices; - } + for (int mip = 0; mip < getMipmapCount(); mip++) + { + int w = getPixelWidth(mip); + int h = getPixelHeight(mip); + int slices = getDepth(mip) * layerCount; + memsize += getPixelFormatSliceSize(format, w, h) * slices; + } - memsize *= static_cast(msaaSamples); + memsize *= static_cast(msaaSamples); + } setGraphicsMemorySize(memsize); @@ -207,8 +235,16 @@ bool Texture::loadVolatile() { VkDebugUtilsObjectNameInfoEXT nameInfo{}; nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; - nameInfo.objectType = VK_OBJECT_TYPE_IMAGE; - nameInfo.objectHandle = (uint64_t)textureImage; + if (root) + { + nameInfo.objectType = VK_OBJECT_TYPE_IMAGE; + nameInfo.objectHandle = (uint64_t)textureImage; + } + else + { + nameInfo.objectType = VK_OBJECT_TYPE_IMAGE_VIEW; + nameInfo.objectHandle = (uint64_t)textureImageView; + } nameInfo.pObjectName = debugName.c_str(); vkSetDebugUtilsObjectNameEXT(device, &nameInfo); } @@ -230,13 +266,15 @@ void Texture::unloadVolatile() textureImageAllocation = textureImageAllocation, textureImageViews = std::move(renderTargetImageViews)] () { vkDestroyImageView(device, textureImageView, nullptr); - vmaDestroyImage(allocator, textureImage, textureImageAllocation); + if (textureImageAllocation) + vmaDestroyImage(allocator, textureImage, textureImageAllocation); for (const auto &views : textureImageViews) for (const auto &view : views) vkDestroyImageView(device, view, nullptr); }); textureImage = VK_NULL_HANDLE; + textureImageAllocation = VK_NULL_HANDLE; setGraphicsMemorySize(0); } @@ -278,8 +316,7 @@ ptrdiff_t Texture::getHandle() const void Texture::setSamplerState(const SamplerState &s) { - love::graphics::Texture::setSamplerState(s); - + samplerState = validateSamplerState(s); textureSampler = vgfx->getCachedSampler(samplerState); } @@ -291,16 +328,15 @@ VkImageLayout Texture::getImageLayout() const void Texture::createTextureImageView() { auto vulkanFormat = Vulkan::getTextureFormat(format); - VkImageViewCreateInfo viewInfo{}; viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; viewInfo.image = textureImage; viewInfo.viewType = Vulkan::getImageViewType(getTextureType()); viewInfo.format = vulkanFormat.internalFormat; viewInfo.subresourceRange.aspectMask = imageAspect; - viewInfo.subresourceRange.baseMipLevel = 0; + viewInfo.subresourceRange.baseMipLevel = rootView.startMipmap; viewInfo.subresourceRange.levelCount = getMipmapCount(); - viewInfo.subresourceRange.baseArrayLayer = 0; + viewInfo.subresourceRange.baseArrayLayer = rootView.startLayer; viewInfo.subresourceRange.layerCount = layerCount; viewInfo.components.r = vulkanFormat.swizzleR; viewInfo.components.g = vulkanFormat.swizzleG; @@ -404,16 +440,16 @@ void Texture::generateMipmapsInternal() barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - barrier.subresourceRange.baseArrayLayer = 0; + barrier.subresourceRange.baseArrayLayer = rootView.startLayer; barrier.subresourceRange.layerCount = static_cast(layerCount); - barrier.subresourceRange.baseMipLevel = 0; + barrier.subresourceRange.baseMipLevel = rootView.startMipmap; barrier.subresourceRange.levelCount = 1u; uint32_t mipLevels = static_cast(getMipmapCount()); for (uint32_t i = 1; i < mipLevels; i++) { - barrier.subresourceRange.baseMipLevel = i - 1; + barrier.subresourceRange.baseMipLevel = rootView.startMipmap + i - 1; barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; barrier.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; @@ -429,15 +465,15 @@ void Texture::generateMipmapsInternal() blit.srcOffsets[0] = { 0, 0, 0 }; blit.srcOffsets[1] = { getPixelWidth(i - 1), getPixelHeight(i - 1), 1 }; blit.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - blit.srcSubresource.mipLevel = i - 1; - blit.srcSubresource.baseArrayLayer = 0; + blit.srcSubresource.mipLevel = rootView.startMipmap + i - 1; + blit.srcSubresource.baseArrayLayer = rootView.startLayer; blit.srcSubresource.layerCount = static_cast(layerCount); blit.dstOffsets[0] = { 0, 0, 0 }; blit.dstOffsets[1] = { getPixelWidth(i), getPixelHeight(i), 1 }; blit.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - blit.dstSubresource.mipLevel = i; - blit.dstSubresource.baseArrayLayer = 0; + blit.dstSubresource.mipLevel = rootView.startMipmap + i; + blit.dstSubresource.baseArrayLayer = rootView.startLayer; blit.dstSubresource.layerCount = static_cast(layerCount); vkCmdBlitImage(commandBuffer, @@ -458,7 +494,7 @@ void Texture::generateMipmapsInternal() 1, &barrier); } - barrier.subresourceRange.baseMipLevel = mipLevels - 1; + barrier.subresourceRange.baseMipLevel = rootView.startMipmap + mipLevels - 1; barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; barrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; @@ -496,11 +532,11 @@ void Texture::uploadByteData(const void *data, size_t size, int level, int slice region.bufferRowLength = 0; region.bufferImageHeight = 0; - uint32_t baseLayer; - if (getTextureType() == TEXTURE_VOLUME) - baseLayer = 0; - else - baseLayer = slice; + uint32_t baseLayer = rootView.startLayer; + if (getTextureType() != TEXTURE_VOLUME) + baseLayer += slice; + + level += rootView.startMipmap; region.imageSubresource.aspectMask = imageAspect; region.imageSubresource.mipLevel = level; @@ -558,8 +594,8 @@ void Texture::copyFromBuffer(graphics::Buffer *source, size_t sourceoffset, int VkImageSubresourceLayers layers{}; layers.aspectMask = imageAspect; - layers.mipLevel = mipmap; - layers.baseArrayLayer = slice; + layers.mipLevel = mipmap + rootView.startMipmap; + layers.baseArrayLayer = slice + rootView.startLayer; layers.layerCount = 1; VkBufferImageCopy region{}; @@ -588,8 +624,8 @@ void Texture::copyToBuffer(graphics::Buffer *dest, int slice, int mipmap, const VkImageSubresourceLayers layers{}; layers.aspectMask = imageAspect; - layers.mipLevel = mipmap; - layers.baseArrayLayer = slice; + layers.mipLevel = mipmap + rootView.startMipmap; + layers.baseArrayLayer = slice + rootView.startLayer; layers.layerCount = 1; VkBufferImageCopy region{}; diff --git a/src/modules/graphics/vulkan/Texture.h b/src/modules/graphics/vulkan/Texture.h index 4ec79be3c..9ad198378 100644 --- a/src/modules/graphics/vulkan/Texture.h +++ b/src/modules/graphics/vulkan/Texture.h @@ -40,11 +40,13 @@ class Texture final , public Volatile { public: + Texture(love::graphics::Graphics *gfx, const Settings &settings, const Slices *data); - ~Texture(); + Texture(love::graphics::Graphics *gfx, love::graphics::Texture *base, const Texture::ViewSettings &viewsettings); + virtual ~Texture(); - virtual bool loadVolatile() override; - virtual void unloadVolatile() override; + bool loadVolatile() override; + void unloadVolatile() override; void setSamplerState(const SamplerState &s) override; @@ -61,7 +63,7 @@ class Texture final void uploadByteData(const void *data, size_t size, int level, int slice, const Rect &r) override; - void generateMipmapsInternal() override; + void generateMipmapsInternal() override; int getMSAA() const override; ptrdiff_t getHandle() const override; diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index 52d2cecfe..e2221c9b6 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -799,6 +799,13 @@ static void luax_checktexturesettings(lua_State *L, int idx, bool opt, bool chec if (s.type == TEXTURE_2D_ARRAY || s.type == TEXTURE_VOLUME) s.layers = luax_checkintflag(L, idx, Texture::getConstant(Texture::SETTING_LAYERS)); } + else + { + s.width = luax_intflag(L, idx, Texture::getConstant(Texture::SETTING_WIDTH), s.width); + s.height = luax_intflag(L, idx, Texture::getConstant(Texture::SETTING_HEIGHT), s.height); + if (s.type == TEXTURE_2D_ARRAY || s.type == TEXTURE_VOLUME) + s.layers = luax_intflag(L, idx, Texture::getConstant(Texture::SETTING_LAYERS), s.layers); + } lua_getfield(L, idx, Texture::getConstant(Texture::SETTING_MIPMAPS)); if (!lua_isnoneornil(L, -1)) @@ -823,6 +830,7 @@ static void luax_checktexturesettings(lua_State *L, int idx, bool opt, bool chec s.msaa = luax_intflag(L, idx, Texture::getConstant(Texture::SETTING_MSAA), s.msaa); s.computeWrite = luax_boolflag(L, idx, Texture::getConstant(Texture::SETTING_COMPUTE_WRITE), s.computeWrite); + s.viewFormats = luax_boolflag(L, idx, Texture::getConstant(Texture::SETTING_VIEW_FORMATS), s.viewFormats); lua_getfield(L, idx, Texture::getConstant(Texture::SETTING_READABLE)); if (!lua_isnoneornil(L, -1)) @@ -1240,6 +1248,66 @@ int w_newVolumeImage(lua_State *L) return w_newVolumeTexture(L); } +int w_newTextureView(lua_State *L) +{ + Texture *base = luax_checktexture(L, 1); + luaL_checktype(L, 2, LUA_TTABLE); + + Texture::ViewSettings settings; + + lua_getfield(L, 2, "format"); + if (!lua_isnoneornil(L, -1)) + { + const char *str = luaL_checkstring(L, -1); + if (!getConstant(str, settings.format.value)) + luax_enumerror(L, "pixel format", str); + settings.format.hasValue = true; + } + lua_pop(L, 1); + + lua_getfield(L, 2, "type"); + if (!lua_isnoneornil(L, -1)) + { + const char *str = luaL_checkstring(L, -1); + if (!Texture::getConstant(str, settings.type.value)) + luax_enumerror(L, "texture type", Texture::getConstants(settings.type.value), str); + settings.type.hasValue = true; + } + lua_pop(L, 1); + + lua_getfield(L, 2, "mipmapstart"); + if (!lua_isnoneornil(L, -1)) + settings.mipmapStart.set(luaL_checkint(L, -1) - 1); + lua_pop(L, 1); + + lua_getfield(L, 2, "mipmapcount"); + if (!lua_isnoneornil(L, -1)) + settings.mipmapCount.set(luaL_checkint(L, -1)); + lua_pop(L, 1); + + lua_getfield(L, 2, "layerstart"); + if (!lua_isnoneornil(L, -1)) + settings.layerStart.set(luaL_checkint(L, -1) - 1); + lua_pop(L, 1); + + lua_getfield(L, 2, "layers"); + if (!lua_isnoneornil(L, -1)) + settings.layerCount.set(luaL_checkint(L, -1)); + lua_pop(L, 1); + + lua_getfield(L, 2, "debugname"); + if (!lua_isnoneornil(L, -1)) + settings.debugName = luaL_checkstring(L, -1); + lua_pop(L, 1); + + Texture *t = nullptr; + luax_catchexcept(L, [&]() { t = instance()->newTextureView(base, settings); }); + + luax_pushtype(L, t); + t->release(); + return 1; +} + int w_newQuad(lua_State *L) { luax_checkgraphicscreated(L); @@ -3857,6 +3925,7 @@ static const luaL_Reg functions[] = { "newCubeTexture", w_newCubeTexture }, { "newArrayTexture", w_newArrayTexture }, { "newVolumeTexture", w_newVolumeTexture }, + { "newTextureView", w_newTextureView }, { "newQuad", w_newQuad }, { "newFont", w_newFont }, { "newImageFont", w_newImageFont }, diff --git a/src/modules/graphics/wrap_Texture.cpp b/src/modules/graphics/wrap_Texture.cpp index 9381a02bc..533cb1997 100644 --- a/src/modules/graphics/wrap_Texture.cpp +++ b/src/modules/graphics/wrap_Texture.cpp @@ -300,6 +300,13 @@ int w_Texture_isReadable(lua_State *L) return 1; } +int w_Texture_hasViewFormats(lua_State *L) +{ + Texture *t = luax_checktexture(L, 1); + luax_pushboolean(L, t->hasViewFormats()); + return 1; +} + int w_Texture_setDepthSampleMode(lua_State *L) { Texture *t = luax_checktexture(L, 1); @@ -511,6 +518,7 @@ const luaL_Reg w_Texture_functions[] = { "isCanvas", w_Texture_isCanvas }, { "isComputeWritable", w_Texture_isComputeWritable }, { "isReadable", w_Texture_isReadable }, + { "hasViewFormats", w_Texture_hasViewFormats }, { "getMipmapMode", w_Texture_getMipmapMode }, { "getDepthSampleMode", w_Texture_getDepthSampleMode }, { "setDepthSampleMode", w_Texture_setDepthSampleMode }, From e20f0182723aafcb403a9dd96313d21bdde3d3bc Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 24 Feb 2024 23:42:28 -0400 Subject: [PATCH 026/104] Change the 'viewformats' texture setting field to be a list of pixel formats. Replace Texture:hasViewFormats with Texture:getViewFormats. --- src/modules/graphics/Texture.cpp | 46 ++++++++++++++----------- src/modules/graphics/Texture.h | 9 +++-- src/modules/graphics/metal/Texture.mm | 11 ++++-- src/modules/graphics/vulkan/Graphics.h | 2 ++ src/modules/graphics/vulkan/Texture.cpp | 23 +++++++++++-- src/modules/graphics/wrap_Graphics.cpp | 20 ++++++++++- src/modules/graphics/wrap_Texture.cpp | 17 +++++++-- 7 files changed, 96 insertions(+), 32 deletions(-) diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index fb989328d..a880a51e8 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -287,6 +287,28 @@ Texture::Texture(Graphics *gfx, const Settings &settings, const Slices *slices) if (isCompressed() && renderTarget) throw love::Exception("Compressed textures cannot be render targets."); + for (PixelFormat viewformat : viewFormats) + { + if (getLinearPixelFormat(viewformat) == getLinearPixelFormat(format)) + continue; + + if (isPixelFormatCompressed(format) || isPixelFormatCompressed(viewformat)) + throw love::Exception("Compressed textures cannot use different pixel formats for texture views, aside from sRGB versus linear variants of the same pixel format."); + + if (isPixelFormatColor(viewformat) != isPixelFormatColor(format)) + throw love::Exception("Color-format textures cannot use depth/stencil pixel formats and vice versa, in texture views."); + + // TODO: depth[24|32f]_stencil8 -> stencil8 can work. + if (isPixelFormatDepthStencil(viewformat)) + throw love::Exception("Using different pixel formats for texture views is not currently supported for depth or stencil formats."); + + size_t viewbytes = getPixelFormatBlockSize(viewformat); + size_t basebytes = getPixelFormatBlockSize(format); + + if (viewbytes != basebytes) + throw love::Exception("Texture view pixel formats must have the same bits per pixel as the base texture's pixel format."); + } + validatePixelFormat(gfx); if (!caps.textureTypes[texType]) @@ -409,28 +431,10 @@ Texture::Texture(Graphics *gfx, Texture *base, const ViewSettings &viewsettings) throw love::Exception("Unknown texture type."); } - auto baseformat = base->getPixelFormat(); - - if (format != baseformat) + if (format != base->getPixelFormat()) { - if (isPixelFormatCompressed(baseformat) || isPixelFormatCompressed(format)) - throw love::Exception("Compressed textures cannot use a different pixel format in a texture view."); - - if (isPixelFormatColor(baseformat) != isPixelFormatColor(format)) - throw love::Exception("Color-format textures cannot use a depth/stencil pixel format and vice versa, in a texture view."); - - // TODO: depth[24|32f]_stencil8 -> stencil8 can work. - if (isPixelFormatDepthStencil(baseformat)) - throw love::Exception("Using a different pixel format in a texture view is not currently supported for depth or stencil formats."); - - if (!viewFormats) - throw love::Exception("Using a different pixel format in a texture view requires the original texture to be created with the 'viewformats' setting set to true."); - - size_t bytes = getPixelFormatBlockSize(format); - size_t basebytes = getPixelFormatBlockSize(baseformat); - - if (bytes != basebytes) - throw love::Exception("Texture views must have the same bits per pixel as the original texture."); + if (std::find(viewFormats.begin(), viewFormats.end(), format) == viewFormats.end()) + throw love::Exception("Using a different pixel format in a texture view requires the original texture to be created with a 'viewformats' setting that includes the given format in its list."); } const char *miperr = nullptr; diff --git a/src/modules/graphics/Texture.h b/src/modules/graphics/Texture.h index 099442d50..0f228848f 100644 --- a/src/modules/graphics/Texture.h +++ b/src/modules/graphics/Texture.h @@ -39,6 +39,7 @@ // C #include +#include namespace love { @@ -195,7 +196,7 @@ class Texture : public Drawable, public Resource int msaa = 1; bool renderTarget = false; bool computeWrite = false; - bool viewFormats = false; + std::vector viewFormats; OptionalBool readable; std::string debugName; }; @@ -279,7 +280,8 @@ class Texture : public Drawable, public Resource bool isRenderTarget() const { return renderTarget; } bool isComputeWritable() const { return computeWrite; } bool isReadable() const { return readable; } - bool hasViewFormats() const { return viewFormats; } + + const std::vector &getViewFormats() const { return viewFormats; } bool isCompressed() const; bool isFormatLinear() const; @@ -353,9 +355,10 @@ class Texture : public Drawable, public Resource PixelFormat format; bool renderTarget; bool computeWrite; - bool viewFormats; bool readable; + std::vector viewFormats; + MipmapsMode mipmapsMode; int width; diff --git a/src/modules/graphics/metal/Texture.mm b/src/modules/graphics/metal/Texture.mm index b5c23c8f3..e880495ae 100644 --- a/src/modules/graphics/metal/Texture.mm +++ b/src/modules/graphics/metal/Texture.mm @@ -76,8 +76,15 @@ static MTLTextureType getMTLTextureType(TextureType type, int msaa) desc.usage |= MTLTextureUsageRenderTarget; if (computeWrite) desc.usage |= MTLTextureUsageShaderWrite; - if (viewFormats) - desc.usage |= MTLTextureUsagePixelFormatView; + + for (PixelFormat viewformat : viewFormats) + { + if (getLinearPixelFormat(viewformat) != getLinearPixelFormat(format)) + { + desc.usage |= MTLTextureUsagePixelFormatView; + break; + } + } texture = [device newTextureWithDescriptor:desc]; diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index 1726b200c..084c2b836 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -326,6 +326,8 @@ class Graphics final : public love::graphics::Graphics void setVsync(int vsync); int getVsync() const; + uint32 getDeviceApiVersion() const { return deviceApiVersion; } + protected: graphics::ShaderStage *newShaderStageInternal(ShaderStageType stage, const std::string &cachekey, const std::string &source, bool gles) override; graphics::Shader *newShaderInternal(StrongRef stages[SHADERSTAGE_MAX_ENUM], const Shader::CompileOptions &options) override; diff --git a/src/modules/graphics/vulkan/Texture.cpp b/src/modules/graphics/vulkan/Texture.cpp index 46a6a01cc..229e6bc50 100644 --- a/src/modules/graphics/vulkan/Texture.cpp +++ b/src/modules/graphics/vulkan/Texture.cpp @@ -100,9 +100,17 @@ bool Texture::loadVolatile() if (root) { VkImageCreateFlags createFlags = 0; + std::vector vkviewformats; - if (viewFormats) - createFlags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; + for (PixelFormat viewformat : viewFormats) + { + if (viewformat != format) + { + createFlags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; + TextureFormat f = Vulkan::getTextureFormat(viewformat); + vkviewformats.push_back(f.internalFormat); + } + } if (texType == TEXTURE_CUBE || texType == TEXTURE_2D_ARRAY) createFlags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; @@ -125,6 +133,17 @@ bool Texture::loadVolatile() imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; imageInfo.samples = msaaSamples; + VkImageFormatListCreateInfo viewFormatsInfo{}; + viewFormatsInfo.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO; + + if (!vkviewformats.empty() && vgfx->getDeviceApiVersion() >= VK_API_VERSION_1_2) + { + viewFormatsInfo.viewFormatCount = (uint32)vkviewformats.size(); + viewFormatsInfo.pViewFormats = vkviewformats.data(); + + imageInfo.pNext = &viewFormatsInfo; + } + VmaAllocationCreateInfo imageAllocationCreateInfo{}; if (vmaCreateImage(allocator, &imageInfo, &imageAllocationCreateInfo, &textureImage, &textureImageAllocation, nullptr) != VK_SUCCESS) diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index e2221c9b6..15af25563 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -830,7 +830,25 @@ static void luax_checktexturesettings(lua_State *L, int idx, bool opt, bool chec s.msaa = luax_intflag(L, idx, Texture::getConstant(Texture::SETTING_MSAA), s.msaa); s.computeWrite = luax_boolflag(L, idx, Texture::getConstant(Texture::SETTING_COMPUTE_WRITE), s.computeWrite); - s.viewFormats = luax_boolflag(L, idx, Texture::getConstant(Texture::SETTING_VIEW_FORMATS), s.viewFormats); + + lua_getfield(L, idx, Texture::getConstant(Texture::SETTING_VIEW_FORMATS)); + if (!lua_isnoneornil(L, -1)) + { + if (lua_type(L, -1) != LUA_TTABLE) + luaL_argerror(L, idx, "expected field 'viewformats' to be a table type"); + + for (int i = 1; i <= luax_objlen(L, -1); i++) + { + lua_rawgeti(L, -1, i); + const char *str = luaL_checkstring(L, -1); + PixelFormat viewformat = PIXELFORMAT_UNKNOWN; + if (!getConstant(str, viewformat)) + luax_enumerror(L, "pixel format", str); + s.viewFormats.push_back(viewformat); + lua_pop(L, 1); + } + } + lua_pop(L, 1); lua_getfield(L, idx, Texture::getConstant(Texture::SETTING_READABLE)); if (!lua_isnoneornil(L, -1)) diff --git a/src/modules/graphics/wrap_Texture.cpp b/src/modules/graphics/wrap_Texture.cpp index 533cb1997..b667c48b3 100644 --- a/src/modules/graphics/wrap_Texture.cpp +++ b/src/modules/graphics/wrap_Texture.cpp @@ -300,10 +300,21 @@ int w_Texture_isReadable(lua_State *L) return 1; } -int w_Texture_hasViewFormats(lua_State *L) +int w_Texture_getViewFormats(lua_State *L) { Texture *t = luax_checktexture(L, 1); - luax_pushboolean(L, t->hasViewFormats()); + const std::vector &viewformats = t->getViewFormats(); + + lua_createtable(L, (int) viewformats.size(), 0); + for (int i = 0; i < (int) viewformats.size(); i++) + { + const char *str = nullptr; + if (!getConstant(viewformats[i], str)) + return luaL_error(L, "Unknown pixel format."); + lua_pushstring(L, str); + lua_rawseti(L, -2, i + 1); + } + return 1; } @@ -518,7 +529,7 @@ const luaL_Reg w_Texture_functions[] = { "isCanvas", w_Texture_isCanvas }, { "isComputeWritable", w_Texture_isComputeWritable }, { "isReadable", w_Texture_isReadable }, - { "hasViewFormats", w_Texture_hasViewFormats }, + { "getViewFormats", w_Texture_getViewFormats }, { "getMipmapMode", w_Texture_getMipmapMode }, { "getDepthSampleMode", w_Texture_getDepthSampleMode }, { "setDepthSampleMode", w_Texture_setDepthSampleMode }, From 476e520969a4d0d4c9e514994e73c6cd9d7f8265 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 25 Feb 2024 11:23:52 -0400 Subject: [PATCH 027/104] Fix pointer alignment of default random generator object. --- src/modules/math/MathModule.cpp | 5 +++-- src/modules/math/MathModule.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/modules/math/MathModule.cpp b/src/modules/math/MathModule.cpp index 42fb70c2a..122c35163 100644 --- a/src/modules/math/MathModule.cpp +++ b/src/modules/math/MathModule.cpp @@ -201,11 +201,12 @@ float linearToGamma(float c) Math::Math() : Module(M_MATH, "love.math") - , rng() { RandomGenerator::Seed seed; seed.b64 = (uint64) time(nullptr); - rng.setSeed(seed); + + rng.set(new RandomGenerator(), Acquire::NORETAIN); + rng->setSeed(seed); } Math::~Math() diff --git a/src/modules/math/MathModule.h b/src/modules/math/MathModule.h index adf0ec0d3..645df8aae 100644 --- a/src/modules/math/MathModule.h +++ b/src/modules/math/MathModule.h @@ -102,7 +102,7 @@ class Math : public Module RandomGenerator *getRandomGenerator() { - return &rng; + return rng.get(); } /** @@ -120,7 +120,9 @@ class Math : public Module private: - RandomGenerator rng; + // All love objects accessible in Lua should be heap-allocated, + // to guarantee a minimum pointer alignment. + StrongRef rng; }; // Math From 5907a7efe72c3d2772dd0ae74d696397f3e108cc Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 25 Feb 2024 14:25:36 -0400 Subject: [PATCH 028/104] Update luasocket to lunarmodules/luasocket@98be8d9 Fixes #1663. --- src/libraries/luasocket/libluasocket/http.lua | 24 ++++++---- .../luasocket/libluasocket/http.lua.h | 48 +++++++++++++------ src/libraries/luasocket/libluasocket/inet.c | 2 +- .../luasocket/libluasocket/luasocket.h | 2 +- src/libraries/luasocket/libluasocket/makefile | 4 +- .../luasocket/libluasocket/options.c | 29 ++++++++++- .../luasocket/libluasocket/options.h | 3 ++ src/libraries/luasocket/libluasocket/smtp.lua | 4 +- .../luasocket/libluasocket/smtp.lua.h | 2 +- src/libraries/luasocket/libluasocket/tcp.c | 2 + .../luasocket/libluasocket/unixdgram.c | 4 -- .../luasocket/libluasocket/unixstream.c | 5 -- src/libraries/luasocket/libluasocket/url.lua | 2 +- .../luasocket/libluasocket/url.lua.h | 5 +- .../luasocket/libluasocket/usocket.c | 2 +- .../luasocket/libluasocket/wsocket.c | 2 + 16 files changed, 96 insertions(+), 44 deletions(-) diff --git a/src/libraries/luasocket/libluasocket/http.lua b/src/libraries/luasocket/libluasocket/http.lua index 1330355f4..259eb2b5d 100644 --- a/src/libraries/luasocket/libluasocket/http.lua +++ b/src/libraries/luasocket/libluasocket/http.lua @@ -54,7 +54,7 @@ local function receiveheaders(sock, headers) while line ~= "" do -- get field-name and value name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)")) - if not (name and value) then return nil, "malformed reponse headers" end + if not (name and value) then return nil, "malformed response headers" end name = string.lower(name) -- get next line (value might be folded) line, err = sock:receive() @@ -62,7 +62,7 @@ local function receiveheaders(sock, headers) -- unfold any folded values while string.find(line, "^%s") do value = value .. line - line = sock:receive() + line, err = sock:receive() if err then return nil, err end end -- save pair in table @@ -81,7 +81,7 @@ socket.sourcet["http-chunked"] = function(sock, headers) dirty = function() return sock:dirty() end }, { __call = function() - -- get chunk size, skip extention + -- get chunk size, skip extension local line, err = sock:receive() if err then return nil, err end local size = base.tonumber(string.gsub(line, ";.*", ""), 16) @@ -219,9 +219,11 @@ local function adjustproxy(reqt) local proxy = reqt.proxy or _M.PROXY if proxy then proxy = url.parse(proxy) - return proxy.host, proxy.port or 3128 + proxy.port = proxy.port or 3128 + proxy.create = SCHEMES[proxy.scheme].create(reqt) + return proxy.host, proxy.port, proxy.create else - return reqt.host, reqt.port + return reqt.host, reqt.port, reqt.create end end @@ -279,7 +281,7 @@ local function adjustrequest(reqt) if not (host and host ~= "") then socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'") end - -- compute uri if user hasn't overriden + -- compute uri if user hasn't overridden nreqt.uri = reqt.uri or adjusturi(nreqt) -- adjust headers in request nreqt.headers = adjustheaders(nreqt) @@ -291,7 +293,10 @@ local function adjustrequest(reqt) end -- ajust host and port if there is a proxy - nreqt.host, nreqt.port = adjustproxy(nreqt) + local proxy_create + nreqt.host, nreqt.port, proxy_create = adjustproxy(nreqt) + if not reqt.create then nreqt.create = proxy_create end + return nreqt end @@ -300,6 +305,8 @@ local function shouldredirect(reqt, code, headers) if not location then return false end location = string.gsub(location, "%s", "") if location == "" then return false end + -- the RFC says the redirect URL may be relative + location = url.absolute(reqt.url, location) local scheme = url.parse(location).scheme if scheme and (not SCHEMES[scheme]) then return false end -- avoid https downgrades @@ -323,8 +330,7 @@ end local trequest, tredirect --[[local]] function tredirect(reqt, location) - -- the RFC says the redirect URL has to be absolute, but some - -- servers do not respect that + -- the RFC says the redirect URL may be relative local newurl = url.absolute(reqt.url, location) -- if switching schemes, reset port and create function if url.parse(newurl).scheme ~= reqt.scheme then diff --git a/src/libraries/luasocket/libluasocket/http.lua.h b/src/libraries/luasocket/libluasocket/http.lua.h index 27799a9f4..70620ec39 100644 --- a/src/libraries/luasocket/libluasocket/http.lua.h +++ b/src/libraries/luasocket/libluasocket/http.lua.h @@ -167,8 +167,8 @@ const unsigned char http_lua[] = 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x22, 0x6d, 0x61, 0x6c, 0x66, - 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, + 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x6e, 0x65, 0x78, @@ -186,8 +186,9 @@ const unsigned char http_lua[] = 0x22, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x2e, 0x2e, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x3d, - 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, + 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, @@ -235,7 +236,7 @@ const unsigned char http_lua[] = 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x2c, 0x20, 0x73, 0x6b, 0x69, 0x70, 0x20, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x0a, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, @@ -570,12 +571,20 @@ const unsigned char http_lua[] = 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x29, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x6f, 0x72, 0x74, + 0x20, 0x3d, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x33, + 0x31, 0x32, 0x38, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x20, 0x3d, 0x20, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x45, 0x53, 0x5b, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5d, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x72, 0x65, + 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x6f, 0x72, - 0x74, 0x20, 0x6f, 0x72, 0x20, 0x33, 0x31, 0x32, 0x38, 0x0a, + 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x71, - 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x0a, + 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, + 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, @@ -710,7 +719,7 @@ const unsigned char http_lua[] = 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x75, 0x72, 0x69, 0x20, 0x69, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x6f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x6e, 0x0a, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x69, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x69, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x75, 0x72, 0x69, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, @@ -736,9 +745,17 @@ const unsigned char http_lua[] = 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x6e, 0x72, - 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, + 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, @@ -757,6 +774,12 @@ const unsigned char http_lua[] = 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x52, 0x46, 0x43, 0x20, 0x73, 0x61, 0x79, + 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x20, 0x55, 0x52, 0x4c, + 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, + 0x2e, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x6c, + 0x2c, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x0a, @@ -820,10 +843,7 @@ const unsigned char http_lua[] = 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x52, 0x46, 0x43, 0x20, 0x73, 0x61, 0x79, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x20, 0x55, 0x52, 0x4c, - 0x20, 0x68, 0x61, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, - 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x20, 0x64, 0x6f, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, + 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x65, 0x77, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, diff --git a/src/libraries/luasocket/libluasocket/inet.c b/src/libraries/luasocket/libluasocket/inet.c index 138c9abe8..afef5f45b 100644 --- a/src/libraries/luasocket/libluasocket/inet.c +++ b/src/libraries/luasocket/libluasocket/inet.c @@ -290,7 +290,7 @@ int inet_meth_getsockname(lua_State *L, p_socket ps, int family) return 2; } lua_pushstring(L, name); - lua_pushstring(L, port); + lua_pushinteger(L, (int) strtol(port, (char **) NULL, 10)); switch (family) { case AF_INET: lua_pushliteral(L, "inet"); break; case AF_INET6: lua_pushliteral(L, "inet6"); break; diff --git a/src/libraries/luasocket/libluasocket/luasocket.h b/src/libraries/luasocket/libluasocket/luasocket.h index 1017fbaab..1e3d3588c 100644 --- a/src/libraries/luasocket/libluasocket/luasocket.h +++ b/src/libraries/luasocket/libluasocket/luasocket.h @@ -10,7 +10,7 @@ /*-------------------------------------------------------------------------* \ * Current socket library version \*-------------------------------------------------------------------------*/ -#define LUASOCKET_VERSION "LuaSocket 3.0.0" +#define LUASOCKET_VERSION "LuaSocket 3.1.0" #define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2013 Diego Nehab" /*-------------------------------------------------------------------------*\ diff --git a/src/libraries/luasocket/libluasocket/makefile b/src/libraries/luasocket/libluasocket/makefile index 06f4d1927..25b293c72 100644 --- a/src/libraries/luasocket/libluasocket/makefile +++ b/src/libraries/luasocket/libluasocket/makefile @@ -1,6 +1,6 @@ # luasocket src/makefile # -# Definitions in this section can be overriden on the command line or in the +# Definitions in this section can be overridden on the command line or in the # environment. # # These are equivalent: @@ -272,7 +272,7 @@ SOCKET_win64=wsocket.obj # SO=$(SO_$(PLAT)) O=$(O_$(PLAT)) -SOCKET_V=3.0.0 +SOCKET_V=3.1.0 MIME_V=1.0.3 SOCKET_SO=socket-$(SOCKET_V).$(SO) MIME_SO=mime-$(MIME_V).$(SO) diff --git a/src/libraries/luasocket/libluasocket/options.c b/src/libraries/luasocket/libluasocket/options.c index 3280c51d7..9dea6bda2 100644 --- a/src/libraries/luasocket/libluasocket/options.c +++ b/src/libraries/luasocket/libluasocket/options.c @@ -54,6 +54,33 @@ int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps) return opt->func(L, ps); } +/*------------------------------------------------------*/ +/* binds socket to network interface */ +int opt_set_bindtodevice(lua_State *L, p_socket ps) +{ +#ifndef SO_BINDTODEVICE + return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system"); +#else + const char *dev = luaL_checkstring(L, 3); + return opt_set(L, ps, SOL_SOCKET, SO_BINDTODEVICE, (char*)dev, strlen(dev)+1); +#endif +} + +int opt_get_bindtodevice(lua_State *L, p_socket ps) +{ +#ifndef SO_BINDTODEVICE + return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system"); +#else + char dev[IFNAMSIZ]; + int len = sizeof(dev); + int err = opt_get(L, ps, SOL_SOCKET, SO_BINDTODEVICE, &dev, &len); + if (err) + return err; + lua_pushstring(L, dev); + return 1; +#endif +} + /*------------------------------------------------------*/ /* enables reuse of local address */ int opt_set_reuseaddr(lua_State *L, p_socket ps) @@ -190,7 +217,7 @@ int opt_set_send_buf_size(lua_State *L, p_socket ps) return opt_setint(L, ps, SOL_SOCKET, SO_SNDBUF); } -// /*------------------------------------------------------*/ +/*------------------------------------------------------*/ #ifdef TCP_FASTOPEN int opt_set_tcp_fastopen(lua_State *L, p_socket ps) diff --git a/src/libraries/luasocket/libluasocket/options.h b/src/libraries/luasocket/libluasocket/options.h index 456eeb5f4..26d6f0250 100644 --- a/src/libraries/luasocket/libluasocket/options.h +++ b/src/libraries/luasocket/libluasocket/options.h @@ -53,6 +53,9 @@ int opt_get_tcp_keepintvl(lua_State *L, p_socket ps); int opt_set_tcp_defer_accept(lua_State *L, p_socket ps); #endif +int opt_set_bindtodevice(lua_State *L, p_socket ps); +int opt_get_bindtodevice(lua_State *L, p_socket ps); + int opt_set_keepalive(lua_State *L, p_socket ps); int opt_get_keepalive(lua_State *L, p_socket ps); diff --git a/src/libraries/luasocket/libluasocket/smtp.lua b/src/libraries/luasocket/libluasocket/smtp.lua index b113d0067..c26ce44f4 100644 --- a/src/libraries/luasocket/libluasocket/smtp.lua +++ b/src/libraries/luasocket/libluasocket/smtp.lua @@ -225,7 +225,7 @@ local function adjust_headers(mesgt) lower["date"] = lower["date"] or os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE) lower["x-mailer"] = lower["x-mailer"] or socket._VERSION - -- this can't be overriden + -- this can't be overridden lower["mime-version"] = "1.0" return lower end @@ -253,4 +253,4 @@ _M.send = socket.protect(function(mailt) return s:close() end) -return _M \ No newline at end of file +return _M diff --git a/src/libraries/luasocket/libluasocket/smtp.lua.h b/src/libraries/luasocket/libluasocket/smtp.lua.h index b4a7da2bd..6bb022090 100644 --- a/src/libraries/luasocket/libluasocket/smtp.lua.h +++ b/src/libraries/luasocket/libluasocket/smtp.lua.h @@ -543,7 +543,7 @@ const unsigned char smtp_lua[] = 0x6c, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x27, 0x74, 0x20, - 0x62, 0x65, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x6e, 0x0a, + 0x62, 0x65, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x6d, 0x69, 0x6d, 0x65, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x0a, diff --git a/src/libraries/luasocket/libluasocket/tcp.c b/src/libraries/luasocket/libluasocket/tcp.c index e84db8454..f00120640 100644 --- a/src/libraries/luasocket/libluasocket/tcp.c +++ b/src/libraries/luasocket/libluasocket/tcp.c @@ -71,6 +71,7 @@ static luaL_Reg tcp_methods[] = { /* socket option handlers */ static t_opt optget[] = { + {"bindtodevice", opt_get_bindtodevice}, {"keepalive", opt_get_keepalive}, {"reuseaddr", opt_get_reuseaddr}, {"reuseport", opt_get_reuseport}, @@ -92,6 +93,7 @@ static t_opt optget[] = { }; static t_opt optset[] = { + {"bindtodevice", opt_set_bindtodevice}, {"keepalive", opt_set_keepalive}, {"reuseaddr", opt_set_reuseaddr}, {"reuseport", opt_set_reuseport}, diff --git a/src/libraries/luasocket/libluasocket/unixdgram.c b/src/libraries/luasocket/libluasocket/unixdgram.c index d00ead742..69093d734 100644 --- a/src/libraries/luasocket/libluasocket/unixdgram.c +++ b/src/libraries/luasocket/libluasocket/unixdgram.c @@ -12,11 +12,7 @@ #include #include -#ifdef _WIN32 -#include -#else #include -#endif #define UNIXDGRAM_DATAGRAMSIZE 8192 diff --git a/src/libraries/luasocket/libluasocket/unixstream.c b/src/libraries/luasocket/libluasocket/unixstream.c index 350d0efeb..02aced9c8 100644 --- a/src/libraries/luasocket/libluasocket/unixstream.c +++ b/src/libraries/luasocket/libluasocket/unixstream.c @@ -10,12 +10,7 @@ #include "unixstream.h" #include - -#ifdef _WIN32 -#include -#else #include -#endif /*=========================================================================*\ * Internal function prototypes diff --git a/src/libraries/luasocket/libluasocket/url.lua b/src/libraries/luasocket/libluasocket/url.lua index 8e0dc5ceb..aef16984c 100644 --- a/src/libraries/luasocket/libluasocket/url.lua +++ b/src/libraries/luasocket/libluasocket/url.lua @@ -152,7 +152,7 @@ function _M.parse(url, default) url = string.gsub(url, "^([%w][%w%+%-%.]*)%:", function(s) parsed.scheme = s; return "" end) -- get authority - url = string.gsub(url, "^//([^/]*)", function(n) + url = string.gsub(url, "^//([^/%?#]*)", function(n) parsed.authority = n return "" end) diff --git a/src/libraries/luasocket/libluasocket/url.lua.h b/src/libraries/luasocket/libluasocket/url.lua.h index 936281064..7db3e665c 100644 --- a/src/libraries/luasocket/libluasocket/url.lua.h +++ b/src/libraries/luasocket/libluasocket/url.lua.h @@ -402,8 +402,9 @@ const unsigned char url_lua[] = 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, - 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x5e, 0x2f, 0x2f, 0x28, 0x5b, 0x5e, 0x2f, 0x5d, - 0x2a, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x0a, + 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x5e, 0x2f, 0x2f, 0x28, 0x5b, 0x5e, 0x2f, 0x25, + 0x3f, 0x23, 0x5d, 0x2a, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, + 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x0a, diff --git a/src/libraries/luasocket/libluasocket/usocket.c b/src/libraries/luasocket/libluasocket/usocket.c index 69635daa6..7965db6c4 100644 --- a/src/libraries/luasocket/libluasocket/usocket.c +++ b/src/libraries/luasocket/libluasocket/usocket.c @@ -236,7 +236,7 @@ int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, *sent = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { - long put = (long) sendto(*ps, data, count, 0, addr, len); + long put = (long) sendto(*ps, data, count, 0, addr, len); if (put >= 0) { *sent = put; return IO_DONE; diff --git a/src/libraries/luasocket/libluasocket/wsocket.c b/src/libraries/luasocket/libluasocket/wsocket.c index 6cb1e415c..d3af9d4a1 100644 --- a/src/libraries/luasocket/libluasocket/wsocket.c +++ b/src/libraries/luasocket/libluasocket/wsocket.c @@ -262,6 +262,7 @@ int socket_recv(p_socket ps, char *data, size_t count, size_t *got, if (err != WSAEWOULDBLOCK) { if (err != WSAECONNRESET || prev == WSAECONNRESET) return err; prev = err; + continue; } if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } @@ -291,6 +292,7 @@ int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, if (err != WSAEWOULDBLOCK) { if (err != WSAECONNRESET || prev == WSAECONNRESET) return err; prev = err; + continue; } if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } From bb7312e057b3f1f4839f10f187e862eae54119b8 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 25 Feb 2024 14:39:40 -0400 Subject: [PATCH 029/104] luasocket: restore code to compile unix sockets on windows. --- src/libraries/luasocket/libluasocket/unixdgram.c | 4 ++++ src/libraries/luasocket/libluasocket/unixstream.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/libraries/luasocket/libluasocket/unixdgram.c b/src/libraries/luasocket/libluasocket/unixdgram.c index 69093d734..d00ead742 100644 --- a/src/libraries/luasocket/libluasocket/unixdgram.c +++ b/src/libraries/luasocket/libluasocket/unixdgram.c @@ -12,7 +12,11 @@ #include #include +#ifdef _WIN32 +#include +#else #include +#endif #define UNIXDGRAM_DATAGRAMSIZE 8192 diff --git a/src/libraries/luasocket/libluasocket/unixstream.c b/src/libraries/luasocket/libluasocket/unixstream.c index 02aced9c8..350d0efeb 100644 --- a/src/libraries/luasocket/libluasocket/unixstream.c +++ b/src/libraries/luasocket/libluasocket/unixstream.c @@ -10,7 +10,12 @@ #include "unixstream.h" #include + +#ifdef _WIN32 +#include +#else #include +#endif /*=========================================================================*\ * Internal function prototypes From ed6a50178c0c00b42effefb50f02d06333c21aa1 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 25 Feb 2024 20:09:06 -0400 Subject: [PATCH 030/104] Filled polygons have texture coordinates computed from their bounds. Fixes #1951. --- src/modules/graphics/Graphics.cpp | 35 ++++++++++++++++++++++++------- src/modules/graphics/Polyline.cpp | 28 +++++++++++++++++-------- src/modules/graphics/Polyline.h | 4 ++-- 3 files changed, 49 insertions(+), 18 deletions(-) diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index daf1cdf32..5a6b7a7ad 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -2589,21 +2589,42 @@ void Graphics::polygon(DrawMode mode, const Vector2 *coords, size_t count, bool BatchedDrawCommand cmd; cmd.formats[0] = getSinglePositionFormat(is2D); - cmd.formats[1] = CommonFormat::RGBAub; + cmd.formats[1] = CommonFormat::STf_RGBAub; cmd.indexMode = TRIANGLEINDEX_FAN; cmd.vertexCount = (int)count - (skipLastFilledVertex ? 1 : 0); BatchedVertexData data = requestBatchedDraw(cmd); - if (is2D) - t.transformXY((Vector2 *) data.stream[0], coords, cmd.vertexCount); - else - t.transformXY0((Vector3 *) data.stream[0], coords, cmd.vertexCount); + // Compute texture coordinates. + constexpr float inf = std::numeric_limits::infinity(); + Vector2 mincoord(inf, inf); + Vector2 maxcoord(-inf, -inf); + + for (int i = 0; i < cmd.vertexCount; i++) + { + Vector2 v = coords[i]; + mincoord.x = std::min(mincoord.x, v.x); + mincoord.y = std::min(mincoord.y, v.y); + maxcoord.x = std::max(maxcoord.x, v.x); + maxcoord.y = std::max(maxcoord.y, v.y); + } + + Vector2 invsize(1.0f / (maxcoord.x - mincoord.x), 1.0f / (maxcoord.y - mincoord.y)); + Vector2 start(mincoord.x * invsize.x, mincoord.y * invsize.y); Color32 c = toColor32(getColor()); - Color32 *colordata = (Color32 *) data.stream[1]; + STf_RGBAub *attributes = (STf_RGBAub *) data.stream[1]; for (int i = 0; i < cmd.vertexCount; i++) - colordata[i] = c; + { + attributes[i].s = coords[i].x * invsize.x - start.x; + attributes[i].t = coords[i].y * invsize.y - start.y; + attributes[i].color = c; + } + + if (is2D) + t.transformXY((Vector2*)data.stream[0], coords, cmd.vertexCount); + else + t.transformXY0((Vector3*)data.stream[0], coords, cmd.vertexCount); } } diff --git a/src/modules/graphics/Polyline.cpp b/src/modules/graphics/Polyline.cpp index 2a97893b8..f9537067d 100644 --- a/src/modules/graphics/Polyline.cpp +++ b/src/modules/graphics/Polyline.cpp @@ -424,7 +424,7 @@ void Polyline::draw(love::graphics::Graphics *gfx) Graphics::BatchedDrawCommand cmd; cmd.formats[0] = getSinglePositionFormat(is2D); - cmd.formats[1] = CommonFormat::RGBAub; + cmd.formats[1] = CommonFormat::STf_RGBAub; cmd.indexMode = triangle_mode; cmd.vertexCount = std::min(maxvertices, total_vertex_count - vertex_start); @@ -435,13 +435,19 @@ void Polyline::draw(love::graphics::Graphics *gfx) else t.transformXY0((Vector3 *) data.stream[0], verts, cmd.vertexCount); - Color32 *colordata = (Color32 *) data.stream[1]; + STf_RGBAub *attributes = (STf_RGBAub *) data.stream[1]; int draw_rough_count = std::min(cmd.vertexCount, (int) vertex_count - vertex_start); // Constant vertex color up to the overdraw vertices. + // Texture coordinates are a constant value, we only have them to keep auto-batching + // when drawing filled and line polygons together. for (int i = 0; i < draw_rough_count; i++) - colordata[i] = curcolor; + { + attributes[i].s = 0.0f; + attributes[i].t = 0.0f; + attributes[i].color = curcolor; + } if (overdraw) { @@ -456,30 +462,34 @@ void Polyline::draw(love::graphics::Graphics *gfx) if (draw_overdraw_count > 0) { - Color32 *colors = colordata + draw_overdraw_begin; - fill_color_array(curcolor, colors, draw_overdraw_count); + STf_RGBAub *c = attributes + draw_overdraw_begin; + fill_color_array(curcolor, c, draw_overdraw_count); } } } } -void Polyline::fill_color_array(Color32 constant_color, Color32 *colors, int count) +void Polyline::fill_color_array(Color32 constant_color, STf_RGBAub *attributes, int count) { for (int i = 0; i < count; ++i) { Color32 c = constant_color; c.a *= (i+1) % 2; // avoids branching. equiv to if (i%2 == 1) c.a = 0; - colors[i] = c; + attributes[i].s = 0.0f; + attributes[i].t = 0.0f; + attributes[i].color = c; } } -void NoneJoinPolyline::fill_color_array(Color32 constant_color, Color32 *colors, int count) +void NoneJoinPolyline::fill_color_array(Color32 constant_color, STf_RGBAub *attributes, int count) { for (int i = 0; i < count; ++i) { Color32 c = constant_color; c.a *= (i & 3) < 2; // if (i % 4 == 2 || i % 4 == 3) c.a = 0 - colors[i] = c; + attributes[i].s = 0.0f; + attributes[i].t = 0.0f; + attributes[i].color = c; } } diff --git a/src/modules/graphics/Polyline.h b/src/modules/graphics/Polyline.h index c33bb7068..2acf88382 100644 --- a/src/modules/graphics/Polyline.h +++ b/src/modules/graphics/Polyline.h @@ -73,7 +73,7 @@ class Polyline virtual void calc_overdraw_vertex_count(bool is_looping); virtual void render_overdraw(const std::vector &normals, float pixel_size, bool is_looping); - virtual void fill_color_array(Color32 constant_color, Color32 *colors, int count); + virtual void fill_color_array(Color32 constant_color, STf_RGBAub *attributes, int count); /** Calculate line boundary points. * @@ -133,7 +133,7 @@ class NoneJoinPolyline : public Polyline void calc_overdraw_vertex_count(bool is_looping) override; void render_overdraw(const std::vector &normals, float pixel_size, bool is_looping) override; - void fill_color_array(Color32 constant_color, Color32 *colors, int count) override; + void fill_color_array(Color32 constant_color, STf_RGBAub *attributes, int count) override; void renderEdge(std::vector &anchors, std::vector &normals, Vector2 &s, float &len_s, Vector2 &ns, const Vector2 &q, const Vector2 &r, float hw) override; From 72d6d8f64f1b616b612cc1fdd32fe141c9c50ef5 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Mon, 26 Feb 2024 20:41:50 +0800 Subject: [PATCH 031/104] Windows: Use another way to get pdbstr and srctool for source indexing. --- .github/workflows/main.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 510da5467..478601a1b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -202,25 +202,26 @@ jobs: echo nofiles=ignore>> "%GITHUB_OUTPUT%" echo moredef=-DLOVE_EXTRA_DLLS=%CD%\angle\libEGL.dll;%CD%\angle\libGLESv2.dll>> "%GITHUB_OUTPUT%" exit /b 0 - - name: Download Windows SDK Setup 10.0.20348 - run: curl -Lo winsdksetup.exe https://go.microsoft.com/fwlink/?linkid=2164145 - - name: Install Debugging Tools for Windows - id: windbg + - name: Download pdbstr + run: curl -Lfo pdbstr.nupkg https://www.nuget.org/api/v2/package/Microsoft.Debugging.Tools.PdbStr/20230731.1609.0 + - name: Download srctool + run: curl -Lfo srctool.nupkg https://www.nuget.org/api/v2/package/Microsoft.Debugging.Tools.SrcTool/20230731.1609.0 + - name: Extract Tools and Add to PATH run: | - setlocal enabledelayedexpansion - start /WAIT %CD%\winsdksetup.exe /features OptionId.WindowsDesktopDebuggers /q /log %CD%\log.txt - echo ERRORLEVEL=!ERRORLEVEL! >> %GITHUB_OUTPUT% - - name: Print Debugging Tools Install Log - if: always() - run: | - type log.txt - exit /b ${{ steps.windbg.outputs.ERRORLEVEL }} + mkdir debugtools + cd debugtools + if errorlevel 1 exit /b 1 + 7z e srctool.nupkg content/amd64/srctool.exe + if errorlevel 1 exit /b 1 + 7z e pdbstr.nupkg content/amd64/pdbstr.exe + if errorlevel 1 exit /b 1 + echo %CD%>>%GITHUB_PATH% - name: Setup Python 3.10 uses: actions/setup-python@v5 with: python-version: "3.10" - name: Download source_index.py - run: curl -Lo source_index.py https://gist.github.com/MikuAuahDark/d9c099f5714e09a765496471c2827a55/raw/df34956052035f3473c5f01861dfb53930d06843/source_index.py + run: curl -Lfo source_index.py https://gist.github.com/MikuAuahDark/d9c099f5714e09a765496471c2827a55/raw/df34956052035f3473c5f01861dfb53930d06843/source_index.py - name: Clone Megasource uses: actions/checkout@v4 with: From 7fda266d0a7cef2d4a846585e07c7487fcb695c8 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Mon, 26 Feb 2024 20:44:32 +0800 Subject: [PATCH 032/104] Fix pdbstr and srctool extraction. --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 478601a1b..89458c79a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -211,9 +211,9 @@ jobs: mkdir debugtools cd debugtools if errorlevel 1 exit /b 1 - 7z e srctool.nupkg content/amd64/srctool.exe + 7z e ..\srctool.nupkg content/amd64/srctool.exe if errorlevel 1 exit /b 1 - 7z e pdbstr.nupkg content/amd64/pdbstr.exe + 7z e ..\pdbstr.nupkg content/amd64/pdbstr.exe if errorlevel 1 exit /b 1 echo %CD%>>%GITHUB_PATH% - name: Setup Python 3.10 From 60d4de1a6cc52b5d92061438425cfd2750072742 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Mon, 26 Feb 2024 21:16:48 +0800 Subject: [PATCH 033/104] CI: Add Android build steps. --- .github/workflows/main.yml | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 89458c79a..9adf16075 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -482,3 +482,76 @@ jobs: - name: Build run: xcodebuild -project platform/xcode/love.xcodeproj -scheme love-ios -configuration Release -destination 'platform=iOS Simulator,name=iPhone 11' + Android: + runs-on: ubuntu-latest + strategy: + matrix: + build_type: [Debug, Release] + env: + JAVA_OPTS: '-Xmx10G' + steps: + - name: Prepare Environment + run: sudo apt-get update && curl -Lfo kitware-archive.sh https://apt.kitware.com/kitware-archive.sh && sudo bash ./kitware-archive.sh + - name: Install Dependencies + run: sudo apt-get install ninja-build cmake + - name: Checkout love-android + uses: actions/checkout@v4 + with: + repository: love2d/love-android + submodules: false + - name: Setup Java 17 + uses: actions/setup-java@v4 + with: + distribution: adopt-hotspot + java-version: 17 + cache: gradle + - name: Clone Megasource + uses: actions/checkout@v4 + with: + path: app/src/main/cpp/megasource + repository: love2d/megasource + ref: main + - name: Checkout + uses: actions/checkout@v4 + with: + path: app/src/main/cpp/love + - name: Build Normal Flavor + run: bash ./gradlew assembleNormalRecord${{ matrix.build_type }} + - name: Build Release-specific Binaries + if: ${{ matrix.build_type == 'Release' }} + run: bash ./gradlew bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease + - name: Artifact (Normal debug APK) + if: ${{ matrix.build_type == 'Debug' }} + uses: actions/upload-artifact@v4 + with: + name: love-android-debug.apk + path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk + - name: Artifact (Normal unsigned APK) + if: ${{ matrix.build_type == 'Release' }} + uses: actions/upload-artifact@v4 + with: + name: love-android.apk + path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk + - name: Artifact (Normal AAB w/o recording) + if: ${{ matrix.build_type == 'Release' }} + uses: actions/upload-artifact@v4 + with: + name: love-android-ps.aab + path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab + - name: Artifact (Embed AAB) + if: ${{ matrix.build_type == 'Release' }} + uses: actions/upload-artifact@v4 + with: + name: love-android-embed-record.aab + path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab + - name: Artifact (Embed AAB w/o recording) + if: ${{ matrix.build_type == 'Release' }} + uses: actions/upload-artifact@v4 + with: + name: love-android-embed.aab + path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab + - name: Artifact (Debug symbols) + uses: actions/upload-artifact@v4 + with: + name: love-android-unstripped-debugsyms-${{ matrix.build_type }} + path: app/build/intermediates/cxx From 6d15098ce24242768b1015ad4ed5600fee7f768b Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Tue, 27 Feb 2024 11:18:42 +0800 Subject: [PATCH 034/104] Android: Workaround Java out of memory, attempt 2. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9adf16075..42eadf0b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -488,7 +488,7 @@ jobs: matrix: build_type: [Debug, Release] env: - JAVA_OPTS: '-Xmx10G' + GRADLE_OPTS: "-Dorg.gradle.jvmargs='-Xmx4G'" steps: - name: Prepare Environment run: sudo apt-get update && curl -Lfo kitware-archive.sh https://apt.kitware.com/kitware-archive.sh && sudo bash ./kitware-archive.sh From 57fab45c2c82e51700792e5d042899d8c8b61a56 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Tue, 27 Feb 2024 22:54:18 -0400 Subject: [PATCH 035/104] tests: draw points at the center instead of corner of pixels. --- testing/readme.md | 1 - testing/tests/graphics.lua | 15 ++++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/testing/readme.md b/testing/readme.md index 9cd0cc254..dab1cd7cb 100644 --- a/testing/readme.md +++ b/testing/readme.md @@ -144,7 +144,6 @@ You can specify the test suite is being run on a runner by adding the `--isRunne `& 'c:\Program Files\LOVE\love.exe' PATH_TO_TESTING_FOLDER/main.lua --console --runAllTests --isRunner` | Test | OS | Exception | Reason | | -------------------------- | --------- | ------------------- | ------ | -| love.graphics.points | MacOS | 1px tolerance | Points are offset by 1,1 when drawn | | love.graphics.setWireframe | MacOS | 1px tolerance | Wireframes are offset by 1,1 when drawn | | love.graphica.arc | MacOS | Skipped | Arc curves are drawn slightly off at really low scale | | love.graphics.setLineStyle | Linux | 1rgba tolerance | 'Rough' lines blend differently with the background rgba | diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index ec20edb01..1c4f3cee3 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -1383,19 +1383,16 @@ end -- love.graphics.points love.test.graphics.points = function(test) local canvas = love.graphics.newCanvas(16, 16) - love.graphics.setCanvas(canvas) + love.graphics.push("all") + love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) + love.graphics.translate(0.5, 0.5) -- draw points at the center of pixels love.graphics.setColor(1, 0, 0, 1) - love.graphics.points(1,1,16,1,16,16,1,16,1,1) + love.graphics.points(0,0,15,0,15,15,0,15,0,0) love.graphics.setColor(1, 1, 0, 1) - love.graphics.points({2,2,8,8,15,2,8,9,15,15,9,9,2,15,9,8}) - love.graphics.setColor(1, 1, 1, 1) - love.graphics.setCanvas() + love.graphics.points({1,1,7,7,14,1,7,8,14,14,8,8,1,14,8,7}) + love.graphics.pop() local imgdata = love.graphics.readbackTexture(canvas) - -- on macOS runners points are drawn 1px off from the target - if GITHUB_RUNNER and love.system.getOS() == 'OS X' then - test.pixel_tolerance = 1 - end test:compareImg(imgdata) end From ff06718f8a7bdfcc48b1fc8af3111402a84d2d5a Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Tue, 27 Feb 2024 23:17:24 -0400 Subject: [PATCH 036/104] opengl: only populate Shader:getWarnings string when there are warnings. --- src/modules/graphics/opengl/Shader.cpp | 2 +- testing/tests/graphics.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index d9f7343e8..eeca919c9 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -600,7 +600,7 @@ std::string Shader::getWarnings() const const std::string &stagewarnings = stage->getWarnings(); - if (ShaderStage::getConstant(stage->getStageType(), stagestr)) + if (!stagewarnings.empty() && ShaderStage::getConstant(stage->getStageType(), stagestr)) warnings += std::string(stagestr) + std::string(" shader:\n") + stagewarnings; } diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index 1c4f3cee3..da473da87 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -803,7 +803,7 @@ love.test.graphics.Shader = function(test) ]] local shader1 = love.graphics.newShader(pixelcode1, vertexcode1, {debugname = 'testshader'}) test:assertObject(shader1) - test:assertEquals('vertex shader:\npixel shader:\n', shader1:getWarnings(), 'check shader valid') + test:assertEquals('', shader1:getWarnings(), 'check shader valid') test:assertFalse(shader1:hasUniform('tex1'), 'check invalid uniform') test:assertTrue(shader1:hasUniform('tex2'), 'check valid uniform') test:assertEquals('testshader', shader1:getDebugName()) From 8ba72d8cf12ca2c46eb98d4c3e11e17007d83002 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Wed, 28 Feb 2024 13:20:11 -0400 Subject: [PATCH 037/104] opengl: the computewrite flag isn't supported for sRGB textures. --- src/modules/graphics/opengl/OpenGL.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 533c2755f..020fa5199 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -2162,8 +2162,6 @@ uint32 OpenGL::getPixelFormatUsageFlags(PixelFormat pixelformat) if (GLAD_ES_VERSION_3_0 || GLAD_VERSION_3_0 || ((GLAD_ARB_framebuffer_sRGB || GLAD_EXT_framebuffer_sRGB) && (GLAD_VERSION_2_1 || GLAD_EXT_texture_sRGB))) flags |= commonrender; - if (GLAD_VERSION_4_3 || GLAD_ES_VERSION_3_1) - flags |= computewrite; break; case PIXELFORMAT_BGRA8_UNORM: case PIXELFORMAT_BGRA8_sRGB: From 990259edf95eabde334628181cd25bd0ef252c6b Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:49:51 +0000 Subject: [PATCH 038/104] more tests - added custom error handler so that love is closed if a crash occurs rather than hang on the graphic screen (for runner crashes mainly) - updated missing functions left todo in todo.md and removed list from readme.md to make it easier to keep track of - added love.audio.getPlaybackDevice(), love.audio.getPlaybackDevices(), love.audio.setPlaybackDevice() - added love.data.ByteData:setString() - added love.filesystem.getFullCommonPath(), love.filesystem.mountFullPath(), love.filesystem.unmountFullPath(), love.filesystem.moundCommonPath(), plus optional b/t/bt params to love.filesystem.load() - added love.keyboard.isModifierActive() - added love.sound.SoundData:copy() and love.sound.SoundData:slice() - added love.graphics.Texture:isCanvas() and love.graphics.Texture:isComputeWritable() - added love.image.ImageData:isLinear(), love.image.ImageData:setLinear(), and love.image.ImageData:encode("*.exr") - added love.image.CompressedImageData:isLinear() and love.image.CompressedImageData:setLinear() - added love.system.getPreferredLocales() - added love.window.focus() and removed love.window.close() (now deprecated) --- testing/classes/TestMethod.lua | 10 ++- testing/conf.lua | 14 ++++ testing/main.lua | 2 + testing/readme.md | 9 +-- testing/resources/pop.ogg | Bin 0 -> 16438 bytes testing/resources/tone.ogg | Bin 0 -> 28105 bytes testing/tests/audio.lua | 60 +++++++++++++++++ testing/tests/data.lua | 4 ++ testing/tests/filesystem.lua | 120 +++++++++++++++++++++++++++++++-- testing/tests/graphics.lua | 14 ++++ testing/tests/image.lua | 22 +++++- testing/tests/keyboard.lua | 13 ++++ testing/tests/sound.lua | 12 ++++ testing/tests/system.lua | 8 +++ testing/tests/window.lua | 22 ++---- testing/todo.md | 40 +++++++++++ 16 files changed, 317 insertions(+), 33 deletions(-) create mode 100644 testing/resources/pop.ogg create mode 100644 testing/resources/tone.ogg create mode 100644 testing/todo.md diff --git a/testing/classes/TestMethod.lua b/testing/classes/TestMethod.lua index f4f8688d6..2061a8187 100644 --- a/testing/classes/TestMethod.lua +++ b/testing/classes/TestMethod.lua @@ -367,11 +367,19 @@ TestMethod = { end, + -- @method - TestMethod:waitFrames() + -- @desc - yields the method for x amount of frames + -- @param {number} frames - no. frames to wait + -- @return {nil} waitFrames = function(self, frames) - for i=1,frames do coroutine.yield() end + for _=1,frames do coroutine.yield() end end, + -- @method - TestMethod:waitSeconds() + -- @desc - yields the method for x amount of seconds + -- @param {number} seconds - no. seconds to wait + -- @return {nil} waitSeconds = function(self, seconds) local start = love.timer.getTime() while love.timer.getTime() < start + seconds do diff --git a/testing/conf.lua b/testing/conf.lua index 787650a49..79e5f16d8 100644 --- a/testing/conf.lua +++ b/testing/conf.lua @@ -1,4 +1,7 @@ +print("conf.lua") + function love.conf(t) + print("love.conf") t.console = true t.window.name = 'love.test' t.window.width = 360 @@ -8,3 +11,14 @@ function love.conf(t) t.window.stencil = true t.renderers = {"opengl"} end + +-- custom crash message here to catch anything that might occur with modules +-- loading before we hit main.lua +local function error_printer(msg, layer) + print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", ""))) +end +function love.errorhandler(msg) + msg = tostring(msg) + error_printer(msg, 2) + os.exit(1) +end diff --git a/testing/main.lua b/testing/main.lua index 6c7b26165..ca2d71608 100644 --- a/testing/main.lua +++ b/testing/main.lua @@ -1,3 +1,5 @@ +print('main.lua') + -- load test objs require('classes.TestSuite') require('classes.TestModule') diff --git a/testing/readme.md b/testing/readme.md index dab1cd7cb..9b328023d 100644 --- a/testing/readme.md +++ b/testing/readme.md @@ -114,14 +114,7 @@ For sanity-checking, if it's currently not covered or it's not possible to test ## Todo If you would like to contribute to the test suite please raise a PR with the main [love-test](https://github.com/ellraiser/love-test) repo. -The following items are all the things still outstanding, expanding on any existing tests is also very welcome! -- [ ] check for any 12.0 methods in the changelog not yet covered in the test suite -- [ ] add BMfont alt. tests for font class tests (Rasterizer + GlyphData) -- [ ] graphics.isCompressed() should have an example of all compressed files -- [ ] graphics.Mesh should have some graphical tests ideally to check vertex settings w/ shaders -- [ ] ability to test loading different combinations of modules if needed -- [ ] more scenario based tests similar to some of the obj class tests -- [ ] performance tests? need to discuss what + how +There is a list of outstanding methods that require test coverage in `todo.md`, expanding on any existing tests is also very welcome! --- diff --git a/testing/resources/pop.ogg b/testing/resources/pop.ogg new file mode 100644 index 0000000000000000000000000000000000000000..fb0a82a7b44207780cf5fa2500e3c8ca7312dcb8 GIT binary patch literal 16438 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 DK%0s{ literal 0 HcmV?d00001 diff --git a/testing/resources/tone.ogg b/testing/resources/tone.ogg new file mode 100644 index 0000000000000000000000000000000000000000..1e7156e479d6bef7e196b6c22e098ea043c9620e GIT binary patch literal 28105 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

?E6D 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%0APB+yiNUK-{&1eu4b0#t0d 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 I{nY~g2eFQKo&W#< literal 0 HcmV?d00001 diff --git a/testing/tests/audio.lua b/testing/tests/audio.lua index 39133ab91..24eb7ea0a 100644 --- a/testing/tests/audio.lua +++ b/testing/tests/audio.lua @@ -299,6 +299,20 @@ love.test.audio.getOrientation = function(test) end +-- love.audio.getPlaybackDevice +love.test.audio.getPlaybackDevice = function(test) + test:assertNotNil(love.audio.getPlaybackDevice) + test:assertNotNil(love.audio.getPlaybackDevice()) +end + + +-- love.audio.getPlaybackDevices +love.test.audio.getPlaybackDevices = function(test) + test:assertNotNil(love.audio.getPlaybackDevices) + test:assertGreaterEqual(0, #love.audio.getPlaybackDevices(), 'check table') +end + + -- love.audio.getPosition -- @NOTE is there an expected default listener pos? love.test.audio.getPosition = function(test) @@ -442,6 +456,52 @@ love.test.audio.setOrientation = function(test) end +-- love.audio.setPlaybackDevice +love.test.audio.setPlaybackDevice = function(test) + -- check method + test:assertNotNil(love.audio.setPlaybackDevice) + -- check blank string name + local success1, msg1 = love.audio.setPlaybackDevice('') + -- check invalid name + local success2, msg2 = love.audio.setPlaybackDevice('loveFM') + -- check setting already set + local success3, msg3 = love.audio.setPlaybackDevice(love.audio.getPlaybackDevice()) -- current name + -- rn on macos all 3 return false + -- whereas linux/windows return true for blank/current, which is expected + -- as openalsoft treats blank as current + if love.system.getOS() == 'OS X' then + test:assertFalse(success1, 'check blank device fails') + test:assertFalse(success2, 'check invalid device fails') + test:assertFalse(success3, 'check existing device fails') + else + test:assertTrue(success1, 'check blank device is fine') + test:assertFalse(success2, 'check invalid device fails') + test:assertTrue(success3, 'check existing device is fine') + end + -- if other devices to play with lets set a different one + local devices = love.audio.getPlaybackDevices() + if #devices > 1 then + local another = '' + local current = love.audio.getPlaybackDevice() + for a=1,#devices do + if devices[a] ~= current then + another = devices[a] + break + end + end + if another ~= '' then + -- check setting new device + local success4, msg4 = love.audio.setPlaybackDevice(another) + test:assertTrue(success4, 'check setting different device') + -- check resetting to default + local success5, msg5 = love.audio.setPlaybackDevice() + test:assertTrue(success5, 'check resetting') + test:assertEquals(current, love.audio.getPlaybackDevice()) + end + end +end + + -- love.audio.setPosition love.test.audio.setPosition = function(test) -- check setting position vals are returned diff --git a/testing/tests/data.lua b/testing/tests/data.lua index 21b66b609..725d25f99 100644 --- a/testing/tests/data.lua +++ b/testing/tests/data.lua @@ -33,6 +33,10 @@ love.test.data.ByteData = function(test) test:assertEquals('o', byte5) end + -- check overwriting the byte data string + data:setString('love!', 5) + test:assertEquals('hellolove!', data:getString(), 'check change string') + end diff --git a/testing/tests/filesystem.lua b/testing/tests/filesystem.lua index 55e112553..c7d76e6f6 100644 --- a/testing/tests/filesystem.lua +++ b/testing/tests/filesystem.lua @@ -187,6 +187,27 @@ love.test.filesystem.getDirectoryItems = function(test) end +-- love.filesystem.getFullCommonPath +love.test.filesystem.getFullCommonPath = function(test) + -- check standard paths + local appsavedir = love.filesystem.getFullCommonPath('appsavedir') + local appdocuments = love.filesystem.getFullCommonPath('appdocuments') + local userhome = love.filesystem.getFullCommonPath('userhome') + local userappdata = love.filesystem.getFullCommonPath('userappdata') + local userdesktop = love.filesystem.getFullCommonPath('userdesktop') + local userdocuments = love.filesystem.getFullCommonPath('userdocuments') + test:assertNotNil(appsavedir) + test:assertNotNil(appdocuments) + test:assertNotNil(userhome) + test:assertNotNil(userappdata) + test:assertNotNil(userdesktop) + test:assertNotNil(userdocuments) + -- check invalid path + local ok = pcall(love.filesystem.getFullCommonPath, 'fakepath') + test:assertFalse(ok, 'check invalid common path') +end + + -- love.filesystem.getIdentity love.test.filesystem.getIdentity = function(test) -- check setting identity matches @@ -263,6 +284,7 @@ love.test.filesystem.getInfo = function(test) test:assertEquals(nil, love.filesystem.getInfo('foo/bar/file2.txt', 'directory'), 'check not directory') test:assertNotEquals(nil, love.filesystem.getInfo('foo/bar/file2.txt'), 'check info not nil') test:assertEquals(love.filesystem.getInfo('foo/bar/file2.txt').size, 5, 'check info size match') + test:assertFalse(love.filesystem.getInfo('foo/bar/file2.txt').readonly, 'check readonly') -- @TODO test modified timestamp from info.modtime? -- cleanup love.filesystem.remove('foo/bar/file2.txt') @@ -300,12 +322,16 @@ love.test.filesystem.load = function(test) love.filesystem.write('test1.lua', 'function test()\nreturn 1\nend\nreturn test()') love.filesystem.write('test2.lua', 'function test()\nreturn 1') -- check file that doesn't exist - local chunk, errormsg = love.filesystem.load('faker.lua') - test:assertEquals(nil, chunk, 'check file doesnt exist') - -- check valid lua file - chunk, errormsg = love.filesystem.load('test1.lua') - test:assertEquals(nil, errormsg, 'check no error message') - test:assertEquals(1, chunk(), 'check lua file runs') + local chunk1, errormsg1 = love.filesystem.load('faker.lua', 'b') + test:assertEquals(nil, chunk1, 'check file doesnt exist') + -- check valid lua file (text load) + local chunk2, errormsg2 = love.filesystem.load('test1.lua', 't') + test:assertEquals(nil, errormsg2, 'check no error message') + test:assertEquals(1, chunk2(), 'check lua file runs') + -- check valid lua file (any load) + local chunk4, errormsg4 = love.filesystem.load('test1.lua', 'bt') + test:assertEquals(nil, errormsg2, 'check no error message') + test:assertEquals(1, chunk4(), 'check lua file runs') -- check invalid lua file local ok, chunk, err = pcall(love.filesystem.load, 'test2.lua') test:assertFalse(ok, 'check invalid lua file') @@ -334,6 +360,88 @@ love.test.filesystem.mount = function(test) end +-- love.filesystem.mountFullPath +love.test.filesystem.mountFullPath = function(test) + -- mount something in the working directory + local mount = love.filesystem.mountFullPath(love.filesystem.getSource() .. '/tests', 'tests', 'read') + test:assertTrue(mount, 'check can mount') + -- check reading file through mounted path label + local contents, _ = love.filesystem.read('tests/audio.lua') + test:assertNotEquals(nil, contents) + local unmount = love.filesystem.unmountFullPath(love.filesystem.getSource() .. '/tests') + test:assertTrue(unmount, 'reset mount') +end + + +-- love.filesystem.unmountFullPath +love.test.filesystem.unmountFullPath = function(test) + -- try unmounting something we never mounted + local unmount1 = love.filesystem.unmountFullPath(love.filesystem.getSource() .. '/faker') + test:assertFalse(unmount1, 'check not mounted to start with') + -- mount something to unmount after + love.filesystem.mountFullPath(love.filesystem.getSource() .. '/tests', 'tests', 'read') + local unmount2 = love.filesystem.unmountFullPath(love.filesystem.getSource() .. '/tests') + test:assertTrue(unmount2, 'check unmounted') +end + + +-- love.filesystem.mountCommonPath +love.test.filesystem.mountCommonPath = function(test) + -- check if we can mount all the expected paths + local mount1 = love.filesystem.mountCommonPath('appsavedir', 'appsavedir', 'readwrite') + local mount2 = love.filesystem.mountCommonPath('appdocuments', 'appdocuments', 'readwrite') + local mount3 = love.filesystem.mountCommonPath('userhome', 'userhome', 'readwrite') + local mount4 = love.filesystem.mountCommonPath('userappdata', 'userappdata', 'readwrite') + -- userdesktop isnt valid on linux + if love.system.getOS() ~= 'Linux' then + local mount5 = love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'readwrite') + test:assertTrue(mount5, 'check mount userdesktop') + end + local mount6 = love.filesystem.mountCommonPath('userdocuments', 'userdocuments', 'readwrite') + local ok = pcall(love.filesystem.mountCommonPath, 'fakepath', 'fake', 'readwrite') + test:assertTrue(mount1, 'check mount appsavedir') + test:assertTrue(mount2, 'check mount appdocuments') + test:assertTrue(mount3, 'check mount userhome') + test:assertTrue(mount4, 'check mount userappdata') + test:assertTrue(mount6, 'check mount userdocuments') + test:assertFalse(ok, 'check mount invalid common path fails') +end + + +-- love.filesystem.unmountCommonPath +--love.test.filesystem.unmountCommonPath = function(test) +-- -- check unmounting invalid +-- local ok = pcall(love.filesystem.unmountCommonPath, 'fakepath') +-- test:assertFalse(ok, 'check unmount invalid common path') +-- -- check mounting valid paths +-- love.filesystem.mountCommonPath('appsavedir', 'appsavedir', 'read') +-- love.filesystem.mountCommonPath('appdocuments', 'appdocuments', 'read') +-- love.filesystem.mountCommonPath('userhome', 'userhome', 'read') +-- love.filesystem.mountCommonPath('userappdata', 'userappdata', 'read') +-- love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'read') +-- love.filesystem.mountCommonPath('userdocuments', 'userdocuments', 'read') +-- local unmount1 = love.filesystem.unmountCommonPath('appsavedir') +-- local unmount2 = love.filesystem.unmountCommonPath('appdocuments') +-- local unmount3 = love.filesystem.unmountCommonPath('userhome') +-- local unmount4 = love.filesystem.unmountCommonPath('userappdata') +-- local unmount5 = love.filesystem.unmountCommonPath('userdesktop') +-- local unmount6 = love.filesystem.unmountCommonPath('userdocuments') +-- test:assertTrue(unmount1, 'check unmount appsavedir') +-- test:assertTrue(unmount2, 'check unmount appdocuments') +-- test:assertTrue(unmount3, 'check unmount userhome') +-- test:assertTrue(unmount4, 'check unmount userappdata') +-- test:assertTrue(unmount5, 'check unmount userdesktop') +-- test:assertTrue(unmount6, 'check unmount userdocuments') +-- -- remount or future tests fail +-- love.filesystem.mountCommonPath('appsavedir', 'appsavedir', 'readwrite') +-- love.filesystem.mountCommonPath('appdocuments', 'appdocuments', 'readwrite') +-- love.filesystem.mountCommonPath('userhome', 'userhome', 'readwrite') +-- love.filesystem.mountCommonPath('userappdata', 'userappdata', 'readwrite') +-- love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'readwrite') +-- love.filesystem.mountCommonPath('userdocuments', 'userdocuments', 'readwrite') +--end + + -- love.filesystem.openFile -- @NOTE this is just basic nil checking, objs have their own test method love.test.filesystem.openFile = function(test) diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index da473da87..ae4079382 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -113,6 +113,8 @@ love.test.graphics.Canvas = function(test) debugname = 'testcanvas' }) test:assertObject(canvas) + test:assertTrue(canvas:isCanvas(), 'check is canvas') + test:assertFalse(canvas:isComputeWritable(), 'check not compute writable') -- check dpi test:assertEquals(love.graphics.getDPIScale(), canvas:getDPIScale(), 'check dpi scale') @@ -216,6 +218,16 @@ love.test.graphics.Canvas = function(test) dcanvas:setDepthSampleMode('equal') test:assertEquals('equal', dcanvas:getDepthSampleMode(), 'check depth sample mode set') + -- check compute writeable (wont work on opengl mac) + if love.graphics.getSupported().glsl4 then + local ccanvas = love.graphics.newCanvas(100, 100, { + type = '2d', + format = 'rgba8', + computewrite = true + }) + test:assertTrue(ccanvas:isComputeWritable()) + end + end @@ -303,6 +315,8 @@ love.test.graphics.Image = function(test) mipmaps = true }) test:assertObject(image) + test:assertFalse(image:isCanvas(), 'check not canvas') + test:assertFalse(image:isComputeWritable(), 'check not compute writable') -- check dpi test:assertEquals(love.graphics.getDPIScale(), image:getDPIScale(), 'check dpi scale') diff --git a/testing/tests/image.lua b/testing/tests/image.lua index fa9f4cbd2..7cdcc878b 100644 --- a/testing/tests/image.lua +++ b/testing/tests/image.lua @@ -32,6 +32,11 @@ love.test.image.CompressedImageData = function(test) -- check mipmap count test:assertEquals(7, idata:getMipmapCount(), 'check mipmap count') + -- check linear + test:assertFalse(idata:isLinear(), 'check not linear') + idata:setLinear(true) + test:assertTrue(idata:isLinear(), 'check now linear') + end @@ -78,12 +83,23 @@ love.test.image.ImageData = function(test) local r2, g2, b2 = idata:getPixel(25, 25) test:assertEquals(1, r2+g2+b2, 'check set to red') - -- check encoding to an image + -- check encoding to an image (png) idata:encode('png', 'test-encode.png') - local read = love.filesystem.openFile('test-encode.png', 'r') - test:assertNotNil(read) + local read1 = love.filesystem.openFile('test-encode.png', 'r') + test:assertNotNil(read1) love.filesystem.remove('test-encode.png') + -- check encoding to an image (exr) + idata:encode('png', 'test-encode.exr') + local read2 = love.filesystem.openFile('test-encode.exr', 'r') + test:assertNotNil(read2) + love.filesystem.remove('test-encode.exr') + + -- check linear + test:assertFalse(idata:isLinear(), 'check not linear') + idata:setLinear(true) + test:assertTrue(idata:isLinear(), 'check now linear') + end diff --git a/testing/tests/keyboard.lua b/testing/tests/keyboard.lua index e7a4f5630..c8f9748c9 100644 --- a/testing/tests/keyboard.lua +++ b/testing/tests/keyboard.lua @@ -64,6 +64,19 @@ love.test.keyboard.setKeyRepeat = function(test) end +-- love.keyboard.isModifierActive +love.test.keyboard.isModifierActive = function(test) + local active1 = love.keyboard.isModifierActive('numlock') + local active2 = love.keyboard.isModifierActive('capslock') + local active3 = love.keyboard.isModifierActive('scrolllock') + local active4 = love.keyboard.isModifierActive('mode') + test:assertNotNil(active1) + test:assertNotNil(active2) + test:assertNotNil(active3) + test:assertNotNil(active4) +end + + -- love.keyboard.setTextInput love.test.keyboard.setTextInput = function(test) love.keyboard.setTextInput(false) diff --git a/testing/tests/sound.lua b/testing/tests/sound.lua index 0304d0562..d5032cb30 100644 --- a/testing/tests/sound.lua +++ b/testing/tests/sound.lua @@ -80,6 +80,18 @@ love.test.sound.SoundData = function(test) sdata:setSample(0.002, 1) test:assertEquals(1, sdata:getSample(0.002), 'check setting sample manually') + -- check copying from another sound + local copy1 = love.sound.newSoundData('resources/tone.ogg') + local copy2 = love.sound.newSoundData('resources/pop.ogg') + local before = copy2:getSample(0.02) + copy2:copyFrom(copy1, 0.01, 1, 0.02) + test:assertNotEquals(before, copy2:getSample(0.02), 'check changed') + + -- check slicing + local count = math.floor(copy1:getSampleCount()/2) + local slice = copy1:slice(0, count) + test:assertEquals(count, slice:getSampleCount(), 'check slice length') + end diff --git a/testing/tests/system.lua b/testing/tests/system.lua index e8ef4229c..88912d525 100644 --- a/testing/tests/system.lua +++ b/testing/tests/system.lua @@ -29,6 +29,14 @@ love.test.system.getOS = function(test) end +-- love.system.getPreferredLocales +love.test.system.getPreferredLocales = function(test) + local locale = love.system.getPreferredLocales() + test:assertNotNil(locale) + test:assertEquals('table', type(locale), 'check returns table') +end + + -- love.system.getPowerInfo love.test.system.getPowerInfo = function(test) -- check battery state is one of the documented states diff --git a/testing/tests/window.lua b/testing/tests/window.lua index b1c993776..98cfc2f43 100644 --- a/testing/tests/window.lua +++ b/testing/tests/window.lua @@ -8,6 +8,13 @@ -------------------------------------------------------------------------------- +-- love.window.focus +love.test.window.focus = function(test) + -- cant test as doesnt return anything + test:assertEquals('function', type(love.window.focus), 'check method exists') +end + + -- love.window.fromPixels love.test.window.fromPixels = function(test) -- check dpi/pixel ratio as expected @@ -352,18 +359,3 @@ love.test.window.updateMode = function(test) resizable = true }) end - --- love.window.close --- calling love.window.close() last as it will stop the main test image drawing -love.test.window.z_close = function(test) - -- closing window should cause graphics to not be active - love.window.close() - local active = love.graphics.isActive() - test:assertFalse(active, 'check window not active') - -- should also mark the window as not open and not visible - test:assertFalse(love.window.isOpen(), 'check window closed') - test:assertFalse(love.window.isVisible(), 'check window not visible') - love.window.updateMode(360, 240) -- reset - active = love.graphics.isActive() - test:assertTrue(active, 'check window active again') -end diff --git a/testing/todo.md b/testing/todo.md new file mode 100644 index 000000000..026148b81 --- /dev/null +++ b/testing/todo.md @@ -0,0 +1,40 @@ +# TODO +These are all the outstanding methods that require test coverage, along with a few bits that still need doing / discussion. + +## General +- ability to test loading different combinations of modules if needed? +- performance tests? need to discuss what + how, might be better as a seperate thing +- check expected behaviour of mount + unmount with common path + try uncommenting love.filesystem.unmountCommonPath and you'll see the issues +- revisit love.audio.setPlaybackDevice when we update openal soft for MacOS + +## Physics +- love.physics.World:rayCastAny +- love.physics.World:rayCastClosest +- love.physics.World:getShapesInArea +- love.physics.Body:getShapes +- love.physics.Body:getShape +- love.physics.Body:hasCustomMassData + +## Graphics +- love.graphics.copyBuffer +- love.graphics.copyBufferToTexture +- love.graphics.copyTextureToBuffer +- love.graphics.readbackTexture +- love.graphics.readbackTextureAsync +- love.graphics.readbackBuffer +- love.graphics.readbackBufferAsync +- love.graphics.newComputeShader +- love.graphics.dispatchThreadgroupos +- love.graphics.dispatchIndirect +- love.graphics.newTexture +- love.graphics.drawFromShader +- love.graphics.drawFromShaderIndirect +- love.graphics.drawIndirect +- love.graphics.getQuadIndexBuffer +- love.graphics.setBlendState +- love.graphics.setOrthoProjection +- love.graphics.setPerspectiveProjection +- love.graphics.resetProjection +- Mesh:getAttachedAttributes +- Shader:hasStage From 7cc3816bec4e2d0a131f849df9d5a926cd621850 Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Wed, 28 Feb 2024 18:38:43 +0000 Subject: [PATCH 039/104] finish physics module coverage - love.physics.World:rayCastAny() - love.physics.World:rayCastClosest() - love.physics.World:getShapesInArea() - love.physics.Body:getShapes() - love.physics.Body:getShape() - love.physics.Body:hasCustomMassData() --- testing/tests/physics.lua | 13 +++++++++++++ testing/todo.md | 12 ++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/testing/tests/physics.lua b/testing/tests/physics.lua index 974c89a84..5e4662526 100644 --- a/testing/tests/physics.lua +++ b/testing/tests/physics.lua @@ -19,6 +19,12 @@ love.test.physics.Body = function(test) love.physics.newRectangleShape(body2, 5, 5, 10, 10) test:assertObject(body1) + -- check shapes + test:assertEquals(1, #body1:getShapes(), 'check shapes total 1') + test:assertEquals(1, #body2:getShapes(), 'check shapes total 2') + test:assertNotEquals(nil, body1:getShape(), 'check shape 1') + test:assertNotEquals(nil, body2:getShape(), 'check shape 2') + -- check body active test:assertTrue(body1:isActive(), 'check active by def') @@ -135,6 +141,7 @@ love.test.physics.Body = function(test) test:assertRange(y5, 5, 6, 'check mass data reset y') test:assertRange(mass5, 0.1, 0.2, 'check mass data reset mass') test:assertRange(inertia5, 5, 6, 'check mass data reset inertia') + test:assertFalse(body1:hasCustomMassData()) -- check position local x6, y6 = body1:getPosition() @@ -515,6 +522,10 @@ love.test.physics.World = function(test) test:assertRange(world:getBodies()[1]:getY(), 9, 11, 'check body prop change y') test:assertEquals(1, world:getBodyCount(), 'check 1 body count') + -- check shapes in world + test:assertEquals(1, #world:getShapesInArea(0, 0, 10, 10), 'check shapes in area #1') + test:assertEquals(0, #world:getShapesInArea(20, 20, 30, 30), 'check shapes in area #1') + -- check world status test:assertFalse(world:isLocked(), 'check not updating') test:assertFalse(world:isSleepingAllowed(), 'check no sleep (till brooklyn)') @@ -571,6 +582,8 @@ love.test.physics.World = function(test) return 1 end) test:assertEquals(3, shapes, 'check shapes in raycast') + test:assertEquals(world:rayCastClosest(0, 0, 200, 200), rectangle1, 'check closest raycast') + test:assertNotEquals(nil, world:rayCastAny(0, 0, 200, 200), 'check any raycast') -- change collision logic test:assertEquals(nil, world:getContactFilter(), 'check def filter') diff --git a/testing/todo.md b/testing/todo.md index 026148b81..7339d96e5 100644 --- a/testing/todo.md +++ b/testing/todo.md @@ -8,14 +8,6 @@ These are all the outstanding methods that require test coverage, along with a f try uncommenting love.filesystem.unmountCommonPath and you'll see the issues - revisit love.audio.setPlaybackDevice when we update openal soft for MacOS -## Physics -- love.physics.World:rayCastAny -- love.physics.World:rayCastClosest -- love.physics.World:getShapesInArea -- love.physics.Body:getShapes -- love.physics.Body:getShape -- love.physics.Body:hasCustomMassData - ## Graphics - love.graphics.copyBuffer - love.graphics.copyBufferToTexture @@ -36,5 +28,5 @@ These are all the outstanding methods that require test coverage, along with a f - love.graphics.setOrthoProjection - love.graphics.setPerspectiveProjection - love.graphics.resetProjection -- Mesh:getAttachedAttributes -- Shader:hasStage +- love.graphics.Mesh:getAttachedAttributes +- love.graphics.Shader:hasStage From fe56f88f8eda6d0f0cbb15550ecbbb847c8a569f Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Wed, 28 Feb 2024 17:55:37 -0400 Subject: [PATCH 040/104] opengl es: expand support for rendering to floating point formats. --- src/modules/graphics/opengl/OpenGL.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 020fa5199..68446af0a 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -2188,7 +2188,7 @@ uint32 OpenGL::getPixelFormatUsageFlags(PixelFormat pixelformat) flags |= commonsample | commonrender; if (GLAD_ES_VERSION_3_0 || (GLAD_OES_texture_half_float && GLAD_EXT_texture_rg)) flags |= commonsample; - if (GLAD_EXT_color_buffer_half_float && (GLAD_ES_VERSION_3_0 || GLAD_EXT_texture_rg)) + if ((GLAD_EXT_color_buffer_half_float || GLAD_EXT_color_buffer_float) && (GLAD_ES_VERSION_3_0 || GLAD_EXT_texture_rg)) flags |= commonrender; if (!(GLAD_VERSION_1_1 || GLAD_ES_VERSION_3_0 || GLAD_OES_texture_half_float_linear)) flags &= ~PIXELFORMATUSAGEFLAGS_LINEAR; @@ -2200,7 +2200,7 @@ uint32 OpenGL::getPixelFormatUsageFlags(PixelFormat pixelformat) flags |= commonsample | commonrender; if (GLAD_ES_VERSION_3_0 || GLAD_OES_texture_half_float) flags |= commonsample; - if (GLAD_EXT_color_buffer_half_float) + if (GLAD_EXT_color_buffer_half_float || GLAD_EXT_color_buffer_float) flags |= commonrender; if (!(GLAD_VERSION_1_1 || GLAD_ES_VERSION_3_0 || GLAD_OES_texture_half_float_linear)) flags &= ~PIXELFORMATUSAGEFLAGS_LINEAR; @@ -2216,6 +2216,8 @@ uint32 OpenGL::getPixelFormatUsageFlags(PixelFormat pixelformat) flags |= commonsample | commonrender; if (GLAD_ES_VERSION_3_0 || (GLAD_OES_texture_float && GLAD_EXT_texture_rg)) flags |= commonsample; + if (GLAD_EXT_color_buffer_float) + flags |= commonrender; if (!(GLAD_VERSION_1_1 || GLAD_ES_VERSION_3_0 || GLAD_OES_texture_half_float_linear)) flags &= ~PIXELFORMATUSAGEFLAGS_LINEAR; if (GLAD_VERSION_4_3) @@ -2226,6 +2228,8 @@ uint32 OpenGL::getPixelFormatUsageFlags(PixelFormat pixelformat) flags |= commonsample | commonrender; if (GLAD_ES_VERSION_3_0 || GLAD_OES_texture_float) flags |= commonsample; + if (GLAD_EXT_color_buffer_float) + flags |= commonrender; if (!(GLAD_VERSION_1_1 || GLAD_OES_texture_float_linear)) flags &= ~PIXELFORMATUSAGEFLAGS_LINEAR; if (GLAD_VERSION_4_3 || GLAD_ES_VERSION_3_1) @@ -2293,10 +2297,12 @@ uint32 OpenGL::getPixelFormatUsageFlags(PixelFormat pixelformat) flags |= computewrite; break; case PIXELFORMAT_RG11B10_FLOAT: - if (GLAD_VERSION_3_0 || GLAD_EXT_packed_float || GLAD_APPLE_texture_packed_float) + if (GLAD_ES_VERSION_3_1 || GLAD_VERSION_3_0 || GLAD_EXT_packed_float || GLAD_APPLE_texture_packed_float) flags |= commonsample; if (GLAD_VERSION_3_0 || GLAD_EXT_packed_float || GLAD_APPLE_color_buffer_packed_float) flags |= commonrender; + if (GLAD_EXT_color_buffer_float) + flags |= commonrender; if (GLAD_VERSION_4_3) flags |= computewrite; break; From 3dfa13e60c27a4eab3c139e7c0a609f13be5331a Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:20:18 +0000 Subject: [PATCH 041/104] requested changes --- testing/conf.lua | 4 +--- testing/main.lua | 2 -- testing/tests/image.lua | 3 ++- testing/todo.md | 42 ++++++++++++++++++++--------------------- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/testing/conf.lua b/testing/conf.lua index 79e5f16d8..3a9532780 100644 --- a/testing/conf.lua +++ b/testing/conf.lua @@ -1,5 +1,3 @@ -print("conf.lua") - function love.conf(t) print("love.conf") t.console = true @@ -20,5 +18,5 @@ end function love.errorhandler(msg) msg = tostring(msg) error_printer(msg, 2) - os.exit(1) + return nil end diff --git a/testing/main.lua b/testing/main.lua index ca2d71608..6c7b26165 100644 --- a/testing/main.lua +++ b/testing/main.lua @@ -1,5 +1,3 @@ -print('main.lua') - -- load test objs require('classes.TestSuite') require('classes.TestModule') diff --git a/testing/tests/image.lua b/testing/tests/image.lua index 7cdcc878b..db98882d4 100644 --- a/testing/tests/image.lua +++ b/testing/tests/image.lua @@ -90,7 +90,8 @@ love.test.image.ImageData = function(test) love.filesystem.remove('test-encode.png') -- check encoding to an image (exr) - idata:encode('png', 'test-encode.exr') + local edata = love.image.newImageData(100, 100, 'r16f') + edata:encode('exr', 'test-encode.exr') local read2 = love.filesystem.openFile('test-encode.exr', 'r') test:assertNotNil(read2) love.filesystem.remove('test-encode.exr') diff --git a/testing/todo.md b/testing/todo.md index 7339d96e5..e5f5789ae 100644 --- a/testing/todo.md +++ b/testing/todo.md @@ -9,24 +9,24 @@ These are all the outstanding methods that require test coverage, along with a f - revisit love.audio.setPlaybackDevice when we update openal soft for MacOS ## Graphics -- love.graphics.copyBuffer -- love.graphics.copyBufferToTexture -- love.graphics.copyTextureToBuffer -- love.graphics.readbackTexture -- love.graphics.readbackTextureAsync -- love.graphics.readbackBuffer -- love.graphics.readbackBufferAsync -- love.graphics.newComputeShader -- love.graphics.dispatchThreadgroupos -- love.graphics.dispatchIndirect -- love.graphics.newTexture -- love.graphics.drawFromShader -- love.graphics.drawFromShaderIndirect -- love.graphics.drawIndirect -- love.graphics.getQuadIndexBuffer -- love.graphics.setBlendState -- love.graphics.setOrthoProjection -- love.graphics.setPerspectiveProjection -- love.graphics.resetProjection -- love.graphics.Mesh:getAttachedAttributes -- love.graphics.Shader:hasStage +- love.graphics.copyBuffer() +- love.graphics.copyBufferToTexture() +- love.graphics.copyTextureToBuffer() +- love.graphics.readbackTexture() +- love.graphics.readbackTextureAsync() +- love.graphics.readbackBuffer() +- love.graphics.readbackBufferAsync() +- love.graphics.newComputeShader() +- love.graphics.dispatchThreadgroups() +- love.graphics.dispatchIndirect() +- love.graphics.newTexture() +- love.graphics.drawFromShader() +- love.graphics.drawFromShaderIndirect() +- love.graphics.drawIndirect() +- love.graphics.getQuadIndexBuffer() +- love.graphics.setBlendState() +- love.graphics.setOrthoProjection() +- love.graphics.setPerspectiveProjection() +- love.graphics.resetProjection() +- love.graphics.Mesh:getAttachedAttributes() +- love.graphics.Shader:hasStage() From 23bd9110ddd2af5f5ef83314022c019928a639d3 Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:54:49 +0000 Subject: [PATCH 042/104] add callback variant for love.graphics.captureScreenshot --- testing/tests/graphics.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index ae4079382..bc338b94d 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -1550,6 +1550,11 @@ love.test.graphics.captureScreenshot = function(test) -- need to wait until end of the frame for the screenshot test:assertNotNil(love.filesystem.openFile('example-screenshot.png', 'r')) love.filesystem.remove('example-screenshot.png') + -- test callback version + love.graphics.captureScreenshot(function (idata) + test:assertNotEquals(nil, idata, 'check we have image data') + end) + test:waitFrames(10) end From ced6448011ad19b8646099edadb9facf3644a007 Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:17:14 +0000 Subject: [PATCH 043/104] attempt to fix opengl ES not running as ES on windows runner --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42eadf0b2..7298d16e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -344,8 +344,9 @@ jobs: # windows opengles tests - name: Run Tests (opengles) if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' + env: + LOVE_GRAPHICS_USE_OPENGLES: 1 run: | - $ENV:LOVE_GRAPHICS_USE_OPENGLES=1 powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --runAllTests --isRunner - name: Love Test Report (opengles) id: report2 From c7e7565a3cd67b5fcd8dc8cd4c01be7cf3f061f8 Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:49:24 +0000 Subject: [PATCH 044/104] indentation --- testing/conf.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testing/conf.lua b/testing/conf.lua index 3a9532780..a954b3119 100644 --- a/testing/conf.lua +++ b/testing/conf.lua @@ -13,10 +13,9 @@ end -- custom crash message here to catch anything that might occur with modules -- loading before we hit main.lua local function error_printer(msg, layer) - print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", ""))) + print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", ""))) end function love.errorhandler(msg) - msg = tostring(msg) - error_printer(msg, 2) - return nil + msg = tostring(msg) + error_printer(msg, 2) end From 01fbedb225f16ed7f62c8576f1dcc4b15f20096a Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 3 Mar 2024 12:40:23 -0400 Subject: [PATCH 045/104] vulkan: improve some error messages when shader compilation fails. --- src/modules/graphics/vulkan/Shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index 63e90b601..96f073caf 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -59,7 +59,7 @@ class BindingMapper uint32_t binaryBindingOffset; if (!comp.get_binary_offset_for_decoration(id, spv::DecorationBinding, binaryBindingOffset)) - throw love::Exception("could not get binary offset for binding"); + throw love::Exception("could not get binary offset for uniform %s binding", name.c_str()); spirv[binaryBindingOffset] = freeBinding; @@ -826,7 +826,7 @@ void Shader::compileShaders() uint32_t locationOffset; if (!comp.get_binary_offset_for_decoration(r.id, spv::DecorationLocation, locationOffset)) - throw love::Exception("could not get binary offset for location"); + throw love::Exception("could not get binary offset for vertex attribute %s location", r.name.c_str()); spirv[locationOffset] = (uint32_t)index; From 026e9f164a02f7d8e14bc24f07f450d1e287c8ae Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Tue, 5 Mar 2024 21:01:05 -0400 Subject: [PATCH 046/104] tests: add a few more shader uniform tests --- testing/tests/graphics.lua | 57 ++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index bc338b94d..ca24c4406 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -804,7 +804,7 @@ love.test.graphics.Shader = function(test) -- check valid shader local pixelcode1 = [[ - extern Image tex2; + uniform Image tex2; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texturecolor = Texel(tex2, texture_coords); return texturecolor * color; @@ -824,7 +824,7 @@ love.test.graphics.Shader = function(test) -- check invalid shader local pixelcode2 = [[ - extern float ww; + uniform float ww; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texturecolor = Texel(tex, texture_coords); float unused = ww * 3 * color; @@ -837,8 +837,8 @@ love.test.graphics.Shader = function(test) -- check using a shader to draw + sending uniforms -- shader will return a given color if overwrite set to 1, otherwise def. draw local pixelcode3 = [[ - extern vec4 col; - extern float overwrite; + uniform vec4 col; + uniform float overwrite; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texcol = Texel(tex, texture_coords); if (overwrite == 1.0) { @@ -850,7 +850,8 @@ love.test.graphics.Shader = function(test) ]] local shader3 = love.graphics.newShader(pixelcode3, vertexcode1) local canvas = love.graphics.newCanvas(16, 16) - love.graphics.setCanvas(canvas) + love.graphics.push("all") + love.graphics.setCanvas(canvas) -- set color to yellow love.graphics.setColor(1, 1, 0, 1) -- turn shader 'on' and use red to draw @@ -863,9 +864,8 @@ love.test.graphics.Shader = function(test) shader3:send('overwrite', 0) love.graphics.setShader(shader3) love.graphics.rectangle('fill', 8, 8, 8, 8) - love.graphics.setShader() - love.graphics.setColor(1, 1, 1, 1) - love.graphics.setCanvas() + love.graphics.pop() + local imgdata = love.graphics.readbackTexture(canvas) test:assertPixels(imgdata, { red = {{1,1},{1,7},{7,7},{7,1}}, @@ -873,6 +873,47 @@ love.test.graphics.Shader = function(test) }, 'shader draw check') test:compareImg(imgdata) + -- test some uncommon paths for shader uniforms + local shader4 = love.graphics.newShader[[ + uniform bool booleans[5]; + vec4 effect(vec4 vcolor, Image tex, vec2 tc, vec2 pc) { + return booleans[3] ? vec4(0, 1, 0, 0) : vec4(1, 0, 0, 0); + } + ]] + + shader4:send("booleans", false, true, true) + + local shader5 = love.graphics.newShader[[ + uniform sampler2D textures[5]; + vec4 effect(vec4 vcolor, Image tex, vec2 tc, vec2 pc) { + return Texel(textures[2], tc) + Texel(textures[3], tc); + } + ]] + + local canvas2 = love.graphics.newCanvas(1, 1) + love.graphics.setCanvas(canvas2) + love.graphics.clear(0, 0.5, 0, 1) + love.graphics.setCanvas() + + shader5:send("textures", canvas2, canvas2, canvas2, canvas2, canvas2) + + local shader6 = love.graphics.newShader[[ + struct Data { + bool boolValue; + float floatValue; + sampler2D tex; + }; + + uniform Data data[3]; + + vec4 effect(vec4 vcolor, Image tex, vec2 tc, vec2 pc) { + return data[1].boolValue ? Texel(data[0].tex, tc) : vec4(0.0, 0.0, 0.0, 0.0); + } + ]] + + shader6:send("data[1].boolValue", true) + shader6:send("data[0].tex", canvas2) + end From 32e777c156d379f41ef79ab1274847c7b6f6d272 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Tue, 5 Mar 2024 23:03:55 -0400 Subject: [PATCH 047/104] vulkan: fix a crash. --- src/modules/graphics/vulkan/Graphics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index 084c2b836..d64aa3bff 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -449,7 +449,7 @@ class Graphics final : public love::graphics::Graphics std::vector>> cleanUpFunctions; std::vector>> readbackCallbacks; std::vector screenshotReadbackBuffers; - std::set usedShadersInFrame; + std::set> usedShadersInFrame; RenderpassState renderPassState; }; From 81599fed93f0a7d2a1c23955d2413045e367e1d6 Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Wed, 6 Mar 2024 09:18:44 +0000 Subject: [PATCH 048/104] small update - removed assertPixels() - added exportImg() to help graphics test writing (sets the "expected" image for the test) - added "deflate" variants to love.data.compress() --- testing/classes/TestMethod.lua | 51 ++--- .../expected/love.test.graphics.scale-1.png | Bin 0 -> 84 bytes testing/readme.md | 1 - testing/tests/data.lua | 9 +- testing/tests/graphics.lua | 207 +----------------- 5 files changed, 29 insertions(+), 239 deletions(-) create mode 100644 testing/output/expected/love.test.graphics.scale-1.png diff --git a/testing/classes/TestMethod.lua b/testing/classes/TestMethod.lua index 2061a8187..a90e6921e 100644 --- a/testing/classes/TestMethod.lua +++ b/testing/classes/TestMethod.lua @@ -123,38 +123,6 @@ TestMethod = { end, - -- @method - TestMethod:assertPixels() - -- @desc - checks a list of coloured pixels agaisnt given imgdata - -- @param {ImageData} imgdata - image data to check - -- @param {table} pixelchecks - map of colors to list of pixel coords, i.e. - -- { blue = { {1, 1}, {2, 2}, {3, 4} } } - -- @return {nil} - assertPixels = function(self, imgdata, pixelchecks, label) - for i, v in pairs(pixelchecks) do - local col = self.colors[i] - local pixels = v - for p=1,#pixels do - local coord = pixels[p] - local tr, tg, tb, ta = imgdata:getPixel(coord[1], coord[2]) - local compare_id = tostring(coord[1]) .. ',' .. tostring(coord[2]) - -- prevent us getting stuff like 0.501960785 for 0.5 red - tr = math.floor((tr*10)+0.5)/10 - tg = math.floor((tg*10)+0.5)/10 - tb = math.floor((tb*10)+0.5)/10 - ta = math.floor((ta*10)+0.5)/10 - col[1] = math.floor((col[1]*10)+0.5)/10 - col[2] = math.floor((col[2]*10)+0.5)/10 - col[3] = math.floor((col[3]*10)+0.5)/10 - col[4] = math.floor((col[4]*10)+0.5)/10 - self:assertEquals(col[1], tr, 'check pixel r for ' .. i .. ' at ' .. compare_id .. '(' .. label .. ')') - self:assertEquals(col[2], tg, 'check pixel g for ' .. i .. ' at ' .. compare_id .. '(' .. label .. ')') - self:assertEquals(col[3], tb, 'check pixel b for ' .. i .. ' at ' .. compare_id .. '(' .. label .. ')') - self:assertEquals(col[4], ta, 'check pixel a for ' .. i .. ' at ' .. compare_id .. '(' .. label .. ')') - end - end - end, - - -- @method - TestMethod:assertRange() -- @desc - used to check a value is within an expected range -- @param {number} actual - actual value of the test @@ -350,13 +318,30 @@ TestMethod = { ) end end - local path = 'tempoutput/actual/love.test.graphics.' .. + local path = 'tempoutput/actual/love.test.graphics.' .. self.method .. '-' .. tostring(self.imgs) .. '.png' imgdata:encode('png', path) self.imgs = self.imgs + 1 end, + -- @method - TestMethod:exportImg() + -- @desc - exports the given imgdata to the 'output/expected/' folder, to use when + -- writing new graphics tests to set the expected image output + -- @NOTE - you should not leave this method in when you are finished this is + -- for test writing only + -- @param {table} imgdata - imgdata to save as a png + -- @param {integer} imgdata - index of the png, graphic tests are run sequentially + -- and each test image is numbered in order that its + -- compared to, so set the number here to match + -- @return {nil} + exportImg = function(self, imgdata, index) + local path = 'tempoutput/expected/love.test.graphics.' .. + self.method .. '-' .. tostring(index) .. '.png' + imgdata:encode('png', path) + end, + + -- @method - TestMethod:skipTest() -- @desc - used to mark this test as skipped for a specific reason -- @param {string} reason - reason why method is being skipped diff --git a/testing/output/expected/love.test.graphics.scale-1.png b/testing/output/expected/love.test.graphics.scale-1.png new file mode 100644 index 0000000000000000000000000000000000000000..a97348e509ee00fea8cf1432a82a5b89df82c91a GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;bAV5X>wg9Y$w!>#KrWA`i(^Q| doa6)rULenafl;h;) Date: Wed, 6 Mar 2024 09:41:57 +0000 Subject: [PATCH 049/104] handle missing expected img for compareImg() --- testing/classes/TestMethod.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testing/classes/TestMethod.lua b/testing/classes/TestMethod.lua index a90e6921e..1f336d06b 100644 --- a/testing/classes/TestMethod.lua +++ b/testing/classes/TestMethod.lua @@ -270,10 +270,11 @@ TestMethod = { -- @param {table} imgdata - imgdata to save as a png -- @return {nil} compareImg = function(self, imgdata) - local expected = love.image.newImageData( - 'tempoutput/expected/love.test.graphics.' .. self.method .. '-' .. - tostring(self.imgs) .. '.png' - ) + local expected_path = 'tempoutput/expected/love.test.graphics.' .. + self.method .. '-' .. tostring(self.imgs) .. '.png' + local ok, chunk, _ = pcall(love.image.newImageData, expected_path) + if ok == false then return self:assertEquals(true, false, chunk) end + local expected = chunk local iw = imgdata:getWidth()-2 local ih = imgdata:getHeight()-2 local rgba_tolerance = self.rgba_tolerance * (1/255) From 3509e651fdb634ed7011a18c5e7087a53a4a4b9d Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Wed, 6 Mar 2024 14:23:18 -0400 Subject: [PATCH 050/104] Fix Texture:getWidth for texture views. --- src/modules/graphics/Texture.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/graphics/Texture.cpp b/src/modules/graphics/Texture.cpp index a880a51e8..edae44ff7 100644 --- a/src/modules/graphics/Texture.cpp +++ b/src/modules/graphics/Texture.cpp @@ -166,8 +166,8 @@ Texture::Texture(Graphics *gfx, const Settings &settings, const Slices *slices) , format(settings.format) , renderTarget(settings.renderTarget) , computeWrite(settings.computeWrite) - , viewFormats(settings.viewFormats) , readable(true) + , viewFormats(settings.viewFormats) , mipmapsMode(settings.mipmaps) , width(settings.width) , height(settings.height) @@ -336,8 +336,8 @@ Texture::Texture(Graphics *gfx, Texture *base, const ViewSettings &viewsettings) , format(viewsettings.format.get(base->getPixelFormat())) , renderTarget(base->renderTarget) , computeWrite(base->computeWrite) - , viewFormats(base->viewFormats) , readable(base->readable) + , viewFormats(base->viewFormats) , mipmapsMode(base->mipmapsMode) , width(1) , height(1) @@ -354,7 +354,7 @@ Texture::Texture(Graphics *gfx, Texture *base, const ViewSettings &viewsettings) , rootView({base->rootView.texture, 0, 0}) , parentView({base, viewsettings.mipmapStart.get(0), viewsettings.layerStart.get(0)}) { - width = base->getHeight(parentView.startMipmap); + width = base->getWidth(parentView.startMipmap); height = base->getHeight(parentView.startMipmap); if (texType == TEXTURE_VOLUME) From 99af5765fc60e584fafdd8554cedb040adc117c7 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Thu, 7 Mar 2024 21:00:45 -0400 Subject: [PATCH 051/104] tests: don't skip love.graphics.isActive test on vulkan --- testing/tests/graphics.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index 4522e2487..a7bf8e970 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -1890,12 +1890,7 @@ end -- love.graphics.isActive love.test.graphics.isActive = function(test) - local name, version, vendor, device = love.graphics.getRendererInfo() - if string.find(name, 'Vulkan') ~= nil then - test:skipTest('love.graphics.isActive() crashes on Vulkan') - else - test:assertTrue(love.graphics.isActive(), 'check graphics is active') -- i mean if you got this far - end + test:assertTrue(love.graphics.isActive(), 'check graphics is active') -- i mean if you got this far end From 2079f657e7deaa1f2ba7924af798482cc7a3b0d9 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Thu, 7 Mar 2024 21:24:11 -0400 Subject: [PATCH 052/104] graphics: most uniform reflection is handled at a higher level instead of backend code. Fixes boolean uniforms when Metal is used. --- src/modules/graphics/Shader.cpp | 305 ++++++++--- src/modules/graphics/Shader.h | 60 +-- src/modules/graphics/ShaderStage.h | 8 + src/modules/graphics/metal/Shader.h | 5 +- src/modules/graphics/metal/Shader.mm | 258 ++++------ src/modules/graphics/opengl/Shader.cpp | 684 ++++--------------------- src/modules/graphics/opengl/Shader.h | 9 - src/modules/graphics/vulkan/Shader.cpp | 281 ++++------ src/modules/graphics/vulkan/Shader.h | 4 - src/modules/graphics/wrap_Shader.cpp | 11 +- 10 files changed, 553 insertions(+), 1072 deletions(-) diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index cfe9e1a6c..636750d90 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -691,9 +691,48 @@ Shader::Shader(StrongRef _stages[], const CompileOptions &options) , debugName(options.debugName) { std::string err; - if (!validateInternal(_stages, err, validationReflection)) + if (!validateInternal(_stages, err, reflection)) throw love::Exception("%s", err.c_str()); + activeTextures.resize(reflection.textureCount); + activeBuffers.resize(reflection.bufferCount); + + auto gfx = Module::getInstance(Module::M_GRAPHICS); + + // Default bindings for read-only resources. + for (const auto &kvp : reflection.allUniforms) + { + const auto &u = *kvp.second; + + if (u.resourceIndex < 0) + continue; + + if ((u.access & ACCESS_WRITE) != 0) + continue; + + if (u.baseType == UNIFORM_SAMPLER || u.baseType == UNIFORM_STORAGETEXTURE) + { + auto tex = gfx->getDefaultTexture(u.textureType, u.dataBaseType); + for (int i = 0; i < u.count; i++) + { + tex->retain(); + activeTextures[u.resourceIndex + i] = tex; + } + } + else if (u.baseType == UNIFORM_TEXELBUFFER || u.baseType == UNIFORM_STORAGEBUFFER) + { + auto buffer = u.baseType == UNIFORM_TEXELBUFFER + ? gfx->getDefaultTexelBuffer(u.dataBaseType) + : gfx->getDefaultStorageBuffer(); + + for (int i = 0; i < u.count; i++) + { + buffer->retain(); + activeBuffers[u.resourceIndex + i] = buffer; + } + } + } + for (int i = 0; i < SHADERSTAGE_MAX_ENUM; i++) stages[i] = _stages[i]; } @@ -708,6 +747,18 @@ Shader::~Shader() if (current == this) attachDefault(STANDARD_DEFAULT); + + for (Texture *tex : activeTextures) + { + if (tex) + tex->release(); + } + + for (Buffer *buffer : activeBuffers) + { + if (buffer) + buffer->release(); + } } bool Shader::hasStage(ShaderStageType stage) @@ -740,6 +791,18 @@ bool Shader::isDefaultActive() return false; } +const Shader::UniformInfo *Shader::getUniformInfo(const std::string &name) const +{ + const auto it = reflection.allUniforms.find(name); + return it != reflection.allUniforms.end() ? it->second : nullptr; +} + +bool Shader::hasUniform(const std::string &name) const +{ + const auto it = reflection.allUniforms.find(name); + return it != reflection.allUniforms.end() && it->second->active; +} + const Shader::UniformInfo *Shader::getMainTextureInfo() const { return getUniformInfo(BUILTIN_TEXTURE_MAIN); @@ -781,9 +844,9 @@ bool Shader::isResourceBaseTypeCompatible(DataBaseType a, DataBaseType b) void Shader::validateDrawState(PrimitiveType primtype, Texture *maintex) const { - if ((primtype == PRIMITIVE_POINTS) != validationReflection.usesPointSize) + if ((primtype == PRIMITIVE_POINTS) != reflection.usesPointSize) { - if (validationReflection.usesPointSize) + if (reflection.usesPointSize) throw love::Exception("The active shader can only be used to draw points."); else throw love::Exception("The gl_PointSize variable must be set in a vertex shader when drawing points."); @@ -825,17 +888,29 @@ void Shader::validateDrawState(PrimitiveType primtype, Texture *maintex) const void Shader::getLocalThreadgroupSize(int *x, int *y, int *z) { - *x = validationReflection.localThreadgroupSize[0]; - *y = validationReflection.localThreadgroupSize[1]; - *z = validationReflection.localThreadgroupSize[2]; + *x = reflection.localThreadgroupSize[0]; + *y = reflection.localThreadgroupSize[1]; + *z = reflection.localThreadgroupSize[2]; } bool Shader::validate(StrongRef stages[], std::string& err) { - ValidationReflection reflection; + Reflection reflection; return validateInternal(stages, err, reflection); } +static DataBaseType getBaseType(glslang::TBasicType basictype) +{ + switch (basictype) + { + case glslang::EbtInt: return DATA_BASETYPE_INT; + case glslang::EbtUint: return DATA_BASETYPE_UINT; + case glslang::EbtFloat: return DATA_BASETYPE_FLOAT; + case glslang::EbtBool: return DATA_BASETYPE_BOOL; + default: return DATA_BASETYPE_FLOAT; + } +} + static PixelFormat getPixelFormat(glslang::TLayoutFormat format) { using namespace glslang; @@ -885,6 +960,30 @@ static PixelFormat getPixelFormat(glslang::TLayoutFormat format) } } +static TextureType getTextureType(const glslang::TSampler &sampler) +{ + if (sampler.is2D()) + return sampler.isArrayed() ? TEXTURE_2D_ARRAY : TEXTURE_2D; + else if (sampler.dim == glslang::EsdCube) + return sampler.isArrayed() ? TEXTURE_MAX_ENUM : TEXTURE_CUBE; + else if (sampler.dim == glslang::Esd3D) + return TEXTURE_VOLUME; + else + return TEXTURE_MAX_ENUM; +} + +static uint32 getStageMask(EShLanguageMask mask) +{ + uint32 m = 0; + if (mask & EShLangVertexMask) + m |= SHADERSTAGEMASK_VERTEX; + if (mask & EShLangFragmentMask) + m |= SHADERSTAGEMASK_PIXEL; + if (mask & EShLangComputeMask) + m |= SHADERSTAGEMASK_COMPUTE; + return m; +} + template static T convertData(const glslang::TConstUnion &data) { @@ -903,7 +1002,7 @@ static T convertData(const glslang::TConstUnion &data) } } -bool Shader::validateInternal(StrongRef stages[], std::string &err, ValidationReflection &reflection) +bool Shader::validateInternal(StrongRef stages[], std::string &err, Reflection &reflection) { glslang::TProgram program; @@ -946,6 +1045,9 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, } } + reflection.textureCount = 0; + reflection.bufferCount = 0; + for (int i = 0; i < program.getNumUniformVariables(); i++) { const glslang::TObjectReflection &info = program.getUniform(i); @@ -955,9 +1057,40 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, const glslang::TQualifier &qualifiers = type->getQualifier(); - if (type->isImage()) + UniformInfo u = {}; + + u.name = canonicaliizeUniformName(info.name); + u.location = -1; + u.access = ACCESS_READ; + u.stageMask = getStageMask(info.stages); + u.components = 1; + u.resourceIndex = -1; + + if (type->isSizedArray()) + u.count = type->getArraySizes()->getCumulativeSize(); + else + u.count = 1; + + const auto &sampler = type->getSampler(); + + if (type->isTexture() && type->getSampler().isCombined()) { - if ((info.stages & EShLangComputeMask) == 0) + u.baseType = UNIFORM_SAMPLER; + u.dataBaseType = getBaseType(sampler.getBasicType()); + u.isDepthSampler = sampler.isShadow(); + u.textureType = getTextureType(sampler); + + if (u.textureType == TEXTURE_MAX_ENUM) + continue; + + u.resourceIndex = reflection.textureCount; + reflection.textureCount += u.count; + + reflection.sampledTextures[u.name] = u; + } + else if (type->isImage()) + { + if ((info.stages & (~EShLangComputeMask)) != 0) { err = "Shader validation error:\nStorage Texture uniform variables (image2D, etc) are only allowed in compute shaders."; return false; @@ -965,36 +1098,63 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, if (!qualifiers.hasFormat()) { - err = "Shader validation error:\nStorage Texture '" + info.name + "' must have an explicit format set in its layout declaration."; + err = "Shader validation error:\nStorage Texture '" + u.name + "' must have an explicit format set in its layout declaration."; return false; } - StorageTextureReflection texreflection = {}; + u.baseType = UNIFORM_STORAGETEXTURE; + u.storageTextureFormat = getPixelFormat(qualifiers.getFormat()); + u.dataBaseType = getDataBaseType(u.storageTextureFormat); + u.textureType = getTextureType(sampler); - texreflection.format = getPixelFormat(qualifiers.getFormat()); + if (u.textureType == TEXTURE_MAX_ENUM) + continue; + + u.resourceIndex = reflection.textureCount; + reflection.textureCount += u.count; if (qualifiers.isReadOnly()) - texreflection.access = ACCESS_READ; + u.access = ACCESS_READ; else if (qualifiers.isWriteOnly()) - texreflection.access = ACCESS_WRITE; + u.access = ACCESS_WRITE; else - texreflection.access = (Access)(ACCESS_READ | ACCESS_WRITE); + u.access = (Access)(ACCESS_READ | ACCESS_WRITE); + + reflection.storageTextures[u.name] = u; + } + else if (type->getBasicType() == glslang::EbtSampler && type->getSampler().isBuffer()) + { + u.baseType = UNIFORM_TEXELBUFFER; + u.dataBaseType = getBaseType(sampler.getBasicType()); + + u.resourceIndex = reflection.bufferCount; + reflection.bufferCount += u.count; - reflection.storageTextures[info.name] = texreflection; + reflection.texelBuffers[u.name] = u; } else if (!type->isOpaque()) { - LocalUniform u = {}; - auto &values = u.initializerValues; + std::vector values; const glslang::TConstUnionArray *constarray = info.getConstArray(); + if (type->isMatrix()) + { + u.matrix.rows = type->getMatrixRows(); + u.matrix.columns = type->getMatrixCols(); + } + else + { + u.components = type->getVectorSize(); + } + // Store initializer values for local uniforms. Some love graphics // backends strip these out of the shader so we need to be able to // access them (to re-send them) by getting them here. switch (type->getBasicType()) { case glslang::EbtFloat: - u.dataType = DATA_BASETYPE_FLOAT; + u.baseType = type->isMatrix() ? UNIFORM_MATRIX : UNIFORM_FLOAT; + u.dataBaseType = DATA_BASETYPE_FLOAT; if (constarray != nullptr) { values.resize(constarray->size()); @@ -1003,7 +1163,8 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, } break; case glslang::EbtUint: - u.dataType = DATA_BASETYPE_UINT; + u.baseType = UNIFORM_UINT; + u.dataBaseType = DATA_BASETYPE_UINT; if (constarray != nullptr) { values.resize(constarray->size()); @@ -1012,7 +1173,8 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, } break; case glslang::EbtBool: - u.dataType = DATA_BASETYPE_BOOL; + u.baseType = UNIFORM_BOOL; + u.dataBaseType = DATA_BASETYPE_BOOL; if (constarray != nullptr) { values.resize(constarray->size()); @@ -1022,7 +1184,8 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, break; case glslang::EbtInt: default: - u.dataType = DATA_BASETYPE_INT; + u.baseType = UNIFORM_INT; + u.dataBaseType = DATA_BASETYPE_INT; if (constarray != nullptr) { values.resize(constarray->size()); @@ -1032,7 +1195,8 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, break; } - reflection.localUniforms[info.name] = u; + reflection.localUniforms[u.name] = u; + reflection.localUniformInitializerValues[u.name] = values; } } @@ -1070,18 +1234,29 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, return false; } - BufferReflection bufferReflection = {}; - bufferReflection.stride = (size_t) info.size; - bufferReflection.memberCount = (size_t) info.numMembers; + UniformInfo u = {}; + u.name = canonicaliizeUniformName(info.name); + u.location = -1; + + if (type->isSizedArray()) + u.count = type->getArraySizes()->getCumulativeSize(); + else + u.count = 1; + + u.bufferStride = (size_t) info.size; + u.bufferMemberCount = (size_t) info.numMembers; + + u.resourceIndex = reflection.bufferCount; + reflection.bufferCount += u.count; if (qualifiers.isReadOnly()) - bufferReflection.access = ACCESS_READ; + u.access = ACCESS_READ; else if (qualifiers.isWriteOnly()) - bufferReflection.access = ACCESS_WRITE; + u.access = ACCESS_WRITE; else - bufferReflection.access = (Access)(ACCESS_READ | ACCESS_WRITE); + u.access = (Access)(ACCESS_READ | ACCESS_WRITE); - reflection.storageBuffers[info.name] = bufferReflection; + reflection.storageBuffers[u.name] = u; } else { @@ -1090,6 +1265,21 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, } } + for (auto &kvp : reflection.texelBuffers) + reflection.allUniforms[kvp.first] = &kvp.second; + + for (auto &kvp : reflection.storageBuffers) + reflection.allUniforms[kvp.first] = &kvp.second; + + for (auto &kvp : reflection.sampledTextures) + reflection.allUniforms[kvp.first] = &kvp.second; + + for (auto &kvp : reflection.storageTextures) + reflection.allUniforms[kvp.first] = &kvp.second; + + for (auto &kvp : reflection.localUniforms) + reflection.allUniforms[kvp.first] = &kvp.second; + return true; } @@ -1216,55 +1406,40 @@ bool Shader::validateBuffer(const UniformInfo *info, Buffer *buffer, bool intern return true; } -bool Shader::fillUniformReflectionData(UniformInfo &u) +std::string Shader::getShaderStageDebugName(ShaderStageType stage) const { - const auto &r = validationReflection; - - if (u.baseType == UNIFORM_STORAGETEXTURE) - { - const auto reflectionit = r.storageTextures.find(u.name); - if (reflectionit != r.storageTextures.end()) - { - u.storageTextureFormat = reflectionit->second.format; - u.access = reflectionit->second.access; - return true; - } + std::string name = debugName; - // No reflection info - maybe glslang was better at detecting dead code - // than the driver's compiler? - return false; - } - else if (u.baseType == UNIFORM_STORAGEBUFFER) + if (!name.empty()) { - const auto reflectionit = r.storageBuffers.find(u.name); - if (reflectionit != r.storageBuffers.end()) - { - u.bufferStride = reflectionit->second.stride; - u.bufferMemberCount = reflectionit->second.memberCount; - u.access = reflectionit->second.access; - return true; - } - - return false; + const char *stagename = "unknown"; + ShaderStage::getConstant(stage, stagename); + name += " (" + std::string(stagename) + ")"; } - return true; + return name; } -std::string Shader::getShaderStageDebugName(ShaderStageType stage) const +std::string Shader::canonicaliizeUniformName(const std::string &n) { - std::string name = debugName; + std::string name(n); - if (!name.empty()) + // Some drivers/compilers append "[0]" to the end of array uniform names. + if (name.length() > 3) { - const char *stagename = "unknown"; - ShaderStage::getConstant(stage, stagename); - name += " (" + std::string(stagename) + ")"; + size_t findpos = name.rfind("[0]"); + if (findpos != std::string::npos && findpos == name.length() - 3) + name.erase(name.length() - 3); } return name; } +void Shader::handleUnknownUniformName(const char */*name*/) +{ + // TODO: do something here? +} + bool Shader::initialize() { return glslang::InitializeProcess(); diff --git a/src/modules/graphics/Shader.h b/src/modules/graphics/Shader.h index d9e53999b..51b538fd7 100644 --- a/src/modules/graphics/Shader.h +++ b/src/modules/graphics/Shader.h @@ -129,6 +129,10 @@ class Shader : public Object, public Resource struct UniformInfo { + UniformType baseType; + uint32 stageMask; + bool active; + int location; int count; @@ -138,7 +142,6 @@ class Shader : public Object, public Resource MatrixSize matrix; }; - UniformType baseType; DataBaseType dataBaseType; TextureType textureType; Access access; @@ -148,6 +151,8 @@ class Shader : public Object, public Resource size_t bufferMemberCount; std::string name; + int resourceIndex; + union { void *data; @@ -157,12 +162,6 @@ class Shader : public Object, public Resource }; size_t dataSize; - - union - { - Texture **textures; - Buffer **buffers; - }; }; union LocalUniformValue @@ -222,7 +221,7 @@ class Shader : public Object, public Resource virtual int getVertexAttributeIndex(const std::string &name) = 0; - virtual const UniformInfo *getUniformInfo(const std::string &name) const = 0; + const UniformInfo *getUniformInfo(const std::string &name) const; virtual const UniformInfo *getUniformInfo(BuiltinUniform builtin) const = 0; virtual void updateUniform(const UniformInfo *info, int count) = 0; @@ -234,7 +233,7 @@ class Shader : public Object, public Resource * Gets whether a uniform with the specified name exists and is actively * used in the shader. **/ - virtual bool hasUniform(const std::string &name) const = 0; + bool hasUniform(const std::string &name) const; /** * Sets the textures used when rendering a video. For internal use only. @@ -264,39 +263,31 @@ class Shader : public Object, public Resource protected: - struct BufferReflection + struct Reflection { - size_t stride; - size_t memberCount; - Access access; - }; + std::map texelBuffers; + std::map storageBuffers; + std::map sampledTextures; + std::map storageTextures; + std::map localUniforms; - struct StorageTextureReflection - { - PixelFormat format; - Access access; - }; + std::map allUniforms; - struct LocalUniform - { - DataBaseType dataType; - std::vector initializerValues; - }; + std::map> localUniformInitializerValues; + + int textureCount; + int bufferCount; - struct ValidationReflection - { - std::map storageBuffers; - std::map storageTextures; - std::map localUniforms; int localThreadgroupSize[3]; bool usesPointSize; }; - bool fillUniformReflectionData(UniformInfo &u); - std::string getShaderStageDebugName(ShaderStageType stage) const; - static bool validateInternal(StrongRef stages[], std::string& err, ValidationReflection &reflection); + void handleUnknownUniformName(const char *name); + + static std::string canonicaliizeUniformName(const std::string &name); + static bool validateInternal(StrongRef stages[], std::string& err, Reflection &reflection); static DataBaseType getDataBaseType(PixelFormat format); static bool isResourceBaseTypeCompatible(DataBaseType a, DataBaseType b); @@ -305,7 +296,10 @@ class Shader : public Object, public Resource StrongRef stages[SHADERSTAGE_MAX_ENUM]; - ValidationReflection validationReflection; + Reflection reflection; + + std::vector activeTextures; + std::vector activeBuffers; std::string debugName; diff --git a/src/modules/graphics/ShaderStage.h b/src/modules/graphics/ShaderStage.h index 69214a3a8..fda4e5b9c 100644 --- a/src/modules/graphics/ShaderStage.h +++ b/src/modules/graphics/ShaderStage.h @@ -48,6 +48,14 @@ enum ShaderStageType SHADERSTAGE_MAX_ENUM }; +enum ShaderStageMask +{ + SHADERSTAGEMASK_NONE = 0, + SHADERSTAGEMASK_VERTEX = 1 << SHADERSTAGE_VERTEX, + SHADERSTAGEMASK_PIXEL = 1 << SHADERSTAGE_PIXEL, + SHADERSTAGEMASK_COMPUTE = 1 << SHADERSTAGE_COMPUTE, +}; + class ShaderStage : public love::Object { public: diff --git a/src/modules/graphics/metal/Shader.h b/src/modules/graphics/metal/Shader.h index 1e517a950..93ceec7af 100644 --- a/src/modules/graphics/metal/Shader.h +++ b/src/modules/graphics/metal/Shader.h @@ -107,12 +107,10 @@ class Shader final : public love::graphics::Shader void attach() override; std::string getWarnings() const override { return ""; } int getVertexAttributeIndex(const std::string &name) override; - const UniformInfo *getUniformInfo(const std::string &name) const override; const UniformInfo *getUniformInfo(BuiltinUniform builtin) const override; void updateUniform(const UniformInfo *info, int count) override; void sendTextures(const UniformInfo *info, love::graphics::Texture **textures, int count) override; void sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffers, int count) override; - bool hasUniform(const std::string &name) const override; ptrdiff_t getHandle() const override { return 0; } void setVideoTextures(love::graphics::Texture *ytexture, love::graphics::Texture *cbtexture, love::graphics::Texture *crtexture) override; @@ -140,13 +138,12 @@ class Shader final : public love::graphics::Shader }; void buildLocalUniforms(const spirv_cross::CompilerMSL &msl, const spirv_cross::SPIRType &type, size_t baseoffset, const std::string &basename); - void addImage(const spirv_cross::CompilerMSL &msl, const spirv_cross::Resource &resource, UniformType baseType); + void addImage(const spirv_cross::Resource &resource); void compileFromGLSLang(id device, const glslang::TProgram &program); id functions[SHADERSTAGE_MAX_ENUM]; UniformInfo *builtinUniformInfo[BUILTIN_MAX_ENUM]; - std::map uniforms; uint8 *localUniformStagingData; uint8 *localUniformBufferData; diff --git a/src/modules/graphics/metal/Shader.mm b/src/modules/graphics/metal/Shader.mm index 5ed42deb2..5379e1be6 100644 --- a/src/modules/graphics/metal/Shader.mm +++ b/src/modules/graphics/metal/Shader.mm @@ -299,132 +299,69 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) continue; } + name = canonicaliizeUniformName(name); + if (offset + membersize > localUniformBufferSize) throw love::Exception("Invalid uniform offset + size for '%s' (offset=%d, size=%d, buffer size=%d)", name.c_str(), (int)offset, (int)membersize, (int)localUniformBufferSize); - UniformInfo u = {}; - u.name = name; - u.dataSize = membersize; - u.count = membertype.array.empty() ? 1 : membertype.array[0]; - u.components = 1; - - u.data = localUniformStagingData + offset; - if (membertype.columns == 1) - { - if (membertype.basetype == SPIRType::Int) - u.baseType = UNIFORM_INT; - else if (membertype.basetype == SPIRType::UInt) - u.baseType = UNIFORM_UINT; - else - u.baseType = UNIFORM_FLOAT; - u.components = membertype.vecsize; - } - else + auto uniformit = reflection.allUniforms.find(name); + if (uniformit == reflection.allUniforms.end()) { - u.baseType = UNIFORM_MATRIX; - u.matrix.rows = membertype.vecsize; - u.matrix.columns = membertype.columns; + handleUnknownUniformName(name.c_str()); + continue; } - const auto &reflectionit = validationReflection.localUniforms.find(u.name); - if (reflectionit != validationReflection.localUniforms.end()) + UniformInfo &u = *(uniformit->second); + u.active = true; + + if (u.dataSize > 0) + continue; + + u.dataSize = membersize; + u.data = localUniformStagingData + offset; + + const auto &reflectionit = reflection.localUniformInitializerValues.find(u.name); + if (reflectionit != reflection.localUniformInitializerValues.end()) { - const auto &localuniform = reflectionit->second; - const auto &values = localuniform.initializerValues; + const auto &values = reflectionit->second; if (!values.empty()) memcpy(u.data, values.data(), std::min(u.dataSize, values.size() * sizeof(LocalUniformValue))); } - uniforms[u.name] = u; - BuiltinUniform builtin = BUILTIN_MAX_ENUM; if (getConstant(u.name.c_str(), builtin)) { if (builtin == BUILTIN_UNIFORMS_PER_DRAW) builtinUniformDataOffset = offset; - builtinUniformInfo[builtin] = &uniforms[u.name]; + builtinUniformInfo[builtin] = &u; } updateUniform(&u, u.count); } } -void Shader::addImage(const spirv_cross::CompilerMSL &msl, const spirv_cross::Resource &resource, UniformType baseType) +void Shader::addImage(const spirv_cross::Resource &resource) { using namespace spirv_cross; - const SPIRType &basetype = msl.get_type(resource.base_type_id); - const SPIRType &type = msl.get_type(resource.type_id); - const SPIRType &imagetype = msl.get_type(basetype.image.type); - - UniformInfo u = {}; - u.baseType = baseType; - u.name = resource.name; - u.count = type.array.empty() ? 1 : type.array[0]; - u.isDepthSampler = type.image.depth; - u.components = 1; - - auto it = uniforms.find(u.name); - if (it != uniforms.end()) - return; - - if (!fillUniformReflectionData(u)) + std::string name = canonicaliizeUniformName(resource.name); + auto uniformit = reflection.allUniforms.find(name); + if (uniformit == reflection.allUniforms.end()) return; - switch (imagetype.basetype) - { - case SPIRType::Float: - u.dataBaseType = DATA_BASETYPE_FLOAT; - break; - case SPIRType::Int: - u.dataBaseType = DATA_BASETYPE_INT; - break; - case SPIRType::UInt: - u.dataBaseType = DATA_BASETYPE_UINT; - break; - default: - break; - } + UniformInfo &u = *(uniformit->second); - switch (basetype.image.dim) + if (u.dataSize == 0) { - case spv::Dim2D: - u.textureType = basetype.image.arrayed ? TEXTURE_2D_ARRAY : TEXTURE_2D; - u.textures = new love::graphics::Texture*[u.count]; - memset(u.textures, 0, sizeof(love::graphics::Texture *) * u.count); - break; - case spv::Dim3D: - u.textureType = TEXTURE_VOLUME; - u.textures = new love::graphics::Texture*[u.count]; - memset(u.textures, 0, sizeof(love::graphics::Texture *) * u.count); - break; - case spv::DimCube: - if (basetype.image.arrayed) - throw love::Exception("Cubemap Arrays are not currently supported."); - u.textureType = TEXTURE_CUBE; - u.textures = new love::graphics::Texture*[u.count]; - memset(u.textures, 0, sizeof(love::graphics::Texture *) * u.count); - break; - case spv::DimBuffer: - u.baseType = UNIFORM_TEXELBUFFER; - u.buffers = new love::graphics::Buffer*[u.count]; - memset(u.buffers, 0, sizeof(love::graphics::Buffer *) * u.count); - break; - default: - // TODO: error? continue? - break; + u.dataSize = sizeof(int) * u.count; + u.data = malloc(u.dataSize); + for (int i = 0; i < u.count; i++) + u.ints[i] = -1; // Initialized below, after compiling. } - u.dataSize = sizeof(int) * u.count; - u.data = malloc(u.dataSize); - for (int i = 0; i < u.count; i++) - u.ints[i] = -1; // Initialized below, after compiling. - - uniforms[u.name] = u; - BuiltinUniform builtin; - if (getConstant(resource.name.c_str(), builtin)) - builtinUniformInfo[builtin] = &uniforms[u.name]; + if (getConstant(name.c_str(), builtin)) + builtinUniformInfo[builtin] = &u; } void Shader::compileFromGLSLang(id device, const glslang::TProgram &program) @@ -473,19 +410,18 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) auto &msl = *mslpointer; auto interfacevars = msl.get_active_interface_variables(); + ShaderResources resources = msl.get_shader_resources(interfacevars); msl.set_enabled_interface_variables(interfacevars); - ShaderResources resources = msl.get_shader_resources(); - for (const auto &resource : resources.storage_images) { - addImage(msl, resource, UNIFORM_STORAGETEXTURE); + addImage(resource); } for (const auto &resource : resources.sampled_images) { - addImage(msl, resource, UNIFORM_SAMPLER); + addImage(resource); } for (const auto &resource : resources.uniform_buffers) @@ -536,32 +472,24 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) binding.msl_buffer = metalBufferIndices[stageindex]++; msl.add_msl_resource_binding(binding); - auto it = uniforms.find(resource.name); - if (it != uniforms.end()) + std::string name = canonicaliizeUniformName(resource.name); + auto uniformit = reflection.allUniforms.find(name); + if (uniformit == reflection.allUniforms.end()) + { + handleUnknownUniformName(name.c_str()); continue; + } - const SPIRType &type = msl.get_type(resource.type_id); - - UniformInfo u = {}; - u.baseType = UNIFORM_STORAGEBUFFER; - u.components = 1; - u.name = resource.name; - u.count = type.array.empty() ? 1 : type.array[0]; + UniformInfo &u = *(uniformit->second); - if (!fillUniformReflectionData(u)) + if (u.dataSize > 0) continue; - u.buffers = new love::graphics::Buffer*[u.count]; u.dataSize = sizeof(int) * u.count; u.data = malloc(u.dataSize); for (int i = 0; i < u.count; i++) - { u.ints[i] = -1; // Initialized below, after compiling. - u.buffers[i] = nullptr; - } - - uniforms[u.name] = u; } if (stageindex == SHADERSTAGE_VERTEX) @@ -634,7 +562,8 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) if (library == nil && err != nil) { NSLog(@"errors: %@", err); - throw love::Exception("Error compiling converted Metal shader code"); + NSString *errorstr = err.localizedDescription; + throw love::Exception("Error compiling converted Metal shader code:\n\n%s", errorstr.UTF8String); } functions[stageindex] = [library newFunctionWithName:library.functionNames[0]]; @@ -645,11 +574,12 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) auto setTextureBinding = [this](CompilerMSL &msl, int stageindex, const spirv_cross::Resource &resource) -> void { - auto it = uniforms.find(resource.name); - if (it == uniforms.end()) + std::string name = canonicaliizeUniformName(resource.name); + auto it = reflection.allUniforms.find(name); + if (it == reflection.allUniforms.end()) return; - UniformInfo &u = it->second; + UniformInfo &u = *(it->second); uint32 texturebinding = msl.get_automatic_msl_resource_binding(resource.id); uint32 samplerbinding = msl.get_automatic_msl_resource_binding_secondary(resource.id); @@ -657,10 +587,11 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) if (texturebinding == (uint32)-1) { // No valid binding, the uniform was likely optimized out because it's not used. - uniforms.erase(resource.name); return; } + u.active = true; + for (int i = 0; i < u.count; i++) { if (u.ints[i] == -1) @@ -702,8 +633,9 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) for (const auto &resource : resources.storage_buffers) { - auto it = uniforms.find(resource.name); - if (it == uniforms.end()) + std::string name = canonicaliizeUniformName(resource.name); + auto it = reflection.storageBuffers.find(name); + if (it == reflection.storageBuffers.end()) continue; UniformInfo &u = it->second; @@ -712,10 +644,11 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) if (bufferbinding == (uint32)-1) { // No valid binding, the uniform was likely optimized out because it's not used. - uniforms.erase(resource.name); continue; } + u.active = true; + for (int i = 0; i < u.count; i++) { if (u.ints[i] == -1) @@ -736,18 +669,18 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) } // Initialize default resource bindings. - for (auto &kvp : uniforms) + for (const auto &kvp : reflection.allUniforms) { - UniformInfo &info = kvp.second; - switch (info.baseType) + const UniformInfo *info = kvp.second; + switch (info->baseType) { case UNIFORM_SAMPLER: case UNIFORM_STORAGETEXTURE: - sendTextures(&info, info.textures, info.count); + sendTextures(info, &activeTextures[info->resourceIndex], info->count); break; case UNIFORM_TEXELBUFFER: case UNIFORM_STORAGEBUFFER: - sendBuffers(&info, info.buffers, info.count); + sendBuffers(info, &activeBuffers[info->resourceIndex], info->count); break; default: break; @@ -767,29 +700,13 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) cachedRenderPipelines.clear(); - for (const auto &it : uniforms) + for (const auto &it : reflection.allUniforms) { - const auto &u = it.second; + const auto &u = *(it.second); if (u.baseType == UNIFORM_SAMPLER || u.baseType == UNIFORM_STORAGETEXTURE) - { free(u.data); - for (int i = 0; i < u.count; i++) - { - if (u.textures[i] != nullptr) - u.textures[i]->release(); - } - delete[] u.textures; - } else if (u.baseType == UNIFORM_TEXELBUFFER || u.baseType == UNIFORM_STORAGEBUFFER) - { free(u.data); - for (int i = 0; i < u.count; i++) - { - if (u.buffers[i] != nullptr) - u.buffers[i]->release(); - } - delete[] u.buffers; - } } delete[] localUniformStagingData; @@ -813,12 +730,6 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) return it != attributes.end() ? it->second : -1; } -const Shader::UniformInfo *Shader::getUniformInfo(const std::string &name) const -{ - const auto it = uniforms.find(name); - return it != uniforms.end() ? &(it->second) : nullptr; -} - const Shader::UniformInfo *Shader::getUniformInfo(BuiltinUniform builtin) const { return builtinUniformInfo[(int)builtin]; @@ -826,6 +737,9 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) void Shader::updateUniform(const UniformInfo *info, int count) { + if (info->dataSize == 0) + return; + if (current == this) Graphics::flushBatchedDrawsGlobal(); @@ -895,12 +809,21 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) tex->retain(); - if (info->textures[i] != nullptr) - info->textures[i]->release(); + int resourceindex = info->resourceIndex + i; - info->textures[i] = tex; + if (activeTextures[resourceindex] != nullptr) + activeTextures[resourceindex]->release(); - auto &binding = textureBindings[info->ints[i]]; + activeTextures[resourceindex] = tex; + + if (info->dataSize == 0) + continue; + + int bindingindex = info->ints[i]; + if (bindingindex < 0) + continue; + + auto &binding = textureBindings[bindingindex]; if (isdefault && (binding.access & ACCESS_WRITE) != 0) { binding.texture = nil; @@ -949,18 +872,24 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) buffer->retain(); - if (info->buffers[i] != nullptr) - info->buffers[i]->release(); + int resourceindex = info->resourceIndex + i; + + if (activeBuffers[resourceindex] != nullptr) + activeBuffers[resourceindex]->release(); - info->buffers[i] = buffer; + activeBuffers[resourceindex] = buffer; + + if (info->dataSize == 0) + continue; - if (texelbinding) + int bindingindex = info->ints[i]; + if (texelbinding && bindingindex >= 0) { - textureBindings[info->ints[i]].texture = getMTLTexture(buffer); + textureBindings[bindingindex].texture = getMTLTexture(buffer); } - else if (storagebinding) + else if (storagebinding && bindingindex >= 0) { - auto &binding = bufferBindings[info->ints[i]]; + auto &binding = bufferBindings[bindingindex]; if (isdefault && (binding.access & ACCESS_WRITE) != 0) binding.buffer = nil; else @@ -987,11 +916,6 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) } } -bool Shader::hasUniform(const std::string &name) const -{ - return uniforms.find(name) != uniforms.end(); -} - id Shader::getCachedRenderPipeline(const RenderPipelineKey &key) { auto it = cachedRenderPipelines.find(key); diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index eeca919c9..21e26fb0f 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -38,11 +38,6 @@ namespace graphics namespace opengl { -static bool isBuffer(Shader::UniformType utype) -{ - return utype == Shader::UNIFORM_TEXELBUFFER || utype == Shader::UNIFORM_STORAGEBUFFER; -} - Shader::Shader(StrongRef stages[SHADERSTAGE_MAX_ENUM], const CompileOptions &options) : love::graphics::Shader(stages, options) , program(0) @@ -58,32 +53,11 @@ Shader::~Shader() { unloadVolatile(); - for (const auto &p : uniforms) + for (const auto &p : reflection.allUniforms) { // Allocated with malloc(). - if (p.second.data != nullptr) - free(p.second.data); - - if (p.second.baseType == UNIFORM_SAMPLER || p.second.baseType == UNIFORM_STORAGETEXTURE) - { - for (int i = 0; i < p.second.count; i++) - { - if (p.second.textures[i] != nullptr) - p.second.textures[i]->release(); - } - - delete[] p.second.textures; - } - else if (isBuffer(p.second.baseType)) - { - for (int i = 0; i < p.second.count; i++) - { - if (p.second.buffers[i] != nullptr) - p.second.buffers[i]->release(); - } - - delete[] p.second.buffers; - } + if (p.second->data != nullptr) + free(p.second->data); } } @@ -96,6 +70,26 @@ void Shader::mapActiveUniforms() builtinUniformInfo[i] = nullptr; } + // Make sure all stored resources have their Volatiles loaded before + // the sendTextures/sendBuffers calls below, since they call getHandle(). + for (love::graphics::Texture *tex : activeTextures) + { + if (tex == nullptr) + continue; + Volatile *v = dynamic_cast(tex); + if (v != nullptr) + v->loadVolatile(); + } + + for (love::graphics::Buffer *buffer : activeBuffers) + { + if (buffer == nullptr) + continue; + Volatile *v = dynamic_cast(buffer); + if (v != nullptr) + v->loadVolatile(); + } + GLint activeprogram = 0; glGetIntegerv(GL_CURRENT_PROGRAM, &activeprogram); @@ -107,43 +101,39 @@ void Shader::mapActiveUniforms() GLchar cname[256]; const GLint bufsize = (GLint) (sizeof(cname) / sizeof(GLchar)); - std::map olduniforms = uniforms; - uniforms.clear(); - - auto gfx = Module::getInstance(Module::M_GRAPHICS); - for (int uindex = 0; uindex < numuniforms; uindex++) { GLsizei namelen = 0; GLenum gltype = 0; - UniformInfo u = {}; + int count = 0; - glGetActiveUniform(program, (GLuint) uindex, bufsize, &namelen, &u.count, &gltype, cname); + glGetActiveUniform(program, (GLuint) uindex, bufsize, &namelen, &count, &gltype, cname); - u.name = std::string(cname, (size_t) namelen); - u.location = glGetUniformLocation(program, u.name.c_str()); - u.access = ACCESS_READ; - computeUniformTypeInfo(gltype, u); + std::string name(cname, (size_t) namelen); + int location = glGetUniformLocation(program, name.c_str()); + + if (location == -1) + continue; - // glGetActiveUniform appends "[0]" to the end of array uniform names... - if (u.name.length() > 3) + name = canonicaliizeUniformName(name); + + const auto &uniformit = reflection.allUniforms.find(name); + if (uniformit == reflection.allUniforms.end()) { - size_t findpos = u.name.find("[0]"); - if (findpos != std::string::npos && findpos == u.name.length() - 3) - u.name.erase(u.name.length() - 3); + handleUnknownUniformName(name.c_str()); + continue; } + UniformInfo &u = *uniformit->second; + + u.active = true; + u.location = location; + // If this is a built-in (LOVE-created) uniform, store the location. BuiltinUniform builtin = BUILTIN_MAX_ENUM; if (getConstant(u.name.c_str(), builtin)) builtinUniforms[int(builtin)] = u.location; - if (u.location == -1) - continue; - - if (!fillUniformReflectionData(u)) - continue; - if ((u.baseType == UNIFORM_SAMPLER && builtin != BUILTIN_TEXTURE_MAIN) || u.baseType == UNIFORM_TEXELBUFFER) { TextureUnit unit; @@ -175,183 +165,51 @@ void Shader::mapActiveUniforms() storageTextureBindings.push_back(binding); } - // Make sure previously set uniform data is preserved, and shader- - // initialized values are retrieved. - auto oldu = olduniforms.find(u.name); - if (oldu != olduniforms.end()) + if (u.dataSize == 0) { - u.data = oldu->second.data; - u.dataSize = oldu->second.dataSize; - u.textures = oldu->second.textures; + if (u.baseType == UNIFORM_MATRIX) + u.dataSize = sizeof(uint32) * u.matrix.rows * u.matrix.columns * u.count; + else + u.dataSize = sizeof(uint32) * u.components * u.count; - updateUniform(&u, u.count, true); - } - else - { - u.dataSize = 0; + u.data = malloc(u.dataSize); + memset(u.data, 0, u.dataSize); - switch (u.baseType) + const auto &valuesit = reflection.localUniformInitializerValues.find(u.name); + if (valuesit != reflection.localUniformInitializerValues.end()) { - case UNIFORM_FLOAT: - u.dataSize = sizeof(float) * u.components * u.count; - u.data = malloc(u.dataSize); - break; - case UNIFORM_INT: - case UNIFORM_BOOL: - case UNIFORM_SAMPLER: - case UNIFORM_STORAGETEXTURE: - case UNIFORM_TEXELBUFFER: - u.dataSize = sizeof(int) * u.components * u.count; - u.data = malloc(u.dataSize); - break; - case UNIFORM_UINT: - u.dataSize = sizeof(unsigned int) * u.components * u.count; - u.data = malloc(u.dataSize); - break; - case UNIFORM_MATRIX: - u.dataSize = sizeof(float) * ((size_t)u.matrix.rows * u.matrix.columns) * u.count; - u.data = malloc(u.dataSize); - break; - default: - break; + const auto &values = valuesit->second; + if (!values.empty()) + memcpy(u.data, values.data(), std::min(u.dataSize, sizeof(LocalUniformValue) * values.size())); } + } - if (u.dataSize > 0) - { - memset(u.data, 0, u.dataSize); - - if (u.baseType == UNIFORM_SAMPLER || u.baseType == UNIFORM_TEXELBUFFER) - { - int startunit = (int) textureUnits.size() - u.count; - - if (builtin == BUILTIN_TEXTURE_MAIN) - startunit = 0; - - for (int i = 0; i < u.count; i++) - u.ints[i] = startunit + i; - - glUniform1iv(u.location, u.count, u.ints); - - if (u.baseType == UNIFORM_TEXELBUFFER) - { - u.buffers = new love::graphics::Buffer*[u.count]; - memset(u.buffers, 0, sizeof(Buffer *) * u.count); - } - else - { - u.textures = new love::graphics::Texture*[u.count]; - - auto *tex = gfx->getDefaultTexture(u.textureType, u.dataBaseType); - for (int i = 0; i < u.count; i++) - { - tex->retain(); - u.textures[i] = tex; - } - } - } - else if (u.baseType == UNIFORM_STORAGETEXTURE) - { - int startbinding = (int) storageTextureBindings.size() - u.count; - for (int i = 0; i < u.count; i++) - u.ints[i] = startbinding + i; - - glUniform1iv(u.location, u.count, u.ints); - - u.textures = new love::graphics::Texture*[u.count]; - - if ((u.access & ACCESS_WRITE) != 0) - { - memset(u.textures, 0, sizeof(Texture *) * u.count); - } - else - { - auto *tex = gfx->getDefaultTexture(u.textureType, u.dataBaseType); - for (int i = 0; i < u.count; i++) - { - tex->retain(); - u.textures[i] = tex; - } - } - } - } + if (u.baseType == UNIFORM_SAMPLER || u.baseType == UNIFORM_TEXELBUFFER) + { + int startunit = (int) textureUnits.size() - u.count; - size_t offset = 0; + if (builtin == BUILTIN_TEXTURE_MAIN) + startunit = 0; - // Store any shader-initialized values in our own memory. for (int i = 0; i < u.count; i++) - { - GLint location = u.location; - - if (u.count > 1) - { - std::ostringstream ss; - ss << i; - - std::string indexname = u.name + "[" + ss.str() + "]"; - location = glGetUniformLocation(program, indexname.c_str()); - } - - if (location == -1) - continue; - - switch (u.baseType) - { - case UNIFORM_FLOAT: - glGetUniformfv(program, location, &u.floats[offset]); - offset += u.components; - break; - case UNIFORM_INT: - case UNIFORM_BOOL: - glGetUniformiv(program, location, &u.ints[offset]); - offset += u.components; - break; - case UNIFORM_UINT: - glGetUniformuiv(program, location, &u.uints[offset]); - offset += u.components; - break; - case UNIFORM_MATRIX: - glGetUniformfv(program, location, &u.floats[offset]); - offset += (size_t)u.matrix.rows * u.matrix.columns; - break; - default: - break; - } - } + u.ints[i] = startunit + i; + } + else if (u.baseType == UNIFORM_STORAGETEXTURE) + { + int startbinding = (int) storageTextureBindings.size() - u.count; + for (int i = 0; i < u.count; i++) + u.ints[i] = startbinding + i; } - uniforms[u.name] = u; + updateUniform(&u, u.count, true); if (builtin != BUILTIN_MAX_ENUM) - builtinUniformInfo[(int)builtin] = &uniforms[u.name]; + builtinUniformInfo[(int)builtin] = &u; if (u.baseType == UNIFORM_SAMPLER || u.baseType == UNIFORM_STORAGETEXTURE) - { - // Make sure all stored textures have their Volatiles loaded before - // the sendTextures call, since it calls getHandle(). - for (int i = 0; i < u.count; i++) - { - if (u.textures[i] == nullptr) - continue; - Volatile *v = dynamic_cast(u.textures[i]); - if (v != nullptr) - v->loadVolatile(); - } - - sendTextures(&u, u.textures, u.count, true); - } + sendTextures(&u, &activeTextures[u.resourceIndex], u.count, true); else if (u.baseType == UNIFORM_TEXELBUFFER) - { - for (int i = 0; i < u.count; i++) - { - if (u.buffers[i] == nullptr) - continue; - Volatile *v = dynamic_cast(u.buffers[i]); - if (v != nullptr) - v->loadVolatile(); - } - - sendBuffers(&u, u.buffers, u.count, true); - } + sendBuffers(&u, &activeBuffers[u.resourceIndex], u.count, true); } if (gl.isBufferUsageSupported(BUFFERUSAGE_SHADER_STORAGE)) @@ -364,37 +222,28 @@ void Shader::mapActiveUniforms() for (int sindex = 0; sindex < numstoragebuffers; sindex++) { - UniformInfo u = {}; - u.baseType = UNIFORM_STORAGEBUFFER; - u.access = ACCESS_READ; - GLsizei namelength = 0; glGetProgramResourceName(program, GL_SHADER_STORAGE_BLOCK, sindex, 2048, &namelength, namebuffer); - u.name = std::string(namebuffer, namelength); - u.count = 1; - - if (!fillUniformReflectionData(u)) - continue; + std::string name = canonicaliizeUniformName(std::string(namebuffer, namelength)); - // Make sure previously set uniform data is preserved, and shader- - // initialized values are retrieved. - auto oldu = olduniforms.find(u.name); - if (oldu != olduniforms.end()) + const auto &uniformit = reflection.storageBuffers.find(name); + if (uniformit == reflection.storageBuffers.end()) { - u.data = oldu->second.data; - u.dataSize = oldu->second.dataSize; - u.buffers = oldu->second.buffers; + handleUnknownUniformName(name.c_str()); + continue; } - else - { - u.dataSize = sizeof(int) * 1; - u.data = malloc(u.dataSize); - u.ints[0] = -1; + UniformInfo &u = uniformit->second; + + u.active = true; - u.buffers = new love::graphics::Buffer * [u.count]; - memset(u.buffers, 0, sizeof(Buffer*)* u.count); + if (u.dataSize == 0) + { + u.dataSize = sizeof(int) * u.count; + u.data = malloc(u.dataSize); + for (int i = 0; i < u.count; i++) + u.ints[i] = -1; } // Unlike local uniforms and attributes, OpenGL doesn't auto-assign storage @@ -417,56 +266,13 @@ void Shader::mapActiveUniforms() if (u.access & ACCESS_WRITE) { p.second = (int)activeWritableStorageBuffers.size(); - activeWritableStorageBuffers.push_back(u.buffers[0]); + activeWritableStorageBuffers.push_back(activeBuffers[u.resourceIndex]); } storageBufferBindingIndexToActiveBinding[binding.bindingindex] = p; } - uniforms[u.name] = u; - - for (int i = 0; i < u.count; i++) - { - if (u.buffers[i] == nullptr) - continue; - Volatile* v = dynamic_cast(u.buffers[i]); - if (v != nullptr) - v->loadVolatile(); - } - - sendBuffers(&u, u.buffers, u.count, true); - } - } - - // Make sure uniforms that existed before but don't exist anymore are - // cleaned up. This theoretically shouldn't happen, but... - for (const auto &p : olduniforms) - { - if (uniforms.find(p.first) == uniforms.end()) - { - if (p.second.data != nullptr) - free(p.second.data); - - if (p.second.baseType == UNIFORM_SAMPLER || p.second.baseType == UNIFORM_STORAGETEXTURE) - { - for (int i = 0; i < p.second.count; i++) - { - if (p.second.textures[i] != nullptr) - p.second.textures[i]->release(); - } - - delete[] p.second.textures; - } - else if (isBuffer(p.second.baseType)) - { - for (int i = 0; i < p.second.count; i++) - { - if (p.second.buffers[i] != nullptr) - p.second.buffers[i]->release(); - } - - delete[] p.second.buffers; - } + sendBuffers(&u, &activeBuffers[u.resourceIndex], u.count, true); } } @@ -649,16 +455,6 @@ void Shader::attach() } } -const Shader::UniformInfo *Shader::getUniformInfo(const std::string &name) const -{ - const auto it = uniforms.find(name); - - if (it == uniforms.end()) - return nullptr; - - return &(it->second); -} - const Shader::UniformInfo *Shader::getUniformInfo(BuiltinUniform builtin) const { return builtinUniformInfo[(int)builtin]; @@ -802,10 +598,12 @@ void Shader::sendTextures(const UniformInfo *info, love::graphics::Texture **tex tex->retain(); - if (info->textures[i] != nullptr) - info->textures[i]->release(); + int resourceindex = info->resourceIndex + i; - info->textures[i] = tex; + if (activeTextures[resourceindex] != nullptr) + activeTextures[resourceindex]->release(); + + activeTextures[resourceindex] = tex; if (isstoragetex) { @@ -885,10 +683,12 @@ void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffe buffer->retain(); - if (info->buffers[i] != nullptr) - info->buffers[i]->release(); + int resourceindex = info->resourceIndex + i; + + if (activeBuffers[resourceindex] != nullptr) + activeBuffers[resourceindex]->release(); - info->buffers[i] = buffer; + activeBuffers[resourceindex] = buffer; if (texelbinding) { @@ -926,11 +726,6 @@ void Shader::flushBatchedDraws() const Graphics::flushBatchedDrawsGlobal(); } -bool Shader::hasUniform(const std::string &name) const -{ - return uniforms.find(name) != uniforms.end(); -} - ptrdiff_t Shader::getHandle() const { return program; @@ -1043,293 +838,6 @@ void Shader::updateBuiltinUniforms(love::graphics::Graphics *gfx, int viewportW, } } -int Shader::getUniformTypeComponents(GLenum type) const -{ - switch (type) - { - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_BOOL: - return 1; - case GL_INT_VEC2: - case GL_UNSIGNED_INT_VEC2: - case GL_FLOAT_VEC2: - case GL_FLOAT_MAT2: - case GL_BOOL_VEC2: - return 2; - case GL_INT_VEC3: - case GL_UNSIGNED_INT_VEC3: - case GL_FLOAT_VEC3: - case GL_FLOAT_MAT3: - case GL_BOOL_VEC3: - return 3; - case GL_INT_VEC4: - case GL_UNSIGNED_INT_VEC4: - case GL_FLOAT_VEC4: - case GL_FLOAT_MAT4: - case GL_BOOL_VEC4: - return 4; - default: - return 1; - } -} - -Shader::MatrixSize Shader::getMatrixSize(GLenum type) const -{ - MatrixSize m; - - switch (type) - { - case GL_FLOAT_MAT2: - m.columns = m.rows = 2; - break; - case GL_FLOAT_MAT3: - m.columns = m.rows = 3; - break; - case GL_FLOAT_MAT4: - m.columns = m.rows = 4; - break; - case GL_FLOAT_MAT2x3: - m.columns = 2; - m.rows = 3; - break; - case GL_FLOAT_MAT2x4: - m.columns = 2; - m.rows = 4; - break; - case GL_FLOAT_MAT3x2: - m.columns = 3; - m.rows = 2; - break; - case GL_FLOAT_MAT3x4: - m.columns = 3; - m.rows = 4; - break; - case GL_FLOAT_MAT4x2: - m.columns = 4; - m.rows = 2; - break; - case GL_FLOAT_MAT4x3: - m.columns = 4; - m.rows = 3; - break; - default: - m.columns = m.rows = 0; - break; - } - - return m; -} - -void Shader::computeUniformTypeInfo(GLenum type, UniformInfo &u) -{ - u.isDepthSampler = false; - u.components = getUniformTypeComponents(type); - u.baseType = UNIFORM_UNKNOWN; - - switch (type) - { - case GL_INT: - case GL_INT_VEC2: - case GL_INT_VEC3: - case GL_INT_VEC4: - u.baseType = UNIFORM_INT; - u.dataBaseType = DATA_BASETYPE_INT; - break; - case GL_UNSIGNED_INT: - case GL_UNSIGNED_INT_VEC2: - case GL_UNSIGNED_INT_VEC3: - case GL_UNSIGNED_INT_VEC4: - u.baseType = UNIFORM_UINT; - u.dataBaseType = DATA_BASETYPE_UINT; - break; - case GL_FLOAT: - case GL_FLOAT_VEC2: - case GL_FLOAT_VEC3: - case GL_FLOAT_VEC4: - u.baseType = UNIFORM_FLOAT; - u.dataBaseType = DATA_BASETYPE_FLOAT; - break; - case GL_FLOAT_MAT2: - case GL_FLOAT_MAT3: - case GL_FLOAT_MAT4: - case GL_FLOAT_MAT2x3: - case GL_FLOAT_MAT2x4: - case GL_FLOAT_MAT3x2: - case GL_FLOAT_MAT3x4: - case GL_FLOAT_MAT4x2: - case GL_FLOAT_MAT4x3: - u.baseType = UNIFORM_MATRIX; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.matrix = getMatrixSize(type); - break; - case GL_BOOL: - case GL_BOOL_VEC2: - case GL_BOOL_VEC3: - case GL_BOOL_VEC4: - u.baseType = UNIFORM_BOOL; - u.dataBaseType = DATA_BASETYPE_BOOL; - break; - - case GL_SAMPLER_2D: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_2D; - break; - case GL_SAMPLER_2D_SHADOW: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_2D; - u.isDepthSampler = true; - break; - case GL_INT_SAMPLER_2D: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_2D; - break; - case GL_UNSIGNED_INT_SAMPLER_2D: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_2D; - break; - case GL_SAMPLER_2D_ARRAY: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_2D_ARRAY; - break; - case GL_SAMPLER_2D_ARRAY_SHADOW: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_2D_ARRAY; - u.isDepthSampler = true; - break; - case GL_INT_SAMPLER_2D_ARRAY: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_2D_ARRAY; - break; - case GL_UNSIGNED_INT_SAMPLER_2D_ARRAY: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_2D_ARRAY; - break; - case GL_SAMPLER_3D: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_VOLUME; - break; - case GL_INT_SAMPLER_3D: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_VOLUME; - break; - case GL_UNSIGNED_INT_SAMPLER_3D: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_VOLUME; - break; - case GL_SAMPLER_CUBE: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_CUBE; - break; - case GL_SAMPLER_CUBE_SHADOW: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_CUBE; - u.isDepthSampler = true; - break; - case GL_INT_SAMPLER_CUBE: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_CUBE; - break; - case GL_UNSIGNED_INT_SAMPLER_CUBE: - u.baseType = UNIFORM_SAMPLER; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_CUBE; - break; - - case GL_SAMPLER_BUFFER: - u.baseType = UNIFORM_TEXELBUFFER; - u.dataBaseType = DATA_BASETYPE_FLOAT; - break; - case GL_INT_SAMPLER_BUFFER: - u.baseType = UNIFORM_TEXELBUFFER; - u.dataBaseType = DATA_BASETYPE_INT; - break; - case GL_UNSIGNED_INT_SAMPLER_BUFFER: - u.baseType = UNIFORM_TEXELBUFFER; - u.dataBaseType = DATA_BASETYPE_UINT; - break; - - case GL_IMAGE_2D: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_2D; - break; - case GL_INT_IMAGE_2D: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_2D; - break; - case GL_UNSIGNED_INT_IMAGE_2D: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_2D; - break; - case GL_IMAGE_2D_ARRAY: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_2D_ARRAY; - break; - case GL_INT_IMAGE_2D_ARRAY: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_2D_ARRAY; - break; - case GL_UNSIGNED_INT_IMAGE_2D_ARRAY: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_2D_ARRAY; - break; - case GL_IMAGE_3D: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_VOLUME; - break; - case GL_INT_IMAGE_3D: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_VOLUME; - break; - case GL_UNSIGNED_INT_IMAGE_3D: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_VOLUME; - break; - case GL_IMAGE_CUBE: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_FLOAT; - u.textureType = TEXTURE_CUBE; - break; - case GL_INT_IMAGE_CUBE: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_INT; - u.textureType = TEXTURE_CUBE; - break; - case GL_UNSIGNED_INT_IMAGE_CUBE: - u.baseType = UNIFORM_STORAGETEXTURE; - u.dataBaseType = DATA_BASETYPE_UINT; - u.textureType = TEXTURE_CUBE; - break; - - default: - break; - } -} - } // opengl } // graphics } // love diff --git a/src/modules/graphics/opengl/Shader.h b/src/modules/graphics/opengl/Shader.h index fd1e8c162..134ab97fb 100644 --- a/src/modules/graphics/opengl/Shader.h +++ b/src/modules/graphics/opengl/Shader.h @@ -63,12 +63,10 @@ class Shader final : public love::graphics::Shader, public Volatile void attach() override; std::string getWarnings() const override; int getVertexAttributeIndex(const std::string &name) override; - const UniformInfo *getUniformInfo(const std::string &name) const override; const UniformInfo *getUniformInfo(BuiltinUniform builtin) const override; void updateUniform(const UniformInfo *info, int count) override; void sendTextures(const UniformInfo *info, love::graphics::Texture **textures, int count) override; void sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffers, int count) override; - bool hasUniform(const std::string &name) const override; ptrdiff_t getHandle() const override; void setVideoTextures(love::graphics::Texture *ytexture, love::graphics::Texture *cbtexture, love::graphics::Texture *crtexture) override; @@ -100,10 +98,6 @@ class Shader final : public love::graphics::Shader, public Volatile void sendTextures(const UniformInfo *info, love::graphics::Texture **textures, int count, bool internalupdate); void sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffers, int count, bool internalupdate); - int getUniformTypeComponents(GLenum type) const; - void computeUniformTypeInfo(GLenum type, UniformInfo &u); - MatrixSize getMatrixSize(GLenum type) const; - void flushBatchedDraws() const; // Get any warnings or errors generated only by the shader program object. @@ -120,9 +114,6 @@ class Shader final : public love::graphics::Shader, public Volatile std::map attributes; - // Uniform location buffer map - std::map uniforms; - // Texture unit pool for setting textures std::vector textureUnits; diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index 96f073caf..607ce9936 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -173,31 +173,6 @@ void Shader::unloadVolatile() if (shaderModules.empty()) return; - for (const auto &uniform : uniformInfos) - { - switch (uniform.second.baseType) - { - case UNIFORM_SAMPLER: - case UNIFORM_STORAGETEXTURE: - for (int i = 0; i < uniform.second.count; i++) - { - if (uniform.second.textures[i] != nullptr) - uniform.second.textures[i]->release(); - } - delete[] uniform.second.textures; - break; - case UNIFORM_TEXELBUFFER: - case UNIFORM_STORAGEBUFFER: - for (int i = 0; i < uniform.second.count; i++) - { - if (uniform.second.buffers[i] != nullptr) - uniform.second.buffers[i]->release(); - } - delete[] uniform.second.buffers; - break; - } - } - vgfx->queueCleanUp([shaderModules = std::move(shaderModules), device = device, descriptorSetLayout = descriptorSetLayout, pipelineLayout = pipelineLayout, descriptorPools = descriptorPools, computePipeline = computePipeline](){ for (const auto &pools : descriptorPools) { @@ -320,9 +295,9 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind currentUsedUniformStreamBuffersCount++; } - for (const auto &u : uniformInfos) + for (const auto &u : reflection.allUniforms) { - auto &info = u.second; + auto &info = *(u.second); if (usesLocalUniformData(&info)) continue; @@ -333,7 +308,7 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind for (int i = 0; i < info.count; i++) { - auto vkTexture = dynamic_cast(info.textures[i]); + auto vkTexture = dynamic_cast(activeTextures[info.resourceIndex + i]); if (vkTexture == nullptr) throw love::Exception("uniform variable %s is not set.", info.name.c_str()); @@ -374,13 +349,14 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind for (int i = 0; i < info.count; i++) { - if (info.buffers[i] == nullptr) + auto b = activeBuffers[info.resourceIndex + i]; + if (b == nullptr) throw love::Exception("uniform variable %s is not set.", info.name.c_str()); VkDescriptorBufferInfo bufferInfo{}; - bufferInfo.buffer = (VkBuffer)info.buffers[i]->getHandle();; + bufferInfo.buffer = (VkBuffer)b->getHandle(); bufferInfo.offset = 0; - bufferInfo.range = info.buffers[i]->getSize(); + bufferInfo.range = b->getSize(); bufferInfos.push_back(bufferInfo); } @@ -396,15 +372,16 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind write.dstSet = currentDescriptorSet; write.dstBinding = info.location; write.dstArrayElement = 0; - write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; + write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; write.descriptorCount = info.count; for (int i = 0; i < info.count; i++) { - if (info.buffers[i] == nullptr) + auto b = activeBuffers[info.resourceIndex + i]; + if (b == nullptr) throw love::Exception("uniform variable %s is not set.", info.name.c_str()); - bufferViews.push_back((VkBufferView)info.buffers[i]->getTexelBufferHandle()); + bufferViews.push_back((VkBufferView)b->getTexelBufferHandle()); } write.pTexelBufferView = &bufferViews[bufferViews.size() - info.count]; @@ -444,12 +421,6 @@ int Shader::getVertexAttributeIndex(const std::string &name) return it == attributes.end() ? -1 : it->second; } -const Shader::UniformInfo *Shader::getUniformInfo(const std::string &name) const -{ - const auto it = uniformInfos.find(name); - return it != uniformInfos.end() ? &(it->second) : nullptr; -} - const Shader::UniformInfo *Shader::getUniformInfo(BuiltinUniform builtin) const { return builtinUniformInfo[builtin]; @@ -468,9 +439,10 @@ void Shader::sendTextures(const UniformInfo *info, graphics::Texture **textures, { for (int i = 0; i < count; i++) { - auto oldTexture = info->textures[i]; - info->textures[i] = textures[i]; - info->textures[i]->retain(); + int resourceindex = info->resourceIndex + i; + auto oldTexture = activeTextures[resourceindex]; + activeTextures[resourceindex] = textures[i]; + activeTextures[resourceindex]->retain(); if (oldTexture) oldTexture->release(); } @@ -480,9 +452,10 @@ void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffe { for (int i = 0; i < count; i++) { - auto oldBuffer = info->buffers[i]; - info->buffers[i] = buffers[i]; - info->buffers[i]->retain(); + int resourceindex = info->resourceIndex + i; + auto oldBuffer = activeBuffers[resourceindex]; + activeBuffers[resourceindex] = buffers[i]; + activeBuffers[resourceindex]->retain(); if (oldBuffer) oldBuffer->release(); } @@ -524,38 +497,25 @@ void Shader::buildLocalUniforms(spirv_cross::Compiler &comp, const spirv_cross:: continue; } - UniformInfo u{}; - u.name = name; - u.dataSize = memberSize; - u.count = memberType.array.empty() ? 1 : memberType.array[0]; - u.components = 1; - u.data = localUniformStagingData.data() + offset; + name = canonicaliizeUniformName(name); - if (memberType.columns == 1) + auto uniformit = reflection.allUniforms.find(name); + if (uniformit == reflection.allUniforms.end()) { - if (memberType.basetype == SPIRType::Int) - u.baseType = UNIFORM_INT; - else if (memberType.basetype == SPIRType::UInt) - u.baseType = UNIFORM_UINT; - else - u.baseType = UNIFORM_FLOAT; - u.components = memberType.vecsize; - } - else - { - u.baseType = UNIFORM_MATRIX; - u.matrix.rows = memberType.vecsize; - u.matrix.columns = memberType.columns; + handleUnknownUniformName(name.c_str()); + continue; } - const auto &reflectionIt = validationReflection.localUniforms.find(u.name); - if (reflectionIt != validationReflection.localUniforms.end()) - { - const auto &localUniform = reflectionIt->second; - if (localUniform.dataType == DATA_BASETYPE_BOOL) - u.baseType = UNIFORM_BOOL; + UniformInfo &u = *(uniformit->second); - const auto &values = localUniform.initializerValues; + u.active = true; + u.dataSize = memberSize; + u.data = localUniformStagingData.data() + offset; + + const auto &valuesit = reflection.localUniformInitializerValues.find(name); + if (valuesit != reflection.localUniformInitializerValues.end()) + { + const auto &values = valuesit->second; if (!values.empty()) memcpy( u.data, @@ -563,14 +523,12 @@ void Shader::buildLocalUniforms(spirv_cross::Compiler &comp, const spirv_cross:: std::min(u.dataSize, values.size() * sizeof(LocalUniformValue))); } - uniformInfos[u.name] = u; - BuiltinUniform builtin = BUILTIN_MAX_ENUM; if (getConstant(u.name.c_str(), builtin)) { if (builtin == BUILTIN_UNIFORMS_PER_DRAW) builtinUniformDataOffset = offset; - builtinUniformInfo[builtin] = &uniformInfos[u.name]; + builtinUniformInfo[builtin] = &u; } } } @@ -643,8 +601,6 @@ void Shader::compileShaders() if (!program->mapIO()) throw love::Exception("mapIO failed"); - uniformInfos.clear(); - BindingMapper bindingMapper; for (int i = 0; i < SHADERSTAGE_MAX_ENUM; i++) @@ -695,119 +651,51 @@ void Shader::compileShaders() for (const auto &r : shaderResources.sampled_images) { - const SPIRType &basetype = comp.get_type(r.base_type_id); - const SPIRType &type = comp.get_type(r.type_id); - const SPIRType &imagetype = comp.get_type(basetype.image.type); - - graphics::Shader::UniformInfo info; - info.location = bindingMapper(comp, spirv, r.name, r.id); - info.baseType = UNIFORM_SAMPLER; - info.name = r.name; - info.count = type.array.empty() ? 1 : type.array[0]; - info.isDepthSampler = type.image.depth; - info.components = 1; - - switch (imagetype.basetype) + std::string name = canonicaliizeUniformName(r.name); + auto uniformit = reflection.allUniforms.find(name); + if (uniformit == reflection.allUniforms.end()) { - case SPIRType::Float: - info.dataBaseType = DATA_BASETYPE_FLOAT; - break; - case SPIRType::Int: - info.dataBaseType = DATA_BASETYPE_INT; - break; - case SPIRType::UInt: - info.dataBaseType = DATA_BASETYPE_UINT; - break; - default: - break; + handleUnknownUniformName(name.c_str()); + continue; } - switch (basetype.image.dim) - { - case spv::Dim2D: - info.textureType = basetype.image.arrayed ? TEXTURE_2D_ARRAY : TEXTURE_2D; - info.textures = new love::graphics::Texture *[info.count]; - break; - case spv::Dim3D: - info.textureType = TEXTURE_VOLUME; - info.textures = new love::graphics::Texture *[info.count]; - break; - case spv::DimCube: - if (basetype.image.arrayed) { - throw love::Exception("cubemap arrays are not currently supported"); - } - info.textureType = TEXTURE_CUBE; - info.textures = new love::graphics::Texture *[info.count]; - break; - case spv::DimBuffer: - info.baseType = UNIFORM_TEXELBUFFER; - info.buffers = new love::graphics::Buffer *[info.count]; - break; - default: - throw love::Exception("unknown dim"); - } + UniformInfo &u = *(uniformit->second); + u.active = true; + u.location = bindingMapper(comp, spirv, name, r.id); - if (info.baseType == UNIFORM_TEXELBUFFER) - { - for (int i = 0; i < info.count; i++) - info.buffers[i] = nullptr; - } - else - { - for (int i = 0; i < info.count; i++) - { - info.textures[i] = nullptr; - } - } - - uniformInfos[r.name] = info; BuiltinUniform builtin; - if (getConstant(r.name.c_str(), builtin)) - builtinUniformInfo[builtin] = &uniformInfos[info.name]; + if (getConstant(name.c_str(), builtin)) + builtinUniformInfo[builtin] = &u; } for (const auto &r : shaderResources.storage_buffers) { - const auto &type = comp.get_type(r.type_id); - - UniformInfo u{}; - u.baseType = UNIFORM_STORAGEBUFFER; - u.components = 1; - u.name = r.name; - u.count = type.array.empty() ? 1 : type.array[0]; - - if (!fillUniformReflectionData(u)) + std::string name = canonicaliizeUniformName(r.name); + auto &uniformit = reflection.storageBuffers.find(name); + if (uniformit == reflection.storageBuffers.end()) + { + handleUnknownUniformName(name.c_str()); continue; + } - u.location = bindingMapper(comp, spirv, r.name, r.id); - u.buffers = new love::graphics::Buffer *[u.count]; - - for (int i = 0; i < u.count; i++) - u.buffers[i] = nullptr; - - uniformInfos[u.name] = u; + UniformInfo &u = uniformit->second; + u.active = true; + u.location = bindingMapper(comp, spirv, name, r.id); } for (const auto &r : shaderResources.storage_images) { - const auto &type = comp.get_type(r.type_id); - - UniformInfo u{}; - u.baseType = UNIFORM_STORAGETEXTURE; - u.components = 1; - u.name = r.name; - u.count = type.array.empty() ? 1 : type.array[0]; - - if (!fillUniformReflectionData(u)) + std::string name = canonicaliizeUniformName(r.name); + auto &uniformit = reflection.storageBuffers.find(name); + if (uniformit == reflection.storageBuffers.end()) + { + handleUnknownUniformName(name.c_str()); continue; + } - u.textures = new love::graphics::Texture *[u.count]; - u.location = bindingMapper(comp, spirv, r.name, r.id); - - for (int i = 0; i < u.count; i++) - u.textures[i] = nullptr; - - uniformInfos[u.name] = u; + UniformInfo &u = uniformit->second; + u.active = true; + u.location = bindingMapper(comp, spirv, name, r.id); } if (shaderStage == SHADERSTAGE_VERTEX) @@ -875,9 +763,12 @@ void Shader::compileShaders() if (localUniformData.size() > 0) numBuffers++; - for (const auto &u : uniformInfos) + for (const auto kvp : reflection.allUniforms) { - switch (u.second.baseType) + if (kvp.second->location < 0) + continue; + + switch (kvp.second->baseType) { case UNIFORM_SAMPLER: case UNIFORM_STORAGETEXTURE: @@ -905,16 +796,16 @@ void Shader::createDescriptorSetLayout() else stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; - for (auto const &entry : uniformInfos) + for (auto const &entry : reflection.allUniforms) { - auto type = Vulkan::getDescriptorType(entry.second.baseType); + auto type = Vulkan::getDescriptorType(entry.second->baseType); if (type != VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) { VkDescriptorSetLayoutBinding layoutBinding{}; - layoutBinding.binding = entry.second.location; + layoutBinding.binding = entry.second->location; layoutBinding.descriptorType = type; - layoutBinding.descriptorCount = entry.second.count; + layoutBinding.descriptorCount = entry.second->count; layoutBinding.stageFlags = stageFlags; bindings.push_back(layoutBinding); @@ -976,10 +867,13 @@ void Shader::createDescriptorPoolSizes() descriptorPoolSizes.push_back(size); } - for (const auto &entry : uniformInfos) + for (const auto &entry : reflection.allUniforms) { + if (entry.second->location < 0) + continue; + VkDescriptorPoolSize size{}; - auto type = Vulkan::getDescriptorType(entry.second.baseType); + auto type = Vulkan::getDescriptorType(entry.second->baseType); if (type == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) continue; @@ -1012,29 +906,26 @@ void Shader::setVideoTextures(graphics::Texture *ytexture, graphics::Texture *cb for (size_t i = 0; i < textures.size(); i++) { - if (builtinUniformInfo[builtIns[i]] != nullptr) + const UniformInfo *u = builtinUniformInfo[builtIns[i]]; + if (u != nullptr) { textures[i]->retain(); - if (builtinUniformInfo[builtIns[i]]->textures[0]) - builtinUniformInfo[builtIns[i]]->textures[0]->release(); - builtinUniformInfo[builtIns[i]]->textures[0] = textures[i]; + if (activeTextures[u->resourceIndex]) + activeTextures[u->resourceIndex]->release(); + activeTextures[u->resourceIndex] = textures[i]; } } } -bool Shader::hasUniform(const std::string &name) const -{ - return uniformInfos.find(name) != uniformInfos.end(); -} - void Shader::setMainTex(graphics::Texture *texture) { - if (builtinUniformInfo[BUILTIN_TEXTURE_MAIN] != nullptr) + const UniformInfo *u = builtinUniformInfo[BUILTIN_TEXTURE_MAIN]; + if (u != nullptr) { texture->retain(); - if (builtinUniformInfo[BUILTIN_TEXTURE_MAIN]->textures[0]) - builtinUniformInfo[BUILTIN_TEXTURE_MAIN]->textures[0]->release(); - builtinUniformInfo[BUILTIN_TEXTURE_MAIN]->textures[0] = texture; + if (activeTextures[u->resourceIndex]) + activeTextures[u->resourceIndex]->release(); + activeTextures[u->resourceIndex] = texture; } } diff --git a/src/modules/graphics/vulkan/Shader.h b/src/modules/graphics/vulkan/Shader.h index 58632285c..d48fa09ca 100644 --- a/src/modules/graphics/vulkan/Shader.h +++ b/src/modules/graphics/vulkan/Shader.h @@ -76,7 +76,6 @@ class Shader final int getVertexAttributeIndex(const std::string &name) override; - const UniformInfo *getUniformInfo(const std::string &name) const override; const UniformInfo *getUniformInfo(BuiltinUniform builtin) const override; void updateUniform(const UniformInfo *info, int count) override; @@ -84,8 +83,6 @@ class Shader final void sendTextures(const UniformInfo *info, graphics::Texture **textures, int count) override; void sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffers, int count) override; - bool hasUniform(const std::string &name) const override; - void setVideoTextures(graphics::Texture *ytexture, graphics::Texture *cbtexture, graphics::Texture *crtexture) override; void setMainTex(graphics::Texture *texture); @@ -126,7 +123,6 @@ class Shader final bool isCompute = false; - std::unordered_map uniformInfos; UniformInfo *builtinUniformInfo[BUILTIN_MAX_ENUM]; std::unique_ptr uniformBufferObjectBuffer; diff --git a/src/modules/graphics/wrap_Shader.cpp b/src/modules/graphics/wrap_Shader.cpp index 69a9ee941..51de56b8c 100644 --- a/src/modules/graphics/wrap_Shader.cpp +++ b/src/modules/graphics/wrap_Shader.cpp @@ -446,7 +446,7 @@ int w_Shader_send(lua_State *L) const char *name = luaL_checkstring(L, 2); const Shader::UniformInfo *info = shader->getUniformInfo(name); - if (info == nullptr) + if (info == nullptr || !info->active) return luaL_error(L, "Shader uniform '%s' does not exist.\nA common error is to define but not use the variable.", name); if (luax_istype(L, 3, Data::type) || (info->baseType == Shader::UNIFORM_MATRIX && luax_istype(L, 4, Data::type))) @@ -461,14 +461,11 @@ int w_Shader_sendColors(lua_State *L) const char *name = luaL_checkstring(L, 2); const Shader::UniformInfo *info = shader->getUniformInfo(name); - if (info == nullptr) - { - luax_pushboolean(L, false); - return 1; - } + if (info == nullptr || !info->active) + return luaL_error(L, "Shader uniform '%s' does not exist.\nA common error is to define but not use the variable.", name); if (info->baseType != Shader::UNIFORM_FLOAT || info->components < 3) - return luaL_error(L, "sendColor can only be used on vec3 or vec4 uniforms."); + return luaL_error(L, "Shader:sendColor can only be used with vec3 or vec4 uniforms."); if (luax_istype(L, 3, Data::type)) w_Shader_sendData(L, 3, shader, info, true); From ad42570cef41cf20a8c685d84397925d5c79ad0f Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Thu, 7 Mar 2024 21:37:21 -0400 Subject: [PATCH 053/104] Fix compile errors on Linux/Android --- src/modules/graphics/vulkan/Shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index 607ce9936..384452cca 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -671,7 +671,7 @@ void Shader::compileShaders() for (const auto &r : shaderResources.storage_buffers) { std::string name = canonicaliizeUniformName(r.name); - auto &uniformit = reflection.storageBuffers.find(name); + const auto &uniformit = reflection.storageBuffers.find(name); if (uniformit == reflection.storageBuffers.end()) { handleUnknownUniformName(name.c_str()); @@ -686,7 +686,7 @@ void Shader::compileShaders() for (const auto &r : shaderResources.storage_images) { std::string name = canonicaliizeUniformName(r.name); - auto &uniformit = reflection.storageBuffers.find(name); + const auto &uniformit = reflection.storageBuffers.find(name); if (uniformit == reflection.storageBuffers.end()) { handleUnknownUniformName(name.c_str()); From 321143755f59ec27341dd0e0771e69affe794023 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Thu, 7 Mar 2024 21:53:40 -0400 Subject: [PATCH 054/104] metal: clean up some shader resource binding code --- src/modules/graphics/metal/Shader.h | 1 - src/modules/graphics/metal/Shader.mm | 103 +++++++-------------------- 2 files changed, 27 insertions(+), 77 deletions(-) diff --git a/src/modules/graphics/metal/Shader.h b/src/modules/graphics/metal/Shader.h index 93ceec7af..174902bfc 100644 --- a/src/modules/graphics/metal/Shader.h +++ b/src/modules/graphics/metal/Shader.h @@ -138,7 +138,6 @@ class Shader final : public love::graphics::Shader }; void buildLocalUniforms(const spirv_cross::CompilerMSL &msl, const spirv_cross::SPIRType &type, size_t baseoffset, const std::string &basename); - void addImage(const spirv_cross::Resource &resource); void compileFromGLSLang(id device, const glslang::TProgram &program); id functions[SHADERSTAGE_MAX_ENUM]; diff --git a/src/modules/graphics/metal/Shader.mm b/src/modules/graphics/metal/Shader.mm index 5379e1be6..e2859dd55 100644 --- a/src/modules/graphics/metal/Shader.mm +++ b/src/modules/graphics/metal/Shader.mm @@ -340,30 +340,6 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) } } -void Shader::addImage(const spirv_cross::Resource &resource) -{ - using namespace spirv_cross; - - std::string name = canonicaliizeUniformName(resource.name); - auto uniformit = reflection.allUniforms.find(name); - if (uniformit == reflection.allUniforms.end()) - return; - - UniformInfo &u = *(uniformit->second); - - if (u.dataSize == 0) - { - u.dataSize = sizeof(int) * u.count; - u.data = malloc(u.dataSize); - for (int i = 0; i < u.count; i++) - u.ints[i] = -1; // Initialized below, after compiling. - } - - BuiltinUniform builtin; - if (getConstant(name.c_str(), builtin)) - builtinUniformInfo[builtin] = &u; -} - void Shader::compileFromGLSLang(id device, const glslang::TProgram &program) { using namespace glslang; @@ -414,16 +390,6 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) msl.set_enabled_interface_variables(interfacevars); - for (const auto &resource : resources.storage_images) - { - addImage(resource); - } - - for (const auto &resource : resources.sampled_images) - { - addImage(resource); - } - for (const auto &resource : resources.uniform_buffers) { MSLResourceBinding binding; @@ -471,25 +437,6 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) binding.desc_set = msl.get_decoration(resource.id, spv::DecorationDescriptorSet); binding.msl_buffer = metalBufferIndices[stageindex]++; msl.add_msl_resource_binding(binding); - - std::string name = canonicaliizeUniformName(resource.name); - auto uniformit = reflection.allUniforms.find(name); - if (uniformit == reflection.allUniforms.end()) - { - handleUnknownUniformName(name.c_str()); - continue; - } - - UniformInfo &u = *(uniformit->second); - - if (u.dataSize > 0) - continue; - - u.dataSize = sizeof(int) * u.count; - u.data = malloc(u.dataSize); - - for (int i = 0; i < u.count; i++) - u.ints[i] = -1; // Initialized below, after compiling. } if (stageindex == SHADERSTAGE_VERTEX) @@ -577,7 +524,10 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) std::string name = canonicaliizeUniformName(resource.name); auto it = reflection.allUniforms.find(name); if (it == reflection.allUniforms.end()) + { + handleUnknownUniformName(name.c_str()); return; + } UniformInfo &u = *(it->second); @@ -592,11 +542,11 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) u.active = true; - for (int i = 0; i < u.count; i++) + if (u.location < 0) { - if (u.ints[i] == -1) + u.location = (int)textureBindings.size(); + for (int i = 0; i < u.count; i++) { - u.ints[i] = (int)textureBindings.size(); TextureBinding b = {}; b.access = u.access; @@ -614,11 +564,18 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) textureBindings.push_back(b); } + } - auto &b = textureBindings[u.ints[i]]; + for (int i = 0; i < u.count; i++) + { + auto &b = textureBindings[u.location + i]; b.textureStages[stageindex] = (uint8) texturebinding; b.samplerStages[stageindex] = (uint8) samplerbinding; } + + BuiltinUniform builtin; + if (getConstant(name.c_str(), builtin)) + builtinUniformInfo[builtin] = &u; }; for (const auto &resource : resources.sampled_images) @@ -636,7 +593,10 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) std::string name = canonicaliizeUniformName(resource.name); auto it = reflection.storageBuffers.find(name); if (it == reflection.storageBuffers.end()) + { + handleUnknownUniformName(name.c_str()); continue; + } UniformInfo &u = it->second; @@ -649,11 +609,11 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) u.active = true; - for (int i = 0; i < u.count; i++) + if (u.location < 0) { - if (u.ints[i] == -1) + u.location = (int)bufferBindings.size(); + for (int i = 0; i < u.count; i++) { - u.ints[i] = (int)bufferBindings.size(); BufferBinding b = {}; b.access = u.access; @@ -662,9 +622,10 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) bufferBindings.push_back(b); } - - bufferBindings[u.ints[i]].stages[stageindex] = (uint8) bufferbinding; } + + for (int i = 0; i < u.count; i++) + bufferBindings[u.location + i].stages[stageindex] = (uint8) bufferbinding; } } @@ -700,15 +661,6 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) cachedRenderPipelines.clear(); - for (const auto &it : reflection.allUniforms) - { - const auto &u = *(it.second); - if (u.baseType == UNIFORM_SAMPLER || u.baseType == UNIFORM_STORAGETEXTURE) - free(u.data); - else if (u.baseType == UNIFORM_TEXELBUFFER || u.baseType == UNIFORM_STORAGEBUFFER) - free(u.data); - } - delete[] localUniformStagingData; delete[] localUniformBufferData; }} @@ -816,10 +768,10 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) activeTextures[resourceindex] = tex; - if (info->dataSize == 0) + if (info->location < 0) continue; - int bindingindex = info->ints[i]; + int bindingindex = info->location + i; if (bindingindex < 0) continue; @@ -850,7 +802,6 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) count = std::min(count, info->count); - // Bind the textures to the texture units. for (int i = 0; i < count; i++) { love::graphics::Buffer *buffer = buffers[i]; @@ -879,10 +830,10 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) activeBuffers[resourceindex] = buffer; - if (info->dataSize == 0) + if (info->location < 0) continue; - int bindingindex = info->ints[i]; + int bindingindex = info->location + i; if (texelbinding && bindingindex >= 0) { textureBindings[bindingindex].texture = getMTLTexture(buffer); From c35b9cba4aefe3fd5b7437ca021208ce9c10b111 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Thu, 7 Mar 2024 22:31:05 -0400 Subject: [PATCH 055/104] vulkan: fix a potential error during draws. --- src/modules/graphics/vulkan/Shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index 384452cca..a65e82e70 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -299,7 +299,7 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind { auto &info = *(u.second); - if (usesLocalUniformData(&info)) + if (!info.active || usesLocalUniformData(&info)) continue; if (info.baseType == UNIFORM_SAMPLER || info.baseType == UNIFORM_STORAGETEXTURE) From 8dae72b88e9244d8e16a3c0a4aad5b0f46a003d8 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Thu, 7 Mar 2024 23:04:22 -0400 Subject: [PATCH 056/104] vulkan: fix shader:send(texture|buffer) not calling love.graphics.flushBatch. --- src/modules/graphics/vulkan/Shader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index a65e82e70..cff26e4d4 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -437,6 +437,9 @@ void Shader::updateUniform(const UniformInfo *info, int count) void Shader::sendTextures(const UniformInfo *info, graphics::Texture **textures, int count) { + if (current == this) + Graphics::flushBatchedDrawsGlobal(); + for (int i = 0; i < count; i++) { int resourceindex = info->resourceIndex + i; @@ -450,6 +453,9 @@ void Shader::sendTextures(const UniformInfo *info, graphics::Texture **textures, void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffers, int count) { + if (current == this) + Graphics::flushBatchedDrawsGlobal(); + for (int i = 0; i < count; i++) { int resourceindex = info->resourceIndex + i; From ca0264e90628a35c652fb5d29ad0b642586acbd7 Mon Sep 17 00:00:00 2001 From: niki Date: Fri, 8 Mar 2024 13:42:05 +0100 Subject: [PATCH 057/104] vulkan: fix #2032 when using the low level vertexmain and pixelmain entry points it can happen that there are no local uniforms used. --- src/modules/graphics/vulkan/Shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index cff26e4d4..0b8692ad8 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -229,7 +229,7 @@ void Shader::newFrame() streamBuffers.clear(); streamBuffers.push_back(new StreamBuffer(vgfx, BUFFERUSAGE_UNIFORM, newSize)); } - else + else if (streamBuffers.size() == 1) streamBuffers.at(0)->nextFrame(); for (VkDescriptorPool pool : descriptorPools[currentFrame]) From 52f33041a508903645e79e85bb23a115850c8184 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 8 Mar 2024 17:52:21 -0400 Subject: [PATCH 058/104] Fix Shader:send with storage buffers. --- src/modules/graphics/Shader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index 636750d90..d859012e5 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -1237,6 +1237,9 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, UniformInfo u = {}; u.name = canonicaliizeUniformName(info.name); u.location = -1; + u.stageMask = getStageMask(info.stages); + u.components = 1; + u.baseType = UNIFORM_STORAGEBUFFER; if (type->isSizedArray()) u.count = type->getArraySizes()->getCumulativeSize(); From 51d5773b93d4d8a9f5a5708efccecd3749b95ad8 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 9 Mar 2024 00:15:13 -0400 Subject: [PATCH 059/104] vulkan: optimize vertex buffer binding code --- src/modules/graphics/vulkan/Graphics.cpp | 35 ++++++++++++++++-------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 9b1ce0f39..7687d8bb6 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -2354,28 +2354,39 @@ void Graphics::prepareDraw(const VertexAttributes &attributes, const BufferBindi configuration.dynamicState.cullmode = cullmode; } - std::vector bufferVector; - std::vector offsets; + VkBuffer vkbuffers[VertexAttributes::MAX + 2]; + VkDeviceSize vkoffsets[VertexAttributes::MAX + 2]; + int buffercount = 0; - for (uint32_t i = 0; i < VertexAttributes::MAX; i++) + uint32 allbits = buffers.useBits; + uint32 i = 0; + while (allbits) { - if (buffers.useBits & (1u << i)) + uint32 bit = 1u << i; + + if (buffers.useBits & bit) { - bufferVector.push_back((VkBuffer)buffers.info[i].buffer->getHandle()); - offsets.push_back((VkDeviceSize)buffers.info[i].offset); + vkbuffers[buffercount] = (VkBuffer)buffers.info[i].buffer->getHandle(); + vkoffsets[buffercount] = (VkDeviceSize)buffers.info[i].offset; + buffercount++; } + + i++; + allbits >>= 1; } if (!(attributes.enableBits & (1u << ATTRIB_TEXCOORD))) { - bufferVector.push_back((VkBuffer)defaultConstantTexCoord->getHandle()); - offsets.push_back((VkDeviceSize)0); + vkbuffers[buffercount] = (VkBuffer)defaultConstantTexCoord->getHandle(); + vkoffsets[buffercount] = (VkDeviceSize)0; + buffercount++; } if (!(attributes.enableBits & (1u << ATTRIB_COLOR))) { - bufferVector.push_back((VkBuffer)defaultConstantColor->getHandle()); - offsets.push_back((VkDeviceSize)0); + vkbuffers[buffercount] = (VkBuffer)defaultConstantColor->getHandle(); + vkoffsets[buffercount] = (VkDeviceSize)0; + buffercount++; } configuration.shader->setMainTex(texture); @@ -2383,7 +2394,9 @@ void Graphics::prepareDraw(const VertexAttributes &attributes, const BufferBindi ensureGraphicsPipelineConfiguration(configuration); configuration.shader->cmdPushDescriptorSets(commandBuffers.at(currentFrame), VK_PIPELINE_BIND_POINT_GRAPHICS); - vkCmdBindVertexBuffers(commandBuffers.at(currentFrame), 0, static_cast(bufferVector.size()), bufferVector.data(), offsets.data()); + + if (buffercount > 0) + vkCmdBindVertexBuffers(commandBuffers.at(currentFrame), 0, static_cast(buffercount), vkbuffers, vkoffsets); } void Graphics::setDefaultRenderPass() From be377601f74b2b37b2757f03a2c80022dbcef955 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 9 Mar 2024 13:07:23 -0400 Subject: [PATCH 060/104] vulkan: shader binding mapper works with arrays of resources --- src/common/Range.h | 2 +- src/modules/graphics/vulkan/Shader.cpp | 34 ++++++++++++++------------ 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/common/Range.h b/src/common/Range.h index 7daf07af4..14e274f59 100644 --- a/src/common/Range.h +++ b/src/common/Range.h @@ -61,7 +61,7 @@ struct Range return first <= other.first && last >= other.last; } - bool intersects(const Range &other) + bool intersects(const Range &other) const { return !(first > other.last || last < other.first); } diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index 0b8692ad8..e753680b3 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -21,6 +21,7 @@ #include "graphics/vertex.h" #include "Shader.h" #include "Graphics.h" +#include "common/Range.h" #include "libraries/glslang/glslang/Public/ShaderLang.h" #include "libraries/glslang/glslang/Public/ResourceLimits.h" @@ -41,21 +42,21 @@ static const uint32_t DESCRIPTOR_POOL_SIZE = 1000; class BindingMapper { public: - uint32_t operator()(spirv_cross::CompilerGLSL &comp, std::vector &spirv, const std::string &name, const spirv_cross::ID &id) + uint32_t operator()(spirv_cross::CompilerGLSL &comp, std::vector &spirv, const std::string &name, int count, const spirv_cross::ID &id) { auto it = bindingMappings.find(name); if (it == bindingMappings.end()) { auto binding = comp.get_decoration(id, spv::DecorationBinding); - if (isFreeBinding(binding)) + if (isFreeBinding(binding, count)) { - bindingMappings[name] = binding; + bindingMappings[name] = Range(binding, count); return binding; } else { - uint32_t freeBinding = getFreeBinding(); + uint32_t freeBinding = getFreeBinding(count); uint32_t binaryBindingOffset; if (!comp.get_binary_offset_for_decoration(id, spv::DecorationBinding, binaryBindingOffset)) @@ -63,37 +64,38 @@ class BindingMapper spirv[binaryBindingOffset] = freeBinding; - bindingMappings[name] = freeBinding; + bindingMappings[name] = Range(freeBinding, count); return freeBinding; } } else - return it->second; + return (uint32_t)it->second.getOffset(); }; private: - uint32_t getFreeBinding() + uint32_t getFreeBinding(int count) { for (uint32_t i = 0;; i++) { - if (isFreeBinding(i)) + if (isFreeBinding(i, count)) return i; } } - bool isFreeBinding(uint32_t binding) + bool isFreeBinding(uint32_t binding, int count) { + Range r(binding, count); for (const auto &entry : bindingMappings) { - if (entry.second == binding) + if (entry.second.intersects(r)) return false; } return true; } - std::map bindingMappings; + std::map bindingMappings; }; @@ -641,7 +643,7 @@ void Shader::compileShaders() localUniformStagingData.resize(defaultUniformBlockSize); localUniformData.resize(defaultUniformBlockSize); - localUniformLocation = bindingMapper(comp, spirv, resource.name, resource.id); + localUniformLocation = bindingMapper(comp, spirv, resource.name, 1, resource.id); memset(localUniformStagingData.data(), 0, defaultUniformBlockSize); memset(localUniformData.data(), 0, defaultUniformBlockSize); @@ -667,7 +669,7 @@ void Shader::compileShaders() UniformInfo &u = *(uniformit->second); u.active = true; - u.location = bindingMapper(comp, spirv, name, r.id); + u.location = bindingMapper(comp, spirv, name, u.count, r.id); BuiltinUniform builtin; if (getConstant(name.c_str(), builtin)) @@ -686,7 +688,7 @@ void Shader::compileShaders() UniformInfo &u = uniformit->second; u.active = true; - u.location = bindingMapper(comp, spirv, name, r.id); + u.location = bindingMapper(comp, spirv, name, u.count, r.id); } for (const auto &r : shaderResources.storage_images) @@ -701,7 +703,7 @@ void Shader::compileShaders() UniformInfo &u = uniformit->second; u.active = true; - u.location = bindingMapper(comp, spirv, name, r.id); + u.location = bindingMapper(comp, spirv, name, u.count, r.id); } if (shaderStage == SHADERSTAGE_VERTEX) @@ -771,7 +773,7 @@ void Shader::compileShaders() for (const auto kvp : reflection.allUniforms) { - if (kvp.second->location < 0) + if (!kvp.second->active) continue; switch (kvp.second->baseType) From 10565e9967aad0a0b2cc8eb61972b94ac9ad4525 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 9 Mar 2024 13:22:15 -0400 Subject: [PATCH 061/104] vulkan: improve draw performance via Shader::cmdPushDescriptorSets. --- src/modules/graphics/vulkan/Shader.cpp | 299 ++++++++++++++++--------- src/modules/graphics/vulkan/Shader.h | 9 +- 2 files changed, 198 insertions(+), 110 deletions(-) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index e753680b3..5ec35f6bb 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -240,18 +240,9 @@ void Shader::newFrame() void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint bindPoint) { - VkDescriptorSet currentDescriptorSet = allocateDescriptorSet(); - - std::vector bufferInfos; - bufferInfos.reserve(numBuffers); - - std::vector imageInfos; - imageInfos.reserve(numTextures); - - std::vector bufferViews; - bufferViews.reserve(numBufferViews); - - std::vector descriptorWrites; + int imageIndex = 0; + int bufferIndex = 0; + int bufferViewIndex = 0; if (!localUniformData.empty()) { @@ -276,122 +267,98 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind auto offset = currentStreamBuffer->unmap(uniformBufferSizeAligned); currentStreamBuffer->markUsed(uniformBufferSizeAligned); - VkDescriptorBufferInfo bufferInfo{}; + VkDescriptorBufferInfo &bufferInfo = descriptorBuffers[bufferIndex++]; bufferInfo.buffer = (VkBuffer)currentStreamBuffer->getHandle(); bufferInfo.offset = offset; bufferInfo.range = localUniformData.size(); - bufferInfos.push_back(bufferInfo); - - VkWriteDescriptorSet uniformWrite{}; - uniformWrite.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; - uniformWrite.dstSet = currentDescriptorSet; - uniformWrite.dstBinding = localUniformLocation; - uniformWrite.dstArrayElement = 0; - uniformWrite.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - uniformWrite.descriptorCount = 1; - uniformWrite.pBufferInfo = &bufferInfos[bufferInfos.size() - 1]; - - descriptorWrites.push_back(uniformWrite); - currentUsedUniformStreamBuffersCount++; } - for (const auto &u : reflection.allUniforms) + // TODO: iteration order must match the order at the end of compileShaders right now. + // TODO: We can store data via setTextures and setBuffers instead of iterating over + // everything here. + for (const auto &u : reflection.sampledTextures) { - auto &info = *(u.second); - - if (!info.active || usesLocalUniformData(&info)) + const auto &info = u.second; + if (!info.active) continue; - if (info.baseType == UNIFORM_SAMPLER || info.baseType == UNIFORM_STORAGETEXTURE) + for (int i = 0; i < info.count; i++) { - bool isSampler = info.baseType == UNIFORM_SAMPLER; - - for (int i = 0; i < info.count; i++) - { - auto vkTexture = dynamic_cast(activeTextures[info.resourceIndex + i]); - - if (vkTexture == nullptr) - throw love::Exception("uniform variable %s is not set.", info.name.c_str()); + auto vkTexture = dynamic_cast(activeTextures[info.resourceIndex + i]); - VkDescriptorImageInfo imageInfo{}; + if (vkTexture == nullptr) + throw love::Exception("uniform variable %s is not set.", info.name.c_str()); - imageInfo.imageLayout = vkTexture->getImageLayout(); - imageInfo.imageView = (VkImageView)vkTexture->getRenderTargetHandle(); - if (isSampler) - imageInfo.sampler = (VkSampler)vkTexture->getSamplerHandle(); + VkDescriptorImageInfo &imageInfo = descriptorImages[imageIndex++]; - imageInfos.push_back(imageInfo); - } + imageInfo.imageLayout = vkTexture->getImageLayout(); + imageInfo.imageView = (VkImageView)vkTexture->getRenderTargetHandle(); + imageInfo.sampler = (VkSampler)vkTexture->getSamplerHandle(); + } + } - VkWriteDescriptorSet write{}; - write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; - write.dstSet = currentDescriptorSet; - write.dstBinding = info.location; - write.dstArrayElement = 0; - if (isSampler) - write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; - else - write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; - write.descriptorCount = static_cast(info.count); - write.pImageInfo = &imageInfos[imageInfos.size() - info.count]; + for (const auto &u : reflection.storageTextures) + { + const auto &info = u.second; + if (!info.active) + continue; - descriptorWrites.push_back(write); - } - if (info.baseType == UNIFORM_STORAGEBUFFER) + for (int i = 0; i < info.count; i++) { - VkWriteDescriptorSet write{}; - write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; - write.dstSet = currentDescriptorSet; - write.dstBinding = info.location; - write.dstArrayElement = 0; - write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; - write.descriptorCount = info.count; - - for (int i = 0; i < info.count; i++) - { - auto b = activeBuffers[info.resourceIndex + i]; - if (b == nullptr) - throw love::Exception("uniform variable %s is not set.", info.name.c_str()); + auto vkTexture = dynamic_cast(activeTextures[info.resourceIndex + i]); - VkDescriptorBufferInfo bufferInfo{}; - bufferInfo.buffer = (VkBuffer)b->getHandle(); - bufferInfo.offset = 0; - bufferInfo.range = b->getSize(); + if (vkTexture == nullptr) + throw love::Exception("uniform variable %s is not set.", info.name.c_str()); - bufferInfos.push_back(bufferInfo); - } + VkDescriptorImageInfo &imageInfo = descriptorImages[imageIndex++]; - write.pBufferInfo = &bufferInfos[bufferInfos.size() - info.count]; - - descriptorWrites.push_back(write); + imageInfo.imageLayout = vkTexture->getImageLayout(); + imageInfo.imageView = (VkImageView)vkTexture->getRenderTargetHandle(); } - if (info.baseType == UNIFORM_TEXELBUFFER) + } + + for (const auto &u : reflection.texelBuffers) + { + const auto &info = u.second; + if (!info.active) + continue; + + for (int i = 0; i < info.count; i++) { - VkWriteDescriptorSet write{}; - write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; - write.dstSet = currentDescriptorSet; - write.dstBinding = info.location; - write.dstArrayElement = 0; - write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; - write.descriptorCount = info.count; - - for (int i = 0; i < info.count; i++) - { - auto b = activeBuffers[info.resourceIndex + i]; - if (b == nullptr) - throw love::Exception("uniform variable %s is not set.", info.name.c_str()); + auto b = activeBuffers[info.resourceIndex + i]; + if (b == nullptr) + throw love::Exception("uniform variable %s is not set.", info.name.c_str()); - bufferViews.push_back((VkBufferView)b->getTexelBufferHandle()); - } + descriptorBufferViews[bufferViewIndex++] = (VkBufferView)b->getTexelBufferHandle(); + } + } - write.pTexelBufferView = &bufferViews[bufferViews.size() - info.count]; + for (const auto &u : reflection.storageBuffers) + { + const auto &info = u.second; + if (!info.active) + continue; - descriptorWrites.push_back(write); + for (int i = 0; i < info.count; i++) + { + auto b = activeBuffers[info.resourceIndex + i]; + if (b == nullptr) + throw love::Exception("uniform variable %s is not set.", info.name.c_str()); + + VkDescriptorBufferInfo &bufferInfo = descriptorBuffers[bufferIndex++]; + bufferInfo.buffer = (VkBuffer)b->getHandle(); + bufferInfo.offset = 0; + bufferInfo.range = b->getSize(); } } + VkDescriptorSet currentDescriptorSet = allocateDescriptorSet(); + + for (auto &write : descriptorWrites) + write.dstSet = currentDescriptorSet; + vkUpdateDescriptorSets(device, descriptorWrites.size(), descriptorWrites.data(), 0, nullptr); vkCmdBindDescriptorSets(commandBuffer, bindPoint, pipelineLayout, 0, 1, ¤tDescriptorSet, 0, nullptr); @@ -764,9 +731,9 @@ void Shader::compileShaders() shaderStages.push_back(shaderStageInfo); } - numBuffers = 0; - numTextures = 0; - numBufferViews = 0; + int numBuffers = 0; + int numTextures = 0; + int numBufferViews = 0; if (localUniformData.size() > 0) numBuffers++; @@ -780,18 +747,135 @@ void Shader::compileShaders() { case UNIFORM_SAMPLER: case UNIFORM_STORAGETEXTURE: - numTextures++; + numTextures += kvp.second->count; break; case UNIFORM_STORAGEBUFFER: - numBuffers++; + numBuffers += kvp.second->count; break; case UNIFORM_TEXELBUFFER: - numBufferViews++; + numBufferViews += kvp.second->count; break; default: continue; } } + + descriptorWrites.clear(); + + descriptorBuffers.clear(); + descriptorBuffers.reserve(numBuffers); + + descriptorImages.clear(); + descriptorImages.reserve(numTextures); + + descriptorBufferViews.clear(); + descriptorBufferViews.reserve(numBufferViews); + + if (localUniformData.size() > 0) + { + VkDescriptorBufferInfo bufferInfo{}; + bufferInfo.range = localUniformData.size(); + + descriptorBuffers.push_back(bufferInfo); + + VkWriteDescriptorSet write{}; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.dstBinding = localUniformLocation; + write.dstArrayElement = 0; + write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + write.descriptorCount = 1; + write.pBufferInfo = &descriptorBuffers.back(); + descriptorWrites.push_back(write); + } + + for (const auto &u : reflection.sampledTextures) + { + const UniformInfo &info = u.second; + if (!info.active) + continue; + + for (int i = 0; i < info.count; i++) + { + VkDescriptorImageInfo imageInfo{}; + descriptorImages.push_back(imageInfo); + } + + VkWriteDescriptorSet write{}; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.dstBinding = info.location; + write.dstArrayElement = 0; + write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + write.descriptorCount = static_cast(info.count); + write.pImageInfo = &descriptorImages[descriptorImages.size() - info.count]; + + descriptorWrites.push_back(write); + } + + for (const auto &u : reflection.storageTextures) + { + const UniformInfo &info = u.second; + if (!info.active) + continue; + + for (int i = 0; i < info.count; i++) + { + VkDescriptorImageInfo imageInfo{}; + descriptorImages.push_back(imageInfo); + } + + VkWriteDescriptorSet write{}; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.dstBinding = info.location; + write.dstArrayElement = 0; + write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; + write.descriptorCount = static_cast(info.count); + write.pImageInfo = &descriptorImages[descriptorImages.size() - info.count]; + + descriptorWrites.push_back(write); + } + + for (const auto &u : reflection.texelBuffers) + { + const UniformInfo &info = u.second; + if (!info.active) + continue; + + for (int i = 0; i < info.count; i++) + descriptorBufferViews.push_back(VK_NULL_HANDLE); + + VkWriteDescriptorSet write{}; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.dstBinding = info.location; + write.dstArrayElement = 0; + write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER; + write.descriptorCount = info.count; + write.pTexelBufferView = &descriptorBufferViews[descriptorBufferViews.size() - info.count]; + + descriptorWrites.push_back(write); + } + + for (const auto &u : reflection.storageBuffers) + { + const UniformInfo &info = u.second; + if (!info.active) + continue; + + for (int i = 0; i < info.count; i++) + { + VkDescriptorBufferInfo bufferInfo{}; + descriptorBuffers.push_back(bufferInfo); + } + + VkWriteDescriptorSet write{}; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.dstBinding = info.location; + write.dstArrayElement = 0; + write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + write.descriptorCount = info.count; + write.pBufferInfo = &descriptorBuffers[descriptorBuffers.size() - info.count]; + + descriptorWrites.push_back(write); + } } void Shader::createDescriptorSetLayout() @@ -806,6 +890,9 @@ void Shader::createDescriptorSetLayout() for (auto const &entry : reflection.allUniforms) { + if (!entry.second->active) + continue; + auto type = Vulkan::getDescriptorType(entry.second->baseType); if (type != VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) { diff --git a/src/modules/graphics/vulkan/Shader.h b/src/modules/graphics/vulkan/Shader.h index d48fa09ca..7639fdaf4 100644 --- a/src/modules/graphics/vulkan/Shader.h +++ b/src/modules/graphics/vulkan/Shader.h @@ -102,10 +102,6 @@ class Shader final VkPipeline computePipeline; - uint32_t numTextures; - uint32_t numBuffers; - uint32_t numBufferViews; - VkDescriptorSetLayout descriptorSetLayout; VkPipelineLayout pipelineLayout; std::vector descriptorPoolSizes; @@ -115,6 +111,11 @@ class Shader final std::vector streamBuffers; std::vector> descriptorPools; + std::vector descriptorBuffers; + std::vector descriptorImages; + std::vector descriptorBufferViews; + std::vector descriptorWrites; + std::vector shaderStages; std::vector shaderModules; From 892411a737857a14b9d2b7a7746b0138f99b354e Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 9 Mar 2024 13:22:39 -0400 Subject: [PATCH 062/104] don't error during newShader if a buffer is unused. --- src/modules/graphics/Shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index d859012e5..d25842252 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -1208,7 +1208,7 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, { const glslang::TQualifier &qualifiers = type->getQualifier(); - if ((!qualifiers.isReadOnly() || qualifiers.isWriteOnly()) && (info.stages & EShLangComputeMask) == 0) + if ((!qualifiers.isReadOnly() || qualifiers.isWriteOnly()) && ((info.stages & (~EShLangComputeMask)) != 0)) { err = "Shader validation error:\nStorage Buffer block '" + info.name + "' must be marked as readonly in vertex and pixel shaders."; return false; From b08f35d341a7b77b248b0c2a8940e802b0367e65 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 9 Mar 2024 16:01:26 -0400 Subject: [PATCH 063/104] vulkan: only set cubemap compatibility for array textures with >= 6 layers. --- src/modules/graphics/vulkan/Texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/Texture.cpp b/src/modules/graphics/vulkan/Texture.cpp index 229e6bc50..a728b0212 100644 --- a/src/modules/graphics/vulkan/Texture.cpp +++ b/src/modules/graphics/vulkan/Texture.cpp @@ -112,7 +112,7 @@ bool Texture::loadVolatile() } } - if (texType == TEXTURE_CUBE || texType == TEXTURE_2D_ARRAY) + if (texType == TEXTURE_CUBE || (texType == TEXTURE_2D_ARRAY && layerCount >= 6)) createFlags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; msaaSamples = vgfx->getMsaaCount(requestedMSAA); From b6c47cd3ec337e4f62b991227c209f2b18aacb2c Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 9 Mar 2024 16:09:26 -0400 Subject: [PATCH 064/104] vulkan: fix typo preventing storage textures in shaders from working. --- src/modules/graphics/vulkan/Shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index 5ec35f6bb..f28b8bfd8 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -661,8 +661,8 @@ void Shader::compileShaders() for (const auto &r : shaderResources.storage_images) { std::string name = canonicaliizeUniformName(r.name); - const auto &uniformit = reflection.storageBuffers.find(name); - if (uniformit == reflection.storageBuffers.end()) + const auto &uniformit = reflection.storageTextures.find(name); + if (uniformit == reflection.storageTextures.end()) { handleUnknownUniformName(name.c_str()); continue; From 54f27a8277b6d462987b4340356e2a17b95739e1 Mon Sep 17 00:00:00 2001 From: niki Date: Sun, 10 Mar 2024 14:41:37 +0100 Subject: [PATCH 065/104] vulkan: unify local uniform buffer --- src/modules/graphics/vulkan/Graphics.cpp | 28 +++++++++--- src/modules/graphics/vulkan/Graphics.h | 3 +- src/modules/graphics/vulkan/Shader.cpp | 58 +----------------------- src/modules/graphics/vulkan/Shader.h | 8 ---- 4 files changed, 25 insertions(+), 72 deletions(-) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 7687d8bb6..ab1f799ef 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -153,6 +153,7 @@ Graphics::~Graphics() { defaultConstantTexCoord.set(nullptr); defaultConstantColor.set(nullptr); + localUniformBuffer.set(nullptr); Volatile::unloadAll(); cleanup(); @@ -650,6 +651,9 @@ bool Graphics::setMode(void *context, int width, int height, int pixelwidth, int createSyncObjects(); } + if (localUniformBuffer == nullptr) + localUniformBuffer.set(new StreamBuffer(this, BUFFERUSAGE_UNIFORM, 1024 * 512 * 1), Acquire::NORETAIN); + beginFrame(); if (createBaseObjects) @@ -1302,9 +1306,11 @@ void Graphics::beginFrame() Vulkan::resetShaderSwitches(); - for (const auto shader : usedShadersInFrame) + for (const auto &shader : usedShadersInFrame) shader->newFrame(); usedShadersInFrame.clear(); + + localUniformBuffer->nextFrame(); } void Graphics::startRecordingGraphicsCommands() @@ -1330,11 +1336,6 @@ void Graphics::endRecordingGraphicsCommands() { throw love::Exception("failed to record command buffer"); } -const VkDeviceSize Graphics::getMinUniformBufferOffsetAlignment() const -{ - return minUniformBufferOffsetAlignment; -} - VkCommandBuffer Graphics::getCommandBufferForDataTransfer() { if (renderPassState.active) @@ -2869,6 +2870,21 @@ int Graphics::getVsync() const return vsync; } +void Graphics::mapLocalUniformData(void *data, size_t size, VkDescriptorBufferInfo &bufferInfo) +{ + size_t alignedSize = static_cast(std::ceil(static_cast(size) / static_cast(minUniformBufferOffsetAlignment))) * minUniformBufferOffsetAlignment; + + if (localUniformBuffer->getUsableSize() < alignedSize) + localUniformBuffer.set(new StreamBuffer(this, BUFFERUSAGE_UNIFORM, localUniformBuffer->getSize() * 2), Acquire::NORETAIN); + + auto mapInfo = localUniformBuffer->map(alignedSize); + memcpy(mapInfo.data, data, size); + + bufferInfo.buffer = (VkBuffer)localUniformBuffer->getHandle(); + bufferInfo.offset = localUniformBuffer->unmap(alignedSize); + bufferInfo.range = size; +} + void Graphics::createColorResources() { if (msaaSamples & VK_SAMPLE_COUNT_1_BIT) diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index d64aa3bff..a000120bf 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -316,7 +316,6 @@ class Graphics final : public love::graphics::Graphics void queueCleanUp(std::function cleanUp); void addReadbackCallback(std::function callback); void submitGpuCommands(SubmitMode, void *screenshotCallbackData = nullptr); - const VkDeviceSize getMinUniformBufferOffsetAlignment() const; VkSampler getCachedSampler(const SamplerState &sampler); void setComputeShader(Shader *computeShader); graphics::Shader::BuiltinUniformData getCurrentBuiltinUniformData(); @@ -325,6 +324,7 @@ class Graphics final : public love::graphics::Graphics VkSampleCountFlagBits getMsaaCount(int requestedMsaa) const; void setVsync(int vsync); int getVsync() const; + void mapLocalUniformData(void *data, size_t size, VkDescriptorBufferInfo &bufferInfo); uint32 getDeviceApiVersion() const { return deviceApiVersion; } @@ -444,6 +444,7 @@ class Graphics final : public love::graphics::Graphics VmaAllocator vmaAllocator = VK_NULL_HANDLE; StrongRef defaultConstantColor; StrongRef defaultConstantTexCoord; + StrongRef localUniformBuffer; // functions that need to be called to cleanup objects that were needed for rendering a frame. // We need a vector for each frame in flight. std::vector>> cleanUpFunctions; diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index f28b8bfd8..ba2a1d9a2 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -157,14 +157,11 @@ bool Shader::loadVolatile() builtinUniformInfo[i] = nullptr; compileShaders(); - calculateUniformBufferSizeAligned(); createDescriptorSetLayout(); createPipelineLayout(); createDescriptorPoolSizes(); - createStreamBuffers(); descriptorPools.resize(MAX_FRAMES_IN_FLIGHT); currentFrame = 0; - currentUsedUniformStreamBuffersCount = 0; newFrame(); return true; @@ -189,12 +186,8 @@ void Shader::unloadVolatile() vkDestroyPipeline(device, computePipeline, nullptr); }); - for (const auto streamBuffer : streamBuffers) - streamBuffer->release(); - shaderModules.clear(); shaderStages.clear(); - streamBuffers.clear(); descriptorPools.clear(); } @@ -217,23 +210,8 @@ void Shader::newFrame() { currentFrame = (currentFrame + 1) % MAX_FRAMES_IN_FLIGHT; - currentUsedUniformStreamBuffersCount = 0; currentDescriptorPool = 0; - if (streamBuffers.size() > 1) - { - size_t newSize = 0; - for (auto streamBuffer : streamBuffers) - { - newSize += streamBuffer->getSize(); - streamBuffer->release(); - } - streamBuffers.clear(); - streamBuffers.push_back(new StreamBuffer(vgfx, BUFFERUSAGE_UNIFORM, newSize)); - } - else if (streamBuffers.size() == 1) - streamBuffers.at(0)->nextFrame(); - for (VkDescriptorPool pool : descriptorPools[currentFrame]) vkResetDescriptorPool(device, pool, 0); } @@ -246,13 +224,6 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind if (!localUniformData.empty()) { - auto usedStreamBufferMemory = currentUsedUniformStreamBuffersCount * uniformBufferSizeAligned; - if (usedStreamBufferMemory >= streamBuffers.back()->getSize()) - { - streamBuffers.push_back(new StreamBuffer(vgfx, BUFFERUSAGE_UNIFORM, STREAMBUFFER_DEFAULT_SIZE * uniformBufferSizeAligned)); - currentUsedUniformStreamBuffersCount = 0; - } - if (builtinUniformDataOffset.hasValue) { auto builtinData = vgfx->getCurrentBuiltinUniformData(); @@ -260,19 +231,7 @@ void Shader::cmdPushDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBind memcpy(dst, &builtinData, sizeof(builtinData)); } - auto currentStreamBuffer = streamBuffers.back(); - - auto mapInfo = currentStreamBuffer->map(uniformBufferSizeAligned); - memcpy(mapInfo.data, localUniformData.data(), localUniformData.size()); - auto offset = currentStreamBuffer->unmap(uniformBufferSizeAligned); - currentStreamBuffer->markUsed(uniformBufferSizeAligned); - - VkDescriptorBufferInfo &bufferInfo = descriptorBuffers[bufferIndex++]; - bufferInfo.buffer = (VkBuffer)currentStreamBuffer->getHandle(); - bufferInfo.offset = offset; - bufferInfo.range = localUniformData.size(); - - currentUsedUniformStreamBuffersCount++; + vgfx->mapLocalUniformData(localUniformData.data(), localUniformData.size(), descriptorBuffers[bufferIndex++]); } // TODO: iteration order must match the order at the end of compileShaders right now. @@ -436,14 +395,6 @@ void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffe } } -void Shader::calculateUniformBufferSizeAligned() -{ - auto minAlignment = vgfx->getMinUniformBufferOffsetAlignment(); - size_t size = localUniformStagingData.size(); - auto factor = static_cast(std::ceil(static_cast(size) / static_cast(minAlignment))); - uniformBufferSizeAligned = factor * minAlignment; -} - void Shader::buildLocalUniforms(spirv_cross::Compiler &comp, const spirv_cross::SPIRType &type, size_t baseoff, const std::string &basename) { using namespace spirv_cross; @@ -978,13 +929,6 @@ void Shader::createDescriptorPoolSizes() } } -void Shader::createStreamBuffers() -{ - size_t size = STREAMBUFFER_DEFAULT_SIZE * uniformBufferSizeAligned; - if (size > 0) - streamBuffers.push_back(new StreamBuffer(vgfx, BUFFERUSAGE_UNIFORM, size)); -} - void Shader::setVideoTextures(graphics::Texture *ytexture, graphics::Texture *cbtexture, graphics::Texture *crtexture) { std::array textures = { diff --git a/src/modules/graphics/vulkan/Shader.h b/src/modules/graphics/vulkan/Shader.h index 7639fdaf4..cbca89218 100644 --- a/src/modules/graphics/vulkan/Shader.h +++ b/src/modules/graphics/vulkan/Shader.h @@ -88,27 +88,20 @@ class Shader final void setMainTex(graphics::Texture *texture); private: - void calculateUniformBufferSizeAligned(); void compileShaders(); void createDescriptorSetLayout(); void createPipelineLayout(); void createDescriptorPoolSizes(); - void createStreamBuffers(); void buildLocalUniforms(spirv_cross::Compiler &comp, const spirv_cross::SPIRType &type, size_t baseoff, const std::string &basename); void createDescriptorPool(); VkDescriptorSet allocateDescriptorSet(); - VkDeviceSize uniformBufferSizeAligned; - VkPipeline computePipeline; VkDescriptorSetLayout descriptorSetLayout; VkPipelineLayout pipelineLayout; std::vector descriptorPoolSizes; - // we don't know how much memory we need per frame for the uniform buffer descriptors - // we keep a vector of stream buffers that gets dynamically increased if more memory is needed - std::vector streamBuffers; std::vector> descriptorPools; std::vector descriptorBuffers; @@ -135,7 +128,6 @@ class Shader final std::unordered_map attributes; uint32_t currentFrame; - uint32_t currentUsedUniformStreamBuffersCount; uint32_t currentDescriptorPool; }; From 75fd2fa06ea886c017b410b9a997b3248bc8710b Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 10 Mar 2024 13:08:04 -0300 Subject: [PATCH 066/104] metal: add debug labels for internal buffers. --- src/modules/graphics/metal/Graphics.mm | 1 + src/modules/graphics/metal/StreamBuffer.mm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index e4e9dc2af..9ef7230dc 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -341,6 +341,7 @@ static inline void setSampler(id encoder, Graphics::Re }; Buffer::Settings attribsettings(BUFFERUSAGEFLAG_VERTEX, BUFFERDATAUSAGE_STATIC); + attribsettings.debugName = "Default Vertex Attributes"; defaultAttributesBuffer = newBuffer(attribsettings, dataformat, &defaults, sizeof(DefaultVertexAttributes), 0); } diff --git a/src/modules/graphics/metal/StreamBuffer.mm b/src/modules/graphics/metal/StreamBuffer.mm index 41d938ca3..857fdb07d 100644 --- a/src/modules/graphics/metal/StreamBuffer.mm +++ b/src/modules/graphics/metal/StreamBuffer.mm @@ -48,6 +48,8 @@ if (buffer == nil) throw love::Exception("Out of graphics memory."); + buffer.label = [NSString stringWithFormat:@"StreamBuffer (usage: %d, size: %ld)", usage, size]; + data = (uint8 *) buffer.contents; for (int i = 0; i < BUFFER_FRAMES; i++) From 9e00ce097366b1bea0a016243eafd30873963f1c Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 10 Mar 2024 13:38:28 -0300 Subject: [PATCH 067/104] metal: fix uniform data corruption The wrong buffer binding offset was being used in 2/3rds of frames. --- src/modules/graphics/StreamBuffer.h | 2 ++ src/modules/graphics/metal/Graphics.h | 1 + src/modules/graphics/metal/Graphics.mm | 21 +++++++++++++++----- src/modules/graphics/metal/StreamBuffer.mm | 5 +++++ src/modules/graphics/opengl/StreamBuffer.cpp | 15 ++++++++++++++ src/modules/graphics/vulkan/StreamBuffer.cpp | 5 +++++ 6 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/modules/graphics/StreamBuffer.h b/src/modules/graphics/StreamBuffer.h index d016ce5bf..ceaa87f94 100644 --- a/src/modules/graphics/StreamBuffer.h +++ b/src/modules/graphics/StreamBuffer.h @@ -57,6 +57,8 @@ class StreamBuffer : public love::Object, public Resource BufferUsage getMode() const { return mode; } size_t getUsableSize() const { return bufferSize - frameGPUReadOffset; } + virtual size_t getGPUReadOffset() const = 0; + virtual MapInfo map(size_t minsize) = 0; virtual size_t unmap(size_t usedsize) = 0; virtual void markUsed(size_t usedsize) = 0; diff --git a/src/modules/graphics/metal/Graphics.h b/src/modules/graphics/metal/Graphics.h index 4a7ebf219..41aa71be9 100644 --- a/src/modules/graphics/metal/Graphics.h +++ b/src/modules/graphics/metal/Graphics.h @@ -242,6 +242,7 @@ class Graphics final : public love::graphics::Graphics StreamBuffer *uniformBuffer; StreamBuffer::MapInfo uniformBufferData; size_t uniformBufferOffset; + size_t uniformBufferGPUStart; Buffer *defaultAttributesBuffer; diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index 9ef7230dc..ecad1ea24 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -280,6 +280,7 @@ static inline void setSampler(id encoder, Graphics::Re , attachmentStoreActions() , renderBindings() , uniformBufferOffset(0) + , uniformBufferGPUStart(0) , defaultAttributesBuffer(nullptr) , families() { @autoreleasepool { @@ -1035,14 +1036,19 @@ static bool isClampOne(SamplerState::WrapMode w) if (uniformBuffer->getSize() < uniformBufferOffset + size) { size_t newsize = uniformBuffer->getSize() * 2; + if (uniformBufferOffset > 0) + uniformBuffer->nextFrame(); uniformBuffer->release(); - uniformBuffer = CreateStreamBuffer(device, BUFFERUSAGE_VERTEX, newsize); + uniformBuffer = CreateStreamBuffer(device, BUFFERUSAGE_UNIFORM, newsize); uniformBufferData = {}; uniformBufferOffset = 0; } if (uniformBufferData.data == nullptr) + { uniformBufferData = uniformBuffer->map(uniformBuffer->getSize()); + uniformBufferGPUStart = uniformBuffer->getGPUReadOffset(); + } memcpy(uniformBufferData.data + uniformBufferOffset, bufferdata, size); @@ -1050,7 +1056,7 @@ static bool isClampOne(SamplerState::WrapMode w) int uniformindex = Shader::getUniformBufferBinding(); auto &bindings = renderBindings; - setBuffer(encoder, bindings, uniformindex, buffer, uniformBufferOffset); + setBuffer(encoder, bindings, uniformindex, buffer, uniformBufferGPUStart + uniformBufferOffset); uniformBufferOffset += alignUp(size, alignment); @@ -1141,14 +1147,19 @@ static bool isClampOne(SamplerState::WrapMode w) if (uniformBuffer->getSize() < uniformBufferOffset + size) { size_t newsize = uniformBuffer->getSize() * 2; + if (uniformBufferOffset > 0) + uniformBuffer->nextFrame(); uniformBuffer->release(); - uniformBuffer = CreateStreamBuffer(device, BUFFERUSAGE_VERTEX, newsize); + uniformBuffer = CreateStreamBuffer(device, BUFFERUSAGE_UNIFORM, newsize); uniformBufferData = {}; uniformBufferOffset = 0; } if (uniformBufferData.data == nullptr) + { uniformBufferData = uniformBuffer->map(uniformBuffer->getSize()); + uniformBufferGPUStart = uniformBuffer->getGPUReadOffset(); + } memcpy(uniformBufferData.data + uniformBufferOffset, bufferdata, size); @@ -1156,8 +1167,8 @@ static bool isClampOne(SamplerState::WrapMode w) int uniformindex = Shader::getUniformBufferBinding(); auto &bindings = renderBindings; - setBuffer(renderEncoder, bindings, SHADERSTAGE_VERTEX, uniformindex, buffer, uniformBufferOffset); - setBuffer(renderEncoder, bindings, SHADERSTAGE_PIXEL, uniformindex, buffer, uniformBufferOffset); + setBuffer(renderEncoder, bindings, SHADERSTAGE_VERTEX, uniformindex, buffer, uniformBufferGPUStart + uniformBufferOffset); + setBuffer(renderEncoder, bindings, SHADERSTAGE_PIXEL, uniformindex, buffer, uniformBufferGPUStart + uniformBufferOffset); uniformBufferOffset += alignUp(size, alignment); diff --git a/src/modules/graphics/metal/StreamBuffer.mm b/src/modules/graphics/metal/StreamBuffer.mm index 857fdb07d..00d3e33c9 100644 --- a/src/modules/graphics/metal/StreamBuffer.mm +++ b/src/modules/graphics/metal/StreamBuffer.mm @@ -67,6 +67,11 @@ } }} + size_t getGPUReadOffset() const override + { + return (frameIndex * bufferSize) + frameGPUReadOffset; + } + MapInfo map(size_t /*minsize*/) override { // Make sure this frame's section of the buffer is done being used. diff --git a/src/modules/graphics/opengl/StreamBuffer.cpp b/src/modules/graphics/opengl/StreamBuffer.cpp index c5919cdd7..9317ead3a 100644 --- a/src/modules/graphics/opengl/StreamBuffer.cpp +++ b/src/modules/graphics/opengl/StreamBuffer.cpp @@ -63,6 +63,11 @@ class StreamBufferClientMemory final : public love::graphics::StreamBuffer delete[] data; } + size_t getGPUReadOffset() const override + { + return (size_t) data; + } + MapInfo map(size_t /*minsize*/) override { return MapInfo(data, bufferSize); @@ -111,6 +116,11 @@ class StreamBufferSubDataOrphan final : public love::graphics::StreamBuffer, pub delete[] data; } + size_t getGPUReadOffset() const override + { + return frameGPUReadOffset; + } + MapInfo map(size_t /*minsize*/) override { if (orphan) @@ -192,6 +202,11 @@ class StreamBufferSync : public love::graphics::StreamBuffer virtual ~StreamBufferSync() {} + size_t getGPUReadOffset() const override + { + return (frameIndex * bufferSize) + frameGPUReadOffset; + } + void nextFrame() override { // Insert a GPU fence for this frame's section of the data, we'll wait diff --git a/src/modules/graphics/vulkan/StreamBuffer.cpp b/src/modules/graphics/vulkan/StreamBuffer.cpp index 8c37de985..de4e4d73c 100644 --- a/src/modules/graphics/vulkan/StreamBuffer.cpp +++ b/src/modules/graphics/vulkan/StreamBuffer.cpp @@ -96,6 +96,11 @@ ptrdiff_t StreamBuffer::getHandle() const return (ptrdiff_t) buffer; } +size_t getGPUReadOffset() const override +{ + return (frameIndex * bufferSize) + frameGPUReadOffset; +} + love::graphics::StreamBuffer::MapInfo StreamBuffer::map(size_t /*minsize*/) { // TODO: do we also need to wait until a fence is complete, here? From b12ecf49d8db79869e2da67621a796fd7295a822 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 10 Mar 2024 13:51:33 -0300 Subject: [PATCH 068/104] Fix compile errors --- src/modules/graphics/vulkan/StreamBuffer.cpp | 2 +- src/modules/graphics/vulkan/StreamBuffer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/StreamBuffer.cpp b/src/modules/graphics/vulkan/StreamBuffer.cpp index de4e4d73c..517a69eaa 100644 --- a/src/modules/graphics/vulkan/StreamBuffer.cpp +++ b/src/modules/graphics/vulkan/StreamBuffer.cpp @@ -96,7 +96,7 @@ ptrdiff_t StreamBuffer::getHandle() const return (ptrdiff_t) buffer; } -size_t getGPUReadOffset() const override +size_t StreamBuffer::getGPUReadOffset() const { return (frameIndex * bufferSize) + frameGPUReadOffset; } diff --git a/src/modules/graphics/vulkan/StreamBuffer.h b/src/modules/graphics/vulkan/StreamBuffer.h index 6b2c11772..c32533d13 100644 --- a/src/modules/graphics/vulkan/StreamBuffer.h +++ b/src/modules/graphics/vulkan/StreamBuffer.h @@ -47,6 +47,7 @@ class StreamBuffer final virtual void unloadVolatile() override; + size_t getGPUReadOffset() const override; MapInfo map(size_t minsize) override; size_t unmap(size_t usedSize) override; void markUsed(size_t usedSize) override; From ec9fb6eb288c1e0615f055f9627d9ba51cdd9155 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 10 Mar 2024 14:33:29 -0300 Subject: [PATCH 069/104] Improve Windows vulkan draw performance by reducing the size of a struct. --- src/modules/graphics/metal/Shader.mm | 2 +- src/modules/graphics/opengl/OpenGL.cpp | 2 +- src/modules/graphics/vertex.cpp | 4 +++- src/modules/graphics/vertex.h | 9 ++++++--- src/modules/graphics/vulkan/Graphics.cpp | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/modules/graphics/metal/Shader.mm b/src/modules/graphics/metal/Shader.mm index e2859dd55..b481236c0 100644 --- a/src/modules/graphics/metal/Shader.mm +++ b/src/modules/graphics/metal/Shader.mm @@ -948,7 +948,7 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) const auto &attrib = attributes.attribs[i]; int metalBufferIndex = firstVertexBufferBinding + attrib.bufferIndex; - vertdesc.attributes[i].format = getMTLVertexFormat(attrib.format); + vertdesc.attributes[i].format = getMTLVertexFormat(attrib.getFormat()); vertdesc.attributes[i].offset = attrib.offsetFromVertex; vertdesc.attributes[i].bufferIndex = metalBufferIndex; diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 68446af0a..845030f8d 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -870,7 +870,7 @@ void OpenGL::setVertexAttributes(const VertexAttributes &attributes, const Buffe int components = 0; GLboolean normalized = GL_FALSE; bool intformat = false; - GLenum gltype = getGLVertexDataType(attrib.format, components, normalized, intformat); + GLenum gltype = getGLVertexDataType(attrib.getFormat(), components, normalized, intformat); const void *offsetpointer = reinterpret_cast(bufferinfo.offset + attrib.offsetFromVertex); diff --git a/src/modules/graphics/vertex.cpp b/src/modules/graphics/vertex.cpp index bc757014b..b2e5f098e 100644 --- a/src/modules/graphics/vertex.cpp +++ b/src/modules/graphics/vertex.cpp @@ -26,6 +26,8 @@ namespace love namespace graphics { +static_assert(sizeof(VertexAttributeInfo) == 4, "Unexpected sizeof(VertexAttributeInfo)"); + static_assert(sizeof(Color32) == 4, "sizeof(Color32) incorrect!"); static_assert(sizeof(STf_RGBAub) == sizeof(float)*2 + sizeof(Color32), "sizeof(STf_RGBAub) incorrect!"); static_assert(sizeof(STPf_RGBAub) == sizeof(float)*3 + sizeof(Color32), "sizeof(STPf_RGBAub) incorrect!"); @@ -336,7 +338,7 @@ bool VertexAttributes::operator == (const VertexAttributes &other) const { const auto &a = attribs[i]; const auto &b = other.attribs[i]; - if (a.bufferIndex != b.bufferIndex || a.format != b.format || a.offsetFromVertex != b.offsetFromVertex) + if (a.bufferIndex != b.bufferIndex || a.packedFormat != b.packedFormat || a.offsetFromVertex != b.offsetFromVertex) return false; if (bufferLayouts[a.bufferIndex].stride != other.bufferLayouts[a.bufferIndex].stride) diff --git a/src/modules/graphics/vertex.h b/src/modules/graphics/vertex.h index 10ee45599..7669c407d 100644 --- a/src/modules/graphics/vertex.h +++ b/src/modules/graphics/vertex.h @@ -298,9 +298,12 @@ struct BufferBindings struct VertexAttributeInfo { - uint8 bufferIndex; - DataFormat format : 8; uint16 offsetFromVertex; + uint8 packedFormat; + uint8 bufferIndex; + + void setFormat(DataFormat format) { packedFormat = (uint8)format; } + DataFormat getFormat() const { return (DataFormat)packedFormat; } }; struct VertexBufferLayout @@ -335,7 +338,7 @@ struct VertexAttributes enableBits |= (1u << index); attribs[index].bufferIndex = bufferindex; - attribs[index].format = format; + attribs[index].setFormat(format); attribs[index].offsetFromVertex = offsetfromvertex; } diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 7687d8bb6..f8b3509ab 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -2273,7 +2273,7 @@ void Graphics::createVulkanVertexFormat( attributeDescription.location = i; attributeDescription.binding = bufferBinding; attributeDescription.offset = attrib.offsetFromVertex; - attributeDescription.format = Vulkan::getVulkanVertexFormat(attrib.format); + attributeDescription.format = Vulkan::getVulkanVertexFormat(attrib.getFormat()); attributeDescriptions.push_back(attributeDescription); } From a07503c3f5989248e1f4402307066c46f36cf0f9 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 10 Mar 2024 15:41:31 -0300 Subject: [PATCH 070/104] rename test parameters to be simpler. --runAllTests is now --all --runSpecificMethod is now --method --runSpecificModules is now --modules --- .github/workflows/main.yml | 14 +++++++------- testing/main.lua | 32 ++++++++++++++++---------------- testing/readme.md | 4 ++-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7298d16e5..7c75d2db9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,7 +61,7 @@ jobs: - name: Run Test Suite (opengl) run: | chmod a+x love-${{ github.sha }}.AppImage - ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --runAllTests --isRunner + ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner - name: Love Test Report (opengl) id: report1 uses: ellraiser/love-test-report@main @@ -82,7 +82,7 @@ jobs: - name: Run Test Suite (opengles) run: | export LOVE_GRAPHICS_USE_OPENGLES=1 - ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --runAllTests --isRunner + ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner - name: Love Test Report (opengles) uses: ellraiser/love-test-report@main id: report2 @@ -103,7 +103,7 @@ jobs: # - name: Run Test Suite (vulkan) # run: | # export LOVE_GRAPHICS_DEBUG=1 -# ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --runAllTests --isRunner --renderers vulkan +# ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers vulkan # - name: Love Test Report (vulkan) # uses: ellraiser/love-test-report@main # with: @@ -321,7 +321,7 @@ jobs: run: | echo 'check dir' ls - powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --runAllTests --isRunner + powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner - name: Love Test Report (opengl) id: report1 if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' @@ -347,7 +347,7 @@ jobs: env: LOVE_GRAPHICS_USE_OPENGLES: 1 run: | - powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --runAllTests --isRunner + powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner - name: Love Test Report (opengles) id: report2 if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' @@ -391,7 +391,7 @@ jobs: # if: steps.vars.outputs.arch != 'ARM64' # run: | # $ENV:LOVE_GRAPHICS_DEBUG=1 -# powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --runAllTests --isRunner --renderers vulkan +# powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers vulkan # - name: Love Test Report (vulkan) # if: steps.vars.outputs.arch != 'ARM64' # uses: ellraiser/love-test-report@main @@ -444,7 +444,7 @@ jobs: - name: Run Test Suite run: | ls - love-macos/love.app/Contents/MacOS/love ./testing/main.lua --runAllTests --isRunner + love-macos/love.app/Contents/MacOS/love ./testing/main.lua --all --isRunner - name: Love Test Report id: report1 uses: ellraiser/love-test-report@main diff --git a/testing/main.lua b/testing/main.lua index 6c7b26165..3a4344426 100644 --- a/testing/main.lua +++ b/testing/main.lua @@ -71,7 +71,7 @@ love.load = function(args) end -- convert args to the cmd to run, modules, method (if any) and disabled - local testcmd = '--runAllTests' + local testcmd = '--all' local module = '' local method = '' local cmderr = 'Invalid flag used' @@ -82,7 +82,7 @@ love.load = function(args) } GITHUB_RUNNER = false for a=1,#arglist do - if testcmd == '--runSpecificMethod' then + if testcmd == '--method' then if module == '' and (arglist[a] == 'love' or love[ arglist[a] ] ~= nil) then module = arglist[a] table.insert(modules, module) @@ -90,16 +90,16 @@ love.load = function(args) if love.test[module][arglist[a]] ~= nil then method = arglist[a] end end end - if testcmd == '--runSpecificModules' then + if testcmd == '--modules' then if (arglist[a] == 'love' or love[ arglist[a] ] ~= nil) and arglist[a] ~= '--isRunner' then table.insert(modules, arglist[a]) end end - if arglist[a] == '--runSpecificMethod' then + if arglist[a] == '--method' then testcmd = arglist[a] modules = {} end - if arglist[a] == '--runSpecificModules' then + if arglist[a] == '--modules' then testcmd = arglist[a] modules = {} end @@ -108,22 +108,22 @@ love.load = function(args) end end - -- runSpecificMethod uses the module + method given - if testcmd == '--runSpecificMethod' then + -- method uses the module + method given + if testcmd == '--method' then local testmodule = TestModule:new(module, method) table.insert(love.test.modules, testmodule) if module ~= '' and method ~= '' then love.test.module = testmodule - love.test.module:log('grey', '--runSpecificMethod "' .. module .. '" "' .. method .. '"') - love.test.output = 'lovetest_runSpecificMethod_' .. module .. '_' .. method + love.test.module:log('grey', '--method "' .. module .. '" "' .. method .. '"') + love.test.output = 'lovetest_method_' .. module .. '_' .. method else if method == '' then cmderr = 'No valid method specified' end if module == '' then cmderr = 'No valid module specified' end end end - -- runSpecificModules runs all methods for all the modules given - if testcmd == '--runSpecificModules' then + -- modules runs all methods for all the modules given + if testcmd == '--modules' then local modulelist = {} for m=1,#modules do local testmodule = TestModule:new(modules[m]) @@ -132,22 +132,22 @@ love.load = function(args) end if #modulelist > 0 then love.test.module = love.test.modules[1] - love.test.module:log('grey', '--runSpecificModules "' .. table.concat(modulelist, '" "') .. '"') - love.test.output = 'lovetest_runSpecificModules_' .. table.concat(modulelist, '_') + love.test.module:log('grey', '--modules "' .. table.concat(modulelist, '" "') .. '"') + love.test.output = 'lovetest_modules_' .. table.concat(modulelist, '_') else cmderr = 'No modules specified' end end -- otherwise default runs all methods for all modules - if arglist[1] == nil or arglist[1] == '' or arglist[1] == '--runAllTests' then + if arglist[1] == nil or arglist[1] == '' or arglist[1] == '--all' then for m=1,#modules do local testmodule = TestModule:new(modules[m]) table.insert(love.test.modules, testmodule) end love.test.module = love.test.modules[1] - love.test.module:log('grey', '--runAllTests') - love.test.output = 'lovetest_runAllTests' + love.test.module:log('grey', '--all') + love.test.output = 'lovetest_all' end if GITHUB_RUNNER then diff --git a/testing/readme.md b/testing/readme.md index f6902067d..6b749a689 100644 --- a/testing/readme.md +++ b/testing/readme.md @@ -52,9 +52,9 @@ LINUX: `./love.AppImage PATH_TO_TESTING_FOLDER/main.lua` By default all tests will be run for all modules. If you want to specify a module/s you can use: -`--runSpecificModules filesystem,audio` +`--modules filesystem,audio` If you want to specify only 1 specific method only you can use: -`--runSpecificMethod filesystem write` +`--method filesystem write` All results will be printed in the console per method as PASS, FAIL, or SKIP with total assertions met on a module level and overall level. From ff903ffef38a6a3c95b6a63b366d157f19b0de85 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 10 Mar 2024 16:44:56 -0300 Subject: [PATCH 071/104] CI: fix path for test output --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c75d2db9..5a2ae806d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,7 @@ jobs: with: name: Love Testsuite Linux title: test-report-linux-opengl - path: love2d-${{ github.sha }}/testing/output/lovetest_runAllTests.md + path: love2d-${{ github.sha }}/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengl) run: | @@ -89,7 +89,7 @@ jobs: with: name: Love Testsuite Linux title: test-report-linux-opengles - path: love2d-${{ github.sha }}/testing/output/lovetest_runAllTests.md + path: love2d-${{ github.sha }}/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengles) run: | @@ -109,7 +109,7 @@ jobs: # with: # name: Love Testsuite Linux # title: test-report-linux-vulkan -# path: love2d-${{ github.sha }}/testing/output/lovetest_runAllTests.md +# path: love2d-${{ github.sha }}/testing/output/lovetest_all.md # - name: Zip Test Output (vulkan) # run: | # 7z a -tzip test-output-linux-vulkan.zip love2d-${{ github.sha }}/testing/output/ @@ -329,7 +329,7 @@ jobs: with: name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} ${{ steps.vars.outputs.compatname }} (opengl) title: test-report-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengl - path: megasource/libs/love/testing/output/lovetest_runAllTests.md + path: megasource/libs/love/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengl) if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' @@ -355,7 +355,7 @@ jobs: with: name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} ${{ steps.vars.outputs.compatname }} (opengles) title: test-report-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengles - path: megasource/libs/love/testing/output/lovetest_runAllTests.md + path: megasource/libs/love/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengles) if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' @@ -398,7 +398,7 @@ jobs: # with: # name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} ${{ steps.vars.outputs.compatname }} (vulkan) # title: test-report-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan -# path: megasource/libs/love/testing/output/lovetest_runAllTests.md +# path: megasource/libs/love/testing/output/lovetest_all.md # - name: Zip Test Output (vulkan) # if: steps.vars.outputs.arch != 'ARM64' # run: | @@ -451,7 +451,7 @@ jobs: with: name: Love Testsuite MacOS title: test-report-macos - path: testing/output/lovetest_runAllTests.md + path: testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output run: | From c91101d2e465e2cc4859b9b6d3974d074abfe8ae Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 10 Mar 2024 21:24:10 -0300 Subject: [PATCH 072/104] Fix texel buffer detection in shaders. --- src/modules/graphics/Shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index d25842252..1f5a76553 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -1073,7 +1073,7 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, const auto &sampler = type->getSampler(); - if (type->isTexture() && type->getSampler().isCombined()) + if (type->isTexture() && type->getSampler().isCombined() && !sampler.isBuffer()) { u.baseType = UNIFORM_SAMPLER; u.dataBaseType = getBaseType(sampler.getBasicType()); @@ -1122,7 +1122,7 @@ bool Shader::validateInternal(StrongRef stages[], std::string &err, reflection.storageTextures[u.name] = u; } - else if (type->getBasicType() == glslang::EbtSampler && type->getSampler().isBuffer()) + else if (type->getBasicType() == glslang::EbtSampler && sampler.isBuffer()) { u.baseType = UNIFORM_TEXELBUFFER; u.dataBaseType = getBaseType(sampler.getBasicType()); From 295fb214d524e72fc7136a8647e28e71f59d075e Mon Sep 17 00:00:00 2001 From: niki Date: Mon, 11 Mar 2024 13:47:43 +0100 Subject: [PATCH 073/104] vulkan: remove unused constant and use correct sizes for mapping the local uniform stream buffer --- src/modules/graphics/vulkan/Graphics.cpp | 6 ++++-- src/modules/graphics/vulkan/Shader.cpp | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index ab1f799ef..2e1360f1b 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -2877,12 +2877,14 @@ void Graphics::mapLocalUniformData(void *data, size_t size, VkDescriptorBufferIn if (localUniformBuffer->getUsableSize() < alignedSize) localUniformBuffer.set(new StreamBuffer(this, BUFFERUSAGE_UNIFORM, localUniformBuffer->getSize() * 2), Acquire::NORETAIN); - auto mapInfo = localUniformBuffer->map(alignedSize); + auto mapInfo = localUniformBuffer->map(size); memcpy(mapInfo.data, data, size); bufferInfo.buffer = (VkBuffer)localUniformBuffer->getHandle(); - bufferInfo.offset = localUniformBuffer->unmap(alignedSize); + bufferInfo.offset = localUniformBuffer->unmap(size); bufferInfo.range = size; + + localUniformBuffer->markUsed(alignedSize); } void Graphics::createColorResources() diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index ba2a1d9a2..1c70616c0 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -36,7 +36,6 @@ namespace graphics namespace vulkan { -static const uint32_t STREAMBUFFER_DEFAULT_SIZE = 16; static const uint32_t DESCRIPTOR_POOL_SIZE = 1000; class BindingMapper From 63aba28d18cf8d5cf1829183f60cd3c28eed3d73 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 11 Mar 2024 19:14:25 -0300 Subject: [PATCH 074/104] metal: fix shader compilation when using void effect() with MRTs. --- src/modules/graphics/Shader.cpp | 14 +++++++++++++- src/modules/graphics/ShaderStage.cpp | 2 +- src/modules/graphics/metal/Shader.mm | 2 +- src/modules/graphics/vulkan/Shader.cpp | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index 1f5a76553..696e7f3b5 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -26,6 +26,7 @@ // glslang #include "libraries/glslang/glslang/Public/ShaderLang.h" +#include "libraries/glslang/glslang/Public/ResourceLimits.h" // Needed for reflection information. #include "libraries/glslang/glslang/Include/Types.h" @@ -1445,7 +1446,18 @@ void Shader::handleUnknownUniformName(const char */*name*/) bool Shader::initialize() { - return glslang::InitializeProcess(); + bool success = glslang::InitializeProcess(); + if (!success) + return false; + + TBuiltInResource *resources = GetResources(); + *resources = *GetDefaultResources(); + + // This is 32 in the default resource struct, which is too high for Metal. + // TODO: Set this based on what the system actually supports? + resources->maxDrawBuffers = 8; + + return true; } void Shader::deinitialize() diff --git a/src/modules/graphics/ShaderStage.cpp b/src/modules/graphics/ShaderStage.cpp index 6b4aaf304..d079cfa96 100644 --- a/src/modules/graphics/ShaderStage.cpp +++ b/src/modules/graphics/ShaderStage.cpp @@ -62,7 +62,7 @@ ShaderStage::ShaderStage(Graphics *gfx, ShaderStageType stage, const std::string bool forwardcompat = supportsGLSL3 && !forcedefault; - if (!glslangShader->parse(GetDefaultResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings)) + if (!glslangShader->parse(GetResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings)) { const char *stagename = "unknown"; getConstant(stage, stagename); diff --git a/src/modules/graphics/metal/Shader.mm b/src/modules/graphics/metal/Shader.mm index b481236c0..316efd6fc 100644 --- a/src/modules/graphics/metal/Shader.mm +++ b/src/modules/graphics/metal/Shader.mm @@ -208,7 +208,7 @@ static EShLanguage getGLSLangStage(ShaderStageType stage) forcedefault = true; #endif - if (!tshader->parse(GetDefaultResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings)) + if (!tshader->parse(GetResources(), defaultversion, defaultprofile, forcedefault, forwardcompat, EShMsgSuppressWarnings)) { const char *stagename = "unknown"; ShaderStage::getConstant(stage, stagename); diff --git a/src/modules/graphics/vulkan/Shader.cpp b/src/modules/graphics/vulkan/Shader.cpp index f28b8bfd8..caa277d41 100644 --- a/src/modules/graphics/vulkan/Shader.cpp +++ b/src/modules/graphics/vulkan/Shader.cpp @@ -554,7 +554,7 @@ void Shader::compileShaders() bool forceDefault = false; bool forwardCompat = true; - if (!tshader->parse(GetDefaultResources(), defaultVersion, defaultProfile, forceDefault, forwardCompat, EShMsgSuppressWarnings)) + if (!tshader->parse(GetResources(), defaultVersion, defaultProfile, forceDefault, forwardCompat, EShMsgSuppressWarnings)) { const char *stageName = "unknown"; ShaderStage::getConstant(stage, stageName); From 930053d81d31d8cdefcf13cdc65d38a27b8e0137 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Tue, 12 Mar 2024 18:27:49 -0300 Subject: [PATCH 075/104] opengl: ignore debug notifications when debug output is enabled. --- src/modules/graphics/opengl/Graphics.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 58b4d5312..6e247908f 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -708,13 +708,16 @@ void Graphics::drawQuads(int start, int count, const VertexAttributes &attribute static void APIENTRY debugCB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei /*len*/, const GLchar *msg, const GLvoid* /*usr*/) { + if (severity == GL_DEBUG_SEVERITY_NOTIFICATION) + return; + // Human-readable strings for the debug info. const char *sourceStr = OpenGL::debugSourceString(source); const char *typeStr = OpenGL::debugTypeString(type); const char *severityStr = OpenGL::debugSeverityString(severity); - const char *fmt = "OpenGL: %s [source=%s, type=%s, severity=%s, id=%d]\n"; - printf(fmt, msg, sourceStr, typeStr, severityStr, id); + const char *fmt = "OpenGL: [source=%s, type=%s, severity=%s, id=%d]: %s\n"; + printf(fmt, sourceStr, typeStr, severityStr, id, msg); } void Graphics::setDebug(bool enable) From f8859358c39ef0e5d5cad9adaf80478790ed019f Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Tue, 12 Mar 2024 18:28:26 -0300 Subject: [PATCH 076/104] allow graphics debug output when OpenGL ES 3.2 is used. --- src/modules/graphics/opengl/Graphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 6e247908f..19bc6d3e9 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -724,11 +724,11 @@ void Graphics::setDebug(bool enable) { // Make sure debug output is supported. The AMD ext. is a bit different // so we don't make use of it, since AMD drivers now support KHR_debug. - if (!(GLAD_VERSION_4_3 || GLAD_KHR_debug || GLAD_ARB_debug_output)) + if (!(GLAD_VERSION_4_3 || GLAD_ES_VERSION_3_2 || GLAD_KHR_debug || GLAD_ARB_debug_output)) return; // TODO: We don't support GL_KHR_debug in GLES yet. - if (GLAD_ES_VERSION_2_0) + if (GLAD_ES_VERSION_2_0 && !GLAD_ES_VERSION_3_2) return; // Ugly hack to reduce code duplication. @@ -744,7 +744,7 @@ void Graphics::setDebug(bool enable) glDebugMessageCallback(nullptr, nullptr); // We can disable debug output entirely with KHR_debug. - if (GLAD_VERSION_4_3 || GLAD_KHR_debug) + if (GLAD_VERSION_4_3 || GLAD_ES_VERSION_3_2 || GLAD_KHR_debug) glDisable(GL_DEBUG_OUTPUT); return; @@ -762,7 +762,7 @@ void Graphics::setDebug(bool enable) glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR, GL_DONT_CARE, 0, 0, GL_FALSE); glDebugMessageControl(GL_DEBUG_SOURCE_SHADER_COMPILER, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR, GL_DONT_CARE, 0, 0, GL_FALSE); - if (GLAD_VERSION_4_3 || GLAD_KHR_debug) + if (GLAD_VERSION_4_3 || GLAD_ES_VERSION_3_2 || GLAD_KHR_debug) glEnable(GL_DEBUG_OUTPUT); ::printf("OpenGL debug output enabled (LOVE_GRAPHICS_DEBUG=1)\n"); From 19d714d1cc62a37663ece19ba227ce0042d1b347 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Tue, 12 Mar 2024 18:33:05 -0300 Subject: [PATCH 077/104] CI: enable graphics debug output (when supported) when running tests --- .github/workflows/main.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a2ae806d..167f95900 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,6 +80,8 @@ jobs: path: test-output-linux-opengl.zip # linux opengles tests - name: Run Test Suite (opengles) + env: + LOVE_GRAPHICS_DEBUG: 1 run: | export LOVE_GRAPHICS_USE_OPENGLES=1 ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner @@ -101,8 +103,9 @@ jobs: path: test-output-linux-opengles.zip # # linux vulkan tests # - name: Run Test Suite (vulkan) +# env: +# LOVE_GRAPHICS_DEBUG: 1 # run: | -# export LOVE_GRAPHICS_DEBUG=1 # ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers vulkan # - name: Love Test Report (vulkan) # uses: ellraiser/love-test-report@main @@ -318,6 +321,8 @@ jobs: # windows opengl tests - name: Run Tests (opengl) if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' + env: + LOVE_GRAPHICS_DEBUG: 1 run: | echo 'check dir' ls @@ -345,6 +350,7 @@ jobs: - name: Run Tests (opengles) if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat' env: + LOVE_GRAPHICS_DEBUG: 1 LOVE_GRAPHICS_USE_OPENGLES: 1 run: | powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner @@ -389,8 +395,9 @@ jobs: # # windows vulkan tests # - name: Run Tests (vulkan) # if: steps.vars.outputs.arch != 'ARM64' +# env: +# LOVE_GRAPHICS_DEBUG: 1 # run: | -# $ENV:LOVE_GRAPHICS_DEBUG=1 # powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers vulkan # - name: Love Test Report (vulkan) # if: steps.vars.outputs.arch != 'ARM64' @@ -442,6 +449,8 @@ jobs: path: love-macos.zip # macos opengl tests (metal not supported on runners) - name: Run Test Suite + env: + LOVE_GRAPHICS_DEBUG: 1 run: | ls love-macos/love.app/Contents/MacOS/love ./testing/main.lua --all --isRunner From 07c5c44ea36851f42afc71f0f9182ba53b26d1fc Mon Sep 17 00:00:00 2001 From: niki Date: Wed, 13 Mar 2024 22:16:33 +0100 Subject: [PATCH 078/104] vulkan: simplify code with alignUp --- src/modules/graphics/vulkan/Graphics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 2e1360f1b..939ed5be3 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -21,6 +21,7 @@ #include "common/Exception.h" #include "common/pixelformat.h" #include "common/version.h" +#include "common/memory.h" #include "window/Window.h" #include "Buffer.h" #include "Graphics.h" @@ -2872,7 +2873,7 @@ int Graphics::getVsync() const void Graphics::mapLocalUniformData(void *data, size_t size, VkDescriptorBufferInfo &bufferInfo) { - size_t alignedSize = static_cast(std::ceil(static_cast(size) / static_cast(minUniformBufferOffsetAlignment))) * minUniformBufferOffsetAlignment; + size_t alignedSize = alignUp(size, minUniformBufferOffsetAlignment); if (localUniformBuffer->getUsableSize() < alignedSize) localUniformBuffer.set(new StreamBuffer(this, BUFFERUSAGE_UNIFORM, localUniformBuffer->getSize() * 2), Acquire::NORETAIN); From 50295fdb8a94109025183a07915fd2e185faaa1a Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Sat, 16 Mar 2024 15:11:21 +0800 Subject: [PATCH 079/104] Test: Add tests for love.sensors. --- testing/tests/sensor.lua | 87 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/testing/tests/sensor.lua b/testing/tests/sensor.lua index fcf3379dc..f619a5192 100644 --- a/testing/tests/sensor.lua +++ b/testing/tests/sensor.lua @@ -2,6 +2,51 @@ -- @NOTE we can't test this module fully as it's hardware dependent -- however we can test methods do what is expected and can handle certain params +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +------------------------------------HELPERS------------------------------------- +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- + +local function testIsEnabled(test, sensorType) + love.sensor.setEnabled(sensorType, true) + test:assertTrue(love.sensor.isEnabled(sensorType), 'check ' .. sensorType .. ' enabled') + love.sensor.setEnabled(sensorType, false) + test:assertFalse(love.sensor.isEnabled(sensorType), 'check ' .. sensorType .. ' disabled') +end + + +local function testGetName(test, sensorType) + love.sensor.setEnabled(sensorType, true) + local ok, name = pcall(love.sensor.getName, sensorType) + test:assertTrue(ok, 'check sensor.getName("' .. sensorType .. '") success') + test:assertEquals(type(name), 'string', 'check sensor.getName("' .. sensorType .. '") return value type') + + love.sensor.setEnabled(sensorType, false) + ok, name = pcall(love.sensor.getName, sensorType) + test:assertFalse(ok, 'check sensor.getName("' .. sensorType .. '") errors when disabled') + + love.sensor.setEnabled(sensorType, false) + ok, x, y, z = pcall(love.sensor.getData, sensorType) + test:assertFalse(ok, 'check sensor.getData("' .. sensorType .. '") errors when disabled') +end + + +local function testGetData(test, sensorType) + love.sensor.setEnabled(sensorType, true) + local ok, x, y, z = pcall(love.sensor.getData, sensorType) + test:assertTrue(ok, 'check sensor.getData("' .. sensorType .. '") success') + if ok then + test:assertNotNil(x) + test:assertNotNil(y) + test:assertNotNil(z) + end + + love.sensor.setEnabled(sensorType, false) + ok, x, y, z = pcall(love.sensor.getData, sensorType) + test:assertFalse(ok, 'check sensor.getData("' .. sensorType .. '") errors when disabled') +end + -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- @@ -17,3 +62,45 @@ love.test.sensor.hasSensor = function(test) test:assertNotNil(accelerometer) test:assertNotNil(gyroscope) end + + +-- love.sensor.isEnabled and love.sensor.setEnabled +love.test.sensor.isEnabled = function(test) + local accelerometer = love.sensor.hasSensor('accelerometer') + local gyroscope = love.sensor.hasSensor('gyroscope') + + if accelerometer or gyroscope then + if accelerometer then testIsEnabled(test, 'accelerometer') end + if gyroscope then testIsEnabled(test, 'gyroscope') end + else + test:skipTest('neither accelerometer nor gyroscope are supported in this system') + end +end + + +-- love.sensor.getName +love.test.sensor.getName = function(test) + local accelerometer = love.sensor.hasSensor('accelerometer') + local gyroscope = love.sensor.hasSensor('gyroscope') + + if accelerometer or gyroscope then + if accelerometer then testGetName(test, 'accelerometer') end + if gyroscope then testGetName(test, 'gyroscope') end + else + test:skipTest('neither accelerometer nor gyroscope are supported in this system') + end +end + + +-- love.sensor.getData +love.test.sensor.getData = function(test) + local accelerometer = love.sensor.hasSensor('accelerometer') + local gyroscope = love.sensor.hasSensor('gyroscope') + + if accelerometer or gyroscope then + if accelerometer then testGetData(test, 'accelerometer') end + if gyroscope then testGetData(test, 'gyroscope') end + else + test:skipTest('neither accelerometer nor gyroscope are supported in this system') + end +end From 6f86c195bc33d7f595460b8054390dc7fe1bd25e Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Sat, 16 Mar 2024 20:47:17 +0800 Subject: [PATCH 080/104] Test: Remove leftover love.sensor.getData calls when testing love.sensor.getName. --- testing/tests/sensor.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/testing/tests/sensor.lua b/testing/tests/sensor.lua index f619a5192..56c5da7b5 100644 --- a/testing/tests/sensor.lua +++ b/testing/tests/sensor.lua @@ -25,10 +25,6 @@ local function testGetName(test, sensorType) love.sensor.setEnabled(sensorType, false) ok, name = pcall(love.sensor.getName, sensorType) test:assertFalse(ok, 'check sensor.getName("' .. sensorType .. '") errors when disabled') - - love.sensor.setEnabled(sensorType, false) - ok, x, y, z = pcall(love.sensor.getData, sensorType) - test:assertFalse(ok, 'check sensor.getData("' .. sensorType .. '") errors when disabled') end From 89f43ff48dea0d3bd876661e563a8b4e71f05cb7 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 16 Mar 2024 23:11:14 -0300 Subject: [PATCH 081/104] tests: compare screenshot test output to a reference image, on desktops. --- ...love.test.graphics.captureScreenshot-1.png | Bin 0 -> 831 bytes testing/tests/graphics.lua | 20 +++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 testing/output/expected/love.test.graphics.captureScreenshot-1.png diff --git a/testing/output/expected/love.test.graphics.captureScreenshot-1.png b/testing/output/expected/love.test.graphics.captureScreenshot-1.png new file mode 100644 index 0000000000000000000000000000000000000000..f26a3a081ca0a010a324a7c003c05aa4ae0643af GIT binary patch literal 831 zcmV-F1Hk-=P)><;Wih9PR5Asg5;fZD)&o!5w`H|#V6<9h(<+<$zS-pRXK8gUsJ`(mv@4yh`&mIJA^S~^TNf7B z&fP9{9@^xM)UG;Jg=8K5Cbw!v?d8TK7M;Ik*))GrugiYMj%=PzcE8D)Hs`1n>d{{#pnI|p1E6<4 zmLO#Wh~D{Ff|L;)y7+J(eEf7gib2Q-5M9WQ*`M(#p=FHV(AftwUAln#Sb~rdAiDX8 z&~yP8f{+m$dgY_$PmnPJM6Z0b2pPelr~BwvjR4VpKZA8Buf>{|Nos zI4WAvZ$p<`=5SG!xf>PTax{)2qXns8(!TBFfuG#ZUYqtR$I8jVJy(P(~o{sIxSYR80gR?GkZ002ov JPDHLkV1g&whUfqQ literal 0 HcmV?d00001 diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index a7bf8e970..860d82099 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -1452,15 +1452,29 @@ end -- love.graphics.captureScreenshot love.test.graphics.captureScreenshot = function(test) love.graphics.captureScreenshot('example-screenshot.png') - test:waitFrames(10) + test:waitFrames(1) -- need to wait until end of the frame for the screenshot - test:assertNotNil(love.filesystem.openFile('example-screenshot.png', 'r')) + test:assertTrue(love.filesystem.exists('example-screenshot.png')) love.filesystem.remove('example-screenshot.png') -- test callback version + local cbdata = nil + local prevtextcommand = TextCommand + TextCommand = "Capturing screenshot" love.graphics.captureScreenshot(function (idata) test:assertNotEquals(nil, idata, 'check we have image data') + cbdata = idata end) - test:waitFrames(10) + test:waitFrames(1) + TextCommand = prevtextcommand + test:assertNotNil(cbdata) + + if love.system.getOS() == "iOS" or love.system.getOS() == "Android" then + -- Mobile operating systems don't let us control the window resolution, + -- so we can't compare the reference image properly. + test:assertTrue(true, 'skip test') + else + test:compareImg(cbdata) + end end From 48aefd91fa05a8e3a14b1b2a075f60ddfbd9377c Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 16 Mar 2024 23:51:40 -0300 Subject: [PATCH 082/104] vulkan: captureScreenshot improvements. - Don't create several persistent screen-sized images and buffers for screenshots, only create one temporary buffer during a frame that requests a screenshot. - Attempt to handle more out-of-memory situations. - Make sure the final screenshot is opaque. - Swap R and B channels in the screenshot ImageData when the backbuffer is BGRA. --- src/modules/graphics/vulkan/Graphics.cpp | 223 ++++++++++------------- src/modules/graphics/vulkan/Graphics.h | 2 - 2 files changed, 92 insertions(+), 133 deletions(-) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 82eccef24..b8a56b06c 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -386,6 +386,10 @@ void Graphics::submitGpuCommands(SubmitMode submitMode, void *screenshotCallback if (renderPassState.active) endRenderPass(); + VkBuffer screenshotBuffer = VK_NULL_HANDLE; + VmaAllocation screenshotAllocation = VK_NULL_HANDLE; + VmaAllocationInfo screenshotAllocationInfo = {}; + if (submitMode == SUBMIT_PRESENT) { if (pendingScreenshotCallbacks.empty()) @@ -396,53 +400,34 @@ void Graphics::submitGpuCommands(SubmitMode submitMode, void *screenshotCallback VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); else { + VkBufferCreateInfo bufferInfo{}; + bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; + bufferInfo.size = 4ll * swapChainExtent.width * swapChainExtent.height; + bufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; + bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + + VmaAllocationCreateInfo allocCreateInfo{}; + allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; + allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; + + auto result = vmaCreateBuffer( + vmaAllocator, + &bufferInfo, + &allocCreateInfo, + &screenshotBuffer, + &screenshotAllocation, + &screenshotAllocationInfo); + + if (result != VK_SUCCESS) + throw love::Exception("failed to create screenshot readback buffer"); + + // TODO: swap chain images aren't guaranteed to support TRANSFER_SRC_BIT usage flags. Vulkan::cmdTransitionImageLayout( commandBuffers.at(currentFrame), swapChainImages.at(imageIndex), VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); - Vulkan::cmdTransitionImageLayout( - commandBuffers.at(currentFrame), - screenshotReadbackBuffers.at(currentFrame).image, - VK_IMAGE_LAYOUT_UNDEFINED, - VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); - - VkImageBlit blit{}; - blit.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - blit.srcSubresource.layerCount = 1; - blit.srcOffsets[1] = { - static_cast(swapChainExtent.width), - static_cast(swapChainExtent.height), - 1 - }; - blit.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - blit.dstSubresource.layerCount = 1; - blit.dstOffsets[1] = { - static_cast(swapChainExtent.width), - static_cast(swapChainExtent.height), - 1 - }; - - vkCmdBlitImage( - commandBuffers.at(currentFrame), - swapChainImages.at(imageIndex), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - screenshotReadbackBuffers.at(currentFrame).image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, - 1, &blit, - VK_FILTER_NEAREST); - - Vulkan::cmdTransitionImageLayout( - commandBuffers.at(currentFrame), - swapChainImages.at(imageIndex), - VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); - - Vulkan::cmdTransitionImageLayout( - commandBuffers.at(currentFrame), - screenshotReadbackBuffers.at(currentFrame).image, - VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, - VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); - VkBufferImageCopy region{}; region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; region.imageSubresource.layerCount = 1; @@ -454,32 +439,16 @@ void Graphics::submitGpuCommands(SubmitMode submitMode, void *screenshotCallback vkCmdCopyImageToBuffer( commandBuffers.at(currentFrame), - screenshotReadbackBuffers.at(currentFrame).image, + swapChainImages.at(imageIndex), VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - screenshotReadbackBuffers.at(currentFrame).buffer, + screenshotBuffer, 1, ®ion); - addReadbackCallback([ - w = swapChainExtent.width, - h = swapChainExtent.height, - pendingScreenshotCallbacks = pendingScreenshotCallbacks, - screenShotReadbackBuffer = screenshotReadbackBuffers.at(currentFrame), - screenshotCallbackData = screenshotCallbackData]() { - auto imageModule = Module::getInstance(M_IMAGE); - - for (const auto &info : pendingScreenshotCallbacks) - { - image::ImageData *img = imageModule->newImageData( - w, - h, - PIXELFORMAT_RGBA8_UNORM, - screenShotReadbackBuffer.allocationInfo.pMappedData); - info.callback(&info, img, screenshotCallbackData); - img->release(); - } - }); - - pendingScreenshotCallbacks.clear(); + Vulkan::cmdTransitionImageLayout( + commandBuffers.at(currentFrame), + swapChainImages.at(imageIndex), + VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + VK_IMAGE_LAYOUT_PRESENT_SRC_KHR); } } @@ -524,7 +493,7 @@ void Graphics::submitGpuCommands(SubmitMode submitMode, void *screenshotCallback if (vkQueueSubmit(graphicsQueue, 1, &submitInfo, fence) != VK_SUCCESS) throw love::Exception("failed to submit draw command buffer"); - if (submitMode == SUBMIT_NOPRESENT || submitMode == SUBMIT_RESTART) + if (submitMode == SUBMIT_NOPRESENT || submitMode == SUBMIT_RESTART || screenshotBuffer != VK_NULL_HANDLE) { vkQueueWaitIdle(graphicsQueue); @@ -535,6 +504,64 @@ void Graphics::submitGpuCommands(SubmitMode submitMode, void *screenshotCallback callbacks.clear(); } + if (screenshotBuffer != VK_NULL_HANDLE) + { + auto imageModule = Module::getInstance(M_IMAGE); + + for (int i = 0; i < (int)pendingScreenshotCallbacks.size(); i++) + { + const auto &info = pendingScreenshotCallbacks[i]; + image::ImageData *img = nullptr; + + try + { + img = imageModule->newImageData( + swapChainExtent.width, + swapChainExtent.height, + PIXELFORMAT_RGBA8_UNORM, + screenshotAllocationInfo.pMappedData); + } + catch (love::Exception &) + { + info.callback(&info, nullptr, nullptr); + for (int j = i + 1; j < (int)pendingScreenshotCallbacks.size(); j++) + { + const auto& ninfo = pendingScreenshotCallbacks[j]; + ninfo.callback(&ninfo, nullptr, nullptr); + } + vmaDestroyBuffer(vmaAllocator, screenshotBuffer, screenshotAllocation); + pendingScreenshotCallbacks.clear(); + throw; + } + + uint8 *screenshot = (uint8*)img->getData(); + + if (swapChainImageFormat == VK_FORMAT_B8G8R8A8_UNORM || swapChainImageFormat == VK_FORMAT_B8G8R8A8_SRGB) + { + // Convert from BGRA to RGBA and replace alpha with full opacity. + for (size_t i = 0; i < img->getSize(); i += 4) + { + uint8 r = screenshot[i + 2]; + screenshot[i + 2] = screenshot[i + 0]; + screenshot[i + 0] = r; + screenshot[i + 3] = 255; + } + } + else + { + // Replace alpha with full opacity. + for (size_t i = 0; i < img->getSize(); i += 4) + screenshot[i + 3] = 255; + } + + info.callback(&info, img, screenshotCallbackData); + img->release(); + } + + vmaDestroyBuffer(vmaAllocator, screenshotBuffer, screenshotAllocation); + pendingScreenshotCallbacks.clear(); + } + if (submitMode == SUBMIT_RESTART) startRecordingGraphicsCommands(); } @@ -640,7 +667,6 @@ bool Graphics::setMode(void *context, int width, int height, int pixelwidth, int createSwapChain(); createImageViews(); - createScreenshotCallbackBuffers(); createColorResources(); createDepthResources(); transitionColorDepthLayouts = true; @@ -1986,65 +2012,6 @@ void Graphics::createImageViews() } } -void Graphics::createScreenshotCallbackBuffers() -{ - screenshotReadbackBuffers.resize(MAX_FRAMES_IN_FLIGHT); - - for (uint32_t i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) - { - VkBufferCreateInfo bufferInfo{}; - bufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; - bufferInfo.size = 4ll * swapChainExtent.width * swapChainExtent.height; - bufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; - bufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - - VmaAllocationCreateInfo allocCreateInfo{}; - allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; - allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; - - auto result = vmaCreateBuffer( - vmaAllocator, - &bufferInfo, - &allocCreateInfo, - &screenshotReadbackBuffers.at(i).buffer, - &screenshotReadbackBuffers.at(i).allocation, - &screenshotReadbackBuffers.at(i).allocationInfo); - - if (result != VK_SUCCESS) - throw love::Exception("failed to create screenshot readback buffer"); - - VkImageCreateInfo imageInfo{}; - imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; - imageInfo.imageType = VK_IMAGE_TYPE_2D; - imageInfo.format = VK_FORMAT_R8G8B8A8_SRGB; - imageInfo.extent = { - swapChainExtent.width, - swapChainExtent.height, - 1 - }; - imageInfo.mipLevels = 1; - imageInfo.arrayLayers = 1; - imageInfo.samples = VK_SAMPLE_COUNT_1_BIT; - imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL; - imageInfo.usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; - imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - - VmaAllocationCreateInfo imageAllocCreateInfo{}; - - result = vmaCreateImage( - vmaAllocator, - &imageInfo, - &imageAllocCreateInfo, - &screenshotReadbackBuffers.at(i).image, - &screenshotReadbackBuffers.at(i).imageAllocation, - nullptr); - - if (result != VK_SUCCESS) - throw love::Exception("failed to create screenshot readback image"); - } -} - VkFramebuffer Graphics::createFramebuffer(FramebufferConfiguration &configuration) { std::vector attachments; @@ -3106,11 +3073,6 @@ void Graphics::cleanup() void Graphics::cleanupSwapChain() { - for (const auto &readbackBuffer : screenshotReadbackBuffers) - { - vmaDestroyBuffer(vmaAllocator, readbackBuffer.buffer, readbackBuffer.allocation); - vmaDestroyImage(vmaAllocator, readbackBuffer.image, readbackBuffer.imageAllocation); - } if (colorImage) { vkDestroyImageView(device, colorImageView, nullptr); @@ -3137,7 +3099,6 @@ void Graphics::recreateSwapChain() createSwapChain(); createImageViews(); - createScreenshotCallbackBuffers(); createColorResources(); createDepthResources(); diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index a000120bf..206a5a846 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -355,7 +355,6 @@ class Graphics final : public love::graphics::Graphics VkCompositeAlphaFlagBitsKHR chooseCompositeAlpha(const VkSurfaceCapabilitiesKHR &capabilities); void createSwapChain(); void createImageViews(); - void createScreenshotCallbackBuffers(); VkFramebuffer createFramebuffer(FramebufferConfiguration &configuration); VkFramebuffer getFramebuffer(FramebufferConfiguration &configuration); void createDefaultShaders(); @@ -449,7 +448,6 @@ class Graphics final : public love::graphics::Graphics // We need a vector for each frame in flight. std::vector>> cleanUpFunctions; std::vector>> readbackCallbacks; - std::vector screenshotReadbackBuffers; std::set> usedShadersInFrame; RenderpassState renderPassState; }; From 60911c5181c749868bdb523dfbda45be2dacf6b3 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 17 Mar 2024 00:01:10 -0300 Subject: [PATCH 083/104] vulkan: remove some newly dead code --- src/modules/graphics/vulkan/Graphics.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index 206a5a846..d33a889fd 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -249,16 +249,6 @@ struct RenderpassState OptionalInt mainWindowClearStencilValue; }; -struct ScreenshotReadbackBuffer -{ - VkBuffer buffer; - VmaAllocation allocation; - VmaAllocationInfo allocationInfo; - - VkImage image; - VmaAllocation imageAllocation; -}; - enum SubmitMode { SUBMIT_PRESENT, From 4d1865fe1a13fb9fd3753bcf79d9f1be54e5e316 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 17 Mar 2024 13:54:40 -0300 Subject: [PATCH 084/104] opengl: attempt to fix the Android workaround for r8 pixel format support. --- src/modules/graphics/opengl/Graphics.cpp | 11 +++++++++++ src/modules/graphics/opengl/OpenGL.cpp | 20 +++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 19bc6d3e9..a7a3b3ab0 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -1693,6 +1693,17 @@ void Graphics::initCapabilities() pixelFormatUsage[i][0] = computePixelFormatUsage(format, false); pixelFormatUsage[i][1] = computePixelFormatUsage(format, true); } + +#ifdef LOVE_ANDROID + // This can't be done in initContext with the rest of the bug checks because + // isPixelFormatSupported relies on state initialized here / after init. + if (GLAD_ES_VERSION_3_0 && !isPixelFormatSupported(PIXELFORMAT_R8_UNORM, PIXELFORMATUSAGEFLAGS_SAMPLE | PIXELFORMATUSAGEFLAGS_RENDERTARGET)) + { + gl.bugs.brokenR8PixelFormat = true; + pixelFormatUsage[PIXELFORMAT_R8_UNORM][0] = computePixelFormatUsage(PIXELFORMAT_R8_UNORM, false); + pixelFormatUsage[PIXELFORMAT_R8_UNORM][1] = computePixelFormatUsage(PIXELFORMAT_R8_UNORM, true); + } +#endif } uint32 Graphics::computePixelFormatUsage(PixelFormat format, bool readable) diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 845030f8d..9d3a486d4 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -324,14 +324,6 @@ void OpenGL::setupContext() setColorWriteMask(state.colorWriteMask); contextInitialized = true; - -#ifdef LOVE_ANDROID - // This can't be done in initContext with the rest of the bug checks because - // isPixelFormatSupported relies on state initialized here / after init. - auto gfx = Module::getInstance(Module::M_GRAPHICS); - if (GLAD_ES_VERSION_3_0 && gfx != nullptr && !gfx->isPixelFormatSupported(PIXELFORMAT_R8_UNORM, PIXELFORMATUSAGEFLAGS_SAMPLE | PIXELFORMATUSAGEFLAGS_RENDERTARGET)) - bugs.brokenR8PixelFormat = true; -#endif } void OpenGL::deInitContext() @@ -1344,7 +1336,17 @@ bool OpenGL::rawTexStorage(TextureType target, int levels, PixelFormat pixelform glTexParameteri(gltarget, GL_TEXTURE_SWIZZLE_A, fmt.swizzle[3]); } - if (isTexStorageSupported()) + bool usetexstorage = isTexStorageSupported(); + + // The fallback for bugs.brokenR8PixelFormat is GL_LUMINANCE, which doesn't have a sized + // version in ES3 so it can't be used with glTexStorage. + if (pixelformat == PIXELFORMAT_R8_UNORM && bugs.brokenR8PixelFormat && GLAD_ES_VERSION_3_0) + { + usetexstorage = false; + fmt.internalformat = fmt.externalformat; + } + + if (usetexstorage) { if (target == TEXTURE_2D || target == TEXTURE_CUBE) glTexStorage2D(gltarget, levels, fmt.internalformat, width, height); From 9eacd483c60832f8e3ea26b78b2fad154ee05b83 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Tue, 19 Mar 2024 22:24:45 +0800 Subject: [PATCH 085/104] Android: Fixed assets/game.love fusing not being recognized. Fixes love2d/love-android#267. --- src/common/android.cpp | 14 ++++++++------ src/modules/filesystem/physfs/Filesystem.cpp | 10 +++++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/common/android.cpp b/src/common/android.cpp index d8c775093..1ec823536 100644 --- a/src/common/android.cpp +++ b/src/common/android.cpp @@ -385,18 +385,20 @@ struct AssetInfo: public love::filesystem::physfs::PhysfsIo return 1; } - AssetInfo *duplicate() const + AssetInfo(const AssetInfo &other) + : assetManager(other.assetManager) + , size(strlen(other.filename) + 1) { - AAsset *newAsset = AAssetManager_open(assetManager, filename, AASSET_MODE_RANDOM); + asset = AAssetManager_open(assetManager, other.filename, AASSET_MODE_RANDOM); - if (newAsset == nullptr) + if (asset == nullptr) { PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); - return nullptr; + throw new love::Exception("Unable to duplicate AssetInfo"); } - AAsset_seek64(asset, tell(), SEEK_SET); - return fromAAsset(assetManager, filename, asset); + filename = new (std::nothrow) char[size]; + memcpy(filename, other.filename, size); } ~AssetInfo() override diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index 586e064c0..52e190c56 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -245,8 +245,14 @@ bool Filesystem::setSource(const char *source) if (hasFusedGame) { if (gameLoveIO) - // Actually we should just be able to mount gameLoveIO, but that's experimental. + { + if (PHYSFS_mountIo(gameLoveIO, ".zip", nullptr, 0)) { + gameSource = new_search_path; + return true; + } + gameLoveIO->destroy(gameLoveIO); + } else { if (!love::android::initializeVirtualArchive()) @@ -274,6 +280,8 @@ bool Filesystem::setSource(const char *source) gameSource = new_search_path; return true; } + + io->destroy(io); } } #endif From 7f4adc0ffeb4168930e766d3195b3e5337b1e3be Mon Sep 17 00:00:00 2001 From: ell <77150506+ellraiser@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:05:06 +0000 Subject: [PATCH 086/104] small update changed tests so that all assert failures are logged rather than just the first assert that failed, added isOS() to the test method class to be used in tests directly, updated test readme on a couple bits and added newTexture basic check --- testing/classes/TestMethod.lua | 79 +++++++++++++++++++++++++++------- testing/classes/TestSuite.lua | 15 ++++++- testing/main.lua | 3 ++ testing/readme.md | 14 +++--- testing/tests/audio.lua | 2 +- testing/tests/filesystem.lua | 2 +- testing/tests/graphics.lua | 45 +++++++++++-------- testing/todo.md | 2 - 8 files changed, 114 insertions(+), 48 deletions(-) diff --git a/testing/classes/TestMethod.lua b/testing/classes/TestMethod.lua index 1f336d06b..931dad850 100644 --- a/testing/classes/TestMethod.lua +++ b/testing/classes/TestMethod.lua @@ -374,23 +374,42 @@ TestMethod = { end, + -- @method - TestMethod:isOS() + -- @desc - checks for a specific OS (or list of OSs) + -- @param {string||table} - single OS string or list of OSs that are allowed, + -- these will be checked agaisnt love.system.getOS()'s return value + -- @return {boolean} - returns true if one of the OSs given matches actual OS + isOS = function(self, oss) + if type(oss) == 'table' then + for o=1,#oss do + if oss[o] == love.test.current_os then return true end + end + else + return love.test.current_os == oss + end + end, + -- @method - TestMethod:evaluateTest() -- @desc - evaluates the results of all assertions for a final restult -- @return {nil} evaluateTest = function(self) local failure = '' local failures = 0 + + -- check all asserts for failures, additional failures are also printed + local assert_failures = {} for a=1,#self.asserts do - -- @TODO show all failed assertion methods? - -- currently just shows the first assert that failed if not self.asserts[a].passed and not self.skipped then if failure == '' then failure = self.asserts[a] end + table.insert(assert_failures, self.asserts[a]) failures = failures + 1 end end if self.fatal ~= '' then failure = self.fatal end local passed = tostring(#self.asserts - failures) local total = '(' .. passed .. '/' .. tostring(#self.asserts) .. ')' + + -- skipped tests have a special log if self.skipped then self.testmodule.skipped = self.testmodule.skipped + 1 love.test.totals[3] = love.test.totals[3] + 1 @@ -398,9 +417,12 @@ TestMethod = { total = '', result = "SKIP", passed = false, - message = '(0/0) - method skipped [' .. self.skipreason .. ']' + message = '(0/0) - method skipped [' .. self.skipreason .. ']', + failures = {} } else + + -- if no failure but has asserts, then passed if failure == '' and #self.asserts > 0 then self.passed = true self.testmodule.passed = self.testmodule.passed + 1 @@ -409,38 +431,48 @@ TestMethod = { total = total, result = 'PASS', passed = true, - message = nil + message = nil, + failures = {} } + + -- otherwise it failed else self.passed = false self.testmodule.failed = self.testmodule.failed + 1 love.test.totals[2] = love.test.totals[2] + 1 + + -- no asserts means invalid test if #self.asserts == 0 then local msg = 'no asserts defined' if self.fatal ~= '' then msg = self.fatal end - self.result = { - total = total, - result = 'FAIL', - passed = false, - key = 'test', - message = msg + self.result = { + total = total, + result = 'FAIL', + passed = false, + key = 'test', + message = msg, + failures = {} } + + -- otherwise we had failures, log the first and supply the list of + -- additional failures if any for printResult() else local key = failure['key'] if failure['test'] ~= nil then key = key .. ' [' .. failure['test'] .. ']' end local msg = failure['message'] - if self.fatal ~= '' then + if self.fatal ~= '' then key = 'code' msg = self.fatal end - self.result = { - total = total, - result = 'FAIL', - passed = false, + self.result = { + total = total, + result = 'FAIL', + passed = false, key = key, - message = msg + message = msg, + failures = assert_failures } end end @@ -535,6 +567,21 @@ TestMethod = { ' ==> ' .. self.result.result .. ' - ' .. endtime .. 's ' .. self.result.total .. msg ) + + -- if we failed on multiple asserts, list them here - makes it easier for + -- debugging new methods added that are failing multiple asserts + if #self.result.failures > 1 then + for f=2,#self.result.failures do + local addf = self.result.failures[f] + self.testmodule:log( + self.testmodule.colors[self.result.result], + ' ' .. tested .. matching, + ' ==> ' .. + addf['key'] .. ' [' .. addf['test'] .. '] failed - ' .. addf['message'] + ) + end + end + end diff --git a/testing/classes/TestSuite.lua b/testing/classes/TestSuite.lua index 8a2e76dee..a5c3e841a 100644 --- a/testing/classes/TestSuite.lua +++ b/testing/classes/TestSuite.lua @@ -23,6 +23,7 @@ TestSuite = { delayed = nil, fakequit = false, windowmode = true, + current_os = love.system.getOS(), -- love modules to test audio = {}, @@ -76,7 +77,10 @@ TestSuite = { TextRun = 'love.' .. self.module.module .. '.' .. method self.test.co = coroutine.create(function() - local ok, chunk, err = pcall(love.test[love.test.module.module][method], love.test.test) + local ok, chunk, err = pcall( + love.test[love.test.module.module][method], + love.test.test + ) if ok == false then love.test.test['passed'] = false love.test.test['fatal'] = tostring(chunk) .. tostring(err) @@ -140,7 +144,14 @@ TestSuite = { printResult = function(self) local finaltime = UtilTimeFormat(self.time) - local name, version, vendor, device = love.graphics.getRendererInfo() + -- in case we dont have love.graphics loaded, for future module specific disabling + local name = 'NONE' + local version = 'NONE' + local vendor = 'NONE' + local device = 'NONE' + if love.graphics then + name, version, vendor, device = love.graphics.getRendererInfo() + end local md = ' + ### Info -**344** tests were completed in **14.817s** with **335** passed, **0** failed, and **9** skipped +**355** tests were completed in **14.567s** with **343** passed, **2** failed, and **10** skipped Renderer: OpenGL | 4.1 Metal - 76.3 | Apple | Apple M1 Max ### Report | Module | Pass | Fail | Skip | Time | | --------------------- | ------ | ------ | ------- | ------ | -| 🟢 audio | 28 | 0 | 0 | 0.886s | -| 🟢 data | 12 | 0 | 0 | 0.212s | -| 🟢 event | 4 | 0 | 2 | 0.103s | -| 🟢 filesystem | 29 | 0 | 2 | 0.555s | -| 🟢 font | 7 | 0 | 0 | 0.124s | -| 🟢 graphics | 104 | 0 | 1 | 3.006s | -| 🟢 image | 5 | 0 | 0 | 0.085s | -| 🟢 joystick | 6 | 0 | 0 | 0.106s | -| 🟢 keyboard | 9 | 0 | 0 | 0.150s | -| 🟢 love | 6 | 0 | 0 | 0.098s | -| 🟢 math | 20 | 0 | 0 | 0.337s | -| 🟢 mouse | 18 | 0 | 0 | 0.302s | -| 🟢 physics | 26 | 0 | 0 | 0.434s | -| 🟢 sensor | 1 | 0 | 0 | 0.016s | -| 🟢 sound | 4 | 0 | 0 | 0.072s | -| 🟢 system | 6 | 0 | 2 | 0.135s | -| 🟢 thread | 5 | 0 | 0 | 0.363s | -| 🟢 timer | 6 | 0 | 0 | 2.074s | -| 🟢 touch | 3 | 0 | 0 | 0.023s | -| 🟢 video | 2 | 0 | 0 | 0.039s | -| 🟢 window | 34 | 0 | 2 | 5.696s | +| 🟢 audio | 31 | 0 | 0 | 1.328s | +| 🟢 data | 12 | 0 | 0 | 0.197s | +| 🟢 event | 4 | 0 | 2 | 0.100s | +| 🟢 filesystem | 33 | 0 | 2 | 0.601s | +| 🟢 font | 7 | 0 | 0 | 0.116s | +| 🔴 graphics | 104 | 1 | 2 | 3.463s | +| 🟢 image | 5 | 0 | 0 | 0.093s | +| 🟢 joystick | 6 | 0 | 0 | 0.116s | +| 🟢 keyboard | 10 | 0 | 0 | 0.170s | +| 🟢 love | 6 | 0 | 0 | 0.100s | +| 🟢 math | 20 | 0 | 0 | 0.334s | +| 🔴 mouse | 17 | 1 | 0 | 0.301s | +| 🟢 physics | 26 | 0 | 0 | 0.435s | +| 🟢 sensor | 1 | 0 | 0 | 0.017s | +| 🟢 sound | 4 | 0 | 0 | 0.075s | +| 🟢 system | 7 | 0 | 2 | 0.150s | +| 🟢 thread | 5 | 0 | 0 | 0.306s | +| 🟢 timer | 6 | 0 | 0 | 0.298s | +| 🟢 touch | 3 | 0 | 0 | 0.051s | +| 🟢 video | 2 | 0 | 0 | 0.038s | +| 🟢 window | 34 | 0 | 2 | 6.275s | ### Failures +> 🔴 Shader +> assert 4 [check shader valid] expected '' got 'vertex shader: +pixel shader: +' + +> 🔴 setGrabbed +> assert 2 [check now grabbed] expected 'true' got 'false' + diff --git a/testing/examples/lovetest_runAllTests.xml b/testing/examples/lovetest_runAllTests.xml index f6bf47390..888feca6c 100644 --- a/testing/examples/lovetest_runAllTests.xml +++ b/testing/examples/lovetest_runAllTests.xml @@ -1,137 +1,145 @@ - - - + + + - + - + - + - + - + - + - + - + - + - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + + + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + + + - + - + - + - + - + @@ -139,187 +147,203 @@ - + - + - + - + - + + + + + - + - + - + - + - + - + + + - - + + - + - + - + - + - - + + + + - + - + - + - + - + + assert 4 [check shader valid] expected '' got 'vertex shader: +pixel shader: +' - + + - + - + - + - + - + - + - + - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -327,345 +351,352 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - - + + - + - + - + - + - + - + - + + + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + + assert 2 [check now grabbed] expected 'true' got 'false' - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - - + + + + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - - + + - + - + - - + + - + + + - + @@ -675,67 +706,65 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + - + \ No newline at end of file From f1d350703a726540d65dab35c50e47601720ac24 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 22 Mar 2024 19:55:17 -0300 Subject: [PATCH 097/104] tests: another attempt at fixing the shader pixel coordinate test --- .../expected/love.test.graphics.Canvas-4.png | Bin 327 -> 319 bytes testing/tests/graphics.lua | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/output/expected/love.test.graphics.Canvas-4.png b/testing/output/expected/love.test.graphics.Canvas-4.png index d3e9c37f8bc3899bba97bfaff675fbbb0688b8f6..9dbe75c204330592e451546b73304e055366f9f1 100644 GIT binary patch delta 148 zcmX@kw4Z5$iUXUci(^Q|oVS+^xf%>aSP!}s|2Ov5I;a(G9n7I**8jKoTw#A<@AsdT zwtv2~*I%zINPBzHV(}V>$i_`f$*kuLCVo`nB%LEAD%Zoq+~wPrW6S^qp00i_>zopr E01`zyxc~qF literal 327 zcmeAS@N?(olHy`uVBq!ia0vp^DImb-_`K-hvc z2O=7cd8UX$I1Z7Go0w8rPjO8VmC!C|gL7~zJ;pUBalslSeN<6Of&&mro0vOln7by4 SrzHRbh{4m<&t;ucLK6USId^;j diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index 6e61ad830..acbf74087 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -209,7 +209,11 @@ love.test.graphics.Canvas = function(test) ]] local shader2 = love.graphics.newShader[[ vec4 effect(vec4 c, Image tex, vec2 tc, vec2 pc) { - return vec4(pc / love_ScreenSize.xy, 0.0, 1.0); + // rounding during quantization from float to unorm8 doesn't seem to be + // totally consistent across devices, lets do it ourselves. + vec2 value = pc / love_ScreenSize.xy; + vec2 quantized = (floor(255.0 * value + 0.5) + 0.1) / 255.0; + return vec4(quantized, 0.0, 1.0); } ]] local img = love.graphics.newImage(love.image.newImageData(1, 1)) From 9aaeabd6a5d0740563c9c8b550dd9feab4b142fd Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 22 Mar 2024 23:08:34 -0300 Subject: [PATCH 098/104] vulkan: fix love_ScreenSize shader variable when a canvas is active. --- src/modules/graphics/vulkan/Graphics.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 5313a7e2c..3cdfc145e 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -1430,8 +1430,17 @@ graphics::Shader::BuiltinUniformData Graphics::getCurrentBuiltinUniformData() // Same with point size. data.normalMatrix[1].w = getPointSize(); - data.screenSizeParams.x = static_cast(swapChainExtent.width); - data.screenSizeParams.y = static_cast(swapChainExtent.height); + const auto &rt = states.back().renderTargets.getFirstTarget(); + if (rt.texture != nullptr) + { + data.screenSizeParams.x = rt.texture->getPixelWidth(rt.mipmap); + data.screenSizeParams.y = rt.texture->getPixelHeight(rt.mipmap); + } + else + { + data.screenSizeParams.x = getPixelWidth(); + data.screenSizeParams.y = getPixelHeight(); + } data.screenSizeParams.z = 1.0f; data.screenSizeParams.w = 0.0f; From 1e657ea0bf8d767b81557ae3c3cbd395a80d96f2 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 22 Mar 2024 23:15:09 -0300 Subject: [PATCH 099/104] metal: fix love_ScreenSize shader variable when rendering to a non-default mipmap level of a Canvas. --- src/modules/graphics/metal/Graphics.mm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index ecad1ea24..5319f7dc4 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -921,8 +921,8 @@ static bool isClampOne(SamplerState::WrapMode w) const auto &rt = state.renderTargets.getFirstTarget(); if (rt.texture.get()) { - rtw = rt.texture->getPixelWidth(); - rth = rt.texture->getPixelHeight(); + rtw = rt.texture->getPixelWidth(rt.mipmap); + rth = rt.texture->getPixelHeight(rt.mipmap); } else { @@ -1134,11 +1134,11 @@ static bool isClampOne(SamplerState::WrapMode w) builtins->normalMatrix[1].w = getPointSize(); builtins->screenSizeParams = Vector4(getPixelWidth(), getPixelHeight(), 1.0f, 0.0f); - auto rt = states.back().renderTargets.getFirstTarget().texture.get(); - if (rt != nullptr) + auto rt = states.back().renderTargets.getFirstTarget(); + if (rt.texture.get()) { - builtins->screenSizeParams.x = rt->getPixelWidth(); - builtins->screenSizeParams.y = rt->getPixelHeight(); + builtins->screenSizeParams.x = rt.texture->getPixelWidth(rt.mipmap); + builtins->screenSizeParams.y = rt.texture->getPixelHeight(rt.mipmap); } builtins->constantColor = getColor(); From 112270ba1903bcb47502dec04f497696273c1adc Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 23 Mar 2024 00:19:47 -0300 Subject: [PATCH 100/104] tests: fix pixel coordinate test using too low precision in opengl es --- testing/tests/graphics.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index acbf74087..1993b0bab 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -211,8 +211,8 @@ love.test.graphics.Canvas = function(test) vec4 effect(vec4 c, Image tex, vec2 tc, vec2 pc) { // rounding during quantization from float to unorm8 doesn't seem to be // totally consistent across devices, lets do it ourselves. - vec2 value = pc / love_ScreenSize.xy; - vec2 quantized = (floor(255.0 * value + 0.5) + 0.1) / 255.0; + highp vec2 value = pc / love_ScreenSize.xy; + highp vec2 quantized = (floor(255.0 * value + 0.5) + 0.1) / 255.0; return vec4(quantized, 0.0, 1.0); } ]] From 565eab4ae1ef3304265bd74075aa6bc036ce48df Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 23 Mar 2024 09:50:48 -0300 Subject: [PATCH 101/104] samplers use mediump instead of lowp by default in GLSL ES. --- src/modules/graphics/Shader.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index 696e7f3b5..0f5f4480c 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -124,16 +124,17 @@ uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[13]; static const char global_functions[] = R"( #ifdef GL_ES + precision mediump sampler2D; #if __VERSION__ >= 300 || defined(LOVE_EXT_TEXTURE_ARRAY_ENABLED) - precision lowp sampler2DArray; + precision mediump sampler2DArray; #endif #if __VERSION__ >= 300 || defined(GL_OES_texture_3D) - precision lowp sampler3D; + precision mediump sampler3D; #endif #if __VERSION__ >= 300 && !defined(LOVE_GLSL1_ON_GLSL3) - precision lowp sampler2DShadow; - precision lowp samplerCubeShadow; - precision lowp sampler2DArrayShadow; + precision mediump sampler2DShadow; + precision mediump samplerCubeShadow; + precision mediump sampler2DArrayShadow; #endif #endif From 698d3052127521e81d362ebe3590f65bef08123d Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 23 Mar 2024 17:58:34 -0300 Subject: [PATCH 102/104] Remove love.graphics.setOrthoProjection and setPerspectiveProjection --- src/modules/graphics/Graphics.cpp | 21 --------------------- src/modules/graphics/Graphics.h | 2 -- src/modules/graphics/wrap_Graphics.cpp | 24 ------------------------ 3 files changed, 47 deletions(-) diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index 5a6b7a7ad..da42a8a50 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -2802,27 +2802,6 @@ Vector2 Graphics::inverseTransformPoint(Vector2 point) return p; } -void Graphics::setOrthoProjection(float w, float h, float near, float far) -{ - if (near >= far) - throw love::Exception("Orthographic projection Z far value must be greater than the Z near value."); - - Matrix4 m = Matrix4::ortho(0.0f, w, 0.0f, h, near, far); - setCustomProjection(m); -} - -void Graphics::setPerspectiveProjection(float verticalfov, float aspect, float near, float far) -{ - if (near <= 0.0f) - throw love::Exception("Perspective projection Z near value must be greater than 0."); - - if (near >= far) - throw love::Exception("Perspective projection Z far value must be greater than the Z near value."); - - Matrix4 m = Matrix4::perspective(verticalfov, aspect, near, far); - setCustomProjection(m); -} - void Graphics::setCustomProjection(const Matrix4 &m) { flushBatchedDraws(); diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index a09985a81..9fa1155a3 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -875,8 +875,6 @@ class Graphics : public Module Vector2 transformPoint(Vector2 point); Vector2 inverseTransformPoint(Vector2 point); - void setOrthoProjection(float w, float h, float near, float far); - void setPerspectiveProjection(float verticalfov, float aspect, float near, float far); void setCustomProjection(const Matrix4 &m); void resetProjection(); diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index cf396c1b1..eb9be70b9 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -3900,28 +3900,6 @@ int w_inverseTransformPoint(lua_State *L) return 2; } -int w_setOrthoProjection(lua_State *L) -{ - float w = (float) luaL_checknumber(L, 1); - float h = (float) luaL_checknumber(L, 2); - float near = (float) luaL_optnumber(L, 3, -10.0); - float far = (float) luaL_optnumber(L, 4, 10.0); - - luax_catchexcept(L, [&]() { instance()->setOrthoProjection(w, h, near, far); }); - return 0; -} - -int w_setPerspectiveProjection(lua_State *L) -{ - float verticalfov = (float) luaL_checknumber(L, 1); - float aspect = (float) luaL_checknumber(L, 2); - float near = (float) luaL_checknumber(L, 3); - float far = (float) luaL_checknumber(L, 4); - - luax_catchexcept(L, [&]() { instance()->setPerspectiveProjection(verticalfov, aspect, near, far); }); - return 0; -} - int w_resetProjection(lua_State */*L*/) { instance()->resetProjection(); @@ -4074,8 +4052,6 @@ static const luaL_Reg functions[] = { "transformPoint", w_transformPoint }, { "inverseTransformPoint", w_inverseTransformPoint }, - { "setOrthoProjection", w_setOrthoProjection }, - { "setPerspectiveProjection", w_setPerspectiveProjection }, { "resetProjection", w_resetProjection }, // Deprecated From 7bfbd647ba9b6a8f4861bf58a80f898fe2e8d518 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 23 Mar 2024 22:00:02 -0300 Subject: [PATCH 103/104] Make shader clip space consistent across APIs and projection matrices. - All shaders are expected to output clip space values that are effectively y-up, with [-1, 1] z, in NDC. - The transform to a backend's expected clip space values from the above range now happens after user vertex shader code is run, instead of inside a projection matrix. - Projection matrices no longer need to be flipped when rendering to a canvas versus the main screen. This means custom projection matrices might need to be altered to account for the more consistent range. --- src/modules/graphics/Graphics.cpp | 23 +++--------- src/modules/graphics/Graphics.h | 14 ++------ src/modules/graphics/Shader.cpp | 45 ++++++++++++++++++++---- src/modules/graphics/Shader.h | 21 +++++++++++ src/modules/graphics/metal/Graphics.h | 2 -- src/modules/graphics/metal/Graphics.mm | 9 ++--- src/modules/graphics/opengl/Graphics.cpp | 12 ------- src/modules/graphics/opengl/Graphics.h | 2 -- src/modules/graphics/opengl/Shader.cpp | 21 +++++++++-- src/modules/graphics/vulkan/Graphics.cpp | 11 +++--- src/modules/graphics/vulkan/Graphics.h | 1 - 11 files changed, 93 insertions(+), 68 deletions(-) diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index da42a8a50..7d58e4ed6 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -2831,29 +2831,14 @@ void Graphics::resetProjection() state.useCustomProjection = false; - updateDeviceProjection(Matrix4::ortho(0.0f, w, 0.0f, h, -10.0f, 10.0f)); + // NDC is y-up. The ortho() parameter names assume that as well. We want + // a y-down projection, so we set bottom to h and top to 0. + updateDeviceProjection(Matrix4::ortho(0.0f, w, h, 0.0f, -10.0f, 10.0f)); } void Graphics::updateDeviceProjection(const Matrix4 &projection) { - // Note: graphics implementations define computeDeviceProjection. - deviceProjectionMatrix = computeDeviceProjection(projection, isRenderTargetActive()); -} - -Matrix4 Graphics::calculateDeviceProjection(const Matrix4 &projection, uint32 flags) const -{ - Matrix4 m = projection; - bool reverseZ = (flags & DEVICE_PROJECTION_REVERSE_Z) != 0; - - if (flags & DEVICE_PROJECTION_FLIP_Y) - m.setRow(1, -m.getRow(1)); - - if (flags & DEVICE_PROJECTION_Z_01) // Go from Z [-1, 1] to Z [0, 1]. - m.setRow(2, m.getRow(2) * (reverseZ ? -0.5f : 0.5f) + m.getRow(3)); - else if (reverseZ) - m.setRow(2, -m.getRow(2)); - - return m; + deviceProjectionMatrix = projection; } STRINGMAP_CLASS_BEGIN(Graphics, Graphics::DrawMode, Graphics::DRAW_MAX_ENUM, drawMode) diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index 9fa1155a3..50bc8e65a 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -627,6 +627,9 @@ class Graphics : public Module void setMeshCullMode(CullMode cull); CullMode getMeshCullMode() const; + // Note: These are meant to be relative to the y-down default projection, + // which may be flipped compared to device NDC. Implementations may have + // to flip the winding internally. virtual void setFrontFaceWinding(Winding winding) = 0; Winding getFrontFaceWinding() const; @@ -878,8 +881,6 @@ class Graphics : public Module void setCustomProjection(const Matrix4 &m); void resetProjection(); - virtual Matrix4 computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const = 0; - virtual void draw(const DrawCommand &cmd) = 0; virtual void draw(const DrawIndexedCommand &cmd) = 0; virtual void drawQuads(int start, int count, const VertexAttributes &attributes, const BufferBindings &buffers, Texture *texture) = 0; @@ -922,14 +923,6 @@ class Graphics : public Module protected: - enum DeviceProjectionFlags - { - DEVICE_PROJECTION_DEFAULT = 0, - DEVICE_PROJECTION_FLIP_Y = (1 << 0), - DEVICE_PROJECTION_Z_01 = (1 << 1), - DEVICE_PROJECTION_REVERSE_Z = (1 << 2), - }; - struct DisplayState { DisplayState(); @@ -1058,7 +1051,6 @@ class Graphics : public Module void popTransform(); void updateDeviceProjection(const Matrix4 &projection); - Matrix4 calculateDeviceProjection(const Matrix4 &projection, uint32 flags) const; int width; int height; diff --git a/src/modules/graphics/Shader.cpp b/src/modules/graphics/Shader.cpp index 0f5f4480c..c3839a421 100644 --- a/src/modules/graphics/Shader.cpp +++ b/src/modules/graphics/Shader.cpp @@ -92,10 +92,10 @@ static const char render_uniforms[] = R"( // but we can't guarantee that highp is always supported in fragment shaders... // We *really* don't want to use mediump for these in vertex shaders though. #ifdef LOVE_SPLIT_UNIFORMS_PER_DRAW -uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[12]; +uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[13]; uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw2[1]; #else -uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[13]; +uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[14]; #endif // Older GLSL doesn't support preprocessor line continuations... @@ -107,12 +107,15 @@ uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[13]; #define CurrentDPIScale (love_UniformsPerDraw[8].w) #define ConstantPointSize (love_UniformsPerDraw[9].w) -#define ConstantColor (love_UniformsPerDraw[11]) + +#define love_ClipSpaceParams (love_UniformsPerDraw[11]) + +#define ConstantColor (love_UniformsPerDraw[12]) #ifdef LOVE_SPLIT_UNIFORMS_PER_DRAW #define love_ScreenSize (love_UniformsPerDraw2[0]) #else -#define love_ScreenSize (love_UniformsPerDraw[12]) +#define love_ScreenSize (love_UniformsPerDraw[13]) #endif // Alternate names @@ -248,7 +251,13 @@ static const char vertex_header[] = R"( #endif )"; -static const char vertex_functions[] = R"()"; +static const char vertex_functions[] = R"( +vec4 love_clipSpaceTransform(vec4 clipPosition) { + clipPosition.y *= love_ClipSpaceParams.x; + clipPosition.z = (love_ClipSpaceParams.y * clipPosition.z + love_ClipSpaceParams.z * clipPosition.w) * love_ClipSpaceParams.w; + return clipPosition; +} +)"; static const char vertex_main[] = R"( LOVE_IO_LOCATION(0) attribute vec4 VertexPosition; @@ -264,6 +273,7 @@ void main() { VaryingTexCoord = VertexTexCoord; VaryingColor = gammaCorrectColor(VertexColor) * ConstantColor; love_Position = position(ClipSpaceFromLocal, VertexPosition); + love_Position = love_clipSpaceTransform(love_Position); } )"; @@ -272,6 +282,7 @@ void vertexmain(); void main() { vertexmain(); + love_Position = love_clipSpaceTransform(love_Position); } )"; @@ -588,7 +599,7 @@ static Shader::EntryPoint getComputeEntryPoint(const std::string &src, const std } // glsl -static_assert(sizeof(Shader::BuiltinUniformData) == sizeof(float) * 4 * 13, "Update the array in wrap_GraphicsShader.lua if this changes."); +static_assert(sizeof(Shader::BuiltinUniformData) == sizeof(float) * 4 * 14, "Update the array in wrap_GraphicsShader.lua if this changes."); love::Type Shader::type("Shader", &Object::type); @@ -793,6 +804,28 @@ bool Shader::isDefaultActive() return false; } +Vector4 Shader::computeClipSpaceParams(uint32 clipSpaceTransformFlags) +{ + // See the love_clipSpaceTransform vertex shader function. + Vector4 params(1.0f, 1.0f, 0.0f, 1.0f); + + if (clipSpaceTransformFlags & CLIP_TRANSFORM_FLIP_Y) + params.x = -1.0f; + + if (clipSpaceTransformFlags & CLIP_TRANSFORM_Z_NEG1_1_TO_0_1) + { + params.z = 1.0f; + params.w = 0.5f; + } + else if (clipSpaceTransformFlags & CLIP_TRANSFORM_Z_0_1_TO_NEG1_1) + { + params.y = 2.0f; + params.z = -1.0f; + } + + return params; +} + const Shader::UniformInfo *Shader::getUniformInfo(const std::string &name) const { const auto it = reflection.allUniforms.find(name); diff --git a/src/modules/graphics/Shader.h b/src/modules/graphics/Shader.h index 51b538fd7..abe57be38 100644 --- a/src/modules/graphics/Shader.h +++ b/src/modules/graphics/Shader.h @@ -108,6 +108,14 @@ class Shader : public Object, public Resource ACCESS_WRITE = (1 << 1), }; + enum ClipSpaceTransformFlags + { + CLIP_TRANSFORM_NONE = 0, + CLIP_TRANSFORM_FLIP_Y = 1 << 0, + CLIP_TRANSFORM_Z_NEG1_1_TO_0_1 = 1 << 1, + CLIP_TRANSFORM_Z_0_1_TO_NEG1_1 = 1 << 2, + }; + struct CompileOptions { std::map defines; @@ -177,6 +185,7 @@ class Shader : public Object, public Resource Matrix4 transformMatrix; Matrix4 projectionMatrix; Vector4 normalMatrix[3]; // 3x3 matrix padded to an array of 3 vector4s. + Vector4 clipSpaceParams; Colorf constantColor; // Pixel shader-centric variables past this point. @@ -212,6 +221,18 @@ class Shader : public Object, public Resource **/ static bool isDefaultActive(); + /** + * Used for transforming standardized post-projection clip space positions + * into the backend's current clip space. + * Right now, the standard is: + * NDC y is [-1, 1] starting at the bottom (y-up). + * NDC z is [-1, 1]. + * Pixel coordinates are y-down. + * Pixel (0, 0) in a texture is the top-left. + * Aside from NDC z, this matches Metal and D3D12. + */ + static Vector4 computeClipSpaceParams(uint32 clipSpaceTransformFlags); + /** * Returns any warnings this Shader may have generated. **/ diff --git a/src/modules/graphics/metal/Graphics.h b/src/modules/graphics/metal/Graphics.h index 41aa71be9..c23b5b090 100644 --- a/src/modules/graphics/metal/Graphics.h +++ b/src/modules/graphics/metal/Graphics.h @@ -64,8 +64,6 @@ class Graphics final : public love::graphics::Graphics love::graphics::Texture *newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) override; love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector &format, const void *data, size_t size, size_t arraylength) override; - Matrix4 computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const override; - void backbufferChanged(int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) override; bool setMode(void *context, int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) override; void unSetMode() override; diff --git a/src/modules/graphics/metal/Graphics.mm b/src/modules/graphics/metal/Graphics.mm index 5319f7dc4..6fbe01a69 100644 --- a/src/modules/graphics/metal/Graphics.mm +++ b/src/modules/graphics/metal/Graphics.mm @@ -465,12 +465,6 @@ static inline void setSampler(id encoder, Graphics::Re return new GraphicsReadback(this, method, texture, slice, mipmap, rect, dest, destx, desty); } -Matrix4 Graphics::computeDeviceProjection(const Matrix4 &projection, bool /*rendertotexture*/) const -{ - uint32 flags = DEVICE_PROJECTION_FLIP_Y; - return calculateDeviceProjection(projection, flags); -} - void Graphics::backbufferChanged(int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) { bool sizechanged = width != this->width || height != this->height @@ -1133,6 +1127,9 @@ static bool isClampOne(SamplerState::WrapMode w) // Same with point size. builtins->normalMatrix[1].w = getPointSize(); + uint32 flags = Shader::CLIP_TRANSFORM_Z_NEG1_1_TO_0_1; + builtins->clipSpaceParams = Shader::computeClipSpaceParams(flags); + builtins->screenSizeParams = Vector4(getPixelWidth(), getPixelHeight(), 1.0f, 0.0f); auto rt = states.back().renderTargets.getFirstTarget(); if (rt.texture.get()) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index a7a3b3ab0..f0450dfbf 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -188,18 +188,6 @@ love::graphics::GraphicsReadback *Graphics::newReadbackInternal(ReadbackMethod m return new GraphicsReadback(this, method, texture, slice, mipmap, rect, dest, destx, desty); } -Matrix4 Graphics::computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const -{ - uint32 flags = DEVICE_PROJECTION_DEFAULT; - - // The projection matrix is flipped compared to rendering to a texture, due - // to OpenGL considering (0,0) bottom-left instead of top-left. - if (!rendertotexture) - flags |= DEVICE_PROJECTION_FLIP_Y; - - return calculateDeviceProjection(projection, flags); -} - void Graphics::backbufferChanged(int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) { bool changed = width != this->width || height != this->height diff --git a/src/modules/graphics/opengl/Graphics.h b/src/modules/graphics/opengl/Graphics.h index 7736731f8..351532b39 100644 --- a/src/modules/graphics/opengl/Graphics.h +++ b/src/modules/graphics/opengl/Graphics.h @@ -60,8 +60,6 @@ class Graphics final : public love::graphics::Graphics love::graphics::Texture *newTextureView(love::graphics::Texture *base, const Texture::ViewSettings &viewsettings) override; love::graphics::Buffer *newBuffer(const Buffer::Settings &settings, const std::vector &format, const void *data, size_t size, size_t arraylength) override; - Matrix4 computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const override; - void backbufferChanged(int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) override; bool setMode(void *context, int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) override; void unSetMode() override; diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index 21e26fb0f..3885b7d8a 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -767,6 +767,8 @@ void Shader::updateBuiltinUniforms(love::graphics::Graphics *gfx, int viewportW, if (current != this) return; + bool rt = gfx->isRenderTargetActive(); + BuiltinUniformData data; data.transformMatrix = gfx->getTransform(); @@ -792,13 +794,26 @@ void Shader::updateBuiltinUniforms(love::graphics::Graphics *gfx, int viewportW, // Same with point size. data.normalMatrix[1].w = gfx->getPointSize(); + // Users expect to work with y-up NDC, y-down pixel coordinates and textures + // (see graphics/Shader.h). + // OpenGL has y-up NDC and y-up pixel coordinates and textures. If we just flip + // NDC y when rendering to a texture, it's enough to make (0, 0) on the texture + // match what we expect when sampling from it - so it's the same as if textures + // are y-down with y-up NDC. + // Windowing systems treat (0, 0) on the backbuffer texture as the bottom left, + // so we don't need to do that there. + uint32 clipflags = 0; + if (rt) + clipflags |= CLIP_TRANSFORM_FLIP_Y; + data.clipSpaceParams = computeClipSpaceParams(clipflags); + data.screenSizeParams.x = viewportW; data.screenSizeParams.y = viewportH; // The shader does pixcoord.y = gl_FragCoord.y * params.z + params.w. // This lets us flip pixcoord.y when needed, to be consistent (drawing // with no RT active makes the pixel coordinates y-flipped.) - if (gfx->isRenderTargetActive()) + if (rt) { // No flipping: pixcoord.y = gl_FragCoord.y * 1.0 + 0.0. data.screenSizeParams.z = 1.0f; @@ -825,7 +840,7 @@ void Shader::updateBuiltinUniforms(love::graphics::Graphics *gfx, int viewportW, { GLint location = builtinUniforms[BUILTIN_UNIFORMS_PER_DRAW]; if (location >= 0) - glUniform4fv(location, 12, (const GLfloat *) &data); + glUniform4fv(location, 13, (const GLfloat *) &data); GLint location2 = builtinUniforms[BUILTIN_UNIFORMS_PER_DRAW_2]; if (location2 >= 0) glUniform4fv(location2, 1, (const GLfloat *) &data.screenSizeParams); @@ -834,7 +849,7 @@ void Shader::updateBuiltinUniforms(love::graphics::Graphics *gfx, int viewportW, { GLint location = builtinUniforms[BUILTIN_UNIFORMS_PER_DRAW]; if (location >= 0) - glUniform4fv(location, 13, (const GLfloat *) &data); + glUniform4fv(location, 14, (const GLfloat *) &data); } } diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 3cdfc145e..b4d98a0ce 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -1239,12 +1239,6 @@ bool Graphics::dispatch(love::graphics::Shader *shader, love::graphics::Buffer * return true; } -Matrix4 Graphics::computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const -{ - uint32 flags = DEVICE_PROJECTION_DEFAULT; - return calculateDeviceProjection(projection, flags); -} - void Graphics::setRenderTargetsInternal(const RenderTargets &rts, int pixelw, int pixelh, bool hasSRGBtexture) { if (renderPassState.active) @@ -1430,6 +1424,11 @@ graphics::Shader::BuiltinUniformData Graphics::getCurrentBuiltinUniformData() // Same with point size. data.normalMatrix[1].w = getPointSize(); + // Flip y to convert input y-up [-1, 1] to vulkan's y-down [-1, 1]. + // Convert input z [-1, 1] to vulkan [0, 1]. + uint32 flags = Shader::CLIP_TRANSFORM_FLIP_Y | Shader::CLIP_TRANSFORM_Z_NEG1_1_TO_0_1; + data.clipSpaceParams = Shader::computeClipSpaceParams(flags); + const auto &rt = states.back().renderTargets.getFirstTarget(); if (rt.texture != nullptr) { diff --git a/src/modules/graphics/vulkan/Graphics.h b/src/modules/graphics/vulkan/Graphics.h index ca8b8e3a5..ffaff9399 100644 --- a/src/modules/graphics/vulkan/Graphics.h +++ b/src/modules/graphics/vulkan/Graphics.h @@ -271,7 +271,6 @@ class Graphics final : public love::graphics::Graphics graphics::GraphicsReadback *newReadbackInternal(ReadbackMethod method, love::graphics::Texture *texture, int slice, int mipmap, const Rect &rect, image::ImageData *dest, int destx, int desty) override; void clear(OptionalColorD color, OptionalInt stencil, OptionalDouble depth) override; void clear(const std::vector &colors, OptionalInt stencil, OptionalDouble depth) override; - Matrix4 computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const override; void discard(const std::vector& colorbuffers, bool depthstencil) override; void present(void *screenshotCallbackdata) override; void backbufferChanged(int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) override; From 21b71d02b5bb5f1c914da8d851294fe36ce70b81 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sun, 24 Mar 2024 10:46:29 -0300 Subject: [PATCH 104/104] Add love.graphics.setCustomProjection. The active projection matrix is reset when changing canvases, and when the window is resized if no canvas is active at the time. --- src/modules/graphics/wrap_Graphics.cpp | 29 ++++ src/modules/math/wrap_Transform.cpp | 187 +++++++++++++------------ src/modules/math/wrap_Transform.h | 1 + 3 files changed, 125 insertions(+), 92 deletions(-) diff --git a/src/modules/graphics/wrap_Graphics.cpp b/src/modules/graphics/wrap_Graphics.cpp index eb9be70b9..b4f46fdb9 100644 --- a/src/modules/graphics/wrap_Graphics.cpp +++ b/src/modules/graphics/wrap_Graphics.cpp @@ -3900,6 +3900,34 @@ int w_inverseTransformPoint(lua_State *L) return 2; } +int w_setCustomProjection(lua_State *L) +{ + math::Transform *transform = luax_totype(L, 1); + if (transform != nullptr) + { + instance()->setCustomProjection(transform->getMatrix()); + return 0; + } + + math::Transform::MatrixLayout layout = math::Transform::MATRIX_ROW_MAJOR; + + int idx = 1; + if (lua_type(L, idx) == LUA_TSTRING) + { + const char* layoutstr = lua_tostring(L, idx); + if (!math::Transform::getConstant(layoutstr, layout)) + return luax_enumerror(L, "matrix layout", math::Transform::getConstants(layout), layoutstr); + + idx++; + } + + float elements[16]; + love::math::luax_checkmatrix(L, idx, layout, elements); + + instance()->setCustomProjection(Matrix4(elements)); + return 0; +} + int w_resetProjection(lua_State */*L*/) { instance()->resetProjection(); @@ -4052,6 +4080,7 @@ static const luaL_Reg functions[] = { "transformPoint", w_transformPoint }, { "inverseTransformPoint", w_inverseTransformPoint }, + { "setCustomProjection", w_setCustomProjection }, { "resetProjection", w_resetProjection }, // Deprecated diff --git a/src/modules/math/wrap_Transform.cpp b/src/modules/math/wrap_Transform.cpp index b622e1dad..24e2aa45a 100644 --- a/src/modules/math/wrap_Transform.cpp +++ b/src/modules/math/wrap_Transform.cpp @@ -30,6 +30,99 @@ Transform *luax_checktransform(lua_State *L, int idx) return luax_checktype(L, idx, Transform::type); } +void luax_checkmatrix(lua_State *L, int idx, Transform::MatrixLayout layout, float elements[16]) +{ + bool columnmajor = layout == Transform::MATRIX_COLUMN_MAJOR; + + if (lua_istable(L, idx)) + { + lua_rawgeti(L, idx, 1); + bool tableoftables = lua_istable(L, -1); + lua_pop(L, 1); + + if (tableoftables) + { + if (columnmajor) + { + for (int column = 0; column < 4; column++) + { + lua_rawgeti(L, idx, column + 1); + + for (int row = 0; row < 4; row++) + { + lua_rawgeti(L, -(row + 1), row + 1); + elements[column * 4 + row] = (float) luaL_checknumber(L, -1); + } + + lua_pop(L, 4 + 1); + } + } + else + { + for (int row = 0; row < 4; row++) + { + lua_rawgeti(L, idx, row + 1); + + for (int column = 0; column < 4; column++) + { + // The table has the matrix elements laid out in row-major + // order, but we need to store them column-major in memory. + lua_rawgeti(L, -(column + 1), column + 1); + elements[column * 4 + row] = (float) luaL_checknumber(L, -1); + } + + lua_pop(L, 4 + 1); + } + } + } + else + { + if (columnmajor) + { + for (int column = 0; column < 4; column++) + { + for (int row = 0; row < 4; row++) + { + lua_rawgeti(L, idx, column * 4 + row + 1); + elements[column * 4 + row] = (float) luaL_checknumber(L, -1); + } + } + } + else + { + for (int column = 0; column < 4; column++) + { + for (int row = 0; row < 4; row++) + { + // The table has the matrix elements laid out in row-major + // order, but we need to store them column-major in memory. + lua_rawgeti(L, idx, row * 4 + column + 1); + elements[column * 4 + row] = (float) luaL_checknumber(L, -1); + } + } + } + + lua_pop(L, 16); + } + } + else + { + if (columnmajor) + { + for (int i = 0; i < 16; i++) + elements[i] = (float) luaL_checknumber(L, idx + i); + } + else + { + for (int column = 0; column < 4; column++) + { + for (int row = 0; row < 4; row++) + elements[column * 4 + row] = (float) luaL_checknumber(L, row * 4 + column + idx); + } + } + } +} + int w_Transform_clone(lua_State *L) { Transform *t = luax_checktransform(L, 1); @@ -131,110 +224,20 @@ int w_Transform_setTransformation(lua_State *L) int w_Transform_setMatrix(lua_State *L) { Transform *t = luax_checktransform(L, 1); - - bool columnmajor = false; + Transform::MatrixLayout layout = Transform::MATRIX_ROW_MAJOR; int idx = 2; if (lua_type(L, idx) == LUA_TSTRING) { const char *layoutstr = lua_tostring(L, idx); - Transform::MatrixLayout layout; if (!Transform::getConstant(layoutstr, layout)) return luax_enumerror(L, "matrix layout", Transform::getConstants(layout), layoutstr); - columnmajor = (layout == Transform::MATRIX_COLUMN_MAJOR); idx++; } float elements[16]; - - if (lua_istable(L, idx)) - { - lua_rawgeti(L, idx, 1); - bool tableoftables = lua_istable(L, -1); - lua_pop(L, 1); - - if (tableoftables) - { - if (columnmajor) - { - for (int column = 0; column < 4; column++) - { - lua_rawgeti(L, idx, column + 1); - - for (int row = 0; row < 4; row++) - { - lua_rawgeti(L, -(row + 1), row + 1); - elements[column * 4 + row] = (float) luaL_checknumber(L, -1); - } - - lua_pop(L, 4 + 1); - } - } - else - { - for (int row = 0; row < 4; row++) - { - lua_rawgeti(L, idx, row + 1); - - for (int column = 0; column < 4; column++) - { - // The table has the matrix elements laid out in row-major - // order, but we need to store them column-major in memory. - lua_rawgeti(L, -(column + 1), column + 1); - elements[column * 4 + row] = (float) luaL_checknumber(L, -1); - } - - lua_pop(L, 4 + 1); - } - } - } - else - { - if (columnmajor) - { - for (int column = 0; column < 4; column++) - { - for (int row = 0; row < 4; row++) - { - lua_rawgeti(L, idx, column * 4 + row + 1); - elements[column * 4 + row] = (float) luaL_checknumber(L, -1); - } - } - } - else - { - for (int column = 0; column < 4; column++) - { - for (int row = 0; row < 4; row++) - { - // The table has the matrix elements laid out in row-major - // order, but we need to store them column-major in memory. - lua_rawgeti(L, idx, row * 4 + column + 1); - elements[column * 4 + row] = (float) luaL_checknumber(L, -1); - } - } - } - - lua_pop(L, 16); - } - } - else - { - if (columnmajor) - { - for (int i = 0; i < 16; i++) - elements[i] = (float) luaL_checknumber(L, idx + i); - } - else - { - for (int column = 0; column < 4; column++) - { - for (int row = 0; row < 4; row++) - elements[column * 4 + row] = (float) luaL_checknumber(L, row * 4 + column + idx); - } - } - } + luax_checkmatrix(L, idx, layout, elements); t->setMatrix(Matrix4(elements)); lua_pushvalue(L, 1); diff --git a/src/modules/math/wrap_Transform.h b/src/modules/math/wrap_Transform.h index 80f3a1e15..53feb3b7a 100644 --- a/src/modules/math/wrap_Transform.h +++ b/src/modules/math/wrap_Transform.h @@ -30,6 +30,7 @@ namespace math { Transform *luax_checktransform(lua_State *L, int idx); +void luax_checkmatrix(lua_State *L, int idx, Transform::MatrixLayout layout, float elements[16]); extern "C" int luaopen_transform(lua_State *L); } // math