QRhiComputePipeline Class

Compute pipeline state resource. 更多...

头: #include <QRhiComputePipeline>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 6.6
继承: QRhiResource

公共类型

enum Flag { CompileShadersWithDebugInfo }
flags Flags

公共函数

QRhiComputePipeline::Flags flags () const
void setFlags (QRhiComputePipeline::Flags f )
void setShaderResourceBindings (QRhiShaderResourceBindings * srb )
void setShaderStage (const QRhiShaderStage & stage )
QRhiShaderResourceBindings * shaderResourceBindings () const
QRhiShaderStage shaderStage () const

重实现公共函数

virtual QRhiResource::Type resourceType () const override

详细描述

注意: Setting the shader resource bindings is mandatory. The referenced QRhiShaderResourceBindings must already have created() called on it by the time create() is called.

注意: Setting the shader is mandatory.

注意: This is a RHI API with limited compatibility guarantees, see QRhi 了解细节。

成员类型文档编制

enum QRhiComputePipeline:: Flag
flags QRhiComputePipeline:: Flags

Flag values for describing pipeline options.

常量 描述
QRhiComputePipeline::CompileShadersWithDebugInfo 1 << 0 Requests compiling shaders with debug information enabled, when applicable. See QRhiGraphicsPipeline::CompileShadersWithDebugInfo 了解更多信息。

Flags 类型是 typedef 对于 QFlags <Flag>。它存储 Flag 值的 OR 组合。

成员函数文档编制

QRhiComputePipeline::Flags QRhiComputePipeline:: flags () const

Returns the currently set flags.

另请参阅 setFlags ().

[override virtual] QRhiResource::Type QRhiComputePipeline:: resourceType () const

重实现: QRhiResource::resourceType() const .

Returns the resource type.

void QRhiComputePipeline:: setFlags ( QRhiComputePipeline::Flags f )

Sets the flags f .

另请参阅 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.

另请参阅 shaderResourceBindings ().

void QRhiComputePipeline:: setShaderStage (const QRhiShaderStage & stage )

Sets the shader to use. stage can only refer to the compute stage .

另请参阅 shaderStage ().

QRhiShaderResourceBindings *QRhiComputePipeline:: shaderResourceBindings () const

Returns the currently associated QRhiShaderResourceBindings 对象。

另请参阅 setShaderResourceBindings ().

QRhiShaderStage QRhiComputePipeline:: shaderStage () const

Returns the currently set shader.

另请参阅 setShaderStage ().