420 return 6U * (n / 2U);
422 return n < 2U ? 0U : 6U * (n - 1U);
424 return 3U * (n / 3U);
427 return n < 3U ? 0U : 3U * (n - 2U);
PrimitiveTopology topology
ImageFormat
User-friendly image format enum.
PolygonMode
Rasterization polygon mode.
CullMode
Face culling mode.
AddressMode
Texture addressing mode (wrapping)
@ CLAMP_TO_EDGE
Clamp to edge color.
@ MIRRORED_REPEAT
Mirror and repeat.
@ CLAMP_TO_BORDER
Clamp to border color.
constexpr bool is_concatenable_topology(PrimitiveTopology topology) noexcept
Whether two adjacent spans of this topology can be concatenated without altering the primitives they ...
ShaderStage
User-friendly shader stage enum.
FilterMode
Texture filtering mode.
@ LINEAR
Bilinear filtering (smooth)
@ NEAREST
Nearest neighbor (pixelated)
@ CUBIC
Bicubic filtering (high quality, slower)
BorderColor
Color read outside the texture when an address mode is CLAMP_TO_BORDER.
@ TRANSPARENT_BLACK
Zero in every channel.
@ DEFAULT
The sampler's historical border, opaque black.
@ OPAQUE_BLACK
Black with full alpha.
@ OPAQUE_WHITE
White with full alpha.
BlendOp
Blending operation.
constexpr uint32_t triangle_vertex_count(PrimitiveTopology topology, uint32_t n) noexcept
Vertices a span of n at topology yields once reduced to a TRIANGLE_LIST, with points becoming quads a...
BlendFactor
Blending factor.
size_t element_type_bytes(GpuBufferBinding::ElementType et) noexcept
Byte width of one GpuBufferBinding::ElementType element.
BufferUsageHint
Semantic usage hint for buffer allocation and memory properties.
@ STORAGE_BDA
Storage buffer with device address query support.
@ HOST_STORAGE
Host-visible storage buffer (eStorageBuffer + eHostVisible|eHostCoherent)
@ INDIRECT
Indirect draw/dispatch buffer (device-local)
@ UNIFORM
Uniform buffer (host-visible)
@ COMPUTE
Storage buffer for compute shaders (device-local)
@ STAGING
Host-visible staging buffer (CPU-writable, eTransferSrc|Dst)
@ UNIFORM_BDA
Uniform buffer with device address query support.
@ COMPUTE_STORAGE
Bare eStorageBuffer, no transfer flags. GpuResourceManager's host-visible/host-coherent compute buffe...
@ DEVICE
Device-local GPU-only buffer.
PrimitiveTopology
Vertex assembly primitive topology.
CompareOp
Depth/stencil comparison operation.
FitMode
How a source extent is mapped onto a destination extent.
@ TILE_MIRRORED
Source repeated, every other tile mirrored.
@ STRETCH
Whole source onto whole destination, aspect ignored.
@ CONTAIN
Whole source, aspect kept, centered, the rest left uncovered.
@ COVER
Aspect kept, destination filled, source cropped.
@ CENTER
No scaling, centered, clipped to the destination.
@ TILE
Source repeated at its own size.
PrimitiveTopology topology
One contiguous span of vertices sharing a primitive topology.
uint32_t set
Descriptor set index.
ElementType
Element type the shader expects in this binding.
Direction
Data flow direction for this binding.
BufferUsageHint usage_hint
Hint for buffer allocation and memory properties.
enum MayaFlux::Portal::Graphics::GpuBufferBinding::Direction INPUT
bool skip_auto_readback
Skip automatic CPU readback after dispatch for this binding.
uint32_t binding
Binding index within the set.
enum MayaFlux::Portal::Graphics::GpuBufferBinding::ElementType FLOAT32
Declares a single storage buffer or image binding a compute shader expects.
std::shared_ptr< Core::Window > target_window
std::unordered_map< std::string, std::string > extra_string_params
std::optional< Kinesis::Scissor > scissor
Clip this buffer's draws to an NDC region.
int64_t draw_priority
Draw-order priority. Higher sorts later (drawn on top). Default 0.
std::vector< std::pair< std::string, std::shared_ptr< Core::VKImage > > > additional_textures
bool triangulate
Reduce supplied spans to triangles before drawing them.
bool operator==(const RenderConfig &other) const =default
PrimitiveTopology topology
std::string vertex_shader
std::string fragment_shader
std::string default_texture_binding
std::string geometry_shader
Unified rendering configuration for graphics buffers.
AddressMode address_mode_v
AddressMode address_mode_w
AddressMode address_mode_u