VPP  0.7
A high-level modern C++ API for Vulkan
Public Member Functions | List of all members
vpp::Bool Class Reference

Shader (GPU-side) data type for boolean values. More...

#include <vppLangScalarTypes.hpp>

Public Member Functions

 Bool (bool value)
 Construct a r-value from specified C++ value. More...
 
Bool operator|| (const Bool &rhs) const
 Standard logical or operator.
 
Bool operator && (const Bool &rhs) const
 Standard logical and operator.
 
Bool operator! () const
 Standard logical not operator.
 
Bool operator== (const Bool &rhs) const
 Standard comparison operator (true if equal).
 
Bool operator!= (const Bool &rhs) const
 Standard comparison operator (true if not equal).
 

Detailed Description

Shader (GPU-side) data type for boolean values.

Use this type inside shader code as a counterpart of CPU-side bool type.

This is a r-value type. You must initialize it with value, either CPU-side one (an explicit constant), or an expression computed on GPU side. The value can not be changed.

For mutable variable type, see VBool. Beware that mutable variables can degrade performance on GPU, therefore Bool is preferable, unless you really want a mutable variable.

Constructor & Destructor Documentation

◆ Bool()

vpp::Bool::Bool ( bool  value)

Construct a r-value from specified C++ value.

The source value can be either a constant, or a parameter passed to shader specific for that shader. The constructor is called once when compiling the pipeline.


The documentation for this class was generated from the following file: