Since the texture's sampledImg is only used if MSAA is enabled, we could save 40 bytes for each texture struct by holding the pointer to that sampledImg instead of the entire structure.
struct VK2DTexture_t {
VK2DImage img;
VK2DImage depthBuffer;
VK2DImage *sampledImg; ///<<<<<<<<<
VkFramebuffer fbo;
VK2DBuffer ubo;
VkDescriptorSet uboSet;
bool imgHandled;
SDL_AtomicInt descriptorIndex;
};
On that matter, it would probably also be a good idea to split the texture into a textureMetadata or something like that, to improve caching.
It would be nice to have the discussions tab enabled in order to no pollute the issues tab with suggestions.
Since the texture's sampledImg is only used if MSAA is enabled, we could save 40 bytes for each texture struct by holding the pointer to that sampledImg instead of the entire structure.
On that matter, it would probably also be a good idea to split the texture into a textureMetadata or something like that, to improve caching.
It would be nice to have the discussions tab enabled in order to no pollute the issues tab with suggestions.