MayaFlux
0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
GraphicsUtils.cpp
Go to the documentation of this file.
1
#include "
GraphicsUtils.hpp
"
2
3
#include "
MayaFlux/Kakshya/NDData/NDData.hpp
"
4
5
namespace
MayaFlux::Portal::Graphics
{
6
7
size_t
element_type_bytes
(
GpuBufferBinding::ElementType
et)
noexcept
8
{
9
switch
(et) {
10
case
GpuBufferBinding::ElementType::FLOAT32
:
11
return
Kakshya::gpu_data_format_bytes
(
Kakshya::GpuDataFormat::FLOAT32
);
12
case
GpuBufferBinding::ElementType::UINT32
:
13
return
Kakshya::gpu_data_format_bytes
(
Kakshya::GpuDataFormat::UINT32
);
14
case
GpuBufferBinding::ElementType::INT32
:
15
return
Kakshya::gpu_data_format_bytes
(
Kakshya::GpuDataFormat::INT32
);
16
case
GpuBufferBinding::ElementType::PASSTHROUGH
:
17
case
GpuBufferBinding::ElementType::IMAGE_STORAGE
:
18
case
GpuBufferBinding::ElementType::IMAGE_SAMPLED
:
19
default
:
20
return
0;
21
}
22
}
23
24
}
// namespace MayaFlux::Portal::Graphics
GraphicsUtils.hpp
NDData.hpp
MayaFlux::Kakshya::gpu_data_format_bytes
size_t gpu_data_format_bytes(GpuDataFormat fmt) noexcept
Byte size of one element of a GpuDataFormat.
Definition
NDData.cpp:9
MayaFlux::Kakshya::GpuDataFormat::UINT32
@ UINT32
MayaFlux::Kakshya::GpuDataFormat::INT32
@ INT32
MayaFlux::Kakshya::GpuDataFormat::FLOAT32
@ FLOAT32
MayaFlux::Portal::Graphics::element_type_bytes
size_t element_type_bytes(GpuBufferBinding::ElementType et) noexcept
Byte width of one GpuBufferBinding::ElementType element.
Definition
GraphicsUtils.cpp:7
MayaFlux::Portal::Graphics
Definition
Sinks.hpp:11
MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType
ElementType
Element type the shader expects in this binding.
Definition
GraphicsUtils.hpp:175
MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType::UINT32
@ UINT32
MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType::IMAGE_STORAGE
@ IMAGE_STORAGE
MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType::INT32
@ INT32
MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType::FLOAT32
@ FLOAT32
MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType::IMAGE_SAMPLED
@ IMAGE_SAMPLED
MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType::PASSTHROUGH
@ PASSTHROUGH
src
MayaFlux
Portal
Graphics
GraphicsUtils.cpp
Generated by
1.9.8