MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ resolve_gpu_image()

template<GpuImageSource T>
std::shared_ptr< Core::VKImage > MayaFlux::Buffers::resolve_gpu_image ( const T &  buffer)

Resolve the GPU-resident image from any GpuImageSource buffer.

Selects get_texture() or get_gpu_texture() at compile time based on which the concrete buffer type exposes. Returns nullptr if the buffer has not yet produced a GPU texture.

Template Parameters
TA type satisfying GpuImageSource.
Parameters
bufferThe pixel-bearing buffer to query.
Returns
GPU-resident VKImage, or nullptr.

Definition at line 305 of file StagingUtils.hpp.

306{
307 if constexpr (requires(const T& b) {
308 { b.get_texture() } -> std::convertible_to<std::shared_ptr<Core::VKImage>>;
309 }) {
310 return buffer.get_texture();
311 } else {
312 return buffer.get_gpu_texture();
313 }
314}
size_t b

References b.

Referenced by MayaFlux::Buffers::ImageCVProcessor< T >::processing_function().

+ Here is the caller graph for this function: