QRhiComputePipeline Class

Compute pipeline state resource. More...

Header: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
Since: Qt 6.6
Inherits: QRhiResource

Public Types

enum Flag { CompileShadersWithDebugInfo }
flags Flags

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.

ConstantValueDescription
QRhiComputePipeline::CompileShadersWithDebugInfo1 << 0Requests 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().

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.