Skip to content

pointer to sampled_img instead of entire struct #34

Description

@duarm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions