Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QRhiComputePipeline Class Referenceabstract

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h More...

#include <qrhi.h>

Inheritance diagram for QRhiComputePipeline:
Collaboration diagram for QRhiComputePipeline:

Public Types

enum  Flag { CompileShadersWithDebugInfo = 1 << 0 }
 Flag values for describing pipeline options. More...
Public Types inherited from QRhiResource
enum  Type {
  Buffer , Texture , Sampler , RenderBuffer ,
  RenderPassDescriptor , SwapChainRenderTarget , TextureRenderTarget , ShaderResourceBindings ,
  GraphicsPipeline , SwapChain , ComputePipeline , CommandBuffer ,
  ShadingRateMap
}
 Specifies type of the resource. More...

Public Member Functions

QRhiResource::Type resourceType () const override
virtual bool create ()=0
Flags flags () const
void setFlags (Flags f)
 Sets the flags f.
QRhiShaderStage shaderStage () const
void setShaderStage (const QRhiShaderStage &stage)
 Sets the shader to use.
QRhiShaderResourceBindingsshaderResourceBindings () const
void setShaderResourceBindings (QRhiShaderResourceBindings *srb)
 Associates with srb describing the resource binding layout and the resources (QRhiBuffer, QRhiTexture) themselves.
Public Member Functions inherited from QRhiResource
virtual ~QRhiResource ()
 Destructor.
virtual void destroy ()=0
 Releases (or requests deferred releasing of) the underlying native graphics resources.
void deleteLater ()
 When called without a frame being recorded, this function is equivalent to deleting the object.
QByteArray name () const
void setName (const QByteArray &name)
 Sets a name for the object.
quint64 globalResourceId () const
QRhirhi () const

Protected Member Functions

 QRhiComputePipeline (QRhiImplementation *rhi)
Protected Member Functions inherited from QRhiResource
 QRhiResource (QRhiImplementation *rhi)

Protected Attributes

Flags m_flags
QRhiShaderStage m_shaderStage
QRhiShaderResourceBindingsm_shaderResourceBindings = nullptr
Protected Attributes inherited from QRhiResource
QRhiImplementationm_rhi = nullptr
quint64 m_id
QByteArray m_objectName

Detailed Description

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h

Since
6.6

Compute pipeline state resource.

Note
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 \l QRhi for details.

Definition at line 1665 of file qrhi.h.

Member Enumeration Documentation

◆ Flag

Flag values for describing pipeline options.

\value CompileShadersWithDebugInfo Requests compiling shaders with debug information enabled, when applicable. See QRhiGraphicsPipeline::CompileShadersWithDebugInfo for more information.

Enumerator
CompileShadersWithDebugInfo 

Definition at line 1668 of file qrhi.h.

Constructor & Destructor Documentation

◆ QRhiComputePipeline()

QRhiComputePipeline::QRhiComputePipeline ( QRhiImplementation * rhi)
protected

Definition at line 8236 of file qrhi.cpp.

Member Function Documentation

◆ create()

virtual bool QRhiComputePipeline::create ( )
pure virtual

◆ flags()

Flags QRhiComputePipeline::flags ( ) const
inline
Returns
the currently set flags.

Definition at line 1676 of file qrhi.h.

◆ resourceType()

QRhiResource::Type QRhiComputePipeline::resourceType ( ) const
overridevirtual
Returns
the resource type.

Implements QRhiResource.

Definition at line 8228 of file qrhi.cpp.

◆ setFlags()

void QRhiComputePipeline::setFlags ( Flags f)
inline

Sets the flags f.

Definition at line 1677 of file qrhi.h.

◆ setShaderResourceBindings()

void QRhiComputePipeline::setShaderResourceBindings ( QRhiShaderResourceBindings * srb)
inline

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, \l{QRhiShaderResourceBindings::isLayoutCompatible()}{layout-compatible} QRhiShaderResourceBindings bound via \l{QRhiCommandBuffer::setShaderResources()}{setShaderResources()} before recording the dispatch call.

Definition at line 1683 of file qrhi.h.

◆ setShaderStage()

void QRhiComputePipeline::setShaderStage ( const QRhiShaderStage & stage)
inline

Sets the shader to use.

stage can only refer to the \l{QRhiShaderStage::Compute}{compute stage}.

Definition at line 1680 of file qrhi.h.

◆ shaderResourceBindings()

QRhiShaderResourceBindings * QRhiComputePipeline::shaderResourceBindings ( ) const
inline
Returns
the currently associated QRhiShaderResourceBindings object.

Definition at line 1682 of file qrhi.h.

◆ shaderStage()

QRhiShaderStage QRhiComputePipeline::shaderStage ( ) const
inline
Returns
the currently set shader.

Definition at line 1679 of file qrhi.h.

Member Data Documentation

◆ m_flags

Flags QRhiComputePipeline::m_flags
protected

Definition at line 1687 of file qrhi.h.

◆ m_shaderResourceBindings

QRhiShaderResourceBindings* QRhiComputePipeline::m_shaderResourceBindings = nullptr
protected

Definition at line 1689 of file qrhi.h.

◆ m_shaderStage

QRhiShaderStage QRhiComputePipeline::m_shaderStage
protected

Definition at line 1688 of file qrhi.h.


The documentation for this class was generated from the following files: