summaryrefslogtreecommitdiff
path: root/servers/visual
AgeCommit message (Collapse)Author
2020-03-27Fix some -Wmaybe-uninitialized warningsRémi Verschelde
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; | ^~~~~~~~~ ```
2020-03-27Fix various -Wmaybe-uninitialized (#37352).Martin Liska
2020-03-26Open sub-windows as embedded if the OS does not support themJuan Linietsky
2020-03-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-03-26Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky
2020-03-26Rename conflicting variable to fix MoltenVK shader compilation.bruvzg
2020-03-24Merge pull request #37268 from clayjohn/VULKAN-sky-colorRémi Verschelde
Replace subpass textures with color in sky shader
2020-03-24Replace subpass textures with color in sky shaderclayjohn
2020-03-24Remove unused classes and stray headersRémi Verschelde
Found by reviewing headers with 1 or less matching includes: ``` find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes ```
2020-03-22Merge pull request #37179 from clayjohn/VULKAN-sky-shaderRémi Verschelde
Implement Sky Shaders
2020-03-21Working sky shader implementationclayjohn
2020-03-21Make file formatting comply with POSIX and Unix standardsAaron Franke
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-20Fix incorrect shader block parsingYuri Roubinsky
2020-03-20Allow to reassign local variables in shadersYuri Roubinsky
2020-03-19Add shader based background modeBastiaan Olij
2020-03-19Fix shader TIME auto-completionYuri Roubinsky
2020-03-19Removed old TIME references from shader_typesYuri Roubinsky
2020-03-19Makes shader 'TIME' available in custom functions by defaultYuri Roubinsky
2020-03-18Show shader method out/inout qualifier in intellisenseYuri Roubinsky
2020-03-18Fix shader crash if passing const values to modf functionYuri Roubinsky
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-14Enables passing out built-in parameter from parent function in shadersYuri Roubinsky
2020-03-11Fix various typosluz.paz
Found via `codespell`
2020-03-04Merge pull request #36021 from YeldhamDev/intersects_touch_exposeRémi Verschelde
Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'
2020-03-04Merge pull request #36733 from qarmin/static_analyzer_fixesRémi Verschelde
Fixes bugs found by Sonarcloud and Coverity
2020-03-04Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'Michael Alexsander
2020-03-04Change when we can ERR_FAIL_COND and ERR_FAIL_CONV_V to static_assertMateo Dev .59
2020-03-02Merge pull request #36691 from clayjohn/VULKAN-cubemap-roughnessRémi Verschelde
Improve cubemap importance sampling
2020-03-02Fixes bugs found by Sonarcloud and Coverityqarmin
2020-02-29Properly free reflection probe atlasclayjohn
2020-02-29Improve cubemap importance samplingclayjohn
2020-02-29Merge pull request #36679 from clayjohn/VULKAN-mem-leakRémi Verschelde
Remove minimum size for shadow atlas
2020-02-29Remove minimum size for shadow atlasclayjohn
2020-02-29Fix shader's step hint range for integersYuri Roubinsky
2020-02-28Reduce descripter sets in cubemap filterclayjohn
2020-02-27Basic fast filtering implementationclayjohn
2020-02-28Merge pull request #36627 from clayjohn/VULKAN-freeRémi Verschelde
Properly free many Vulkan resources
2020-02-28Merge pull request #36556 from RandomShaper/rework_mutexRémi Verschelde
Reimplement `Mutex` with C++'s `<mutex>` (plus more)
2020-02-27Properly free many vulkan resourcesclayjohn
2020-02-27Merge pull request #36186 from Calinou/remove-vulkan-debugging-printsRémi Verschelde
Remove Vulkan debugging prints
2020-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-26Merge pull request #36428 from clayjohn/VULKAN-ref-probe-skyRémi Verschelde
Properly flip sky when rendering reflection probes
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-23Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde
This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
2020-02-21properly flip sky when rendering reflection probesclayjohn
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-20Fix MIMPAMPS typos in constants throughout the engineAndrii Doroshenko (Xrayez)
2020-02-18Fix compilation warnings and re-enable werror=yes on TravisRémi Verschelde
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.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-15Fix shader crash if duplicated struct members createdYuri Roubinsky