vkCompViz App
 
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Attributes | List of all members
Gpu::Gpu Class Referenceabstractexport
module gpu
Inheritance diagram for Gpu::Gpu:
Inheritance graph
[legend]

Classes

class  BenchmarkReport
 Reports detailed benchmark statistics for GPU computation and rendering. More...
 
class  WorkGroupCount
 Represents the number of workgroups dispatched in each dimension. More...
 

Public Member Functions

 Gpu ()=default
 
virtual void run ()=0
 
virtual void computeSettings (std::vector< WorkGroupCount > shaderWorkGroupCounts, bool runBenchmark)=0
 
virtual void resize ()=0
 
virtual void updateUniformBuffer (std::vector< std::uint32_t > buffer)=0
 
virtual void updateUniform (std::string name, float value)=0
 
virtual void setUniformLimits (std::string name, float minValue, float maxValue)=0
 
virtual void printUniforms () const =0
 
virtual void addToUniform (std::string name, float value)=0
 
virtual std::shared_ptr< Loader::ImageresultTexture ()=0
 
virtual std::vector< float > resultBuffer (std::size_t size=0)=0
 
virtual ~Gpu ()=default
 
const std::vector< BenchmarkReportbenchmarkReports () const
 Returns the benchmark reports collected during execution.
 

Protected Attributes

bool benchmark = false
 
std::vector< BenchmarkReportbenchmarks
 

Constructor & Destructor Documentation

◆ Gpu()

Gpu::Gpu::Gpu ( )
exportdefault

◆ ~Gpu()

virtual Gpu::Gpu::~Gpu ( )
exportvirtualdefault

Member Function Documentation

◆ addToUniform()

virtual void Gpu::Gpu::addToUniform ( std::string  name,
float  value 
)
exportpure virtual

Implemented in Gpu::Vulkan.

◆ benchmarkReports()

const std::vector< BenchmarkReport > Gpu::Gpu::benchmarkReports ( ) const
inlineexport

Returns the benchmark reports collected during execution.

Returns
Vector of benchmark reports.

◆ computeSettings()

virtual void Gpu::Gpu::computeSettings ( std::vector< WorkGroupCount shaderWorkGroupCounts,
bool  runBenchmark 
)
exportpure virtual

Implemented in Gpu::Vulkan.

◆ printUniforms()

virtual void Gpu::Gpu::printUniforms ( ) const
exportpure virtual

Implemented in Gpu::Vulkan.

◆ resize()

virtual void Gpu::Gpu::resize ( )
exportpure virtual

Implemented in Gpu::Vulkan.

◆ resultBuffer()

virtual std::vector< float > Gpu::Gpu::resultBuffer ( std::size_t  size = 0)
exportpure virtual

◆ resultTexture()

virtual std::shared_ptr< Loader::Image > Gpu::Gpu::resultTexture ( )
exportpure virtual

Implemented in Gpu::Vulkan.

◆ run()

virtual void Gpu::Gpu::run ( )
exportpure virtual

Implemented in Gpu::Vulkan.

◆ setUniformLimits()

virtual void Gpu::Gpu::setUniformLimits ( std::string  name,
float  minValue,
float  maxValue 
)
exportpure virtual

Implemented in Gpu::Vulkan.

◆ updateUniform()

virtual void Gpu::Gpu::updateUniform ( std::string  name,
float  value 
)
exportpure virtual

Implemented in Gpu::Vulkan.

◆ updateUniformBuffer()

virtual void Gpu::Gpu::updateUniformBuffer ( std::vector< std::uint32_t >  buffer)
exportpure virtual

Member Data Documentation

◆ benchmark

bool Gpu::Gpu::benchmark = false
exportprotected

◆ benchmarks

std::vector<BenchmarkReport> Gpu::Gpu::benchmarks
exportprotected