vkCompViz App
 
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
vkCompViz::App Class Referenceexport
module vkCompViz

Main application class for running compute and rendering pipelines. More...

Classes

class  Parameters
 Parameters configuring the behavior of the App. More...
 

Public Member Functions

 App ()
 Constructs a new App instance.
 
void run (Parameters const &inputParameters)
 Runs the compute and rendering pipelines based on provided parameters.
 
const Resolution getImageResolution (std::string path) const
 Retrieves the resolution of an image file.
 
const Shader::Shader::Info::WorkGroupSize getShaderWorkGroupSize (std::string path) const
 Retrieves the work group size defined in a shader file.
 
const Gpu::Gpu::WorkGroupCount calculateWorkGroupCount (Shader::Shader::Info::WorkGroupSize workGroupSize, Shader::Shader::Info::ThreadCount threadCount) const
 Calculates the number of work groups needed for given work group size and thread count.
 
void saveResultImage (std::string path) const
 Saves the first output texture to an image file.
 
std::vector< float > resultBuffer (std::size_t size=0) const
 Retrieves the shader storage buffer result.
 
const std::vector< Gpu::Gpu::BenchmarkReportbenchmarkReports () const
 Returns a list of benchmark reports with performance data.
 
 ~App ()
 Destroys the App instance and cleans up resources.
 

Detailed Description

Main application class for running compute and rendering pipelines.

Constructor & Destructor Documentation

◆ App()

vkCompViz::App::App ( )
export

Constructs a new App instance.

◆ ~App()

vkCompViz::App::~App ( )
export

Destroys the App instance and cleans up resources.

Member Function Documentation

◆ benchmarkReports()

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

Returns a list of benchmark reports with performance data.

Returns
Vector of BenchmarkReport objects.

◆ calculateWorkGroupCount()

const Gpu::Gpu::WorkGroupCount vkCompViz::App::calculateWorkGroupCount ( Shader::Shader::Info::WorkGroupSize  workGroupSize,
Shader::Shader::Info::ThreadCount  threadCount 
) const
export

Calculates the number of work groups needed for given work group size and thread count.

Parameters
workGroupSizeSize of a work group.
threadCountNumber of threads to dispatch.
Returns
WorkGroupCount indicating how many work groups are required.

◆ getImageResolution()

const Resolution vkCompViz::App::getImageResolution ( std::string  path) const
export

Retrieves the resolution of an image file.

Parameters
pathPath to the image file.
Returns
Resolution of the image (width x height).

◆ getShaderWorkGroupSize()

const Shader::Shader::Info::WorkGroupSize vkCompViz::App::getShaderWorkGroupSize ( std::string  path) const
export

Retrieves the work group size defined in a shader file.

Parameters
pathPath to the shader file.
Returns
WorkGroupSize structure with sizes in X, Y, Z.

◆ resultBuffer()

std::vector< float > vkCompViz::App::resultBuffer ( std::size_t  size = 0) const
inlineexport

Retrieves the shader storage buffer result.

Parameters
sizeNumber of floats to retrieve; if 0, returns the whole buffer.
Returns
Vector of floats containing the result buffer.

◆ run()

void vkCompViz::App::run ( Parameters const &  inputParameters)
export

Runs the compute and rendering pipelines based on provided parameters.

Parameters
inputParametersParameters configuring the run.

◆ saveResultImage()

void vkCompViz::App::saveResultImage ( std::string  path) const
export

Saves the first output texture to an image file.

Parameters
pathPath where the image should be saved.