VMA handles memory allocation on certain devices better than our custom VK code, so we might as well use it
Co-authored-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
This avoids crashing on devices when a number of varyings greater than the device limit is used.
For now this accurately prints an error when compiling the shader, but the error text only pops up in the editor if the number of user varyings is above the limit.
PR #90993 needed to get rid of VMA_MEMORY_USAGE_AUTO_PREFER_HOST because
we no longer used vmaCreateBuffer so we could specify the allocation
callbacks.
This however resulted in the wrong memory pool being chosen, causing
signficant performance slowdown.
Indicate additional preferred flags to help VMA select the proper pool.
Fixes#101905
This is a followup to PR #101344 (commit
0e06eb80bc).
Some of them were not an issue because Godot was initializing all
members, but they were "fixed" just in case since it could become a
problem in the future.
Valgrind was specifically complaining about HashMapData &
GlobalPipelineData.
This change improves performance of the AgX tonemapper by allowing two matrix multiplications to be combined into one. This comes at the cost of loss of color information that could be correctly interpreted as positive RGB values in the Rec. 2020 color space. Additionally, an insignificant amount of error is intentionally introduced to the input color value to prevent the need for a second max function call before log2. The final negative color clipping has been removed to allow the tonemapper to return negative RGB values, similar to other tonemappers in Godot.
Most important is a fix for an occasional crash due to a use-after-free
bug.
A number of API availability declarations were updated to include tvOS.
The code is now simplified and generic for all platforms, which makes
way for future tvOS support.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
The purpose of this code is to expose the necessary
functions for users and engine devs to develop tooling
for properly timing and seeking inside particles.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This changes the polynomial function so that a lower input always results in a lower output and vice-versa. Additionally, the new function returns a value that is much closer to 1.0 when given an input of 1.0.