Skip to content

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

@thesmallcreeper

Description

@thesmallcreeper

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions