6#include <QLoggingCategory>
1228#ifndef QT_NO_DEBUG_STREAM
1232 dbg.nospace() <<
"QRhiDepthStencilClearValue(depth-clear=" <<
v.depthClearValue()
1233 <<
" stencil-clear=" <<
v.stencilClearValue()
1287 : m_rect { {
x,
y,
w,
h } },
1288 m_minDepth(minDepth),
1289 m_maxDepth(maxDepth)
1348#ifndef QT_NO_DEBUG_STREAM
1352 const std::array<float, 4>
r =
v.viewport();
1353 dbg.nospace() <<
"QRhiViewport(bottom-left-x=" <<
r[0]
1354 <<
" bottom-left-y=" <<
r[1]
1355 <<
" width=" <<
r[2]
1356 <<
" height=" <<
r[3]
1357 <<
" minDepth=" <<
v.minDepth()
1358 <<
" maxDepth=" <<
v.maxDepth()
1404 : m_rect { {
x,
y,
w,
h } }
1441#ifndef QT_NO_DEBUG_STREAM
1445 const std::array<int, 4>
r =
s.scissor();
1446 dbg.nospace() <<
"QRhiScissor(bottom-left-x=" <<
r[0]
1447 <<
" bottom-left-y=" <<
r[1]
1448 <<
" width=" <<
r[2]
1449 <<
" height=" <<
r[3]
1538 m_classification(cls),
1539 m_instanceStepRate(stepRate)
1593#ifndef QT_NO_DEBUG_STREAM
1597 dbg.nospace() <<
"QRhiVertexInputBinding(stride=" <<
b.stride()
1598 <<
" cls=" <<
b.classification()
1599 <<
" step-rate=" <<
b.instanceStepRate()
1742 : m_binding(binding),
1746 m_matrixSlice(matrixSlice)
1831#ifndef QT_NO_DEBUG_STREAM
1835 dbg.nospace() <<
"QRhiVertexInputAttribute(binding=" <<
a.binding()
1836 <<
" location=" <<
a.location()
1837 <<
" format=" <<
a.format()
1838 <<
" offset=" <<
a.offset()
1892 return 4 *
sizeof(float);
1894 return 4 *
sizeof(float);
1896 return 2 *
sizeof(float);
1898 return sizeof(float);
1901 return 4 *
sizeof(
quint8);
1903 return 2 *
sizeof(
quint8);
1917 return 4 *
sizeof(
qint32);
1919 return 4 *
sizeof(
qint32);
1921 return 2 *
sizeof(
qint32);
1944 return 4 *
sizeof(
qint16);
1946 return 4 *
sizeof(
qint16);
1948 return 2 *
sizeof(
qint16);
1953 Q_UNREACHABLE_RETURN(1);
2074#ifndef QT_NO_DEBUG_STREAM
2078 dbg.nospace() <<
"QRhiVertexInputLayout(bindings=" <<
v.m_bindings
2079 <<
" attributes=" <<
v.m_attributes
2219#ifndef QT_NO_DEBUG_STREAM
2223 dbg.nospace() <<
"QRhiShaderStage(type=" <<
s.type()
2224 <<
" shader=" <<
s.shader()
2225 <<
" variant=" <<
s.shaderVariant()
2294 : m_renderBuffer(renderBuffer)
2596 m_colorAttachments.
append(colorAttachment);
2606 : m_depthStencilBuffer(depthStencilBuffer)
2608 m_colorAttachments.
append(colorAttachment);
2621 : m_depthTexture(depthTexture)
2623 m_colorAttachments.
append(colorAttachment);
3831 m_type(type_), m_usage(usage_), m_size(size_)
4060 int sampleCount_,
Flags flags_,
4063 m_type(type_), m_pixelSize(pixelSize_), m_sampleCount(sampleCount_), m_flags(flags_),
4064 m_backingFormatHint(backingFormatHint_)
4421 int arraySize_,
int sampleCount_,
Flags flags_)
4423 m_format(format_), m_pixelSize(pixelSize_), m_depth(depth_),
4424 m_arraySize(arraySize_), m_sampleCount(sampleCount_), m_flags(flags_)
4753 m_magFilter(magFilter_), m_minFilter(minFilter_), m_mipmapMode(mipmapMode_),
4754 m_addressU(u_), m_addressV(v_), m_addressW(w_),
5035 m_swapchain(swapchain_)
5388 auto layoutDescAppender = std::back_inserter(srb->
m_layoutDesc);
5392 ^
uint(
d->arraySize());
5393 layoutDescAppender =
d->serialize(layoutDescAppender);
5533 b.d.u.ubuf.buf =
buf;
5534 b.d.u.ubuf.offset = 0;
5535 b.d.u.ubuf.maybeSize = 0;
5536 b.d.u.ubuf.hasDynamicOffset =
false;
5571 b.d.u.ubuf.buf =
buf;
5573 b.d.u.ubuf.maybeSize =
size;
5574 b.d.u.ubuf.hasDynamicOffset =
false;
5608 b.d.u.ubuf.buf =
buf;
5609 b.d.u.ubuf.offset = 0;
5610 b.d.u.ubuf.maybeSize =
size;
5611 b.d.u.ubuf.hasDynamicOffset =
true;
5647 b.d.u.stex.count = 1;
5648 b.d.u.stex.texSamplers[0] = { tex,
sampler };
5694 b.d.u.stex.count =
count;
5697 b.d.u.stex.texSamplers[
i] = texSamplers[
i];
5699 b.d.u.stex.texSamplers[
i] = {
nullptr,
nullptr };
5739 b.d.u.stex.count = 1;
5740 b.d.u.stex.texSamplers[0] = { tex,
nullptr };
5771 b.d.u.stex.count =
count;
5774 b.d.u.stex.texSamplers[
i] = { tex[
i],
nullptr };
5776 b.d.u.stex.texSamplers[
i] = {
nullptr,
nullptr };
5815 b.d.u.stex.count = 1;
5816 b.d.u.stex.texSamplers[0] = {
nullptr,
sampler };
5850 b.d.u.simage.tex = tex;
5851 b.d.u.simage.level =
level;
5885 b.d.u.simage.tex = tex;
5886 b.d.u.simage.level =
level;
5920 b.d.u.simage.tex = tex;
5921 b.d.u.simage.level =
level;
5953 b.d.u.sbuf.buf =
buf;
5954 b.d.u.sbuf.offset = 0;
5955 b.d.u.sbuf.maybeSize = 0;
5989 b.d.u.sbuf.buf =
buf;
5991 b.d.u.sbuf.maybeSize =
size;
6023 b.d.u.sbuf.buf =
buf;
6024 b.d.u.sbuf.offset = 0;
6025 b.d.u.sbuf.maybeSize = 0;
6059 b.d.u.sbuf.buf =
buf;
6061 b.d.u.sbuf.maybeSize =
size;
6093 b.d.u.sbuf.buf =
buf;
6094 b.d.u.sbuf.offset = 0;
6095 b.d.u.sbuf.maybeSize = 0;
6129 b.d.u.sbuf.buf =
buf;
6131 b.d.u.sbuf.maybeSize =
size;
6154 if (da->binding !=
db->binding
6155 || da->stage !=
db->stage
6156 || da->type !=
db->type)
6163 if (da->u.ubuf.buf !=
db->u.ubuf.buf
6164 || da->u.ubuf.offset !=
db->u.ubuf.offset
6165 || da->u.ubuf.maybeSize !=
db->u.ubuf.maybeSize)
6171 if (da->u.stex.count !=
db->u.stex.count)
6173 for (
int i = 0;
i < da->u.stex.count; ++
i) {
6174 if (da->u.stex.texSamplers[
i].tex !=
db->u.stex.texSamplers[
i].tex
6175 || da->u.stex.texSamplers[
i].sampler !=
db->u.stex.texSamplers[
i].sampler)
6182 if (da->u.stex.count !=
db->u.stex.count)
6184 for (
int i = 0;
i < da->u.stex.count; ++
i) {
6185 if (da->u.stex.texSamplers[
i].tex !=
db->u.stex.texSamplers[
i].tex)
6190 if (da->u.stex.texSamplers[0].sampler !=
db->u.stex.texSamplers[0].sampler)
6196 if (da->u.simage.tex !=
db->u.simage.tex
6197 || da->u.simage.level !=
db->u.simage.level)
6205 if (da->u.sbuf.buf !=
db->u.sbuf.buf
6206 || da->u.sbuf.offset !=
db->u.sbuf.offset
6207 || da->u.sbuf.maybeSize !=
db->u.sbuf.maybeSize)
6213 Q_UNREACHABLE_RETURN(
false);
6270#ifndef QT_NO_DEBUG_STREAM
6275 dbg.nospace() <<
"QRhiShaderResourceBinding("
6276 <<
"binding=" <<
d->binding
6277 <<
" stage=" <<
d->stage
6278 <<
" type=" <<
d->type;
6281 dbg.nospace() <<
" UniformBuffer("
6282 <<
"buffer=" <<
d->u.ubuf.buf
6283 <<
" offset=" <<
d->u.ubuf.offset
6284 <<
" maybeSize=" <<
d->u.ubuf.maybeSize
6288 dbg.nospace() <<
" SampledTextures("
6289 <<
"count=" <<
d->u.stex.count;
6290 for (
int i = 0;
i <
d->u.stex.count; ++
i) {
6291 dbg.nospace() <<
" texture=" <<
d->u.stex.texSamplers[
i].tex
6292 <<
" sampler=" <<
d->u.stex.texSamplers[
i].sampler;
6294 dbg.nospace() <<
')';
6297 dbg.nospace() <<
" Textures("
6298 <<
"count=" <<
d->u.stex.count;
6299 for (
int i = 0;
i <
d->u.stex.count; ++
i)
6300 dbg.nospace() <<
" texture=" <<
d->u.stex.texSamplers[
i].tex;
6301 dbg.nospace() <<
')';
6304 dbg.nospace() <<
" Sampler("
6305 <<
" sampler=" <<
d->u.stex.texSamplers[0].sampler
6309 dbg.nospace() <<
" ImageLoad("
6310 <<
"texture=" <<
d->u.simage.tex
6311 <<
" level=" <<
d->u.simage.level
6315 dbg.nospace() <<
" ImageStore("
6316 <<
"texture=" <<
d->u.simage.tex
6317 <<
" level=" <<
d->u.simage.level
6321 dbg.nospace() <<
" ImageLoadStore("
6322 <<
"texture=" <<
d->u.simage.tex
6323 <<
" level=" <<
d->u.simage.level
6327 dbg.nospace() <<
" BufferLoad("
6328 <<
"buffer=" <<
d->u.sbuf.buf
6329 <<
" offset=" <<
d->u.sbuf.offset
6330 <<
" maybeSize=" <<
d->u.sbuf.maybeSize
6334 dbg.nospace() <<
" BufferStore("
6335 <<
"buffer=" <<
d->u.sbuf.buf
6336 <<
" offset=" <<
d->u.sbuf.offset
6337 <<
" maybeSize=" <<
d->u.sbuf.maybeSize
6341 dbg.nospace() <<
" BufferLoadStore("
6342 <<
"buffer=" <<
d->u.sbuf.buf
6343 <<
" offset=" <<
d->u.sbuf.offset
6344 <<
" maybeSize=" <<
d->u.sbuf.maybeSize
6348 dbg.nospace() <<
" UNKNOWN()";
6351 dbg.nospace() <<
')';
6356#ifndef QT_NO_DEBUG_STREAM
6360 dbg.nospace() <<
"QRhiShaderResourceBindings("
7801 info.limits.luminanceInNits.minLuminance = 0.0f;
7802 info.limits.luminanceInNits.maxLuminance = 1000.0f;
7804 info.sdrWhiteLevel = 200.0f;
7808#ifndef QT_NO_DEBUG_STREAM
7812 dbg.nospace() <<
"QRhiSwapChainHdrInfo(";
7813 switch (
info.limitsType) {
7815 dbg.nospace() <<
" minLuminance=" <<
info.limits.luminanceInNits.minLuminance
7816 <<
" maxLuminance=" <<
info.limits.luminanceInNits.maxLuminance;
7819 dbg.nospace() <<
" maxColorComponentValue=" <<
info.limits.colorComponentValue.maxColorComponentValue;
7820 dbg.nospace() <<
" maxPotentialColorComponentValue=" <<
info.limits.colorComponentValue.maxPotentialColorComponentValue;
7823 switch (
info.luminanceBehavior) {
7825 dbg.nospace() <<
" scene-referred, SDR white level=" <<
info.sdrWhiteLevel;
7828 dbg.nospace() <<
" display-referred";
7831 dbg.nospace() <<
')';
7994 switch (
res->resourceType()) {
8002 return "RenderBuffer";
8004 return "RenderPassDescriptor";
8006 return "SwapChainRenderTarget";
8008 return "TextureRenderTarget";
8010 return "ShaderResourceBindings";
8012 return "GraphicsPipeline";
8016 return "ComputePipeline";
8018 return "CommandBuffer";
8021 Q_UNREACHABLE_RETURN(
"");
8033 static bool leakCheck =
true;
8040 qWarning(
"QRhi %p going down with %d unreleased resources that own native graphics objects. This is not nice.",
8041 q,
int(resources.
size()));
8045 const bool ownsNativeResources =
it.value();
8046 if (leakCheck && ownsNativeResources)
8053 res->m_rhi =
nullptr;
8067 QSize *blockDim)
const
8180 *byteSize = wblocks * hblocks *
blockSize;
8182 *blockDim =
QSize(xdim, ydim);
8253 *bytesPerPixel = bpc;
8270 qWarning(
"Cannot build a graphics pipeline without any stages");
8274 bool hasVertexStage =
false;
8276 if (!
it->shader().isValid()) {
8277 qWarning(
"Empty shader passed to graphics pipeline");
8281 hasVertexStage =
true;
8283 if (!hasVertexStage) {
8284 qWarning(
"Cannot build a graphics pipeline without a vertex stage");
8289 qWarning(
"Cannot build a graphics pipeline without a QRhiRenderPassDescriptor");
8294 qWarning(
"Cannot build a graphics pipeline without QRhiShaderResourceBindings");
8304 bool bindingsOk =
true;
8305 const int CHECKED_BINDINGS_COUNT = 64;
8306 bool bindingSeen[CHECKED_BINDINGS_COUNT] = {};
8309 if (binding >= CHECKED_BINDINGS_COUNT)
8312 qWarning(
"Invalid binding number %d", binding);
8318 if (!bindingSeen[binding]) {
8319 bindingSeen[binding] =
true;
8321 qWarning(
"Uniform buffer duplicates an existing binding number %d", binding);
8326 if (!bindingSeen[binding]) {
8327 bindingSeen[binding] =
true;
8329 qWarning(
"Combined image sampler duplicates an existing binding number %d", binding);
8334 if (!bindingSeen[binding]) {
8335 bindingSeen[binding] =
true;
8337 qWarning(
"Texture duplicates an existing binding number %d", binding);
8342 if (!bindingSeen[binding]) {
8343 bindingSeen[binding] =
true;
8345 qWarning(
"Sampler duplicates an existing binding number %d", binding);
8352 if (!bindingSeen[binding]) {
8353 bindingSeen[binding] =
true;
8355 qWarning(
"Image duplicates an existing binding number %d", binding);
8362 if (!bindingSeen[binding]) {
8363 bindingSeen[binding] =
true;
8365 qWarning(
"Buffer duplicates an existing binding number %d", binding);
8389 const int s =
qBound(1, sampleCount, 64);
8403 for (
int i = 0, ie = supported.count();
i != ie; ++
i) {
8405 if (supported[
i] >=
s) {
8412 if (
result == 1 && !supported.isEmpty())
8413 result = supported.last();
8414 qCDebug(QRHI_LOG_INFO,
"Attempted to set unsupported sample count %d, using %d instead",
8439 d->pendingDeleteResources.
clear();
8493 std::unique_ptr<QRhi>
r(
new QRhi);
8500#if QT_CONFIG(vulkan)
8506 qWarning(
"This build of Qt has no Vulkan support");
8515 qWarning(
"This build of Qt has no OpenGL support");
8524 qWarning(
"This platform has no Direct3D 11 support");
8533 qWarning(
"This platform has no Metal support");
8538#ifdef QRHI_D3D12_AVAILABLE
8539 r->d =
new QRhiD3D12(
static_cast<QRhiD3D12InitParams *
>(
params),
8540 static_cast<QRhiD3D12NativeHandles *
>(importDevice));
8543 qWarning(
"Qt was built without Direct3D 12 support. "
8544 "This is likely due to having ancient SDK headers (such as d3d12.h) in the Qt build environment. "
8545 "Rebuild Qt with an SDK supporting D3D12 features introduced in Windows 10 version 1703, "
8546 "or use an MSVC build as those typically are built with more up-to-date SDKs.");
8550 qWarning(
"This platform has no Direct3D 12 support");
8556 r->d->prepareForCreate(
r.get(), impl,
flags);
8586 if (impl ==
Metal) {
8592 ok = rhi !=
nullptr;
8677 Q_UNREACHABLE_RETURN(
"Unknown");
8748#ifndef QT_NO_DEBUG_STREAM
8755 return "Integrated";
8766 Q_UNREACHABLE_RETURN(
nullptr);
8771 dbg.nospace() <<
"QRhiDriverInfo(deviceName=" <<
info.deviceName
8773 <<
" vendorId=0x" <<
info.vendorId
8794 return d->implThread;
8854 d->cleanupCallbacks.
clear();
8856 for (
auto it = d->keyedCleanupCallbacks.
cbegin(),
end = d->keyedCleanupCallbacks.
cend();
it !=
end; ++
it)
8859 d->keyedCleanupCallbacks.
clear();
8995 const int opListSize = d->
bufferOps.size();
8996 if (idx < opListSize)
9015 if (idx < d->bufferOps.size())
9030 if (
buf->size() > 0) {
9032 if (idx < d->bufferOps.size())
9066 if (idx < d->bufferOps.size())
9081 if (desc.cbeginEntries() != desc.cendEntries()) {
9083 if (idx < d->textureOps.size())
9119 if (idx < d->textureOps.size())
9189 if (idx < d->textureOps.size())
9213 if (idx < d->textureOps.size())
9272 if (!(d->resUpdPoolMap &
mask)) {
9273 d->resUpdPoolMap |=
mask;
9276 if (!preferMemoryOverPerformance)
9277 d->lastResUpdIdx =
i;
9283 for (
int i = d->lastResUpdIdx + 1;
i <
poolSize; ++
i) {
9287 for (
int i = 0;
i <= d->lastResUpdIdx; ++
i) {
9296 const int oldSize = d->resUpdPool.
size();
9297 const int newSize = oldSize +
qMin(4,
qMax(0, 64 - oldSize));
9298 d->resUpdPool.
resize(newSize);
9299 for (
int i = oldSize;
i < newSize; ++
i)
9301 u = nextFreeBatch();
9303 qWarning(
"Resource update batch pool exhausted (max is 64)");
9306 if (preferMemoryOverPerformance && u)
9386 if (resourceUpdates)
9444 const QColor &colorClearValue,
9447 BeginPassFlags
flags)
9449 m_rhi->
beginPass(
this, rt, colorClearValue, depthStencilClearValue, resourceUpdates,
flags);
9539 int dynamicOffsetCount,
9604 m_rhi->
setVertexInput(
this, startBinding, bindingCount, bindings, indexBuf, indexOffset, indexFormat);
10002 return (
v + byteAlign - 1) & ~(byteAlign - 1);
10019 const int w =
qMax(1, baseLevelSize.width() >> mipLevel);
10020 const int h =
qMax(1, baseLevelSize.height() >> mipLevel);
10180 if (u->d->poolIndex < 0)
10181 u->d->trimOpLists();
10396#ifndef QT_NO_DEBUG_STREAM
10400 dbg.nospace() <<
"QRhiStats("
10401 <<
"totalPipelineCreationTime=" <<
info.totalPipelineCreationTime
10402 <<
" blockCount=" <<
info.blockCount
10403 <<
" allocCount=" <<
info.allocCount
10404 <<
" usedBytes=" <<
info.usedBytes
10405 <<
" unusedBytes=" <<
info.unusedBytes
10406 <<
" totalUsageBytes=" <<
info.totalUsageBytes
10509 QRhiBuffer::UsageFlags
usage,
10536 const QSize &pixelSize,
10538 QRhiRenderBuffer::Flags
flags,
10563 const QSize &pixelSize,
10565 QRhiTexture::Flags
flags)
10567 if (pixelSize.
height() == 0)
10598 QRhiTexture::Flags
flags)
10638 const QSize &pixelSize,
10640 QRhiTexture::Flags
flags)
10644 if (pixelSize.
height() == 0)
10672 return d->
createSampler(magFilter, minFilter, mipmapMode, addressU, addressV, addressW);
10683 QRhiTextureRenderTarget::Flags
flags)
10748 qWarning(
"Attempted to call beginFrame() within a still active frame; ignored");
10783 qWarning(
"Attempted to call endFrame() without an active frame; ignored");
10790 d->pendingDeleteResources.
clear();
10896 qWarning(
"Attempted to call beginOffscreenFrame() within a still active frame; ignored");
10915 qWarning(
"Attempted to call endOffscreenFrame() without an active frame; ignored");
10920 d->pendingDeleteResources.
clear();
10977 return counter.fetchAndAddRelaxed(1) + 1;
10982 return m_buffers.isEmpty() && m_textures.isEmpty();
10988 m_textures.clear();
11000 auto it = m_buffers.find(
buf);
11001 if (
it != m_buffers.end()) {
11004 qWarning(
"Buffer %p (%s) used with different accesses within the same pass, this is not allowed.",
11008 if (
it->stage != *stage) {
11010 *stage =
it->stage;
11019 b.stateAtPassBegin =
state;
11020 m_buffers.insert(
buf,
b);
11039 auto it = m_textures.find(tex);
11040 if (
it != m_textures.end()) {
11051 qWarning(
"Texture %p (%s) used with different accesses within the same pass, this is not allowed.",
11052 tex,
name.constData());
11055 if (
it->stage != *stage) {
11057 *stage =
it->stage;
11065 t.stateAtPassBegin =
state;
11066 m_textures.insert(tex,
t);
The QColor class provides colors based on RGB, HSV or CMYK values.
const_iterator cbegin() const noexcept
qsizetype size() const noexcept
Returns the number of items in the hash.
const_iterator cend() const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
virtual char * beginFullDynamicBufferUpdateForCurrentFrame()
QRhiResource::Type resourceType() const override
Type
Specifies storage type of buffer resource.
QRhiBuffer(QRhiImplementation *rhi, Type type_, UsageFlags usage_, quint32 size_)
\variable QRhiBuffer::NativeBuffer::objects
virtual void endFullDynamicBufferUpdateForCurrentFrame()
To be called when the entire contents of the buffer data has been updated in the memory block returne...
virtual NativeBuffer nativeBuffer()
QRhiColorAttachment()=default
Constructs an empty color attachment description.
void endPass(QRhiResourceUpdateBatch *resourceUpdates=nullptr)
Records ending the current render pass.
void debugMarkMsg(const QByteArray &msg)
Inserts a debug message msg into the command stream.
void draw(quint32 vertexCount, quint32 instanceCount=1, quint32 firstVertex=0, quint32 firstInstance=0)
Records a non-indexed draw.
void setBlendConstants(const QColor &c)
Records setting the active blend constants to c.
void endExternal()
To be called once the externally added commands are recorded to the command buffer or context.
void setScissor(const QRhiScissor &scissor)
Records setting the active scissor rectangle specified in scissor.
void beginComputePass(QRhiResourceUpdateBatch *resourceUpdates=nullptr, BeginPassFlags flags={})
Records starting a new compute pass.
void drawIndexed(quint32 indexCount, quint32 instanceCount=1, quint32 firstIndex=0, qint32 vertexOffset=0, quint32 firstInstance=0)
Records an indexed draw.
void setStencilRef(quint32 refValue)
Records setting the active stencil reference value to refValue.
const QRhiNativeHandles * nativeHandles()
QRhiCommandBuffer(QRhiImplementation *rhi)
void resourceUpdate(QRhiResourceUpdateBatch *resourceUpdates)
Sometimes committing resource updates is necessary or just more convenient without starting a render ...
void dispatch(int x, int y, int z)
Records dispatching compute work items, with x, y, and z specifying the number of local workgroups in...
void beginPass(QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates=nullptr, BeginPassFlags flags={})
Records starting a new render pass targeting the render target rt.
double lastCompletedGpuTime()
void setShaderResources(QRhiShaderResourceBindings *srb=nullptr, int dynamicOffsetCount=0, const DynamicOffset *dynamicOffsets=nullptr)
Records binding a set of shader resources, such as, uniform buffers or textures, that are made visibl...
QPair< int, quint32 > DynamicOffset
Synonym for QPair<int, quint32>.
void beginExternal()
To be called when the application before the application is about to enqueue commands to the current ...
void debugMarkBegin(const QByteArray &name)
Records a named debug group on the command buffer with the specified name.
void setViewport(const QRhiViewport &viewport)
Records setting the active viewport rectangle specified in viewport.
QRhiResource::Type resourceType() const override
void debugMarkEnd()
Records the end of a debug group.
QPair< QRhiBuffer *, quint32 > VertexInput
Synonym for QPair<QRhiBuffer *, quint32>.
void endComputePass(QRhiResourceUpdateBatch *resourceUpdates=nullptr)
Records ending the current compute pass.
IndexFormat
Specifies the index data type.
void setComputePipeline(QRhiComputePipeline *ps)
Records setting a new compute pipeline ps.
void setVertexInput(int startBinding, int bindingCount, const VertexInput *bindings, QRhiBuffer *indexBuf=nullptr, quint32 indexOffset=0, IndexFormat indexFormat=IndexUInt16)
Records vertex input bindings.
void setGraphicsPipeline(QRhiGraphicsPipeline *ps)
Records setting a new graphics pipeline ps.
QRhiResource::Type resourceType() const override
QRhiComputePipeline(QRhiImplementation *rhi)
\variable QRhiD3D11InitParams::enableDebugLayer
\variable QRhiGles2InitParams::format
const QRhiShaderStage * cendShaderStages() const
QRhiShaderResourceBindings * shaderResourceBindings() const
QRhiRenderPassDescriptor * renderPassDescriptor() const
QRhiGraphicsPipeline(QRhiImplementation *rhi)
\variable QRhiGraphicsPipeline::StencilOpState::failOp
QRhiResource::Type resourceType() const override
const QRhiShaderStage * cbeginShaderStages() const
virtual bool isClipDepthZeroToOne() const =0
bool isStencilSupportingFormat(QRhiTexture::Format format) const
virtual void endExternal(QRhiCommandBuffer *cb)=0
virtual QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags)=0
virtual QRhiComputePipeline * createComputePipeline()=0
virtual QRhiGraphicsPipeline * createGraphicsPipeline()=0
virtual void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags)=0
virtual void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps)=0
void removeCleanupCallback(const void *key)
virtual void releaseCachedResources()=0
int effectiveSampleCount(int sampleCount) const
virtual ~QRhiImplementation()
virtual bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const =0
virtual QRhiDriverInfo driverInfo() const =0
bool isCompressedFormat(QRhiTexture::Format format) const
static const QRhiShaderResourceBinding::Data * shaderResourceBindingData(const QRhiShaderResourceBinding &binding)
void updateLayoutDesc(QRhiShaderResourceBindings *srb)
virtual QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w)=0
virtual QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags)=0
virtual bool isYUpInFramebuffer() const =0
virtual QList< int > supportedSampleCounts() const =0
virtual void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)=0
virtual void debugMarkEnd(QRhiCommandBuffer *cb)=0
virtual QRhi::FrameOpResult finish()=0
virtual QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags)=0
virtual void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)=0
virtual int ubufAlignment() const =0
void compressedFormatInfo(QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
virtual QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags)=0
virtual void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)=0
bool sanityCheckShaderResourceBindings(QRhiShaderResourceBindings *srb)
virtual void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags)=0
virtual void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c)=0
virtual void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name)=0
virtual int resourceLimit(QRhi::ResourceLimit limit) const =0
virtual void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets)=0
virtual void setPipelineCacheData(const QByteArray &data)=0
virtual QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size)=0
void prepareForCreate(QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flags)
virtual bool isDeviceLost() const =0
virtual const QRhiNativeHandles * nativeHandles(QRhiCommandBuffer *cb)=0
virtual void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport)=0
virtual void beginExternal(QRhiCommandBuffer *cb)=0
virtual QMatrix4x4 clipSpaceCorrMatrix() const =0
quint32 byteSizePerVertexForVertexInputFormat(QRhiVertexInputAttribute::Format format) const
virtual void dispatch(QRhiCommandBuffer *cb, int x, int y, int z)=0
virtual bool makeThreadLocalNativeContextCurrent()=0
void addDeleteLater(QRhiResource *res)
virtual void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat)=0
virtual QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags)=0
virtual void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue)=0
bool sanityCheckGraphicsPipeline(QRhiGraphicsPipeline *ps)
virtual void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg)=0
QRhiVertexInputAttribute::Format shaderDescVariableFormatToVertexInputFormat(QShaderDescription::VariableType type) const
virtual double lastCompletedGpuTime(QRhiCommandBuffer *cb)=0
virtual QRhiRenderBuffer * createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)=0
void addCleanupCallback(const QRhi::CleanupCallback &callback)
virtual bool isYUpInNDC() const =0
virtual void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance)=0
virtual QRhiShaderResourceBindings * createShaderResourceBindings()=0
virtual bool isFeatureSupported(QRhi::Feature feature) const =0
virtual void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps)=0
void textureFormatInfo(QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const
virtual void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance)=0
virtual QByteArray pipelineCacheData()=0
virtual QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags)=0
virtual QRhiStats statistics()=0
virtual void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor)=0
virtual QRhiSwapChain * createSwapChain()=0
static TextureStage toPassTrackerTextureStage(QRhiShaderResourceBinding::StageFlags stages)
static BufferStage toPassTrackerBufferStage(QRhiShaderResourceBinding::StageFlags stages)
void registerBuffer(QRhiBuffer *buf, int slot, BufferAccess *access, BufferStage *stage, const UsageState &state)
void registerTexture(QRhiTexture *tex, TextureAccess *access, TextureStage *stage, const UsageState &state)
QRhiReadbackDescription()=default
Constructs an empty texture readback description.
QRhiRenderBuffer(QRhiImplementation *rhi, Type type_, const QSize &pixelSize_, int sampleCount_, Flags flags_, QRhiTexture::Format backingFormatHint_)
QRhiResource::Type resourceType() const override
Type
Specifies the type of the renderbuffer.
virtual bool createFrom(NativeRenderBuffer src)
Similar to create() except that no new native renderbuffer objects are created.
QRhiResource::Type resourceType() const override
virtual const QRhiNativeHandles * nativeHandles()
QRhiRenderPassDescriptor(QRhiImplementation *rhi)
QRhiRenderTarget(QRhiImplementation *rhi)
QVarLengthArray< BufferOp, BUFFER_OPS_STATIC_ALLOC > bufferOps
bool hasOptimalCapacity() const
QVarLengthArray< TextureOp, TEXTURE_OPS_STATIC_ALLOC > textureOps
static const int BUFFER_OPS_STATIC_ALLOC
static QRhiResourceUpdateBatchPrivate * get(QRhiResourceUpdateBatch *b)
void merge(QRhiResourceUpdateBatchPrivate *other)
static const int TEXTURE_OPS_STATIC_ALLOC
~QRhiResourceUpdateBatch()
void merge(QRhiResourceUpdateBatch *other)
Copies all queued operations from the other batch into this one.
void generateMips(QRhiTexture *tex)
Enqueues a mipmap generation operation for the specified texture tex.
void updateDynamicBuffer(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Enqueues updating a region of a QRhiBuffer buf created with the type QRhiBuffer::Dynamic.
void uploadStaticBuffer(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Enqueues updating a region of a QRhiBuffer buf created with the type QRhiBuffer::Immutable or QRhiBuf...
void uploadTexture(QRhiTexture *tex, const QRhiTextureUploadDescription &desc)
Enqueues uploading the image data for one or more mip levels in one or more layers of the texture tex...
void readBackTexture(const QRhiReadbackDescription &rb, QRhiReadbackResult *result)
Enqueues a texture-to-host copy operation as described by rb.
void readBackBuffer(QRhiBuffer *buf, quint32 offset, quint32 size, QRhiReadbackResult *result)
Enqueues reading back a region of the QRhiBuffer buf.
void copyTexture(QRhiTexture *dst, QRhiTexture *src, const QRhiTextureCopyDescription &desc=QRhiTextureCopyDescription())
Enqueues a texture-to-texture copy operation from src into dst as described by desc.
bool hasOptimalCapacity() const
QRhiResource(QRhiImplementation *rhi)
Type
Specifies type of the resource.
virtual ~QRhiResource()
Destructor.
quint64 globalResourceId() const
void setName(const QByteArray &name)
Sets a name for the object.
QRhiImplementation * m_rhi
void deleteLater()
When called without a frame being recorded, this function is equivalent to deleting the object.
Filter
Specifies the minification, magnification, or mipmap filtering.
QRhiResource::Type resourceType() const override
AddressMode
Specifies the addressing mode.
QRhiSampler(QRhiImplementation *rhi, Filter magFilter_, Filter minFilter_, Filter mipmapMode_, AddressMode u_, AddressMode v_, AddressMode w_)
QRhiScissor()=default
Constructs an empty scissor.
static QRhiShaderResourceBinding bufferStore(int binding, StageFlags stage, QRhiBuffer *buf)
static QRhiShaderResourceBinding imageLoadStore(int binding, StageFlags stage, QRhiTexture *tex, int level)
bool operator!=(const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b) noexcept
size_t qHash(const QRhiShaderResourceBinding &b, size_t seed) noexcept
bool isLayoutCompatible(const QRhiShaderResourceBinding &other) const
static QRhiShaderResourceBinding bufferLoad(int binding, StageFlags stage, QRhiBuffer *buf)
static QRhiShaderResourceBinding sampledTexture(int binding, StageFlags stage, QRhiTexture *tex, QRhiSampler *sampler)
static QRhiShaderResourceBinding imageLoad(int binding, StageFlags stage, QRhiTexture *tex, int level)
static QRhiShaderResourceBinding sampler(int binding, StageFlags stage, QRhiSampler *sampler)
static QRhiShaderResourceBinding texture(int binding, StageFlags stage, QRhiTexture *tex)
bool operator==(const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b) noexcept
static QRhiShaderResourceBinding textures(int binding, StageFlags stage, int count, QRhiTexture **tex)
static QRhiShaderResourceBinding bufferLoadStore(int binding, StageFlags stage, QRhiBuffer *buf)
static QRhiShaderResourceBinding imageStore(int binding, StageFlags stage, QRhiTexture *tex, int level)
@ TessellationEvaluationStage
@ TessellationControlStage
static constexpr int LAYOUT_DESC_ENTRIES_PER_BINDING
static QRhiShaderResourceBinding sampledTextures(int binding, StageFlags stage, int count, const TextureAndSampler *texSamplers)
static QRhiShaderResourceBinding uniformBufferWithDynamicOffset(int binding, StageFlags stage, QRhiBuffer *buf, quint32 size)
static QRhiShaderResourceBinding uniformBuffer(int binding, StageFlags stage, QRhiBuffer *buf)
bool isLayoutCompatible(const QRhiShaderResourceBindings *other) const
QVarLengthArray< QRhiShaderResourceBinding, BINDING_PREALLOC > m_bindings
QRhiShaderResourceBindings(QRhiImplementation *rhi)
const QRhiShaderResourceBinding * cbeginBindings() const
static constexpr int BINDING_PREALLOC
QVector< quint32 > m_layoutDesc
const QRhiShaderResourceBinding * cendBindings() const
QRhiResource::Type resourceType() const override
QRhiShaderStage()=default
Constructs a shader stage description for the vertex stage with an empty QShader.
QRhiResource::Type resourceType() const override
QRhiSwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain_)
QRhiResource::Type resourceType() const override
virtual QRhiRenderTarget * currentFrameRenderTarget()=0
QRhiSwapChain(QRhiImplementation *rhi)
StereoTargetBuffer
Selects the backbuffer to use with a stereoscopic swapchain.
virtual QRhiSwapChainHdrInfo hdrInfo()
\variable QRhiSwapChainHdrInfo::limitsType
QRhiTextureRenderTargetDescription()=default
Constructs an empty texture render target description.
QRhiResource::Type resourceType() const override
QRhiTextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc_, Flags flags_)
QRhiTextureSubresourceUploadDescription()=default
Constructs an empty subresource description.
QRhiTextureUploadDescription()=default
Constructs an empty texture upload description.
QRhiTextureUploadEntry()=default
Constructs an empty QRhiTextureUploadEntry targeting layer 0 and level 0.
QRhiTexture(QRhiImplementation *rhi, Format format_, const QSize &pixelSize_, int depth_, int arraySize_, int sampleCount_, Flags flags_)
\variable QRhiTexture::NativeTexture::object
QRhiResource::Type resourceType() const override
Format
Specifies the texture format.
virtual void setNativeLayout(int layout)
With some graphics APIs, such as Vulkan, integrating custom rendering code that uses the graphics API...
virtual bool createFrom(NativeTexture src)
Similar to create(), except that no new native textures are created.
virtual NativeTexture nativeTexture()
QRhiViewport()=default
Constructs a viewport description with an empty rectangle and a depth range of 0.0f - 1....
\variable QRhiVulkanInitParams::inst
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
QRhiBuffer * newBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size)
bool isClipDepthZeroToOne() const
FrameOpResult endOffscreenFrame(EndFrameFlags flags={})
Ends, submits, and waits for the offscreen frame.
bool makeThreadLocalNativeContextCurrent()
With OpenGL this makes the OpenGL context current on the current thread.
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags={}) const
int ubufAligned(int v) const
QRhiStats statistics() const
Gathers and returns statistics about the timings and allocations of graphics resources.
int resourceLimit(ResourceLimit limit) const
QRhiTexture * newTextureArray(QRhiTexture::Format format, int arraySize, const QSize &pixelSize, int sampleCount=1, QRhiTexture::Flags flags={})
QMatrix4x4 clipSpaceCorrMatrix() const
bool isYUpInFramebuffer() const
static QRhiSwapChainProxyData updateSwapChainProxyData(Implementation impl, QWindow *window)
Generates and returns a QRhiSwapChainProxyData struct containing opaque data specific to the backend ...
bool isFeatureSupported(QRhi::Feature feature) const
void runCleanup()
Invokes all registered cleanup functions.
QRhiShaderResourceBindings * newShaderResourceBindings()
QList< int > supportedSampleCounts() const
QRhiRenderBuffer * newRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount=1, QRhiRenderBuffer::Flags flags={}, QRhiTexture::Format backingFormatHint=QRhiTexture::UnknownFormat)
Implementation backend() const
Implementation
Describes which graphics API-specific backend gets used by a QRhi instance.
static int mipLevelsForSize(const QSize &size)
int currentFrameSlot() const
FrameOpResult beginFrame(QRhiSwapChain *swapChain, BeginFrameFlags flags={})
Starts a new frame targeting the next available buffer of swapChain.
QRhi::FrameOpResult finish()
Waits for any work on the graphics queue (where applicable) to complete, then executes all deferred o...
QRhiComputePipeline * newComputePipeline()
QRhiSwapChain * newSwapChain()
FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, BeginFrameFlags flags={})
Starts a new offscreen frame.
QRhiSampler * newSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode addressU, QRhiSampler::AddressMode addressV, QRhiSampler::AddressMode addressW=QRhiSampler::Repeat)
QRhiTextureRenderTarget * newTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags={})
bool isRecordingFrame() const
void removeCleanupCallback(const void *key)
Deregisters the callback with key.
const char * backendName() const
QRhiGraphicsPipeline * newGraphicsPipeline()
static bool probe(Implementation impl, QRhiInitParams *params)
void addCleanupCallback(const CleanupCallback &callback)
Registers a callback that is invoked either when the QRhi is destroyed, or when runCleanup() is calle...
static QRhi * create(Implementation impl, QRhiInitParams *params, Flags flags={}, QRhiNativeHandles *importDevice=nullptr)
QByteArray pipelineCacheData()
FrameOpResult endFrame(QRhiSwapChain *swapChain, EndFrameFlags flags={})
Ends, commits, and presents a frame that was started in the last beginFrame() on swapChain.
ResourceLimit
Describes the resource limit to query.
QRhiTexture * newTexture(QRhiTexture::Format format, const QSize &pixelSize, int sampleCount=1, QRhiTexture::Flags flags={})
void setPipelineCacheData(const QByteArray &data)
Loads data into the pipeline cache, when applicable.
QRhiDriverInfo driverInfo() const
Feature
Flag values to indicate what features are supported by the backend currently in use.
const QRhiNativeHandles * nativeHandles()
QRhiResourceUpdateBatch * nextResourceUpdateBatch()
static QSize sizeForMipLevel(int mipLevel, const QSize &baseLevelSize)
int ubufAlignment() const
FrameOpResult
Describes the result of operations that can have a soft failure.
bool isDeviceLost() const
void releaseCachedResources()
Attempts to release resources in the backend's caches.
std::function< void(QRhi *)> CleanupCallback
VariableType
Represents the type of a variable or block member.
Variant
Describes what kind of shader code an entry contains.
constexpr int height() const noexcept
Returns the height.
static QThread * currentThread()
constexpr size_type size() const noexcept
void resize(qsizetype sz)
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
QHash< int, QWidget * > hash
[35multi]
qDeleteAll(list.begin(), list.end())
QSet< QString >::iterator it
Combined button and popup list for selecting options.
QTextStream & hex(QTextStream &stream)
Calls QTextStream::setIntegerBase(16) on stream and returns stream.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
GLboolean GLboolean GLboolean b
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
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
const void GLsizei GLsizei stride
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLdouble GLdouble GLdouble GLdouble q
GLsizeiptr const void GLenum usage
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
static const char * resourceTypeStr(const QRhiResource *res)
static QRhiPassResourceTracker::BufferStage earlierStage(QRhiPassResourceTracker::BufferStage a, QRhiPassResourceTracker::BufferStage b)
QDebug operator<<(QDebug dbg, const QRhiDepthStencilClearValue &v)
static bool isImageLoadStore(QRhiPassResourceTracker::TextureAccess access)
static const char * deviceTypeStr(QRhiDriverInfo::DeviceType type)
\variable QRhiDriverInfo::deviceName
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
static constexpr size_t poolSize
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
unsigned long long quint64
view viewport() -> scroll(dx, dy, deviceRect)
DeviceType
Specifies the graphics device's type, when the information is available.
\variable QRhiReadbackResult::completed
static void changeToStaticUpload(BufferOp *op, QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
static BufferOp staticUpload(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
static BufferOp read(QRhiBuffer *buf, quint32 offset, quint32 size, QRhiReadbackResult *result)
static BufferOp dynamicUpdate(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
static void changeToDynamicUpdate(BufferOp *op, QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
static TextureOp copy(QRhiTexture *dst, QRhiTexture *src, const QRhiTextureCopyDescription &desc)
static TextureOp upload(QRhiTexture *tex, const QRhiTextureUploadDescription &desc)
static TextureOp genMips(QRhiTexture *tex)
static TextureOp read(const QRhiReadbackDescription &rb, QRhiReadbackResult *result)
QRhiShaderResourceBinding::StageFlags stage
static constexpr int MAX_TEX_SAMPLER_ARRAY_SIZE
QRhiShaderResourceBinding::Type type