Caching pipeline objects with a PCO
A pipeline cache is a pool that stores baked pipelines. It enables an application to reduce the pipeline creation overhead between pipeline runs and also between the subsequent application run. The following is the difference between the two:
Between pipelines: The pipeline construction can be reused when new pipelines are created. The pipeline cache object is passed as a parameter to the pipeline creator API (
vkCreateGraphicsPipelines
). By doing so, the underlying mechanism ensures that it reuses the pipeline if a similar one exists. This is widely useful in the creation of drawing objects that are redundant in nature, for example, paint brush strokes, sprites, mesh geometries, and so on.Between applications: While creating a pipeline, you deal with a lot of pipeline state objects, which is an expensive path. Reusability across running applications is a wise design and is efficient in terms of execution time and memory space. A pipeline cache inside...