31 QMetalBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size);
54 int sampleCount, QRhiRenderBuffer::Flags flags,
55 QRhiTexture::Format backingFormatHint);
72 QMetalTexture(QRhiImplementation *rhi, Format format,
const QSize &pixelSize,
int depth,
73 int arraySize,
int sampleCount, Flags flags);
96 QMetalSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
97 AddressMode u, AddressMode v, AddressMode w);
116 bool createFrom(NativeShadingRateMap src)
override;
135 return reinterpret_cast<
const QRhiIndirectDrawCommand *>(m_data.constData());
139 return reinterpret_cast<
const QRhiIndexedIndirectDrawCommand *>(m_data.constData());
153 bool isCompatible(
const QRhiRenderPassDescriptor *other)
const override;
228 } d[QRhiShaderResourceBinding::Data::MAX_TEX_SAMPLER_ARRAY_SIZE];
383 QRhiMetal(QRhiMetalInitParams *params, QRhiMetalNativeHandles *importDevice =
nullptr);
386 static bool probe(QRhiMetalInitParams *params);
389 bool create(QRhi::Flags flags)
override;
396 QRhiBuffer::UsageFlags usage,
397 quint32 size)
override;
399 const QSize &pixelSize,
401 QRhiRenderBuffer::Flags flags,
402 QRhiTexture::Format backingFormatHint)
override;
404 const QSize &pixelSize,
408 QRhiTexture::Flags flags)
override;
410 QRhiSampler::Filter minFilter,
411 QRhiSampler::Filter mipmapMode,
412 QRhiSampler:: AddressMode u,
413 QRhiSampler::AddressMode v,
414 QRhiSampler::AddressMode w)
override;
417 QRhiTextureRenderTarget::Flags flags)
override;
422 quint32 maxCommandCount)
override;
423 void buildIndirect(QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb,
424 const QRhiIndirectCommandBufferBuildInfo &info)
override;
425 void executeIndirect(QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb,
426 quint32 firstCommand, quint32 commandCount)
override;
428 QRhiIndirectCommandBuffer *icb)
override;
440 QRhiRenderTarget *rt,
441 const QColor &colorClearValue,
442 const QRhiDepthStencilClearValue &depthStencilClearValue,
443 QRhiResourceUpdateBatch *resourceUpdates,
444 QRhiCommandBuffer::BeginPassFlags flags)
override;
445 void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
override;
448 QRhiGraphicsPipeline *ps)
override;
451 QRhiShaderResourceBindings *srb,
452 int dynamicOffsetCount,
453 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets)
override;
456 int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput *bindings,
457 QRhiBuffer *indexBuf, quint32 indexOffset,
458 QRhiCommandBuffer::IndexFormat indexFormat)
override;
460 void setViewport(QRhiCommandBuffer *cb,
const QRhiViewport &viewport)
override;
461 void setScissor(QRhiCommandBuffer *cb,
const QRhiScissor &scissor)
override;
463 void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue)
override;
464 void setShadingRate(QRhiCommandBuffer *cb,
const QSize &coarsePixelSize)
override;
466 void draw(QRhiCommandBuffer *cb, quint32 vertexCount,
467 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance)
override;
469 void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount,
470 quint32 instanceCount, quint32 firstIndex,
471 qint32 vertexOffset, quint32 firstInstance)
override;
473 void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer,
474 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
477 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
override;
479 void debugMarkBegin(QRhiCommandBuffer *cb,
const QByteArray &name)
override;
481 void debugMarkMsg(QRhiCommandBuffer *cb,
const QByteArray &msg)
override;
484 QRhiResourceUpdateBatch *resourceUpdates,
485 QRhiCommandBuffer::BeginPassFlags flags)
override;
490 quint32 indirectBufferOffset)
override;
493 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
494 QRhiBuffer *countBuffer, quint32 countBufferOffset,
495 quint32 maxDrawCount, quint32 stride)
override;
497 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
498 QRhiBuffer *countBuffer, quint32 countBufferOffset,
499 quint32 maxDrawCount, quint32 stride)
override;
505 QMetalBuffer *indirectBufD, quint32 indirectBufferOffset,
507 quint32 maxDrawCount, quint32 stride);
539 int layer,
int level,
const QRhiTextureSubresourceUploadDescription &subresDesc,
549 int dynamicOffsetCount,
550 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets,
551 bool offsetOnlyChange,
552 const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[
SUPPORTED_STAGES],
static QRhiResourceUpdateBatchPrivate * get(QRhiResourceUpdateBatch *b)
Combined button and popup list for selecting options.
Int aligned(Int v, Int byteAlign)
\variable QRhiVulkanQueueSubmitParams::waitSemaphoreCount
id< MTLTexture > viewForLevel(int level)
id< MTLTexture > perLevelViews[QRhi::MAX_MIP_LEVELS]
id< MTLBuffer > stagingBuf[QMTL_FRAMES_IN_FLIGHT]
QMetalTextureData(QMetalTexture *t)
~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< MTLDepthStencilState > depthStencilState
std::array< id< MTLComputePipelineState >, 3 > tessVertexComputeState
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