31 QMetalBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size);
60 int sampleCount, QRhiRenderBuffer::Flags flags,
61 QRhiTexture::Format backingFormatHint);
78 QMetalTexture(QRhiImplementation *rhi, Format format,
const QSize &pixelSize,
int depth,
79 int arraySize,
int sampleCount, Flags flags);
102 QMetalSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
103 AddressMode u, AddressMode v, AddressMode w);
122 bool createFrom(NativeShadingRateMap src)
override;
142 return reinterpret_cast<
const QRhiIndirectDrawCommand *>(m_data.constData());
146 return reinterpret_cast<
const QRhiIndexedIndirectDrawCommand *>(m_data.constData());
160 bool isCompatible(
const QRhiRenderPassDescriptor *other)
const override;
390 QRhiMetal(QRhiMetalInitParams *params, QRhiMetalNativeHandles *importDevice =
nullptr);
393 static bool probe(QRhiMetalInitParams *params);
396 bool create(QRhi::Flags flags)
override;
403 QRhiBuffer::UsageFlags usage,
404 quint32 size)
override;
406 const QSize &pixelSize,
408 QRhiRenderBuffer::Flags flags,
409 QRhiTexture::Format backingFormatHint)
override;
411 const QSize &pixelSize,
415 QRhiTexture::Flags flags)
override;
417 QRhiSampler::Filter minFilter,
418 QRhiSampler::Filter mipmapMode,
419 QRhiSampler:: AddressMode u,
420 QRhiSampler::AddressMode v,
421 QRhiSampler::AddressMode w)
override;
424 QRhiTextureRenderTarget::Flags flags)
override;
429 quint32 maxCommandCount)
override;
430 void buildIndirect(QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb,
431 const QRhiIndirectCommandBufferBuildInfo &info)
override;
432 void executeIndirect(QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb,
433 quint32 firstCommand, quint32 commandCount)
override;
435 QRhiIndirectCommandBuffer *icb)
override;
447 QRhiRenderTarget *rt,
448 const QColor &colorClearValue,
449 const QRhiDepthStencilClearValue &depthStencilClearValue,
450 QRhiResourceUpdateBatch *resourceUpdates,
451 QRhiCommandBuffer::BeginPassFlags flags)
override;
452 void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
override;
455 QRhiGraphicsPipeline *ps)
override;
458 QRhiShaderResourceBindings *srb,
459 int dynamicOffsetCount,
460 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets)
override;
463 int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput *bindings,
464 QRhiBuffer *indexBuf, quint32 indexOffset,
465 QRhiCommandBuffer::IndexFormat indexFormat)
override;
467 void setViewport(QRhiCommandBuffer *cb,
const QRhiViewport &viewport)
override;
468 void setScissor(QRhiCommandBuffer *cb,
const QRhiScissor &scissor)
override;
470 void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue)
override;
471 void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size,
const void *data)
override;
472 void setShadingRate(QRhiCommandBuffer *cb,
const QSize &coarsePixelSize)
override;
474 void draw(QRhiCommandBuffer *cb, quint32 vertexCount,
475 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance)
override;
477 void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount,
478 quint32 instanceCount, quint32 firstIndex,
479 qint32 vertexOffset, quint32 firstInstance)
override;
481 void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer,
482 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
485 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
487 void debugMarkBegin(QRhiCommandBuffer *cb,
const QByteArray &name)
override;
489 void debugMarkMsg(QRhiCommandBuffer *cb,
const QByteArray &msg)
override;
492 QRhiResourceUpdateBatch *resourceUpdates,
493 QRhiCommandBuffer::BeginPassFlags flags)
override;
498 quint32 indirectBufferOffset)
override;
501 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
502 QRhiBuffer *countBuffer, quint32 countBufferOffset,
503 quint32 maxDrawCount, quint32 stride)
override;
505 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
506 QRhiBuffer *countBuffer, quint32 countBufferOffset,
507 quint32 maxDrawCount, quint32 stride)
override;
513 QMetalBuffer *indirectBufD, quint32 indirectBufferOffset,
515 quint32 maxDrawCount, quint32 stride);
547 int layer,
int level,
const QRhiTextureSubresourceUploadDescription &subresDesc,
557 int dynamicOffsetCount,
558 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets,
559 bool offsetOnlyChange,
560 const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[
SUPPORTED_STAGES],
const char * constData() const
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
id< MTLComputePipelineState > pipelineState
id< MTLTexture > samplingView
id< MTLDepthStencilState > depthStencilState
std::array< id< MTLComputePipelineState >, 3 > tessVertexComputeState
id< MTLTexture > writeView
id< MTLRasterizationRateMap > rateMap
id< MTLSamplerState > samplerState
id< MTLBuffer > argBuffer
id< MTLBuffer > stagingBuffers[QMTL_FRAMES_IN_FLIGHT]
id< MTLComputePipelineState > tessTessControlComputeState
id< MTLIndirectCommandBuffer > icb
id< MTLRenderPipelineState > pipelineState
id< MTLBuffer > buffers[QMTL_FRAMES_IN_FLIGHT]
id< MTLTexture > views[QRhi::MAX_MIP_LEVELS]
QRhiReadbackDescription desc
QRhiReadbackResult * result
QRhiTexture::Format format
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
float maxPotentialColorComponentValue
LuminanceBehavior luminanceBehavior
float maxColorComponentValue
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h