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
QRhiMetal Class Reference

#include <qrhimetal_p.h>

Inheritance diagram for QRhiMetal:
Collaboration diagram for QRhiMetal:

Classes

struct  TessDrawArgs

Public Member Functions

 QRhiMetal (QRhiMetalInitParams *params, QRhiMetalNativeHandles *importDevice=nullptr)
 ~QRhiMetal ()
bool create (QRhi::Flags flags) override
void destroy () override
QRhiGraphicsPipelinecreateGraphicsPipeline () override
QRhiComputePipelinecreateComputePipeline () override
QRhiShaderResourceBindingscreateShaderResourceBindings () override
QRhiBuffercreateBuffer (QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
QRhiRenderBuffercreateRenderBuffer (QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
QRhiTexturecreateTexture (QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
QRhiSamplercreateSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
QRhiTextureRenderTargetcreateTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QRhiShadingRateMapcreateShadingRateMap () override
QRhiSwapChaincreateSwapChain () override
QRhi::FrameOpResult beginFrame (QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
QRhi::FrameOpResult endFrame (QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
QRhi::FrameOpResult beginOffscreenFrame (QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
QRhi::FrameOpResult endOffscreenFrame (QRhi::EndFrameFlags flags) override
QRhi::FrameOpResult finish () override
void resourceUpdate (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void beginPass (QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endPass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setGraphicsPipeline (QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
void setShaderResources (QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
void setVertexInput (QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void setViewport (QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
void setScissor (QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void setBlendConstants (QRhiCommandBuffer *cb, const QColor &c) override
void setStencilRef (QRhiCommandBuffer *cb, quint32 refValue) override
void setShadingRate (QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
void draw (QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void drawIndexed (QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
void debugMarkBegin (QRhiCommandBuffer *cb, const QByteArray &name) override
void debugMarkEnd (QRhiCommandBuffer *cb) override
void debugMarkMsg (QRhiCommandBuffer *cb, const QByteArray &msg) override
void beginComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setComputePipeline (QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void dispatch (QRhiCommandBuffer *cb, int x, int y, int z) override
const QRhiNativeHandlesnativeHandles (QRhiCommandBuffer *cb) override
void beginExternal (QRhiCommandBuffer *cb) override
void endExternal (QRhiCommandBuffer *cb) override
double lastCompletedGpuTime (QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts () const override
QList< QSizesupportedShadingRates (int sampleCount) const override
int ubufAlignment () const override
bool isYUpInFramebuffer () const override
bool isYUpInNDC () const override
bool isClipDepthZeroToOne () const override
QMatrix4x4 clipSpaceCorrMatrix () const override
bool isTextureFormatSupported (QRhiTexture::Format format, QRhiTexture::Flags flags) const override
bool isFeatureSupported (QRhi::Feature feature) const override
int resourceLimit (QRhi::ResourceLimit limit) const override
const QRhiNativeHandlesnativeHandles () override
QRhiDriverInfo driverInfo () const override
QRhiStats statistics () override
bool makeThreadLocalNativeContextCurrent () override
void setQueueSubmitParams (QRhiNativeHandles *params) override
void releaseCachedResources () override
bool isDeviceLost () const override
QByteArray pipelineCacheData () override
void setPipelineCacheData (const QByteArray &data) override
void executeDeferredReleases (bool forced=false)
void finishActiveReadbacks (bool forced=false)
qsizetype subresUploadByteSize (const QRhiTextureSubresourceUploadDescription &subresDesc) const
void enqueueSubresUpload (QMetalTexture *texD, void *mp, void *blitEncPtr, int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc, qsizetype *curOfs)
void enqueueResourceUpdates (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void executeBufferHostWritesForSlot (QMetalBuffer *bufD, int slot)
void executeBufferHostWritesForCurrentFrame (QMetalBuffer *bufD)
void enqueueShaderResourceBindings (QMetalShaderResourceBindings *srbD, QMetalCommandBuffer *cbD, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets, bool offsetOnlyChange, const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[SUPPORTED_STAGES])
void tessellatedDraw (const TessDrawArgs &args)
void adjustForMultiViewDraw (quint32 *instanceCount, QRhiCommandBuffer *cb)
Public Member Functions inherited from QRhiImplementation
virtual ~QRhiImplementation ()
virtual QRhi::AdapterList enumerateAdaptersBeforeCreate (QRhiNativeHandles *nativeHandles) const
void prepareForCreate (QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flags, QRhiAdapter *adapter)
bool isCompressedFormat (QRhiTexture::Format format) const
void compressedFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
void textureFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const
bool isStencilSupportingFormat (QRhiTexture::Format format) const
void registerResource (QRhiResource *res, bool ownsNativeResources=true)
void unregisterResource (QRhiResource *res)
void addDeleteLater (QRhiResource *res)
void addCleanupCallback (const QRhi::CleanupCallback &callback)
void addCleanupCallback (const void *key, const QRhi::CleanupCallback &callback)
void removeCleanupCallback (const void *key)
bool sanityCheckGraphicsPipeline (QRhiGraphicsPipeline *ps)
bool sanityCheckShaderResourceBindings (QRhiShaderResourceBindings *srb)
void updateLayoutDesc (QRhiShaderResourceBindings *srb)
quint32 pipelineCacheRhiId () const
void pipelineCreationStart ()
void pipelineCreationEnd ()
qint64 totalPipelineCreationTime () const
QRhiVertexInputAttribute::Format shaderDescVariableFormatToVertexInputFormat (QShaderDescription::VariableType type) const
quint32 byteSizePerVertexForVertexInputFormat (QRhiVertexInputAttribute::Format format) const
int effectiveSampleCount (int sampleCount) const
void runCleanup ()

Static Public Member Functions

static bool probe (QRhiMetalInitParams *params)
static QRhiSwapChainProxyData updateSwapChainProxyData (QWindow *window)
Static Public Member Functions inherited from QRhiImplementation
static QRhiImplementationnewInstance (QRhi::Implementation impl, QRhiInitParams *params, QRhiNativeHandles *importDevice)
static const QRhiShaderResourceBinding::DatashaderResourceBindingData (const QRhiShaderResourceBinding &binding)
static QRhiShaderResourceBinding::DatashaderResourceBindingData (QRhiShaderResourceBinding &binding)
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b)

Public Attributes

QRhi::Flags rhiFlags
bool importedDevice = false
bool importedCmdQueue = false
QMetalSwapChaincurrentSwapChain = nullptr
QSet< QMetalSwapChain * > swapchains
QRhiMetalNativeHandles nativeHandlesStruct
QRhiDriverInfo driverInfoStruct
quint32 osMajor = 0
quint32 osMinor = 0
struct { 
   int   maxTextureSize = 4096 
   bool   baseVertexAndInstance = true 
   QVector< int >   supportedSampleCounts 
   bool   isAppleGPU = false 
   int   maxThreadGroupSize = 512 
   bool   multiView = false 
   bool   shadingRateMap = false 
caps
QRhiMetalDatad = nullptr
Public Attributes inherited from QRhiImplementation
QRhiq
bool debugMarkers = false
int currentFrameSlot = 0
bool inFrame = false
QRhiAdapterrequestedRhiAdapter = nullptr

Static Public Attributes

static const int SUPPORTED_STAGES = 5
Static Public Attributes inherited from QRhiImplementation
static const int MAX_SHADER_CACHE_ENTRIES = 128

Detailed Description

Definition at line 346 of file qrhimetal_p.h.

Constructor & Destructor Documentation

◆ QRhiMetal()

QRhiMetal::QRhiMetal ( QRhiMetalInitParams * params,
QRhiMetalNativeHandles * importDevice = nullptr )

Definition at line 482 of file qrhimetal.mm.

References QRhiMetalData::QRhiMetalData(), d, importedCmdQueue, and importedDevice.

Here is the call graph for this function:

◆ ~QRhiMetal()

QRhiMetal::~QRhiMetal ( )

Definition at line 502 of file qrhimetal.mm.

References d.

Member Function Documentation

◆ adjustForMultiViewDraw()

◆ beginComputePass()

void QRhiMetal::beginComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates,
QRhiCommandBuffer::BeginPassFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 3189 of file qrhimetal.mm.

References QMetalCommandBuffer::ComputePass, enqueueResourceUpdates(), QMetalCommandBuffer::NoPass, QMetalCommandBuffer::recordingPass, and QMetalCommandBuffer::resetPerPassState().

Here is the call graph for this function:

◆ beginExternal()

void QRhiMetal::beginExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2373 of file qrhimetal.mm.

◆ beginFrame()

QRhi::FrameOpResult QRhiMetal::beginFrame ( QRhiSwapChain * swapChain,
QRhi::BeginFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2390 of file qrhimetal.mm.

References currentSwapChain, QMetalSwapChainRenderTarget::d, d, QMetalSwapChain::ds, executeDeferredReleases(), finishActiveReadbacks(), QMetalRenderTargetData::ColorAtt::needsDrawableForResolveTex, QMetalRenderTargetData::ColorAtt::needsDrawableForTex, QMetalSwapChain::rtWrapper, and QMetalSwapChain::samples.

Here is the call graph for this function:

◆ beginOffscreenFrame()

QRhi::FrameOpResult QRhiMetal::beginOffscreenFrame ( QRhiCommandBuffer ** cb,
QRhi::BeginFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 2544 of file qrhimetal.mm.

References d, executeDeferredReleases(), and finishActiveReadbacks().

Here is the call graph for this function:

◆ beginPass()

◆ clipSpaceCorrMatrix()

QMatrix4x4 QRhiMetal::clipSpaceCorrMatrix ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 729 of file qrhimetal.mm.

◆ create()

bool QRhiMetal::create ( QRhi::Flags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 556 of file qrhimetal.mm.

References d, and importedDevice.

◆ createBuffer()

QRhiBuffer * QRhiMetal::createBuffer ( QRhiBuffer::Type type,
QRhiBuffer::UsageFlags usage,
quint32 size )
overridevirtual

Implements QRhiImplementation.

Definition at line 704 of file qrhimetal.mm.

◆ createComputePipeline()

QRhiComputePipeline * QRhiMetal::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1124 of file qrhimetal.mm.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiMetal::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1119 of file qrhimetal.mm.

◆ createRenderBuffer()

QRhiRenderBuffer * QRhiMetal::createRenderBuffer ( QRhiRenderBuffer::Type type,
const QSize & pixelSize,
int sampleCount,
QRhiRenderBuffer::Flags flags,
QRhiTexture::Format backingFormatHint )
overridevirtual

Implements QRhiImplementation.

Definition at line 1087 of file qrhimetal.mm.

◆ createSampler()

QRhiSampler * QRhiMetal::createSampler ( QRhiSampler::Filter magFilter,
QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
QRhiSampler::AddressMode u,
QRhiSampler::AddressMode v,
QRhiSampler::AddressMode w )
overridevirtual

Implements QRhiImplementation.

Definition at line 1101 of file qrhimetal.mm.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiMetal::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1129 of file qrhimetal.mm.

◆ createShadingRateMap()

QRhiShadingRateMap * QRhiMetal::createShadingRateMap ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1108 of file qrhimetal.mm.

◆ createSwapChain()

QRhiSwapChain * QRhiMetal::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 699 of file qrhimetal.mm.

◆ createTexture()

QRhiTexture * QRhiMetal::createTexture ( QRhiTexture::Format format,
const QSize & pixelSize,
int depth,
int arraySize,
int sampleCount,
QRhiTexture::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 1094 of file qrhimetal.mm.

◆ createTextureRenderTarget()

QRhiTextureRenderTarget * QRhiMetal::createTextureRenderTarget ( const QRhiTextureRenderTargetDescription & desc,
QRhiTextureRenderTarget::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 1113 of file qrhimetal.mm.

◆ debugMarkBegin()

void QRhiMetal::debugMarkBegin ( QRhiCommandBuffer * cb,
const QByteArray & name )
overridevirtual

Implements QRhiImplementation.

Definition at line 2333 of file qrhimetal.mm.

◆ debugMarkEnd()

void QRhiMetal::debugMarkEnd ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2346 of file qrhimetal.mm.

◆ debugMarkMsg()

void QRhiMetal::debugMarkMsg ( QRhiCommandBuffer * cb,
const QByteArray & msg )
overridevirtual

Implements QRhiImplementation.

Definition at line 2358 of file qrhimetal.mm.

◆ destroy()

void QRhiMetal::destroy ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 664 of file qrhimetal.mm.

References d, executeDeferredReleases(), and finishActiveReadbacks().

Here is the call graph for this function:

◆ dispatch()

void QRhiMetal::dispatch ( QRhiCommandBuffer * cb,
int x,
int y,
int z )
overridevirtual

◆ draw()

void QRhiMetal::draw ( QRhiCommandBuffer * cb,
quint32 vertexCount,
quint32 instanceCount,
quint32 firstVertex,
quint32 firstInstance )
overridevirtual

Implements QRhiImplementation.

Definition at line 2254 of file qrhimetal.mm.

References QRhiMetal::TessDrawArgs::cbD, QMetalCommandBuffer::currentGraphicsPipeline, QMetalGraphicsPipeline::d, QRhiMetal::TessDrawArgs::NonIndexed, QMetalCommandBuffer::recordingPass, QMetalCommandBuffer::RenderPass, and tessellatedDraw().

Here is the call graph for this function:

◆ drawIndexed()

void QRhiMetal::drawIndexed ( QRhiCommandBuffer * cb,
quint32 indexCount,
quint32 instanceCount,
quint32 firstIndex,
qint32 vertexOffset,
quint32 firstInstance )
overridevirtual

Implements QRhiImplementation.

Definition at line 2283 of file qrhimetal.mm.

References QRhiMetal::TessDrawArgs::cbD, QMetalCommandBuffer::currentGraphicsPipeline, QMetalCommandBuffer::currentIndexBuffer, QMetalGraphicsPipeline::d, QMetalCommandBuffer::recordingPass, QMetalCommandBuffer::RenderPass, and tessellatedDraw().

Here is the call graph for this function:

◆ driverInfo()

QRhiDriverInfo QRhiMetal::driverInfo ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 926 of file qrhimetal.mm.

◆ endComputePass()

void QRhiMetal::endComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 3204 of file qrhimetal.mm.

References QMetalCommandBuffer::ComputePass, enqueueResourceUpdates(), QMetalCommandBuffer::NoPass, and QMetalCommandBuffer::recordingPass.

Here is the call graph for this function:

◆ endExternal()

void QRhiMetal::endExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2378 of file qrhimetal.mm.

References QMetalCommandBuffer::resetPerPassCachedState().

Here is the call graph for this function:

◆ endFrame()

QRhi::FrameOpResult QRhiMetal::endFrame ( QRhiSwapChain * swapChain,
QRhi::EndFrameFlags flags )
overridevirtual

◆ endOffscreenFrame()

QRhi::FrameOpResult QRhiMetal::endOffscreenFrame ( QRhi::EndFrameFlags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 2565 of file qrhimetal.mm.

References d, and finishActiveReadbacks().

Here is the call graph for this function:

◆ endPass()

void QRhiMetal::endPass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 3175 of file qrhimetal.mm.

References enqueueResourceUpdates(), QMetalCommandBuffer::NoPass, QMetalCommandBuffer::recordingPass, and QMetalCommandBuffer::RenderPass.

Here is the call graph for this function:

◆ enqueueResourceUpdates()

void QRhiMetal::enqueueResourceUpdates ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )

Definition at line 2802 of file qrhimetal.mm.

References QRhiResourceUpdateBatchPrivate::activeBufferOpCount, QRhiMetalData::BufferReadback::activeFrameSlot, QRhiResourceUpdateBatchPrivate::activeTextureOpCount, QRhiResourceUpdateBatchPrivate::TextureOp::Copy, currentSwapChain, QMetalBuffer::d, QMetalSwapChain::d, QMetalSwapChainRenderTarget::d, QMetalTexture::d, d, QRhiResourceUpdateBatchPrivate::BufferOp::data, QRhiResourceUpdateBatchPrivate::TextureOp::dst, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, executeBufferHostWritesForCurrentFrame(), QRhiResourceUpdateBatchPrivate::free(), QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QMTL_FRAMES_IN_FLIGHT, QRhiResourceUpdateBatchPrivate::BufferOp::Read, QRhiResourceUpdateBatchPrivate::TextureOp::Read, QMetalSwapChain::rtWrapper, QMetalTexture::samples, QMetalBufferData::slotted, QRhiResourceUpdateBatchPrivate::TextureOp::src, QRhiMetalData::DeferredReleaseEntry::StagingBuffer, QRhiResourceUpdateBatchPrivate::BufferOp::StaticUpload, QRhiMetalData::DeferredReleaseEntry::type, QRhiResourceUpdateBatchPrivate::BufferOp::type, QRhiResourceUpdateBatchPrivate::TextureOp::type, and QRhiResourceUpdateBatchPrivate::TextureOp::Upload.

Referenced by beginComputePass(), beginPass(), endComputePass(), endPass(), and resourceUpdate().

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

◆ enqueueShaderResourceBindings()

◆ enqueueSubresUpload()

void QRhiMetal::enqueueSubresUpload ( QMetalTexture * texD,
void * mp,
void * blitEncPtr,
int layer,
int level,
const QRhiTextureSubresourceUploadDescription & subresDesc,
qsizetype * curOfs )

Definition at line 2675 of file qrhimetal.mm.

◆ executeBufferHostWritesForCurrentFrame()

void QRhiMetal::executeBufferHostWritesForCurrentFrame ( QMetalBuffer * bufD)

Definition at line 3019 of file qrhimetal.mm.

Referenced by enqueueResourceUpdates(), setShaderResources(), and setVertexInput().

Here is the caller graph for this function:

◆ executeBufferHostWritesForSlot()

void QRhiMetal::executeBufferHostWritesForSlot ( QMetalBuffer * bufD,
int slot )

Definition at line 2996 of file qrhimetal.mm.

References QMetalBuffer::d.

Referenced by QMetalBuffer::nativeBuffer().

Here is the caller graph for this function:

◆ executeDeferredReleases()

void QRhiMetal::executeDeferredReleases ( bool forced = false)

Definition at line 3268 of file qrhimetal.mm.

References QRhiMetalData::DeferredReleaseEntry::Buffer, d, qrhimtl_releaseBuffer(), qrhimtl_releaseRenderBuffer(), qrhimtl_releaseSampler(), qrhimtl_releaseTexture(), QRhiMetalData::DeferredReleaseEntry::RenderBuffer, QRhiMetalData::DeferredReleaseEntry::Sampler, QRhiMetalData::DeferredReleaseEntry::Texture, and QRhiMetalData::DeferredReleaseEntry::type.

Referenced by beginFrame(), beginOffscreenFrame(), destroy(), and finish().

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

◆ finish()

QRhi::FrameOpResult QRhiMetal::finish ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 2584 of file qrhimetal.mm.

References currentSwapChain, d, executeDeferredReleases(), finishActiveReadbacks(), and QMetalCommandBuffer::NoPass.

Here is the call graph for this function:

◆ finishActiveReadbacks()

void QRhiMetal::finishActiveReadbacks ( bool forced = false)

Definition at line 3311 of file qrhimetal.mm.

References d.

Referenced by beginFrame(), beginOffscreenFrame(), destroy(), endOffscreenFrame(), and finish().

Here is the caller graph for this function:

◆ isClipDepthZeroToOne()

bool QRhiMetal::isClipDepthZeroToOne ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 724 of file qrhimetal.mm.

◆ isDeviceLost()

bool QRhiMetal::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 957 of file qrhimetal.mm.

◆ isFeatureSupported()

bool QRhiMetal::isFeatureSupported ( QRhi::Feature feature) const
overridevirtual

Implements QRhiImplementation.

Definition at line 776 of file qrhimetal.mm.

◆ isTextureFormatSupported()

bool QRhiMetal::isTextureFormatSupported ( QRhiTexture::Format format,
QRhiTexture::Flags flags ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 743 of file qrhimetal.mm.

◆ isYUpInFramebuffer()

bool QRhiMetal::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 714 of file qrhimetal.mm.

◆ isYUpInNDC()

bool QRhiMetal::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 719 of file qrhimetal.mm.

◆ lastCompletedGpuTime()

double QRhiMetal::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2384 of file qrhimetal.mm.

References QMetalCommandBuffer::d, and QMetalCommandBufferData::lastGpuTime.

◆ makeThreadLocalNativeContextCurrent()

bool QRhiMetal::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 938 of file qrhimetal.mm.

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiMetal::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 921 of file qrhimetal.mm.

◆ nativeHandles() [2/2]

const QRhiNativeHandles * QRhiMetal::nativeHandles ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 2368 of file qrhimetal.mm.

◆ pipelineCacheData()

QByteArray QRhiMetal::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 972 of file qrhimetal.mm.

References f().

Here is the call graph for this function:

◆ probe()

bool QRhiMetal::probe ( QRhiMetalInitParams * params)
static

Definition at line 513 of file qrhimetal.mm.

◆ releaseCachedResources()

void QRhiMetal::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 949 of file qrhimetal.mm.

References d.

◆ resourceLimit()

int QRhiMetal::resourceLimit ( QRhi::ResourceLimit limit) const
overridevirtual

Implements QRhiImplementation.

Definition at line 882 of file qrhimetal.mm.

References QMTL_FRAMES_IN_FLIGHT.

◆ resourceUpdate()

void QRhiMetal::resourceUpdate ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 3024 of file qrhimetal.mm.

References enqueueResourceUpdates().

Here is the call graph for this function:

◆ setBlendConstants()

void QRhiMetal::setBlendConstants ( QRhiCommandBuffer * cb,
const QColor & c )
overridevirtual

◆ setComputePipeline()

◆ setGraphicsPipeline()

void QRhiMetal::setGraphicsPipeline ( QRhiCommandBuffer * cb,
QRhiGraphicsPipeline * ps )
overridevirtual

Implements QRhiImplementation.

Definition at line 1503 of file qrhimetal.mm.

References QMetalCommandBuffer::currentComputePipeline, QMetalCommandBuffer::currentGraphicsPipeline, QMetalGraphicsPipeline::d, QMetalGraphicsPipeline::makeActiveForCurrentRenderPassEncoder(), QMetalCommandBuffer::recordingPass, and QMetalCommandBuffer::RenderPass.

Here is the call graph for this function:

◆ setPipelineCacheData()

void QRhiMetal::setPipelineCacheData ( const QByteArray & data)
overridevirtual

Implements QRhiImplementation.

Definition at line 1025 of file qrhimetal.mm.

◆ setQueueSubmitParams()

void QRhiMetal::setQueueSubmitParams ( QRhiNativeHandles * params)
overridevirtual

Implements QRhiImplementation.

Definition at line 944 of file qrhimetal.mm.

◆ setScissor()

void QRhiMetal::setScissor ( QRhiCommandBuffer * cb,
const QRhiScissor & scissor )
overridevirtual

◆ setShaderResources()

◆ setShadingRate()

void QRhiMetal::setShadingRate ( QRhiCommandBuffer * cb,
const QSize & coarsePixelSize )
overridevirtual

Implements QRhiImplementation.

Definition at line 1960 of file qrhimetal.mm.

◆ setStencilRef()

void QRhiMetal::setStencilRef ( QRhiCommandBuffer * cb,
quint32 refValue )
overridevirtual

◆ setVertexInput()

void QRhiMetal::setVertexInput ( QRhiCommandBuffer * cb,
int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput * bindings,
QRhiBuffer * indexBuf,
quint32 indexOffset,
QRhiCommandBuffer::IndexFormat indexFormat )
overridevirtual

◆ setViewport()

void QRhiMetal::setViewport ( QRhiCommandBuffer * cb,
const QRhiViewport & viewport )
overridevirtual

◆ statistics()

QRhiStats QRhiMetal::statistics ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 931 of file qrhimetal.mm.

◆ subresUploadByteSize()

qsizetype QRhiMetal::subresUploadByteSize ( const QRhiTextureSubresourceUploadDescription & subresDesc) const

Definition at line 2665 of file qrhimetal.mm.

◆ supportedSampleCounts()

QList< int > QRhiMetal::supportedSampleCounts ( ) const
overridevirtual

Implements QRhiImplementation.

◆ supportedShadingRates()

QVector< QSize > QRhiMetal::supportedShadingRates ( int sampleCount) const
overridevirtual

Implements QRhiImplementation.

Definition at line 693 of file qrhimetal.mm.

◆ tessellatedDraw()

◆ ubufAlignment()

int QRhiMetal::ubufAlignment ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 709 of file qrhimetal.mm.

◆ updateSwapChainProxyData()

QRhiSwapChainProxyData QRhiMetal::updateSwapChainProxyData ( QWindow * window)
static

Definition at line 6351 of file qrhimetal.mm.

Member Data Documentation

◆ baseVertexAndInstance

bool QRhiMetal::baseVertexAndInstance = true

Definition at line 524 of file qrhimetal_p.h.

◆ [struct]

struct { ... } QRhiMetal::caps

◆ currentSwapChain

QMetalSwapChain* QRhiMetal::currentSwapChain = nullptr

Definition at line 515 of file qrhimetal_p.h.

Referenced by beginFrame(), beginPass(), endFrame(), enqueueResourceUpdates(), and finish().

◆ d

◆ driverInfoStruct

QRhiDriverInfo QRhiMetal::driverInfoStruct

Definition at line 518 of file qrhimetal_p.h.

◆ importedCmdQueue

bool QRhiMetal::importedCmdQueue = false

Definition at line 514 of file qrhimetal_p.h.

Referenced by QRhiMetal().

◆ importedDevice

bool QRhiMetal::importedDevice = false

Definition at line 513 of file qrhimetal_p.h.

Referenced by QRhiMetal(), and create().

◆ isAppleGPU

bool QRhiMetal::isAppleGPU = false

Definition at line 526 of file qrhimetal_p.h.

◆ maxTextureSize

int QRhiMetal::maxTextureSize = 4096

Definition at line 523 of file qrhimetal_p.h.

◆ maxThreadGroupSize

int QRhiMetal::maxThreadGroupSize = 512

Definition at line 527 of file qrhimetal_p.h.

◆ multiView

bool QRhiMetal::multiView = false

Definition at line 528 of file qrhimetal_p.h.

◆ nativeHandlesStruct

QRhiMetalNativeHandles QRhiMetal::nativeHandlesStruct

Definition at line 517 of file qrhimetal_p.h.

◆ osMajor

quint32 QRhiMetal::osMajor = 0

Definition at line 519 of file qrhimetal_p.h.

◆ osMinor

quint32 QRhiMetal::osMinor = 0

Definition at line 520 of file qrhimetal_p.h.

◆ rhiFlags

QRhi::Flags QRhiMetal::rhiFlags

Definition at line 512 of file qrhimetal_p.h.

◆ shadingRateMap

bool QRhiMetal::shadingRateMap = false

Definition at line 529 of file qrhimetal_p.h.

◆ SUPPORTED_STAGES

const int QRhiMetal::SUPPORTED_STAGES = 5
static

Definition at line 476 of file qrhimetal_p.h.

Referenced by enqueueShaderResourceBindings(), and setShaderResources().

◆ supportedSampleCounts

QVector< int > QRhiMetal::supportedSampleCounts

Definition at line 525 of file qrhimetal_p.h.

◆ swapchains

QSet<QMetalSwapChain *> QRhiMetal::swapchains

Definition at line 516 of file qrhimetal_p.h.


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