33 QMetalBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size);
62 int sampleCount, QRhiRenderBuffer::Flags flags,
63 QRhiTexture::Format backingFormatHint);
80 QMetalTexture(QRhiImplementation *rhi, Format format,
const QSize &pixelSize,
int depth,
81 int arraySize,
int sampleCount, Flags flags);
104 QMetalSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
105 AddressMode u, AddressMode v, AddressMode w);
124 bool createFrom(NativeShadingRateMap src)
override;
144 return reinterpret_cast<
const QRhiIndirectDrawCommand *>(m_data.constData());
148 return reinterpret_cast<
const QRhiIndexedIndirectDrawCommand *>(m_data.constData());
162 bool isCompatible(
const QRhiRenderPassDescriptor *other)
const override;
392 QRhiMetal(QRhiMetalInitParams *params, QRhiMetalNativeHandles *importDevice =
nullptr);
395 static bool probe(QRhiMetalInitParams *params);
398 bool create(QRhi::Flags flags)
override;
405 QRhiBuffer::UsageFlags usage,
406 quint32 size)
override;
408 const QSize &pixelSize,
410 QRhiRenderBuffer::Flags flags,
411 QRhiTexture::Format backingFormatHint)
override;
413 const QSize &pixelSize,
417 QRhiTexture::Flags flags)
override;
419 QRhiSampler::Filter minFilter,
420 QRhiSampler::Filter mipmapMode,
421 QRhiSampler:: AddressMode u,
422 QRhiSampler::AddressMode v,
423 QRhiSampler::AddressMode w)
override;
426 QRhiTextureRenderTarget::Flags flags)
override;
431 quint32 maxCommandCount)
override;
432 void buildIndirect(QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb,
433 const QRhiIndirectCommandBufferBuildInfo &info)
override;
434 void executeIndirect(QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb,
435 quint32 firstCommand, quint32 commandCount)
override;
437 QRhiIndirectCommandBuffer *icb)
override;
449 QRhiRenderTarget *rt,
450 const QColor &colorClearValue,
451 const QRhiDepthStencilClearValue &depthStencilClearValue,
452 QRhiResourceUpdateBatch *resourceUpdates,
453 QRhiCommandBuffer::BeginPassFlags flags)
override;
454 void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
override;
457 QRhiGraphicsPipeline *ps)
override;
460 QRhiShaderResourceBindings *srb,
461 int dynamicOffsetCount,
462 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets)
override;
465 int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput *bindings,
466 QRhiBuffer *indexBuf, quint32 indexOffset,
467 QRhiCommandBuffer::IndexFormat indexFormat)
override;
469 void setViewport(QRhiCommandBuffer *cb,
const QRhiViewport &viewport)
override;
470 void setScissor(QRhiCommandBuffer *cb,
const QRhiScissor &scissor)
override;
472 void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue)
override;
473 void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size,
const void *data)
override;
474 void setShadingRate(QRhiCommandBuffer *cb,
const QSize &coarsePixelSize)
override;
476 void draw(QRhiCommandBuffer *cb, quint32 vertexCount,
477 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance)
override;
479 void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount,
480 quint32 instanceCount, quint32 firstIndex,
481 qint32 vertexOffset, quint32 firstInstance)
override;
483 void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer,
484 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
487 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
489 void debugMarkBegin(QRhiCommandBuffer *cb,
const QByteArray &name)
override;
491 void debugMarkMsg(QRhiCommandBuffer *cb,
const QByteArray &msg)
override;
494 QRhiResourceUpdateBatch *resourceUpdates,
495 QRhiCommandBuffer::BeginPassFlags flags)
override;
500 quint32 indirectBufferOffset)
override;
503 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
504 QRhiBuffer *countBuffer, quint32 countBufferOffset,
505 quint32 maxDrawCount, quint32 stride)
override;
507 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
508 QRhiBuffer *countBuffer, quint32 countBufferOffset,
509 quint32 maxDrawCount, quint32 stride)
override;
515 QMetalBuffer *indirectBufD, quint32 indirectBufferOffset,
517 quint32 maxDrawCount, quint32 stride);
549 int layer,
int level,
const QRhiTextureSubresourceUploadDescription &subresDesc,
559 int dynamicOffsetCount,
560 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets,
561 bool offsetOnlyChange,
562 const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[
SUPPORTED_STAGES],
607 int maxTextureSize = 4096;
608 bool baseVertexAndInstance =
true;
609 QVector<
int> supportedSampleCounts;
610 bool isAppleGPU =
false;
617 bool usePrivateStaticBuffers =
false;
618 int maxThreadGroupSize = 512;
619 bool multiView =
false;
620 bool indirectCommandBuffers =
false;
621 bool shadingRateMap =
false;
622 bool depthClamp =
true;
623 bool fragmentStoresAndAtomics =
false;
static QRhiResourceUpdateBatchPrivate * get(QRhiResourceUpdateBatch *b)
Combined button and popup list for selecting options.
Int aligned(Int v, Int byteAlign)
\variable QRhiVulkanQueueSubmitParams::waitSemaphoreCount
QVarLengthArray< Entry, 1 > d
MTLPixelFormat viewFormat
MTLPixelFormat viewFormatForSampling
id< MTLTexture > viewForLevel(int level)
id< MTLTexture > perLevelViews[QRhi::MAX_MIP_LEVELS]
id< MTLBuffer > stagingBuf[QMTL_FRAMES_IN_FLIGHT]
id< MTLTexture > writeView
QMetalTextureData(QMetalTexture *t)
id< MTLTexture > samplingView
id< MTLTexture > textureForWrite() const
id< MTLTexture > textureForSampling() const
~QMetalTextureRenderTarget()
float devicePixelRatio() const override
QMetalRenderTargetData * d
QMetalTextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags)
bool create() override
Creates the corresponding native graphics resources.
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
int sampleCount() const override
QSize pixelSize() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QMetalTexture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, Flags flags)
bool prepareCreate(QSize *adjustedSize=nullptr)
NativeTexture nativeTexture() override
bool create() override
Creates the corresponding native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
\variable QRhiIndirectDrawCommand::vertexCount
QRhiReadbackDescription desc
quint32 depthPlaneByteSize
QRhiReadbackResult * result
QRhiTexture::Format format
quint32 stencilPlaneByteSize
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
LuminanceBehavior luminanceBehavior
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h