Audio drivers are destroyed on OS destruction, when memory management is no longer available so they must release their dynamic allocations explicitly in their `finish()` method.
This backports the work in #7815 and the subsequent fixes in #8393
The following program now works as expected in this branch in both
release_debug and debug mode:
```gdscript
print(sqrt(-1))
print(sqrt(-1))
var simple1=asin(10.0)
var simple2=acos(10.0)
print(simple1)
print(simple2)
```
And successfully prints -nan 4 times
This fixes#9580 and fixes#8925
This one allows for complex shaders paired with a simple lighting shader to skip code that would otherwise be pointlessly (and wastefully) run during the light pass.
You can use `if (AT_LIGHT_PASS) , negated or not, and that will be converted to a preprocessed #if when the shader is compiled.
Depending on your game (number of items and lights), this can be a *significant* performance gain, or at least avoids relying on the driver's optimizing abilities.
since the malloc() suite is nowadays thread-safe by itself (from MSVC 2010 you don't even have a non-MT runtime and for POSIX-based OSs it's mandatory by the spec.
Bonus: Clear about-to-be-released blocks with a better magic number for better debugging of dangling pointers.
- Add a proper function to retrieve IP addresses.
- Solve issues with Windows FileAccess and DirAccess to use the same code
for WinRT.
- Add patches to the GLES2 rasterizer to workaround ANGLE issues.
We were reserving 12 bytes from the buffer for ip, port, and length, but since
IPv6 introduction we should be reserving 24 (IPv6 are 16 bytes)
(cherry picked from commit 5dc7c920bf)
We should probably create a specific function for setting the
recv buffer anyway. UDP sockets does not need to bind (listen)
to be able to call recvfrom. This is especially useful for clients
who just call set_send_address and start communicating with a server.
(cherry picked from commit 9336857132)
TCP status polling is always performed as non blocking.
Trying to put a packet on a connecting socket will fail immediately.
(cherry picked from commit fa0cb7da0e)
- TCP:
- `listen` bind to wildcard "*" -> dual stack socket
- `listen` bind to address -> socket from address type
- `connect` -> resolve using best protocol (UNSPEC), socket from address type
- UDP:
- `listen` bind to wildcard "*" -> dual stack socket
- `listen` bind to address -> socket from address type
- `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
(to change socket type you must first call `close` it)
(cherry picked from commit 88a56ba783)