3#include "vulkan/vulkan.hpp"
11struct VertexAttribute;
24 return vk::BufferUsageFlagBits::eIndirectBuffer;
26 return vk::BufferUsageFlagBits::eStorageBuffer;
31 vk::BufferUsageFlags flags = vk::BufferUsageFlagBits::eTransferSrc | vk::BufferUsageFlagBits::eTransferDst;
38 flags |= vk::BufferUsageFlagBits::eStorageBuffer;
41 flags |= vk::BufferUsageFlagBits::eVertexBuffer | vk::BufferUsageFlagBits::eStorageBuffer;
44 flags |= vk::BufferUsageFlagBits::eIndexBuffer;
47 flags |= vk::BufferUsageFlagBits::eUniformBuffer;
50 flags |= vk::BufferUsageFlagBits::eUniformBuffer
51 | vk::BufferUsageFlagBits::eShaderDeviceAddress;
54 flags |= vk::BufferUsageFlagBits::eStorageBuffer
55 | vk::BufferUsageFlagBits::eShaderDeviceAddress;
58 flags |= vk::BufferUsageFlagBits::eStorageBuffer;
93 std::unordered_map<std::string, std::string>
defines;
180 return vk::DescriptorType::eUniformBuffer;
182 return vk::DescriptorType::eStorageBuffer;
184 return vk::DescriptorType::eCombinedImageSampler;
186 return vk::DescriptorType::eStorageImage;
188 return vk::DescriptorType::eStorageBuffer;
198 vk::DescriptorType
type = vk::DescriptorType::eStorageBuffer;
PolygonMode
Rasterization polygon mode.
constexpr RenderPipelineID INVALID_RENDER_PIPELINE
CullMode
Face culling mode.
uint64_t RenderPipelineID
constexpr ShaderID INVALID_SHADER
ShaderStage
User-friendly shader stage enum.
constexpr FenceID INVALID_FENCE
DescriptorRole
Semantic descriptor type — maps to Vulkan descriptor types internally.
@ STORAGE_IMAGE
Compute-writable image.
@ TEXTURE
Sampled image + sampler combined.
@ STORAGE
Large arrays or buffers the shader may write (SSBO)
@ UNIFORM
Small, read-only, frequently updated (scalars, param structs)
constexpr FramebufferID INVALID_FRAMEBUFFER
BlendOp
Blending operation.
BlendFactor
Blending factor.
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.
vk::DescriptorType to_vk_descriptor_type(DescriptorRole role)
Convert DescriptorRole to the corresponding vk::DescriptorType.
CompareOp
Depth/stencil comparison operation.
vk::BufferUsageFlags to_buffer_usage_flags(BufferUsageHint hint)
Resolve the extra vk::BufferUsageFlags a BufferUsageHint requires, on top of whatever base usage the ...
constexpr DescriptorSetID INVALID_DESCRIPTOR_SET
constexpr SemaphoreID INVALID_SEMAPHORE
constexpr CommandBufferID INVALID_COMMAND_BUFFER
BlendFactor src_color_factor
BlendAttachmentConfig()=default
BlendFactor dst_alpha_factor
BlendFactor src_alpha_factor
BlendFactor dst_color_factor
static BlendAttachmentConfig alpha_blend()
Create standard alpha blending configuration.
Per-attachment blend configuration.
DepthStencilConfig()=default
CompareOp depth_compare_op
Depth and stencil test configuration.
vk::DescriptorBufferInfo buffer_info
size_t push_constant_size
std::array< uint32_t, 3 > workgroup_size
Plain-data description of the compute shader to dispatch.
std::vector< uint8_t > data
Self-describing push constant fragment staged on a VKBuffer.
Extracted push constant range from shader reflection.
RasterizationConfig()=default
Rasterization state configuration.
std::vector< std::vector< DescriptorBindingInfo > > descriptor_sets
std::vector< Core::VertexAttribute > vertex_attributes
RenderPipelineConfig()=default
ShaderID tess_eval_shader
Optional.
std::vector< Core::VertexBinding > vertex_bindings
std::optional< Kakshya::VertexLayout > semantic_vertex_layout
ShaderID tess_control_shader
Optional.
bool use_vertex_shader_reflection
std::vector< BlendAttachmentConfig > blend_attachments
DepthStencilConfig depth_stencil
ShaderID mesh_shader
Optional.
size_t push_constant_size
PrimitiveTopology topology
ShaderID geometry_shader
Optional.
ShaderID task_shader
Optional.
RasterizationConfig rasterization
Complete render pipeline configuration.
bool enable_reflection
Extract descriptor bindings and metadata.
std::vector< std::string > include_directories
Paths for #include resolution.
bool enable_debug_info
Include debug symbols (line numbers, variable names)
bool enable_validation
Validate SPIR-V after compilation.
std::unordered_map< std::string, std::string > defines
Preprocessor macros.
ShaderCompilerConfig()=default
Configuration for shader compilation.
std::optional< std::array< uint32_t, 3 > > workgroup_size
std::vector< PushConstantRangeInfo > push_constant_ranges
std::vector< DescriptorBindingInfo > descriptor_bindings
Extracted reflection information from compiled shader.
std::string content
Shader source code, SPIR-V path, or SPIR-V assembly text.
enum MayaFlux::Portal::Graphics::ShaderSource::SourceType type
ShaderSource(std::string content_, ShaderStage stage_, SourceType type_)
@ GLSL_FILE
Path to .comp/.vert/.frag/etc.
@ GLSL_STRING
In-memory GLSL source.
@ SPIRV_ASM
In-memory SPIR-V assembly text (assembled via SPIRV-Tools, no shaderc)
@ SPIRV_FILE
Path to .spv file.
Shader source descriptor for compilation.