summaryrefslogtreecommitdiffstats
path: root/modules/basis_universal
Commit message (Collapse)AuthorAgeFilesLines
* Fix header guards in modules:Marcel Admiraal2020-09-061-0/+5
| | | | | | | - Add missing header guards to various modules' register_types.h - Add header guard to basis_universal/texture_basisu.h. - Ensure header guard encloses entire header in webrtc/webrtc_data_channel_js.h.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-1/+2
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-5/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-022-4/+4
|
* Fix more -Wmaybe-uninitialized warnings with target=release_debugRémi Verschelde2020-03-311-1/+1
| | | | | | I have no idea why those don't get triggered in target=debug builds. Fixes #37461.
* Fix another batch of -Wmaybe-uninitialized warningsRémi Verschelde2020-03-301-2/+2
| | | | And simplify code in CSGShape.
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-302-20/+23
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Renaming of servers for coherency.Juan Linietsky2020-03-272-16/+16
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Fix some -Wmaybe-uninitialized warningsRémi Verschelde2020-03-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Namely: ``` modules/basis_universal/register_types.cpp: In function 'Ref<Image> basis_universal_unpacker(const Vector<unsigned char>&)': modules/basis_universal/register_types.cpp:266:15: warning: 'imgfmt' may be used uninitialized in this function [-Wmaybe-uninitialized] 266 | image->create(info.m_width, info.m_height, info.m_total_levels > 1, imgfmt, gpudata); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ modules/basis_universal/register_types.cpp:255:39: warning: 'format' may be used uninitialized in this function [-Wmaybe-uninitialized] 255 | bool ret = tr.transcode_image_level(ptr, size, 0, i, dst + ofs, level.m_total_blocks - i, format); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` ``` servers/visual_server.cpp: In member function 'Error VisualServer::_surface_set_data(Array, uint32_t, uint32_t*, uint32_t, Vector<unsigned char>&, int, Vector<unsigned char>&, int, AABB&, Vector<AABB>&)': servers/visual_server.cpp:636:15: warning: 'iw' may be used uninitialized in this function [-Wmaybe-uninitialized] 636 | copymem(&iw[i * 2], &v, 2); | ^ ``` ``` core/image.cpp: In member function 'Error Image::generate_mipmap_roughness(Image::RoughnessChannel, const Ref<Image>&)': core/image.cpp:1683:11: warning: 'roughness' may be used uninitialized in this function [-Wmaybe-uninitialized] 1683 | float roughness; | ^~~~~~~~~ ```
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* Fix basis_universal to not include tool main file.Fabio Alessandrelli2020-03-111-1/+0
| | | | Avoid build error due to duplicate `main` symbol definition.
* Fix compilation warnings and re-enable werror=yes on TravisRémi Verschelde2020-02-181-8/+3
| | | | | | | | | | | | | | | | | | | | | Fix -Wunused-variable, -Wunused-but-set-variable and -Wswitch warnings raised by GCC 8 and 9. Fix -Wunused-function, -Wunused-private-field and -Wtautological-constant-out-of-range-compare raised by Clang. Fix MSVC 2019 warning C4804 (unsafe use of type 'bool' in comparison operation). GCC -Wcpp warnings/Clang -W#warnings (`#warning`) are no longer raising errors and will thus not abort compilation with `werror=yes`. Treat glslang headers are system headers to avoid raising warnings. Re-enables us to build with `werror=yes` on Linux and macOS, thus catching warnings that would be introduced by new code. Fixes #36132.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-183-27/+27
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Fix various GCC compilation warnings after Vulkan mergeRémi Verschelde2020-02-141-1/+5
| | | | Part of #36132.
* basis_universal: Update to upstream commit from Jan 4, 2020Rémi Verschelde2020-02-131-14/+14
| | | | BinomialLLC/basis_universal@895ee8ee7e04f22267f8d16d46de04d5a01d63ac.
* Vulkan: Move thirdparty code out of drivers, style fixesRémi Verschelde2020-02-114-8/+8
| | | | | | | - `vk_enum_string_helper.h` is a generated file taken from the SDK (Vulkan-ValidationLayers). - `vk_mem_alloc.h` is a library from GPUOpen: https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
* Fix code formatting issues and VS compilationRémi Verschelde2020-02-113-0/+90
| | | | | | | Also temporarily disable multicheck build so that we get a full build even when there are style issues on Vulkan. Fixes #33356.
* basis_universal: Use proper basisu_transcoder.h header, fixes Clang buildRémi Verschelde2020-02-114-39/+38
| | | | Also renames bu to basisu to be more explicit and match upstream name.
* Fixes to Basis Universal.Juan Linietsky2020-02-111-2/+3
|
* basis_universal: Fix py3 build and document license and provenanceRémi Verschelde2020-02-111-25/+30
| | | | | | Also drop unneeded files. Fix build with MinGW. Closes #32384.
* Rewritten StreamTexture for better code reuse, added basis universal supportJuan Linietsky2020-02-116-0/+587