![]() |
Qt 6.x
The Qt SDK
|
#include <qrhimetal_p.h>
Inheritance diagram for QMetalComputePipeline:
Collaboration diagram for QMetalComputePipeline:Public Member Functions | |
| QMetalComputePipeline (QRhiImplementation *rhi) | |
| ~QMetalComputePipeline () | |
| void | destroy () override |
| Releases (or requests deferred releasing of) the underlying native graphics resources. | |
| bool | create () override |
Public Member Functions inherited from QRhiComputePipeline | |
| 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. | |
| QRhiShaderResourceBindings * | shaderResourceBindings () 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 Type | resourceType () const =0 |
| 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 |
| QRhi * | rhi () const |
Public Attributes | |
| QMetalComputePipelineData * | d |
| uint | generation = 0 |
| int | lastActiveFrameSlot = -1 |
Friends | |
| class | QRhiMetal |
Additional Inherited Members | |
Public Types inherited from QRhiComputePipeline | |
| 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... | |
Protected Member Functions inherited from QRhiComputePipeline | |
| QRhiComputePipeline (QRhiImplementation *rhi) | |
Protected Member Functions inherited from QRhiResource | |
| QRhiResource (QRhiImplementation *rhi) | |
Protected Attributes inherited from QRhiComputePipeline | |
| Flags | m_flags |
| QRhiShaderStage | m_shaderStage |
| QRhiShaderResourceBindings * | m_shaderResourceBindings = nullptr |
Protected Attributes inherited from QRhiResource | |
| QRhiImplementation * | m_rhi = nullptr |
| quint64 | m_id |
| QByteArray | m_objectName |
Definition at line 233 of file qrhimetal_p.h.
| QMetalComputePipeline::QMetalComputePipeline | ( | QRhiImplementation * | rhi | ) |
Definition at line 5855 of file qrhimetal.mm.
| QMetalComputePipeline::~QMetalComputePipeline | ( | ) |
|
overridevirtual |
Implements QRhiComputePipeline.
Definition at line 5913 of file qrhimetal.mm.
References QMetalComputePipelineData::bufferSizeBuffer, QByteArray::constData(), QMap< Key, T >::contains(), QMetalBuffer::create(), QMetalComputePipelineData::cs, d, QMetalShader::desc, destroy(), QRhi::EnablePipelineCacheDataSave, error, QShader::NativeShaderInfo::extraBufferBindings, QMap< Key, T >::first(), QMetalShader::func, generation, lastActiveFrameSlot, QMetalShader::lib, QMetalShader::localSize, QMetalComputePipelineData::localSize, QRhiComputePipeline::m_shaderStage, QRhiImplementation::MAX_SHADER_CACHE_ENTRIES, QShaderPrivate::MslBufferSizeBufferBinding, QMetalShader::nativeResourceBindingMap, QMetalShader::nativeShaderInfo, QMetalComputePipelineData::ps, qMakePair(), qMax(), qPrintable, QRHI_RES_RHI, qWarning, release(), QRhiBuffer::setSize(), QRhiShaderStage::shader(), QRhiShaderStage::shaderVariant(), QRhiBuffer::Static, QShaderDescription::storageBlocks(), and QRhiBuffer::StorageBuffer.
Here is the call graph for this function:
|
overridevirtual |
Releases (or requests deferred releasing of) the underlying native graphics resources.
Safe to call multiple times, subsequent invocations will be a no-op then.
Once destroy() is called, the QRhiResource instance can be reused, by calling create() again. That will then result in creating new native graphics resources underneath.
The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.
Implements QRhiResource.
Definition at line 5867 of file qrhimetal.mm.
References QMetalComputePipelineData::bufferSizeBuffer, QRhiMetalData::DeferredReleaseEntry::ComputePipeline, QMetalComputePipelineData::cs, d, QMetalShader::destroy(), e, lastActiveFrameSlot, QMetalComputePipelineData::ps, and QRHI_RES_RHI.
Referenced by ~QMetalComputePipeline(), and create().
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Definition at line 243 of file qrhimetal_p.h.
| QMetalComputePipelineData* QMetalComputePipeline::d |
Definition at line 240 of file qrhimetal_p.h.
Referenced by ~QMetalComputePipeline(), create(), destroy(), QRhiMetal::dispatch(), QRhiMetal::setComputePipeline(), and QRhiMetal::setShaderResources().
| uint QMetalComputePipeline::generation = 0 |
Definition at line 241 of file qrhimetal_p.h.
Referenced by create(), and QRhiMetal::setComputePipeline().
| int QMetalComputePipeline::lastActiveFrameSlot = -1 |
Definition at line 242 of file qrhimetal_p.h.
Referenced by create(), destroy(), and QRhiMetal::setComputePipeline().