Loading...
Searching...
No Matches
IsfBindingsBuilder.hpp
void bindUpstreamImagesFromGeometry(GraphicsStorageResources &store, const ossia::geometry &geometry, QRhiShaderResourceBindings *srb)
Wire read-only csf_image_input storage images to an upstream geometry's published auxiliary_textures.
Definition IsfBindingsBuilder.cpp:1140
int graphicsStorageImageBindingCount(const isf::descriptor &desc) noexcept
Number of bindings the graphics-visible csf_image_input's of desc take, _prev slots included.
Definition IsfBindingsBuilder.cpp:167
int64_t glslTypeSizeBytes(std::string_view type) noexcept
Byte size of a single GLSL primitive type as used for SSBO element strides in this codebase.
Definition IsfBindingsBuilder.cpp:22
void collectGraphicsStorageResources(const isf::descriptor &desc, int firstBinding, GraphicsStorageResources &out, int firstInlet, int firstImageBinding)
Walk desc.inputs once and populate out with the storage buffers and images declared by the shader.
Definition IsfBindingsBuilder.cpp:207
int64_t std430ArrayStride(std::string_view type) noexcept
std430 array stride for a GLSL primitive type when laid out as T array[] inside a shader storage bloc...
Definition IsfBindingsBuilder.cpp:41
QVarLengthArray< QRhiShaderResourceBinding, 8 > buildExtraBindings(const GraphicsStorageResources &store)
Produce the QRhiShaderResourceBinding list for the graphics pipeline.
Definition IsfBindingsBuilder.cpp:682
bool resizeCountedStorage(QRhi &rhi, QRhiResourceUpdateBatch &res, const std::vector< Port * > &inputPorts, const isf::descriptor &desc, GraphicsStorageResources &store)
Resize the owned flexible-array SSBOs whose size control changed.
Definition IsfBindingsBuilder.cpp:909
void ensureStorageResources(QRhi &rhi, QRhiResourceUpdateBatch &res, const RenderList &renderer, const isf::descriptor &, GraphicsStorageResources &store, QSize renderSize, const std::function< QSize(const GraphicsStorageImage &, QSize)> &imageSize)
Create missing buffers and textures.
Definition IsfBindingsBuilder.cpp:513
std::vector< int > storageImageInputSamplers(const isf::descriptor &desc, const std::vector< Port * > &ports, int firstInlet)
Indices, in the list initInputSamplers() returns for ports, of the samplers it creates for the input ...
Definition IsfBindingsBuilder.cpp:177
void swapPersistentSSBOs(GraphicsStorageResources &store, QRhiShaderResourceBindings &srb)
Swap current/prev for all persistent SSBOs and storage images, then update the SRB.
Definition IsfBindingsBuilder.cpp:1361
void bindUpstreamBuffers(RenderList &renderer, const std::vector< Port * > &inputPorts, GraphicsStorageResources &store, QRhiShaderResourceBindings *srb)
Wire read-only SSBOs to upstream geometry buffers.
Definition IsfBindingsBuilder.cpp:952
void reapplyStorageBindings(const GraphicsStorageResources &store, QRhiShaderResourceBindings &srb)
Re-apply the current persistent-storage state to a single SRB.
Definition IsfBindingsBuilder.cpp:1338
QRhiShaderResourceBinding::StageFlags visibilityToStages(std::string_view v) noexcept
Decode an isf::storage_input::visibility string to Qt RHI stage flags.
Definition IsfBindingsBuilder.cpp:136
void bindUpstreamBuffersFromGeometry(QRhi &rhi, QRhiResourceUpdateBatch &res, GraphicsStorageResources &store, const ossia::geometry &geometry, QRhiShaderResourceBindings *srb)
Wire INPUTS storage_input / uniform_input bindings to upstream geometry's published auxiliary_buffers...
Definition IsfBindingsBuilder.cpp:1191
void swapPersistentSSBOsState(GraphicsStorageResources &store)
Swap current/prev pointers in store without touching any SRB.
Definition IsfBindingsBuilder.cpp:1328
int64_t std430LayoutSize(const std::vector< isf::storage_input::layout_field > &layout) noexcept
Compute the std430 element size of a layout (vector of {name,type} field entries),...
Definition IsfBindingsBuilder.cpp:56
One SSBO attached to a graphics pipeline.
Definition IsfBindingsBuilder.hpp:36
std::string access
"read_only" / "write_only" / "read_write"
Definition IsfBindingsBuilder.hpp:38
bool from_port
buffer was borrowed through the Buffer input port
Definition IsfBindingsBuilder.hpp:43
std::string buffer_usage
"", "indirect_draw", "indirect_draw_indexed"
Definition IsfBindingsBuilder.hpp:39
bool persistent
Ping-pong swapped every frame.
Definition IsfBindingsBuilder.hpp:40
std::string name
Base GLSL identifier (e.g.
Definition IsfBindingsBuilder.hpp:37
int prev_binding
Binding of prev (only set when persistent)
Definition IsfBindingsBuilder.hpp:62
bool adopted
Holds a RenderList::adoptBuffer reference on buffer
Definition IsfBindingsBuilder.hpp:42
bool owned
This SSBO owns buffer and prev (releases them)
Definition IsfBindingsBuilder.hpp:41
One storage image attached to a graphics pipeline.
Definition IsfBindingsBuilder.hpp:83
bool is_array
image2DArray — N-layer array texture
Definition IsfBindingsBuilder.hpp:89
int depth
Explicit Z dimension for 3D textures; 0 = use default (16)
Definition IsfBindingsBuilder.hpp:94
QRhiTexture * texture
Current (write / read_write) slot.
Definition IsfBindingsBuilder.hpp:97
int layers
Layer count for is_array (0 = use parser-supplied default)
Definition IsfBindingsBuilder.hpp:95
std::string width_expression
WIDTH / HEIGHT, literal or $ expression; empty = the render size.
Definition IsfBindingsBuilder.hpp:92
int prev_binding
Binding of prev (only set when persistent)
Definition IsfBindingsBuilder.hpp:102
bool cubemap
imageCube — 6-layer cubemap storage image
Definition IsfBindingsBuilder.hpp:88
std::string access
"read_only" / "write_only" / "read_write"
Definition IsfBindingsBuilder.hpp:85
QRhiTexture * prev
Previous frame (read-only); only set when persistent.
Definition IsfBindingsBuilder.hpp:98
Aggregate of all graphics-visible storage resources for a node.
Definition IsfBindingsBuilder.hpp:143
QRhiBuffer * sentinelBuffer
StorageBuffer usage only.
Definition IsfBindingsBuilder.hpp:176
QRhiBuffer * sentinelUniformBuffer
UniformBuffer usage only (GL rejects combined usages)
Definition IsfBindingsBuilder.hpp:177
void release(RenderList &renderer)
Definition IsfBindingsBuilder.cpp:852
One UBO sourced from an upstream Buffer port (uniform_input).
Definition IsfBindingsBuilder.hpp:116
bool owned
Always false for now: borrowed from upstream.
Definition IsfBindingsBuilder.hpp:119
int64_t min_size
The smallest buffer that can back it: minimumUniformBlockSize (U42).
Definition IsfBindingsBuilder.hpp:136
bool from_port
buffer was borrowed through the Buffer input port
Definition IsfBindingsBuilder.hpp:121
bool adopted
Holds a RenderList::adoptBuffer reference on buffer
Definition IsfBindingsBuilder.hpp:120
QString refused
See GraphicsSSBO::refused.
Definition IsfBindingsBuilder.hpp:129