MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
GpuDataFormat.hpp File Reference
#include <glm/glm.hpp>
+ Include dependency graph for GpuDataFormat.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::Kakshya::gpu_data_format_of< T >
 Maps a C++ type to its GpuDataFormat. More...
 
struct  MayaFlux::Kakshya::gpu_data_format_of< double >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< float >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< glm::dvec2 >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< glm::dvec3 >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< glm::dvec4 >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< glm::mat4 >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< glm::vec2 >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< glm::vec3 >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< glm::vec4 >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< int32_t >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< uint16_t >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< uint32_t >
 
struct  MayaFlux::Kakshya::gpu_data_format_of< uint8_t >
 
struct  MayaFlux::Kakshya::GpuBlockLayout
 Member offsets and total size of a block of GpuDataFormat fields. More...
 

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
 
namespace  MayaFlux::Kakshya
 
namespace  MayaFlux::Kakshya::detail
 

Concepts

concept  MayaFlux::Kakshya::GpuFormatElement
 A type with a GpuDataFormat mapping.
 

Typedefs

using MayaFlux::Kakshya::GpuValue = std::variant< float, glm::vec2, glm::vec3, glm::vec4, double, glm::dvec2, glm::dvec3, glm::dvec4, int32_t, uint32_t, uint8_t, uint16_t, glm::mat4 >
 One value of any GpuDataFormat.
 

Enumerations

enum class  MayaFlux::Kakshya::GpuDataFormat : uint8_t {
  MayaFlux::Kakshya::FLOAT32 , MayaFlux::Kakshya::VEC2_F32 , MayaFlux::Kakshya::VEC3_F32 , MayaFlux::Kakshya::VEC4_F32 ,
  MayaFlux::Kakshya::FLOAT64 , MayaFlux::Kakshya::VEC2_F64 , MayaFlux::Kakshya::VEC3_F64 , MayaFlux::Kakshya::VEC4_F64 ,
  MayaFlux::Kakshya::INT32 , MayaFlux::Kakshya::UINT32 , MayaFlux::Kakshya::UINT8 , MayaFlux::Kakshya::UINT16 ,
  MayaFlux::Kakshya::MAT4_F32
}
 GPU data formats with explicit precision levels. More...
 

Functions

GpuBlockLayout MayaFlux::Kakshya::gpu_block_layout (std::span< const GpuDataFormat > fields)
 Lay out fields in declaration order under std430 rules.
 
size_t MayaFlux::Kakshya::gpu_data_format_align (GpuDataFormat fmt) noexcept
 Base alignment in bytes of one element, following std430 rules.
 
size_t MayaFlux::Kakshya::gpu_data_format_bytes (GpuDataFormat fmt) noexcept
 Byte size of one element of a GpuDataFormat.
 
size_t MayaFlux::Kakshya::gpu_data_format_components (GpuDataFormat fmt) noexcept
 Number of scalar components in one element of a GpuDataFormat.
 
template<size_t... I>
constexpr bool MayaFlux::Kakshya::detail::gpu_value_follows_format_order (std::index_sequence< I... >)
 
GpuDataFormat MayaFlux::Kakshya::gpu_value_format (const GpuValue &value) noexcept
 The GpuDataFormat of the value held.
 
size_t MayaFlux::Kakshya::gpu_value_write (const GpuValue &value, std::span< std::byte > out) noexcept
 Copies the held value's bytes into out, unconverted.
 
bool MayaFlux::Kakshya::pack_gpu_components (GpuDataFormat dst, std::span< const double > components, std::span< std::byte > out) noexcept
 Writes scalar components into out as one element of dst.
 
template<GpuFormatElement T>
bool MayaFlux::Kakshya::pack_gpu_value (GpuDataFormat dst, const T &value, std::span< std::byte > out) noexcept
 Writes a typed value into out as one element of dst.
 

Variables

template<GpuFormatElement T>
constexpr GpuDataFormat MayaFlux::Kakshya::gpu_data_format_v = gpu_data_format_of<std::remove_cvref_t<T>>::value
 The GpuDataFormat of a GpuFormatElement type.