Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QRhiComputePipeline Class Referenceabstract

\inmodule QtGui 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
}
 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 QtGui

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 1621 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 1624 of file qrhi.h.

Constructor & Destructor Documentation

◆ QRhiComputePipeline()

QRhiComputePipeline::QRhiComputePipeline ( QRhiImplementation * rhi)
protected

Definition at line 7873 of file qrhi.cpp.

Member Function Documentation

◆ create()

virtual bool QRhiComputePipeline::create ( )
pure virtual

Implemented in QD3D11ComputePipeline, QGles2ComputePipeline, QMetalComputePipeline, QNullComputePipeline, and QVkComputePipeline.

Referenced by QSSGRhiContextPrivate::computePipeline().

+ Here is the caller graph for this function:

◆ flags()

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

Definition at line 1632 of file qrhi.h.

◆ resourceType()

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

Implements QRhiResource.

Definition at line 7865 of file qrhi.cpp.

References QRhiResource::ComputePipeline.

◆ setFlags()

void QRhiComputePipeline::setFlags ( Flags f)
inline

Sets the flags f.

Definition at line 1633 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 1639 of file qrhi.h.

Referenced by QSSGRhiContextPrivate::computePipeline().

+ Here is the caller graph for this function:

◆ 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 1636 of file qrhi.h.

Referenced by QSSGRhiContextPrivate::computePipeline().

+ Here is the caller graph for this function:

◆ shaderResourceBindings()

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

Definition at line 1638 of file qrhi.h.

◆ shaderStage()

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

Definition at line 1635 of file qrhi.h.

Member Data Documentation

◆ m_flags

Flags QRhiComputePipeline::m_flags
protected

Definition at line 1643 of file qrhi.h.

Referenced by QD3D11ComputePipeline::create().

◆ m_shaderResourceBindings

QRhiShaderResourceBindings* QRhiComputePipeline::m_shaderResourceBindings = nullptr
protected

Definition at line 1645 of file qrhi.h.

Referenced by QVkComputePipeline::create().

◆ m_shaderStage

QRhiShaderStage QRhiComputePipeline::m_shaderStage
protected

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