Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

record_bind_pipeline(..., PipelineID) is a O(logn) function, n count of pipelines. A faster alternative might should be added. #147

Open
thesmallcreeper opened this issue Apr 13, 2019 · 0 comments

Comments

@thesmallcreeper
Copy link

Under CommandBufferBase class the bellow method binds a pipeline for both Primary and Secondary Command Buffer

bool record_bind_pipeline(Anvil::PipelineBindPoint in_pipeline_bind_point,
                                        Anvil::PipelineID        in_pipeline_id);

This method it calls VkPipeline Anvil::BasePipelineManager::get_pipeline(PipelineID in_pipeline_id) which after a search at a map with all PipelineIDs returns a VkPipeline

Searching at a map is a O(logn) operation and if someone wants to re-record commands every frame (in my case for CPU culling) this might become a bottleneck if many Pipelines have been created.

So maybe giving the option (without "hacking" the library) to bind the pipeline by avoiding using PipelineID might be a good addition.

Please feel free to express your opinion. Thank you in advance and have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant