12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
35
36
37
38
39
40
41
42
43
46 : offscreenCommandBuffer(
this)
68 Q_UNUSED(sampleCount);
69 return { QSize(1, 1) };
74 return new QNullSwapChain(
this);
77QRhiBuffer *
QRhiNull::createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size)
79 return new QNullBuffer(
this, type, usage, size);
123 case QRhi::TextureSizeMin:
125 case QRhi::TextureSizeMax:
127 case QRhi::MaxColorAttachments:
129 case QRhi::FramesInFlight:
131 case QRhi::MaxAsyncReadbackFrames:
133 case QRhi::MaxThreadGroupsPerDimension:
135 case QRhi::MaxThreadsPerThreadGroup:
137 case QRhi::MaxThreadGroupX:
139 case QRhi::MaxThreadGroupY:
141 case QRhi::MaxThreadGroupZ:
143 case QRhi::TextureArraySizeMax:
145 case QRhi::MaxUniformBufferRange:
147 case QRhi::MaxVertexInputs:
149 case QRhi::MaxVertexOutputs:
151 case QRhi::MaxPushConstantsSize:
153 case QRhi::MaxVertexStorageBuffers:
154 case QRhi::MaxFragmentStorageBuffers:
156 case QRhi::MaxStorageBufferBindings:
157 case QRhi::MaxStorageImageBindings:
159 case QRhi::ShadingRateImageTileSize:
163 Q_UNREACHABLE_RETURN(0);
168 return &nativeHandlesStruct;
174 info.deviceName = QByteArrayLiteral(
"Null");
189void QRhiNull::setQueueSubmitParams(QRhiNativeHandles *)
214QRhiRenderBuffer *
QRhiNull::createRenderBuffer(QRhiRenderBuffer::Type type,
const QSize &pixelSize,
215 int sampleCount, QRhiRenderBuffer::Flags flags,
216 QRhiTexture::Format backingFormatHint)
218 return new QNullRenderBuffer(
this, type, pixelSize, sampleCount, flags, backingFormatHint);
222 const QSize &pixelSize,
int depth,
int arraySize,
223 int sampleCount, QRhiTexture::Flags flags)
225 return new QNullTexture(
this, format, pixelSize, depth, arraySize, sampleCount, flags);
229 QRhiSampler::Filter mipmapMode,
230 QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w)
232 return new QNullSampler(
this, magFilter, minFilter, mipmapMode, u, v, w);
236 QRhiTextureRenderTarget::Flags flags)
248 return new QNullGraphicsPipeline(
this);
253 return new QNullComputePipeline(
this);
258 return new QNullShaderResourceBindings(
this);
268 int dynamicOffsetCount,
269 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets)
273 Q_UNUSED(dynamicOffsetCount);
274 Q_UNUSED(dynamicOffsets);
278 int startBinding,
int bindingCount,
const QRhiCommandBuffer::VertexInput *bindings,
279 QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat)
282 Q_UNUSED(startBinding);
283 Q_UNUSED(bindingCount);
286 Q_UNUSED(indexOffset);
287 Q_UNUSED(indexFormat);
325 Q_UNUSED(coarsePixelSize);
329 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance)
332 Q_UNUSED(vertexCount);
333 Q_UNUSED(instanceCount);
334 Q_UNUSED(firstVertex);
335 Q_UNUSED(firstInstance);
339 quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance)
342 Q_UNUSED(indexCount);
343 Q_UNUSED(instanceCount);
344 Q_UNUSED(firstIndex);
345 Q_UNUSED(vertexOffset);
346 Q_UNUSED(firstInstance);
350 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
353 Q_UNUSED(indirectBuffer);
354 Q_UNUSED(indirectBufferOffset);
360 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride)
363 Q_UNUSED(indirectBuffer);
364 Q_UNUSED(indirectBufferOffset);
370 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
371 QRhiBuffer *countBuffer, quint32 countBufferOffset,
372 quint32 maxDrawCount, quint32 stride)
375 Q_UNUSED(indirectBuffer);
376 Q_UNUSED(indirectBufferOffset);
377 Q_UNUSED(countBuffer);
378 Q_UNUSED(countBufferOffset);
379 Q_UNUSED(maxDrawCount);
384 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
385 QRhiBuffer *countBuffer, quint32 countBufferOffset,
386 quint32 maxDrawCount, quint32 stride)
389 Q_UNUSED(indirectBuffer);
390 Q_UNUSED(indirectBufferOffset);
391 Q_UNUSED(countBuffer);
392 Q_UNUSED(countBufferOffset);
393 Q_UNUSED(maxDrawCount);
429 quint32 indirectBufferOffset)
432 Q_UNUSED(indirectBuffer);
433 Q_UNUSED(indirectBufferOffset);
462 return QRhi::FrameOpSuccess;
471 return QRhi::FrameOpSuccess;
477 *cb = &offscreenCommandBuffer;
478 return QRhi::FrameOpSuccess;
484 return QRhi::FrameOpSuccess;
489 return QRhi::FrameOpSuccess;
495 for (
const auto &subres : u.subresDesc) {
496 const int layer = subres.layer;
497 const int level = subres.level;
498 const QRhiTextureSubresourceUploadDescription &subresDesc(subres.desc);
499 if (!subresDesc.image().isNull()) {
500 const QImage src = subresDesc.image();
501 QPainter painter(&texD->image[layer][level]);
502 const QSize srcSize = subresDesc.sourceSize().isEmpty()
503 ? src.size() : subresDesc.sourceSize();
504 painter.setCompositionMode(QPainter::CompositionMode_Source);
505 painter.drawImage(subresDesc.destinationTopLeft(), src,
506 QRect(subresDesc.sourceTopLeft(), srcSize));
507 }
else if (!subresDesc.data().isEmpty()) {
508 const QSize subresSize = q->sizeForMipLevel(level, texD->pixelSize());
509 int w = subresSize.width();
510 int h = subresSize.height();
511 if (!subresDesc.sourceSize().isEmpty()) {
512 w = subresDesc.sourceSize().width();
513 h = subresDesc.sourceSize().height();
516 const QByteArray srcData = subresDesc.data();
517 const QPoint dstOffset = subresDesc.destinationTopLeft();
518 QSize size = clampedSubResourceUploadSize(QSize(w, h), dstOffset, level,
520 size = clampedSubResourceUploadSizeForSourceData(size, subresDesc.dataStride(),
526 const char *src = srcData.constData();
527 const int srcBpl = w * 4;
528 int srcStride = srcBpl;
529 if (subresDesc.dataStride())
530 srcStride = subresDesc.dataStride();
531 uchar *dst = texD->image[layer][level].bits();
532 const int dstBpl = texD->image[layer][level].bytesPerLine();
533 for (
int y = 0; y < h; ++y) {
534 memcpy(dst + dstOffset.x() * 4 + (y + dstOffset.y()) * dstBpl,
546 const QImage &srcImage(srcD->image[u.desc.sourceLayer()][u.desc.sourceLevel()]);
547 QImage &dstImage(dstD->image[u.desc.destinationLayer()][u.desc.destinationLevel()]);
548 const QPoint dstPos = u.desc.destinationTopLeft();
549 const QSize size = u.desc.pixelSize().isEmpty() ? srcD->pixelSize() : u.desc.pixelSize();
550 const QPoint srcPos = u.desc.sourceTopLeft();
552 QPainter painter(&dstImage);
553 painter.setCompositionMode(QPainter::CompositionMode_Source);
554 painter.drawImage(QRect(dstPos, size), srcImage, QRect(srcPos, size));
560 const QSize baseSize = texD->pixelSize();
561 const int levelCount = q->mipLevelsForSize(baseSize);
562 for (
int level = 1; level < levelCount; ++level)
563 texD->image[0][level] = texD->image[0][0].scaled(q->sizeForMipLevel(level, baseSize));
576 memcpy(bufD
->data + u.offset, u.data.constData(), size_t(u.data.size()));
578 QRhiReadbackResult *result = u.result;
579 result->data.resize(u.readSize);
581 memcpy(result->data.data(), bufD
->data + u.offset, size_t(u.readSize));
582 if (result->completed)
587 memcpy(dstD
->data + u.offset, srcD
->data + u.srcOffset, size_t(u.readSize));
590 memset(bufD
->data + u.offset, u.fillValue, size_t(u.readSize));
596 if (u.dst->format() == QRhiTexture::RGBA8)
599 if (u.src->format() == QRhiTexture::RGBA8 && u.dst->format() == QRhiTexture::RGBA8)
602 QRhiReadbackResult *result = u.result;
605 result->format = texD->format();
606 if (u.rb.rect().isValid())
607 result->pixelSize = u.rb.rect().size();
609 result->pixelSize = q->sizeForMipLevel(u.rb.level(), texD->pixelSize());
612 result->format = QRhiTexture::RGBA8;
613 if (u.rb.rect().isValid())
614 result->pixelSize = u.rb.rect().size();
616 result->pixelSize = currentSwapChain->currentPixelSize();
618 quint32 bytesPerLine = 0;
619 quint32 byteSize = 0;
620 textureFormatInfo(result->format, result->pixelSize, &bytesPerLine, &byteSize,
nullptr);
621 if (texD && texD->format() == QRhiTexture::RGBA8) {
622 result->data.resize(
int(byteSize));
623 const QImage &src(texD->image[u.rb.layer()][u.rb.level()]);
624 char *dst = result->data.data();
625 for (
int y = 0, h = src.height(); y < h; ++y) {
626 memcpy(dst, src.constScanLine(y), bytesPerLine);
630 result->data.fill(0,
int(byteSize));
632 if (result->completed)
635 if (u.dst->format() == QRhiTexture::RGBA8)
643 QRhiRenderTarget *rt,
644 const QColor &colorClearValue,
645 const QRhiDepthStencilClearValue &depthStencilClearValue,
646 QRhiResourceUpdateBatch *resourceUpdates,
647 QRhiCommandBuffer::BeginPassFlags flags)
649 Q_UNUSED(colorClearValue);
650 Q_UNUSED(depthStencilClearValue);
656 if (rt->resourceType() == QRhiRenderTarget::TextureRenderTarget) {
658 if (!QRhiRenderTargetAttachmentTracker::isUpToDate<QNullTexture, QNullRenderBuffer>(rtTex->description(), rtTex->d.currentResIdList))
663void QRhiNull::
endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
670 QRhiResourceUpdateBatch *resourceUpdates,
671 QRhiCommandBuffer::BeginPassFlags flags)
701 rhiD->unregisterResource(
this);
709 data =
new char[m_size];
710 memset(
data, 0, m_size);
713 rhiD->registerResource(
this);
720 Q_ASSERT(m_type == Dynamic);
725 int sampleCount, QRhiRenderBuffer::Flags flags,
726 QRhiTexture::Format backingFormatHint)
742 rhiD->unregisterResource(
this);
754 rhiD->registerResource(
this);
761 return m_type == Color ? QRhiTexture::RGBA8 : QRhiTexture::UnknownFormat;
765 int arraySize,
int sampleCount, Flags flags)
781 rhiD->unregisterResource(
this);
792 const bool isCube = m_flags.testFlag(CubeMap);
793 const bool is3D = m_flags.testFlag(ThreeDimensional);
794 const bool isArray = m_flags.testFlag(TextureArray);
795 const bool hasMipMaps = m_flags.testFlag(MipMapped);
796 const bool is1D = m_flags.testFlags(OneDimensional);
797 QSize size = is1D ? QSize(qMax(1, m_pixelSize.width()), 1)
798 : (m_pixelSize.isEmpty() ? QSize(1, 1) : m_pixelSize);
799 const int mipLevelCount = hasMipMaps ? rhiD->q->mipLevelsForSize(size) : 1;
800 const int layerCount = is3D ? qMax(1, m_depth)
802 : (isArray ? qMax(0, m_arraySize)
805 if (!rhiD->textureFormatInfo(m_format, size,
nullptr,
nullptr,
nullptr)) {
810 if (m_format == RGBA8) {
811 image.resize(layerCount);
812 for (
int layer = 0; layer < layerCount; ++layer) {
813 for (
int level = 0; level < mipLevelCount; ++level) {
814 image[layer][level] = QImage(rhiD->q->sizeForMipLevel(level, size),
815 QImage::Format_RGBA8888_Premultiplied);
816 image[layer][level].fill(Qt::yellow);
823 rhiD->registerResource(
this);
839 rhiD->registerResource(
this);
845 AddressMode u, AddressMode v, AddressMode w)
859 rhiD->unregisterResource(
this);
865 rhiD->registerResource(
this);
883 rhiD->unregisterResource(
this);
896 rhiD->registerResource(rpD,
false);
936 const QRhiTextureRenderTargetDescription &desc,
952 rhiD->unregisterResource(
this);
959 rhiD->registerResource(rpD,
false);
966 d.rp =
QRHI_RES(QNullRenderPassDescriptor, m_renderPassDesc);
967 if (m_desc.cbeginColorAttachments() != m_desc.cendColorAttachments()) {
968 const QRhiColorAttachment *colorAtt = m_desc.cbeginColorAttachments();
969 QRhiTexture *tex = colorAtt->texture();
970 QRhiRenderBuffer *rb = colorAtt->renderBuffer();
971 d.pixelSize = tex ? rhiD->q->sizeForMipLevel(colorAtt->level(), tex->pixelSize()) : rb->pixelSize();
972 }
else if (m_desc.depthStencilBuffer()) {
973 d.pixelSize = m_desc.depthStencilBuffer()->pixelSize();
974 }
else if (m_desc.depthTexture()) {
975 d.pixelSize = m_desc.depthTexture()->pixelSize();
977 QRhiRenderTargetAttachmentTracker::updateResIdList<QNullTexture, QNullRenderBuffer>(m_desc, &d.currentResIdList);
978 rhiD->registerResource(
this);
984 if (!QRhiRenderTargetAttachmentTracker::isUpToDate<QNullTexture, QNullRenderBuffer>(m_desc, d.currentResIdList))
1014 rhiD->unregisterResource(
this);
1020 if (!rhiD->sanityCheckShaderResourceBindings(
this))
1023 rhiD->updateLayoutDesc(
this);
1025 rhiD->registerResource(
this,
false);
1048 rhiD->unregisterResource(
this);
1054 if (!rhiD->sanityCheckGraphicsPipeline(
this))
1057 rhiD->registerResource(
this);
1075 rhiD->unregisterResource(
this);
1081 rhiD->registerResource(
this);
1116 rhiD->unregisterResource(
this);
1131 return QSize(1280, 720);
1143 rhiD->registerResource(rpD,
false);
1149 const bool needsRegistration = !
window ||
window != m_window;
1150 if (window && window != m_window)
1154 m_currentPixelSize = surfacePixelSize();
1155 rt.setRenderPassDescriptor(m_renderPassDesc);
1156 rt.d.rp =
QRHI_RES(QNullRenderPassDescriptor, m_renderPassDesc);
1157 rt.d.pixelSize = m_currentPixelSize;
1160 if (needsRegistration) {
1162 rhiD->registerResource(
this);
void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
double lastCompletedGpuTime(QRhiCommandBuffer *cb) override
QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override
void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size, const void *data) override
void dispatchIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
bool isFeatureSupported(QRhi::Feature feature) const override
void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
bool isClipDepthZeroToOne() const override
void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
bool isYUpInNDC() const override
QRhiDriverInfo driverInfo() const override
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void simulateTextureUpload(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
QRhiComputePipeline * createComputePipeline() override
void setPipelineCacheData(const QByteArray &data) override
void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
QByteArray pipelineCacheData() override
void drawIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
void drawIndexedIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
const QRhiNativeHandles * nativeHandles() override
void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
void releaseCachedResources() override
void simulateTextureCopy(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
QList< QSize > supportedShadingRates(int sampleCount) const override
void simulateTextureGenMips(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
void setShadingRate(QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
bool makeThreadLocalNativeContextCurrent() override
void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
const QRhiNativeHandles * nativeHandles(QRhiCommandBuffer *cb) override
bool isYUpInFramebuffer() const override
QRhi::FrameOpResult finish() override
void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
QRhiStats statistics() override
QRhiShadingRateMap * createShadingRateMap() override
void beginExternal(QRhiCommandBuffer *cb) override
QRhiSwapChain * createSwapChain() override
void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QRhiGraphicsPipeline * createGraphicsPipeline() override
bool create(QRhi::Flags flags) override
void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override
void debugMarkEnd(QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts() const override
QMatrix4x4 clipSpaceCorrMatrix() const override
QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
void drawIndexedIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
QRhiSwapChain * currentSwapChain
int ubufAlignment() const override
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override
int resourceLimit(QRhi::ResourceLimit limit) const override
QRhiShaderResourceBindings * createShaderResourceBindings() override
void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override
void endExternal(QRhiCommandBuffer *cb) override
bool isDeviceLost() const override
static QRhiResourceUpdateBatchPrivate * get(QRhiResourceUpdateBatch *b)
Combined button and popup list for selecting options.
QNullBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size)
bool create() override
Creates the corresponding native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
char * beginFullDynamicBufferUpdateForCurrentFrame() override
QNullCommandBuffer(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QNullComputePipeline(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool create() override
Creates the corresponding native graphics resources.
QNullGraphicsPipeline(QRhiImplementation *rhi)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool create() override
Creates the corresponding native graphics resources.
QNullRenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)
QRhiTexture::Format backingFormat() const override
QNullRenderPassDescriptor(QRhiImplementation *rhi)
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const override
~QNullRenderPassDescriptor()
QVector< quint32 > serializedFormat() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool isCompatible(const QRhiRenderPassDescriptor *other) const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QNullSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w)
QNullShaderResourceBindings(QRhiImplementation *rhi)
bool create() override
Creates the corresponding resource binding set.
void updateResources(UpdateFlags flags) override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
~QNullShaderResourceBindings()
QSize pixelSize() const override
float devicePixelRatio() const override
~QNullSwapChainRenderTarget()
QNullSwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain)
int sampleCount() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool createOrResize() override
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
QSize surfacePixelSize() override
bool isFormatSupported(Format f) override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QRhiCommandBuffer * currentFrameCommandBuffer() override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
QRhiRenderTarget * currentFrameRenderTarget() override
QNullSwapChain(QRhiImplementation *rhi)
~QNullTextureRenderTarget()
QSize pixelSize() const override
int sampleCount() const override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
bool create() override
Creates the corresponding native graphics resources.
QNullTextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags)
float devicePixelRatio() const override
bool create() override
Creates the corresponding native graphics resources.
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
QNullTexture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, Flags flags)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h