Age | Commit message (Collapse) | Author |
|
|
|
Remove get_data() from CowData
|
|
|
|
|
|
|
|
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
|
|
|
|
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
|
|
* Changed syntax usage for RD::Uniform to create faster with a single RID
* Converted render pass setup to use this in clustered renderer to test.
This is the first step into creating a proper uniform set cache system to simplify large parts of the codebase.
|
|
[4.x] BVH - Sync BVH with 3.x
|
|
|
|
* Implementing this function efficiently is not really possible.
* Replaced by an option to get all RIDs into a buffer for performance.
|
|
Templated mask checks and generic NUM_TREES
Fix leaking leaves
|
|
Use clear() instead of resize(0).
Use has() instead of "find(p_val) != -1".
|
|
|
|
|
|
The same is done for `Vector` (and thus `Packed*Array`).
`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.
`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.
This makes `slice` works similarly to numpy's and JavaScript's.
|
|
|
|
|
|
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.
`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
|
|
Happy new year to the wonderful Godot community!
|
|
|
|
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.
According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.
This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
|
|
|
|
|
|
|
|
|
|
Some platforms (*cough* web *cough*) have hard limits on the number of
threads that can be spawned.
Currently, ThreadPoolWork (mostly used in rendering/physics servers)
will spawn as many threads as CPUs available causing exception on
machines with high CPU count.
This commit adds a new overridable method to OS that returns the default
thread pool size (still the CPU count by default), and overrides it for
the JavaScript platform so it always allocate only one thread.
We can likely improve the whole ThreadPoolWork in the future to always
allocate X amount of threads, and assign jobs to them on the fly, but
that will require some more architectural changes.
|
|
|
|
support (and add unittests)
|
|
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
|
|
|
|
kdiduk/issue-52491-fix-value-conversion-in-hashfuncs-header
#52491 Cosmetic: fix type cast so that it matches return value type
|
|
|
|
|
|
|
|
|
|
|
|
`#pragma once` was used in a few files, yet we settled on using
traditional include guards instead.
The PooledList template comment was also moved to allow editors
such as Visual Studio Code to display the comment when hovering
PooledList.
`app.h` was renamed to `app_uwp.h` to be less generic for the
include guard.
|
|
On latest (11.1 as of this commit) GCC, the following warning is
continuously issued during build:
warning: placement new constructing an object of type
'SafeNumeric<unsigned int>' and size '4' in a region of type
'uint32_t*' {aka 'unsigned int*'} and size '0' [-Wplacement-new=]
This happens because on 98ceb60eb4 the new operator override used
was dropped and replaced with standard placement new. GCC sees the
subtraction from the pointer and complains as it thinks that the
SafeNumeric is placed outside an allocation, not knowing that the
address requested is already inside one.
After suggestions, the false positive is silenced, with no other
changes.
|
|
|
|
Fix ConstIterator to allow `for` range loops on Packed*Array
|
|
workflow."
|
|
Improve collision generation usability in the new 3D scene import workflow.
|
|
|
|
|
|
* Exposed as utility functions.
* Not very useful for script, but vital for creating servers using native extensions.
|
|
|
|
|
|
The constructor was expecting a mutable pointer, while the passed pointer was immutable ( returns a const pointer), so the compilation was failing when iterating a constant .
|