safestruct: Accessors for non trivial globals

Adding Tracy in VVL showed that we are paying the price of initializing
global variables upon shared library entry, even if we do not
end up accessing those.
Adding accessors will make sure we pay this price
only when truly needed.
Also making the necessary changes in VVL.
This commit is contained in:
Arno 2024-07-17 16:02:41 +02:00 committed by Charles Giessen
parent 5f26cf65a1
commit 9479047902
5 changed files with 44 additions and 36 deletions

View file

@ -22,6 +22,10 @@
namespace vku {
// Mapping of unknown stype codes to structure lengths. This should be set up by the application
// before vkCreateInstance() and not modified afterwards.
std::vector<std::pair<uint32_t, uint32_t>>& GetCustomStypeInfo();
struct safe_VkBufferMemoryBarrier {
VkStructureType sType;
const void* pNext{};