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
QRhiMetalData Struct Reference
+ Collaboration diagram for QRhiMetalData:

Classes

struct  BufferReadback
 
struct  DeferredReleaseEntry
 
struct  OffscreenFrame
 
struct  TextureReadback
 

Public Member Functions

 QRhiMetalData (QRhiMetal *rhi)
 
 API_AVAILABLE (macosx(11.0), ios(14.0)) id< MTLBinaryArchive > binArch
 
id< MTLCommandBuffer > newCommandBuffer ()
 
MTLRenderPassDescriptor * createDefaultRenderPass (bool hasDepthStencil, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, int colorAttCount)
 
id< MTLLibrary > createMetalLib (const QShader &shader, QShader::Variant shaderVariant, QString *error, QByteArray *entryPoint, QShaderKey *activeKey)
 
id< MTLFunction > createMSLShaderFunction (id< MTLLibrary > lib, const QByteArray &entryPoint)
 
bool setupBinaryArchive (NSURL *sourceFileUrl=nil)
 
void addRenderPipelineToBinaryArchive (MTLRenderPipelineDescriptor *rpDesc)
 
void trySeedingRenderPipelineFromBinaryArchive (MTLRenderPipelineDescriptor *rpDesc)
 
void addComputePipelineToBinaryArchive (MTLComputePipelineDescriptor *cpDesc)
 
void trySeedingComputePipelineFromBinaryArchive (MTLComputePipelineDescriptor *cpDesc)
 

Public Attributes

QRhiMetalq
 
id< MTLDevice > dev = nil
 
id< MTLCommandQueue > cmdQueue = nil
 
QVector< DeferredReleaseEntryreleaseQueue
 
struct QRhiMetalData::OffscreenFrame ofr
 
QVarLengthArray< TextureReadback, 2 > activeTextureReadbacks
 
QVarLengthArray< BufferReadback, 2 > activeBufferReadbacks
 
MTLCaptureManager * captureMgr
 
id< MTLCaptureScope > captureScope = nil
 
QHash< QRhiShaderStage, QMetalShadershaderCache
 

Static Public Attributes

static const int TEXBUF_ALIGN = 256
 

Detailed Description

Definition at line 164 of file qrhimetal.mm.

Constructor & Destructor Documentation

◆ QRhiMetalData()

QRhiMetalData::QRhiMetalData ( QRhiMetal * rhi)
inline

Definition at line 166 of file qrhimetal.mm.

Member Function Documentation

◆ addComputePipelineToBinaryArchive()

void QRhiMetalData::addComputePipelineToBinaryArchive ( MTLComputePipelineDescriptor * cpDesc)

Definition at line 5958 of file qrhimetal.mm.

References error, iOS, qPrintable, and qWarning.

◆ addRenderPipelineToBinaryArchive()

void QRhiMetalData::addRenderPipelineToBinaryArchive ( MTLRenderPipelineDescriptor * rpDesc)

Definition at line 4972 of file qrhimetal.mm.

References error, iOS, qPrintable, and qWarning.

◆ API_AVAILABLE()

QRhiMetalData::API_AVAILABLE ( macosx(11.0) ,
ios(14.0)  )

◆ createDefaultRenderPass()

MTLRenderPassDescriptor * QRhiMetalData::createDefaultRenderPass ( bool hasDepthStencil,
const QColor & colorClearValue,
const QRhiDepthStencilClearValue & depthStencilClearValue,
int colorAttCount )

Definition at line 2540 of file qrhimetal.mm.

References i.

Referenced by QRhiMetal::beginPass().

+ Here is the caller graph for this function:

◆ createMetalLib()

id< MTLLibrary > QRhiMetalData::createMetalLib ( const QShader & shader,
QShader::Variant shaderVariant,
QString * error,
QByteArray * entryPoint,
QShaderKey * activeKey )

Definition at line 4735 of file qrhimetal.mm.

References dev, error, init(), iOS, QShader::MetalLibShader, QShader::MslShader, qPrintable, qWarning, release(), QShaderCode::shader(), and toMetalLanguageVersion().

+ Here is the call graph for this function:

◆ createMSLShaderFunction()

id< MTLFunction > QRhiMetalData::createMSLShaderFunction ( id< MTLLibrary > lib,
const QByteArray & entryPoint )

Definition at line 4814 of file qrhimetal.mm.

References QByteArray::constData().

+ Here is the call graph for this function:

◆ newCommandBuffer()

id< MTLCommandBuffer > QRhiMetalData::newCommandBuffer ( )

Definition at line 513 of file qrhimetal.mm.

References cmdQueue.

Referenced by QRhiMetal::beginFrame(), QRhiMetal::beginOffscreenFrame(), and QRhiMetal::finish().

+ Here is the caller graph for this function:

◆ setupBinaryArchive()

bool QRhiMetalData::setupBinaryArchive ( NSURL * sourceFileUrl = nil)

Definition at line 525 of file qrhimetal.mm.

References dev, error, iOS, qPrintable, qWarning, and release().

Referenced by QRhiMetal::create(), and QRhiMetal::setPipelineCacheData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trySeedingComputePipelineFromBinaryArchive()

void QRhiMetalData::trySeedingComputePipelineFromBinaryArchive ( MTLComputePipelineDescriptor * cpDesc)

Definition at line 5948 of file qrhimetal.mm.

References iOS.

◆ trySeedingRenderPipelineFromBinaryArchive()

void QRhiMetalData::trySeedingRenderPipelineFromBinaryArchive ( MTLRenderPipelineDescriptor * rpDesc)

Definition at line 4962 of file qrhimetal.mm.

References iOS.

Member Data Documentation

◆ activeBufferReadbacks

QVarLengthArray<BufferReadback, 2> QRhiMetalData::activeBufferReadbacks

◆ activeTextureReadbacks

QVarLengthArray<TextureReadback, 2> QRhiMetalData::activeTextureReadbacks

Definition at line 246 of file qrhimetal.mm.

Referenced by QRhiMetal::finishActiveReadbacks().

◆ captureMgr

MTLCaptureManager* QRhiMetalData::captureMgr

Definition at line 259 of file qrhimetal.mm.

Referenced by QRhiMetal::create().

◆ captureScope

id<MTLCaptureScope> QRhiMetalData::captureScope = nil

◆ cmdQueue

id<MTLCommandQueue> QRhiMetalData::cmdQueue = nil

◆ dev

id<MTLDevice> QRhiMetalData::dev = nil

◆ ofr

◆ q

QRhiMetal* QRhiMetalData::q

Definition at line 168 of file qrhimetal.mm.

◆ releaseQueue

QVector<DeferredReleaseEntry> QRhiMetalData::releaseQueue

Definition at line 228 of file qrhimetal.mm.

Referenced by QRhiMetal::executeDeferredReleases().

◆ shaderCache

QHash<QRhiShaderStage, QMetalShader> QRhiMetalData::shaderCache

Definition at line 264 of file qrhimetal.mm.

Referenced by QRhiMetal::destroy(), and QRhiMetal::releaseCachedResources().

◆ TEXBUF_ALIGN

const int QRhiMetalData::TEXBUF_ALIGN = 256
static

The documentation for this struct was generated from the following file: