Cache for reusable Vulkan samplers keyed by address mode.
More...
#include <ApplicationContext.h>
|
| VkSampler | getOrCreate (VkDevice device, VkSamplerAddressMode addressMode) |
| | Gets an existing sampler or creates one for the requested address mode.
|
| void | cleanup (VkDevice device) |
| | Destroys all cached samplers.
|
|
| std::unordered_map< VkSamplerAddressMode, VkSampler > | cache_ |
| std::mutex | mutex_ |
Cache for reusable Vulkan samplers keyed by address mode.
Definition at line 46 of file ApplicationContext.h.
◆ cleanup()
| void Engine::Core::SamplerCache::cleanup |
( |
VkDevice | device | ) |
|
Destroys all cached samplers.
- Parameters
-
| device | Vulkan device that owns the cached samplers. |
◆ getOrCreate()
| VkSampler Engine::Core::SamplerCache::getOrCreate |
( |
VkDevice | device, |
|
|
VkSamplerAddressMode | addressMode ) |
Gets an existing sampler or creates one for the requested address mode.
- Parameters
-
| device | Vulkan device used to create the sampler when needed. |
| addressMode | Address mode for U, V, and W coordinates. |
- Returns
- Cached sampler handle.
◆ cache_
| std::unordered_map<VkSamplerAddressMode, VkSampler> Engine::Core::SamplerCache::cache_ |
|
private |
◆ mutex_
| std::mutex Engine::Core::SamplerCache::mutex_ |
|
private |
The documentation for this class was generated from the following file: