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
qrhimetal_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QRHIMETAL_P_H
5#define QRHIMETAL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qrhi_p.h"
19#include <QWindow>
20
22
23static const int QMTL_FRAMES_IN_FLIGHT = 2;
24
25// have to hide the ObjC stuff, this header cannot contain MTL* at all
26struct QMetalBufferData;
27
28struct QMetalBuffer : public QRhiBuffer
29{
32 void destroy() override;
33 bool create() override;
37
41 friend class QRhiMetal;
43
44 static constexpr int WorkBufPoolUsage = 1 << 8;
46};
47
49
51{
53 int sampleCount, QRhiRenderBuffer::Flags flags,
54 QRhiTexture::Format backingFormatHint);
56 void destroy() override;
57 bool create() override;
58 QRhiTexture::Format backingFormat() const override;
59
61 int samples = 1;
64 friend class QRhiMetal;
65};
66
68
70{
74 void destroy() override;
75 bool create() override;
76 bool createFrom(NativeTexture src) override;
78
79 bool prepareCreate(QSize *adjustedSize = nullptr);
80
83 int samples = 1;
86 friend class QRhiMetal;
88 friend struct QMetalTextureData;
89};
90
92
107
109{
112 void destroy() override;
113 bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
115 QVector<quint32> serializedFormat() const override;
116
118
119 // there is no MTLRenderPassDescriptor here as one will be created for each pass in beginPass()
120
121 // but the things needed for the render pipeline descriptor have to be provided
122 static const int MAX_COLOR_ATTACHMENTS = 8;
124 bool hasDepthStencil = false;
127 QVector<quint32> serializedFormatData;
128};
129
131
133{
136 void destroy() override;
137
138 QSize pixelSize() const override;
139 float devicePixelRatio() const override;
140 int sampleCount() const override;
141
143};
144
146{
149 void destroy() override;
150
151 QSize pixelSize() const override;
152 float devicePixelRatio() const override;
153 int sampleCount() const override;
154
156 bool create() override;
157
159 friend class QRhiMetal;
160};
161
207
210
212{
215 void destroy() override;
216 bool create() override;
217
220 void setupMetalDepthStencilDescriptor(void *metalDsDesc);
221 void mapStates();
223 bool createTessellationPipelines(const QShader &tessVert, const QShader &tesc, const QShader &tese, const QShader &tessFrag);
224
228 friend class QRhiMetal;
229};
230
232
245
247struct QMetalSwapChain;
248
289
291
293{
296 void destroy() override;
297
300 QSize surfacePixelSize() override;
301 bool isFormatSupported(Format f) override;
302
304
305 bool createOrResize() override;
306
307 virtual QRhiSwapChainHdrInfo hdrInfo() override;
308
309 void chooseFormats();
310 void waitUntilCompleted(int slot);
311
312 QWindow *window = nullptr;
314 int currentFrameSlot = 0; // 0..QMTL_FRAMES_IN_FLIGHT-1
315 int frameCount = 0;
316 int samples = 1;
321};
322
323struct QRhiMetalData;
324
326{
327public:
329 ~QRhiMetal();
330
331 static bool probe(QRhiMetalInitParams *params);
333
334 bool create(QRhi::Flags flags) override;
335 void destroy() override;
336
341 QRhiBuffer::UsageFlags usage,
342 quint32 size) override;
344 const QSize &pixelSize,
345 int sampleCount,
346 QRhiRenderBuffer::Flags flags,
347 QRhiTexture::Format backingFormatHint) override;
349 const QSize &pixelSize,
350 int depth,
351 int arraySize,
352 int sampleCount,
353 QRhiTexture::Flags flags) override;
355 QRhiSampler::Filter minFilter,
356 QRhiSampler::Filter mipmapMode,
359 QRhiSampler::AddressMode w) override;
360
362 QRhiTextureRenderTarget::Flags flags) override;
363
364 QRhiSwapChain *createSwapChain() override;
365 QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override;
366 QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override;
367 QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override;
368 QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override;
369 QRhi::FrameOpResult finish() override;
370
371 void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override;
372
375 const QColor &colorClearValue,
376 const QRhiDepthStencilClearValue &depthStencilClearValue,
377 QRhiResourceUpdateBatch *resourceUpdates,
378 QRhiCommandBuffer::BeginPassFlags flags) override;
379 void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override;
380
382 QRhiGraphicsPipeline *ps) override;
383
386 int dynamicOffsetCount,
387 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override;
388
390 int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings,
391 QRhiBuffer *indexBuf, quint32 indexOffset,
392 QRhiCommandBuffer::IndexFormat indexFormat) override;
393
394 void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override;
395 void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override;
396 void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override;
397 void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override;
398
399 void draw(QRhiCommandBuffer *cb, quint32 vertexCount,
400 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override;
401
402 void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount,
403 quint32 instanceCount, quint32 firstIndex,
404 qint32 vertexOffset, quint32 firstInstance) override;
405
406 void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override;
407 void debugMarkEnd(QRhiCommandBuffer *cb) override;
408 void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override;
409
411 QRhiResourceUpdateBatch *resourceUpdates,
412 QRhiCommandBuffer::BeginPassFlags flags) override;
413 void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override;
415 void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override;
416
418 void beginExternal(QRhiCommandBuffer *cb) override;
419 void endExternal(QRhiCommandBuffer *cb) override;
420 double lastCompletedGpuTime(QRhiCommandBuffer *cb) override;
421
422 QList<int> supportedSampleCounts() const override;
423 int ubufAlignment() const override;
424 bool isYUpInFramebuffer() const override;
425 bool isYUpInNDC() const override;
426 bool isClipDepthZeroToOne() const override;
427 QMatrix4x4 clipSpaceCorrMatrix() const override;
428 bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override;
429 bool isFeatureSupported(QRhi::Feature feature) const override;
430 int resourceLimit(QRhi::ResourceLimit limit) const override;
431 const QRhiNativeHandles *nativeHandles() override;
432 QRhiDriverInfo driverInfo() const override;
433 QRhiStats statistics() override;
435 void releaseCachedResources() override;
436 bool isDeviceLost() const override;
437
438 QByteArray pipelineCacheData() override;
439 void setPipelineCacheData(const QByteArray &data) override;
440
441 void executeDeferredReleases(bool forced = false);
442 void finishActiveReadbacks(bool forced = false);
444 void enqueueSubresUpload(QMetalTexture *texD, void *mp, void *blitEncPtr,
445 int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc,
446 qsizetype *curOfs);
448 void executeBufferHostWritesForSlot(QMetalBuffer *bufD, int slot);
450 static const int SUPPORTED_STAGES = 5;
453 int dynamicOffsetCount,
454 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets,
455 bool offsetOnlyChange,
456 const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[SUPPORTED_STAGES]);
483 void tessellatedDraw(const TessDrawArgs &args);
485
486 QRhi::Flags rhiFlags;
487 bool importedDevice = false;
488 bool importedCmdQueue = false;
490 QSet<QMetalSwapChain *> swapchains;
495
496 struct {
497 int maxTextureSize = 4096;
500 bool isAppleGPU = false;
502 bool multiView = false;
504
505 QRhiMetalData *d = nullptr;
506};
507
509
510#endif
\inmodule QtCore
Definition qbytearray.h:57
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtGui
Definition qrhi.h:846
Type
Specifies storage type of buffer resource.
Definition qrhi.h:848
@ StorageBuffer
Definition qrhi.h:858
\inmodule QtGui
Definition qrhi.h:1651
QPair< int, quint32 > DynamicOffset
Synonym for QPair<int, quint32>.
Definition qrhi.h:1676
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
Definition qrhi.h:1680
IndexFormat
Specifies the index data type.
Definition qrhi.h:1653
\inmodule QtGui
Definition qrhi.h:1622
\inmodule QtGui
Definition qrhi.h:44
\inmodule QtGui
Definition qrhi.h:1270
\variable QRhiMetalNativeHandles::dev
\inmodule QtRhi
\inmodule QtRhi
static QRhiSwapChainProxyData updateSwapChainProxyData(QWindow *window)
QMetalSwapChain * currentSwapChain
bool isDeviceLost() const override
Definition qrhimetal.mm:939
QRhiMetalNativeHandles nativeHandlesStruct
void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override
QRhiStats statistics() override
Definition qrhimetal.mm:918
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
void executeBufferHostWritesForCurrentFrame(QMetalBuffer *bufD)
int ubufAlignment() const override
Definition qrhimetal.mm:704
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override
Definition qrhimetal.mm:738
void endExternal(QRhiCommandBuffer *cb) override
QRhiMetalData * d
QRhiMetal(QRhiMetalInitParams *params, QRhiMetalNativeHandles *importDevice=nullptr)
Definition qrhimetal.mm:471
void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
qsizetype subresUploadByteSize(const QRhiTextureSubresourceUploadDescription &subresDesc) const
void beginExternal(QRhiCommandBuffer *cb) override
quint32 osMajor
void adjustForMultiViewDraw(quint32 *instanceCount, QRhiCommandBuffer *cb)
QRhiSwapChain * createSwapChain() override
Definition qrhimetal.mm:694
QRhiGraphicsPipeline * createGraphicsPipeline() override
QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
QRhi::Flags rhiFlags
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
static const int SUPPORTED_STAGES
bool multiView
void enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD, QMetalCommandBuffer *cbD, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets, bool offsetOnlyChange, const QShader::NativeResourceBindingMap *nativeResourceBindingMaps[SUPPORTED_STAGES])
QRhiRenderBuffer * createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
bool isYUpInNDC() const override
Definition qrhimetal.mm:714
int resourceLimit(QRhi::ResourceLimit limit) const override
Definition qrhimetal.mm:871
QRhiShaderResourceBindings * createShaderResourceBindings() override
void executeBufferHostWritesForSlot(QMetalBuffer *bufD, int slot)
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
QMatrix4x4 clipSpaceCorrMatrix() const override
Definition qrhimetal.mm:724
int maxTextureSize
const QRhiNativeHandles * nativeHandles() override
Definition qrhimetal.mm:908
void executeDeferredReleases(bool forced=false)
void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
QRhiComputePipeline * createComputePipeline() override
bool isClipDepthZeroToOne() const override
Definition qrhimetal.mm:719
QVector< int > supportedSampleCounts
struct QRhiMetal::@296 caps
QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
int maxThreadGroupSize
bool isYUpInFramebuffer() const override
Definition qrhimetal.mm:709
QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override
quint32 osMinor
void enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void setPipelineCacheData(const QByteArray &data) override
bool isAppleGPU
QByteArray pipelineCacheData() override
Definition qrhimetal.mm:954
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
bool importedDevice
void tessellatedDraw(const TessDrawArgs &args)
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
void debugMarkEnd(QRhiCommandBuffer *cb) override
QRhi::FrameOpResult finish() override
QSet< QMetalSwapChain * > swapchains
bool baseVertexAndInstance
bool importedCmdQueue
QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
bool makeThreadLocalNativeContextCurrent() override
Definition qrhimetal.mm:925
QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
Definition qrhimetal.mm:699
void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
void releaseCachedResources() override
Definition qrhimetal.mm:931
QRhiDriverInfo driverInfoStruct
void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override
void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
QRhiDriverInfo driverInfo() const override
Definition qrhimetal.mm:913
double lastCompletedGpuTime(QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts() const override
void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void finishActiveReadbacks(bool forced=false)
static bool probe(QRhiMetalInitParams *params)
Definition qrhimetal.mm:502
void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override
bool isFeatureSupported(QRhi::Feature feature) const override
Definition qrhimetal.mm:771
void enqueueSubresUpload(QMetalTexture *texD, void *mp, void *blitEncPtr, int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc, qsizetype *curOfs)
void destroy() override
Definition qrhimetal.mm:663
void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
\inmodule QtGui
Definition qrhi.h:1094
QSize pixelSize() const
Definition qrhi.h:1115
int sampleCount() const
Definition qrhi.h:1118
Type
Specifies the type of the renderbuffer.
Definition qrhi.h:1096
\inmodule QtGui
Definition qrhi.h:1142
\inmodule QtGui
Definition qrhi.h:1158
\inmodule QtGui
Definition qrhi.h:1731
QRhi * rhi() const
Definition qrhi.cpp:3603
\inmodule QtGui
Definition qrhi.h:1030
Filter
Specifies the minification, magnification, or mipmap filtering.
Definition qrhi.h:1032
Filter magFilter() const
Definition qrhi.h:1057
AddressMode
Specifies the addressing mode.
Definition qrhi.h:1038
Filter minFilter() const
Definition qrhi.h:1060
Filter mipmapMode() const
Definition qrhi.h:1063
\inmodule QtGui
Definition qrhi.h:138
\inmodule QtGui
Definition qrhi.h:1214
\inmodule QtGui
Definition qrhi.h:1173
\inmodule QtGui
Definition qrhi.h:1549
Format
Describes the swapchain format.
Definition qrhi.h:1561
\inmodule QtGui
Definition qrhi.h:1184
\inmodule QtGui
Definition qrhi.h:895
int arraySize() const
Definition qrhi.h:981
int sampleCount() const
Definition qrhi.h:995
Format
Specifies the texture format.
Definition qrhi.h:914
QSize pixelSize() const
Definition qrhi.h:975
\inmodule QtGui
Definition qrhi.h:85
ResourceLimit
Describes the resource limit to query.
Definition qrhi.h:1886
Feature
Flag values to indicate what features are supported by the backend currently in use.
Definition qrhi.h:1831
FrameOpResult
Describes the result of operations that can have a soft failure.
Definition qrhi.h:1824
\inmodule QtGui
Definition qshader.h:81
\inmodule QtCore
Definition qsize.h:25
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
static int instanceCount
EGLOutputLayerEXT layer
Flags
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLint GLenum GLsizei GLsizei GLsizei depth
GLsizei samples
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat GLfloat f
GLenum src
GLenum type
GLbitfield flags
GLuint name
GLint GLsizei GLsizei GLenum format
GLint y
void ** params
const GLubyte * c
GLint limit
GLenum GLenum colorFormat
GLsizeiptr const void GLenum usage
Definition qopenglext.h:543
static QT_BEGIN_NAMESPACE const int QMTL_FRAMES_IN_FLIGHT
Definition qrhimetal_p.h:23
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
unsigned int quint32
Definition qtypes.h:50
int qint32
Definition qtypes.h:49
unsigned long long quint64
Definition qtypes.h:61
ptrdiff_t qsizetype
Definition qtypes.h:165
unsigned int uint
Definition qtypes.h:34
QSharedPointer< T > other(t)
[5]
view viewport() -> scroll(dx, dy, deviceRect)
aWidget window() -> setWindowTitle("New Window Title")
[2]
view create()
QJSValueList args
char * beginFullDynamicBufferUpdateForCurrentFrame() override
QMetalBufferData * d
Definition qrhimetal_p.h:38
QMetalBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size)
static constexpr int WorkBufPoolUsage
Definition qrhimetal_p.h:44
int lastActiveFrameSlot
Definition qrhimetal_p.h:40
QRhiBuffer::NativeBuffer nativeBuffer() override
void endFullDynamicBufferUpdateForCurrentFrame() override
To be called when the entire contents of the buffer data has been updated in the memory block returne...
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool create() override
Creates the corresponding native graphics resources.
QMetalBuffer * currentIndexBuffer
QRhiCommandBuffer::IndexFormat currentIndexFormat
QRhiMetalCommandBufferNativeHandles nativeHandlesStruct
QPair< float, float > currentDepthBiasValues
const QRhiNativeHandles * nativeHandles()
QMetalShaderResourceBindings * currentComputeSrb
QMetalComputePipeline * currentComputePipeline
QMetalShaderResourceBindings * currentGraphicsSrb
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QMetalCommandBuffer(QRhiImplementation *rhi)
void resetPerPassCachedState()
QMetalCommandBufferData * d
QRhiRenderTarget * currentTarget
QMetalGraphicsPipeline * currentGraphicsPipeline
void resetState(double lastGpuTime=0)
QMetalComputePipeline(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QMetalComputePipelineData * d
bool create() override
QMetalGraphicsPipelineData * d
bool createVertexFragmentPipeline()
QMetalGraphicsPipeline(QRhiImplementation *rhi)
void setupAttachmentsInMetalRenderPassDescriptor(void *metalRpDesc, QMetalRenderPassDescriptor *rpD)
void makeActiveForCurrentRenderPassEncoder(QMetalCommandBuffer *cbD)
bool create() override
Creates the corresponding native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void setupMetalDepthStencilDescriptor(void *metalDsDesc)
bool createTessellationPipelines(const QShader &tessVert, const QShader &tesc, const QShader &tese, const QShader &tessFrag)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QMetalRenderBufferData * d
Definition qrhimetal_p.h:60
QRhiTexture::Format backingFormat() const override
bool create() override
Creates the corresponding native graphics resources.
QMetalRenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)
QMetalRenderPassDescriptor(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QVector< quint32 > serializedFormatData
QVector< quint32 > serializedFormat() const override
bool isCompatible(const QRhiRenderPassDescriptor *other) const override
static const int MAX_COLOR_ATTACHMENTS
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QMetalSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w)
QMetalSamplerData * d
int lastActiveFrameSlot
bool create() override
struct QMetalShaderResourceBindings::BoundSampledTextureData::@262 d[QRhiShaderResourceBinding::Data::MAX_TEX_SAMPLER_ARRAY_SIZE]
QMetalShaderResourceBindings(QRhiImplementation *rhi)
QVarLengthArray< QRhiShaderResourceBinding, 8 > sortedBindings
QVarLengthArray< BoundResourceData, 8 > boundResourceData
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void updateResources(UpdateFlags flags) override
QMetalRenderTargetData * d
QMetalSwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain)
QSize pixelSize() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
float devicePixelRatio() const override
int sampleCount() const override
QWindow * window
void waitUntilCompleted(int slot)
bool createOrResize() override
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QRhiCommandBuffer * currentFrameCommandBuffer() override
QMetalSwapChain(QRhiImplementation *rhi)
QMetalCommandBuffer cbWrapper
virtual QRhiSwapChainHdrInfo hdrInfo() override
\variable QRhiSwapChainHdrInfo::limitsType
QMetalRenderBuffer * ds
QMetalSwapChainRenderTarget rtWrapper
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
QMetalSwapChainData * d
bool isFormatSupported(Format f) override
QSize surfacePixelSize() override
QRhiRenderTarget * currentFrameRenderTarget() override
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
QMetalTextureData * d
Definition qrhimetal_p.h:81
bool create() override
Creates the corresponding native graphics resources.
int lastActiveFrameSlot
Definition qrhimetal_p.h:85
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.
\inmodule QtGui
Definition qrhi.h:862
\inmodule QtGui
Definition qrhi.h:1759
QMetalCommandBuffer * cbD
enum QRhiMetal::TessDrawArgs::@297 type
\variable QRhiReadbackResult::completed
Definition qrhi.h:800
static constexpr int MAX_TEX_SAMPLER_ARRAY_SIZE
Definition qrhi.h:506
\inmodule QtGui
Definition qrhi.h:1782
\inmodule QtGui
Definition qrhi.h:1511
\inmodule QtGui
Definition qrhi.h:1544
\inmodule QtGui
Definition qrhi.h:965
Definition moc.h:23