QRhiComputePipeline Class
Compute pipeline state resource. More...
Header: | #include <QRhiComputePipeline> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
Since: | Qt 6.6 |
Inherits: | QRhiResource |
Public Types
Public Functions
QRhiComputePipeline::Flags | flags() const |
void | setFlags(QRhiComputePipeline::Flags f) |
void | setShaderResourceBindings(QRhiShaderResourceBindings *srb) |
void | setShaderStage(const QRhiShaderStage &stage) |
QRhiShaderResourceBindings * | shaderResourceBindings() const |
QRhiShaderStage | shaderStage() const |
Reimplemented Public Functions
virtual QRhiResource::Type | resourceType() const override |
Detailed Description
Note: Setting the shader resource bindings is mandatory. The referenced QRhiShaderResourceBindings must already have created() called on it by the time create() is called.
Note: Setting the shader is mandatory.
Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.
Member Type Documentation
enum QRhiComputePipeline::Flag
flags QRhiComputePipeline::Flags
Flag values for describing pipeline options.
Constant | Value | Description |
---|---|---|
QRhiComputePipeline::CompileShadersWithDebugInfo | 1 << 0 | Requests compiling shaders with debug information enabled, when applicable. See QRhiGraphicsPipeline::CompileShadersWithDebugInfo for more information. |
The Flags type is a typedef for QFlags<Flag>. It stores an OR combination of Flag values.
Member Function Documentation
QRhiComputePipeline::Flags QRhiComputePipeline::flags() const
Returns the currently set flags.
See also setFlags().
[override virtual]
QRhiResource::Type QRhiComputePipeline::resourceType() const
Reimplements: QRhiResource::resourceType() const.
Returns the resource type.
void QRhiComputePipeline::setFlags(QRhiComputePipeline::Flags f)
Sets the flags f.
See also flags().
void QRhiComputePipeline::setShaderResourceBindings(QRhiShaderResourceBindings *srb)
Associates with srb describing the resource binding layout and the resources (QRhiBuffer, QRhiTexture) themselves. The latter is optional. As with graphics pipelines, the srb passed in here can leave the actual buffer or texture objects unspecified (nullptr
) as long as there is another, layout-compatible QRhiShaderResourceBindings bound via setShaderResources() before recording the dispatch call.
See also shaderResourceBindings().
void QRhiComputePipeline::setShaderStage(const QRhiShaderStage &stage)
Sets the shader to use. stage can only refer to the compute stage.
See also shaderStage().
QRhiShaderResourceBindings *QRhiComputePipeline::shaderResourceBindings() const
Returns the currently associated QRhiShaderResourceBindings object.
See also setShaderResourceBindings().
QRhiShaderStage QRhiComputePipeline::shaderStage() const
Returns the currently set shader.
See also setShaderStage().