QRhiComputePipeline Class

Compute pipeline state resource. 更多...

頭: #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
繼承: 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 ().