Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qrhigles2_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// Qt-Security score:significant reason:default
4
5#ifndef QRHIGLES2_P_H
6#define QRHIGLES2_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "qrhi_p.h"
20#include <rhi/qshaderdescription.h>
21#include <qopengl.h>
22#include <QByteArray>
23#include <QWindow>
24#include <QPointer>
25#include <QtCore/private/qduplicatetracker_p.h>
26#include <optional>
27
28QT_BEGIN_NAMESPACE
29
30class QOpenGLExtensions;
31class QRhiGles2;
32
65
67{
68 QGles2RenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize,
69 int sampleCount, QRhiRenderBuffer::Flags flags,
70 QRhiTexture::Format backingFormatHint);
72 void destroy() override;
73 bool create() override;
74 bool createFrom(NativeRenderBuffer src) override;
75 QRhiTexture::Format backingFormat() const override;
76
78 GLuint stencilRenderbuffer = 0; // when packed depth-stencil not supported
80 bool owns = true;
81 uint generation = 0;
82 friend class QRhiGles2;
83};
84
94
95inline bool operator==(const QGles2SamplerData &a, const QGles2SamplerData &b)
96{
97 return a.glminfilter == b.glminfilter
98 && a.glmagfilter == b.glmagfilter
99 && a.glwraps == b.glwraps
100 && a.glwrapt == b.glwrapt
101 && a.glwrapr == b.glwrapr
102 && a.gltexcomparefunc == b.gltexcomparefunc;
103}
104
105inline bool operator!=(const QGles2SamplerData &a, const QGles2SamplerData &b)
106{
107 return !(a == b);
108}
109
111{
112 QGles2Texture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int depth,
113 int arraySize, int sampleCount, Flags flags);
114 ~QGles2Texture();
115 void destroy() override;
116 bool create() override;
117 bool createFrom(NativeTexture src) override;
118 NativeTexture nativeTexture() override;
119
120 bool prepareCreate(QSize *adjustedSize = nullptr);
121
123 bool owns = true;
130 bool specified = false;
131 bool zeroInitialized = false;
134
145 struct UsageState {
147 };
149
150 uint generation = 0;
151 friend class QRhiGles2;
152};
153
155{
156 QGles2Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
157 AddressMode u, AddressMode v, AddressMode w);
158 ~QGles2Sampler();
159 void destroy() override;
160 bool create() override;
161
163 uint generation = 0;
164 friend class QRhiGles2;
165};
166
168{
169 QGles2RenderPassDescriptor(QRhiImplementation *rhi);
171 void destroy() override;
172 bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
174 QVector<quint32> serializedFormat() const override;
175};
176
193
195{
196 QGles2SwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain);
198 void destroy() override;
199
200 QSize pixelSize() const override;
201 float devicePixelRatio() const override;
202 int sampleCount() const override;
203
205};
206
208{
209 QGles2TextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags);
211 void destroy() override;
212
213 QSize pixelSize() const override;
214 float devicePixelRatio() const override;
215 int sampleCount() const override;
216
218 bool create() override;
219
223 friend class QRhiGles2;
224};
225
227{
228 QGles2ShaderResourceBindings(QRhiImplementation *rhi);
230 void destroy() override;
231 bool create() override;
232 void updateResources(UpdateFlags flags) override;
233
234 bool hasDynamicOffset = false;
235 uint generation = 0;
236 friend class QRhiGles2;
237};
238
240{
247 // Distance in bytes between the array elements, or between the matrix
248 // columns for matrix types. 0 means the std140 default (16). Uniform
249 // blocks are std140, but push constant blocks are std430, where arrays of
250 // scalars and vec2 are tightly packed.
252 int stateIndex; // -1 when not tracked (arrays, matrices, int types)
253};
254
256
264
266
267using QGles2UniformDescriptionVector = QVarLengthArray<QGles2UniformDescription, 8>;
268using QGles2SamplerDescriptionVector = QVarLengthArray<QGles2SamplerDescription, 4>;
269
271{
273 float v[4];
274};
275
277
278using QGles2UniformStateVector = QVarLengthArray<QGles2UniformState, 8>;
279
300
320
322{
323 QGles2CommandBuffer(QRhiImplementation *rhi);
325 void destroy() override;
326
327 struct Command {
368
369 // QRhi*/QGles2* references should be kept at minimum (so no
370 // QRhiTexture/Buffer/etc. pointers).
371 union Args {
372 struct {
374 } beginFrame;
375 struct {
376 GLuint timestampQuery;
377 } endFrame;
378 struct {
379 float x, y, w, h;
380 float d0, d1;
381 } viewport;
382 struct {
383 int x, y, w, h;
384 } scissor;
385 struct {
386 float r, g, b, a;
387 } blendConstants;
388 struct {
391 } stencilRef;
392 struct {
393 QRhiGraphicsPipeline *ps;
397 } bindVertexBuffer;
398 struct {
399 GLuint buffer;
400 quint32 offset;
402 } bindIndexBuffer;
403 struct {
404 QRhiGraphicsPipeline *ps;
409 } draw;
410 struct {
411 QRhiGraphicsPipeline *ps;
414 quint32 instanceCount;
415 quint32 baseInstance;
417 } drawIndexed;
418 struct {
419 QRhiGraphicsPipeline *ps;
420 GLuint buffer;
421 quint32 offset;
424 } drawIndirect;
425 struct {
426 QRhiGraphicsPipeline *ps;
427 GLuint buffer;
428 quint32 offset;
429 quint32 drawCount;
430 quint32 stride;
431 } drawIndexedIndirect;
432 struct {
433 QRhiGraphicsPipeline *ps;
434 GLuint buffer;
435 quint32 offset;
439 quint32 stride;
440 } drawIndirectCount;
441 struct {
442 QRhiGraphicsPipeline *ps;
443 GLuint buffer;
444 quint32 offset;
445 GLuint countBuffer;
446 quint32 countOffset;
447 quint32 maxDrawCount;
448 quint32 stride;
449 } drawIndexedIndirectCount;
450 struct {
451 QRhiGraphicsPipeline *ps;
452 } bindGraphicsPipeline;
453 struct {
459 } bindShaderResources;
460 struct {
461 QRhiGraphicsPipeline *maybeGraphicsPs;
462 QRhiComputePipeline *maybeComputePs;
463 quint32 dataOffset; // into pushConstantPool
465 } setPushConstants;
466 struct {
468 float c[4];
469 float d;
471 } clear;
472 struct {
474 bool srgb;
476 bool stereo;
478 } bindFramebuffer;
479 struct {
481 GLuint buffer;
483 int size;
484 const void *data; // must come from retainData()
485 } bufferSubData;
486 struct {
488 GLenum target;
489 GLuint buffer;
490 int offset;
491 int size;
492 } getBufferSubData;
493 struct {
498 int size;
499 } copyBuf;
500 struct {
505 int srcX;
506 int srcY;
507 int srcZ;
512 int dstX;
513 int dstY;
514 int dstZ;
515 int w;
516 int h;
517 } copyTex;
518 struct {
519 QRhiReadbackResult *result;
521 int x;
522 int y;
523 int w;
524 int h;
527 int level;
529 } readPixels;
530 struct {
531 GLenum target;
532 GLuint texture;
534 int level;
535 int dx;
536 int dy;
537 int dz;
538 int w;
539 int h;
544 const void *data; // must come from retainImage()
545 } subImage;
546 struct {
547 GLenum target;
548 GLuint texture;
549 GLenum faceTarget;
550 int level;
552 int w;
553 int h;
554 int depth;
555 int size;
556 const void *data; // must come from retainData()
557 } compressedImage;
558 struct {
559 GLenum target;
560 GLuint texture;
561 GLenum faceTarget;
562 int level;
563 int dx;
564 int dy;
565 int dz;
566 int w;
567 int h;
568 GLenum glintformat;
569 int size;
570 const void *data; // must come from retainData()
571 } compressedSubImage;
572 struct {
575 int w;
576 int h;
577 GLenum target;
578 GLuint dstTexture;
579 int dstLevel;
583 } blitFromRenderbuffer;
584 struct {
585 GLenum srcTarget;
586 GLuint srcTexture;
587 int srcLevel;
589 int w;
590 int h;
591 GLenum dstTarget;
592 GLuint dstTexture;
593 int dstLevel;
594 int dstLayer;
595 bool isDepthStencil;
596 bool hasStencil;
597 } blitFromTexture;
598 struct {
599 GLenum target;
600 GLuint texture;
601 } genMip;
602 struct {
604 } bindComputePipeline;
605 struct {
609 } dispatch;
610 struct {
611 GLuint buffer;
612 quint32 offset;
613 } dispatchIndirect;
614 struct {
616 } barriersForPass;
617 struct {
619 } barrier;
620 struct {
621 GLuint fbo;
624 } invalidateFramebuffer;
625 } args;
626 };
627
633
637
640 double lastGpuTime = 0;
649
651 bool valid = false;
656 bool blendEnabled[16];
657 struct ColorMask { bool r, g, b, a; } colorMask[16];
685 void reset() { valid = false; }
686 struct {
687 // not part of QRhiGraphicsPipeline but used by setGraphicsPipeline()
689 } dynamic;
690 } graphicsPassState;
691
693 enum Access {
694 Read = 0x01,
695 Write = 0x02
696 };
698 void reset() {
699 writtenResources.clear();
700 }
701 } computePassState;
702
704 void *ps;
707 } textureUnitState[16];
708
711 QVarLengthArray<uint, 32> dynamicOffsetPool; // (binding, offset) pairs
714
715 // relies heavily on implicit sharing (no copies of the actual data will be made)
716 const void *retainData(const QByteArray &data) {
717 dataRetainPool.append(data);
718 return dataRetainPool.last().constData();
719 }
721 bufferDataRetainPool.append(data);
722 return reinterpret_cast<const uchar *>(bufferDataRetainPool.last().constData());
723 }
724 const void *retainImage(const QImage &image) {
725 imageRetainPool.append(image);
726 return imageRetainPool.last().constBits();
727 }
729 commands.reset();
730 pushConstantPool.clear();
731 dynamicOffsetPool.clear();
732 dataRetainPool.clear();
733 bufferDataRetainPool.clear();
734 imageRetainPool.clear();
735
736 passResTrackers.clear();
738 }
739 void resetState() {
742 // do not zero lastGpuTime
743 currentTarget = nullptr;
746 }
748 currentGraphicsPipeline = nullptr;
749 currentComputePipeline = nullptr;
751 currentGraphicsSrb = nullptr;
752 currentComputeSrb = nullptr;
754 pushConstantData.clear();
755 graphicsPassState.reset();
756 computePassState.reset();
757 memset(textureUnitState, 0, sizeof(textureUnitState));
758 }
759};
760
763{
764 return a.func == b.func
765 && a.failOp == b.failOp
766 && a.zfailOp == b.zfailOp
767 && a.zpassOp == b.zpassOp;
768}
769
772{
773 return !(a == b);
774}
775
778{
779 return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
780}
781
784{
785 return !(a == b);
786}
787
790{
791 return a.srcColor == b.srcColor
792 && a.dstColor == b.dstColor
793 && a.srcAlpha == b.srcAlpha
794 && a.dstAlpha == b.dstAlpha
795 && a.opColor == b.opColor
796 && a.opAlpha == b.opAlpha;
797}
798
801{
802 return !(a == b);
803}
804
806{
807 static const int TIMESTAMP_PAIRS = 2;
808
811
812 void prepare(QRhiGles2 *rhiD);
813 void destroy(QRhiGles2 *rhiD);
814 bool tryQueryTimestamps(int pairIndex, QRhiGles2 *rhiD, double *elapsedSec);
815};
816
844
846{
847public:
848 QRhiGles2(QRhiGles2InitParams *params, QRhiGles2NativeHandles *importDevice = nullptr);
849
850 bool create(QRhi::Flags flags) override;
851 void destroy() override;
852
856 QRhiBuffer *createBuffer(QRhiBuffer::Type type,
857 QRhiBuffer::UsageFlags usage,
858 quint32 size) override;
859 QRhiRenderBuffer *createRenderBuffer(QRhiRenderBuffer::Type type,
860 const QSize &pixelSize,
861 int sampleCount,
862 QRhiRenderBuffer::Flags flags,
863 QRhiTexture::Format backingFormatHint) override;
864 QRhiTexture *createTexture(QRhiTexture::Format format,
865 const QSize &pixelSize,
866 int depth,
867 int arraySize,
868 int sampleCount,
869 QRhiTexture::Flags flags) override;
870 QRhiSampler *createSampler(QRhiSampler::Filter magFilter,
871 QRhiSampler::Filter minFilter,
872 QRhiSampler::Filter mipmapMode,
873 QRhiSampler:: AddressMode u,
874 QRhiSampler::AddressMode v,
875 QRhiSampler::AddressMode w) override;
876
877 QRhiTextureRenderTarget *createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc,
878 QRhiTextureRenderTarget::Flags flags) override;
879
880 QRhiShadingRateMap *createShadingRateMap() override;
881
882 QRhiSwapChain *createSwapChain() override;
883 QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override;
884 QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override;
885 QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override;
886 QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override;
887 QRhi::FrameOpResult finish() override;
888
889 void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override;
890
891 void beginPass(QRhiCommandBuffer *cb,
892 QRhiRenderTarget *rt,
893 const QColor &colorClearValue,
894 const QRhiDepthStencilClearValue &depthStencilClearValue,
895 QRhiResourceUpdateBatch *resourceUpdates,
896 QRhiCommandBuffer::BeginPassFlags flags) override;
897 void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override;
898
899 void setGraphicsPipeline(QRhiCommandBuffer *cb,
900 QRhiGraphicsPipeline *ps) override;
901
902 void setShaderResources(QRhiCommandBuffer *cb,
903 QRhiShaderResourceBindings *srb,
904 int dynamicOffsetCount,
905 const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override;
906
907 void setVertexInput(QRhiCommandBuffer *cb,
908 int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings,
909 QRhiBuffer *indexBuf, quint32 indexOffset,
910 QRhiCommandBuffer::IndexFormat indexFormat) override;
911
912 void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override;
913 void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override;
914 void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override;
915 void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override;
916 void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size, const void *data) override;
917 static constexpr quint32 MAX_PUSH_CONSTANTS_SIZE = 128;
918 void setShadingRate(QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override;
919
920 void draw(QRhiCommandBuffer *cb, quint32 vertexCount,
921 quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override;
922
923 void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount,
924 quint32 instanceCount, quint32 firstIndex,
925 qint32 vertexOffset, quint32 firstInstance) override;
926
927 void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer,
928 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override;
929
930 void drawIndexedIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer,
931 quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override;
932
933 void drawIndirectCount(QRhiCommandBuffer *cb,
934 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
935 QRhiBuffer *countBuffer, quint32 countBufferOffset,
936 quint32 maxDrawCount, quint32 stride) override;
937 void drawIndexedIndirectCount(QRhiCommandBuffer *cb,
938 QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset,
939 QRhiBuffer *countBuffer, quint32 countBufferOffset,
940 quint32 maxDrawCount, quint32 stride) override;
941
942 void dispatchIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer,
943 quint32 indirectBufferOffset) override;
944
945 void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override;
946 void debugMarkEnd(QRhiCommandBuffer *cb) override;
947 void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override;
948
949 void beginComputePass(QRhiCommandBuffer *cb,
950 QRhiResourceUpdateBatch *resourceUpdates,
951 QRhiCommandBuffer::BeginPassFlags flags) override;
952 void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override;
953 void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override;
954 void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override;
955
956 const QRhiNativeHandles *nativeHandles(QRhiCommandBuffer *cb) override;
957 void beginExternal(QRhiCommandBuffer *cb) override;
958 void endExternal(QRhiCommandBuffer *cb) override;
959 double lastCompletedGpuTime(QRhiCommandBuffer *cb) override;
960
961 QList<int> supportedSampleCounts() const override;
962 QList<QSize> supportedShadingRates(int sampleCount) const override;
963 int ubufAlignment() const override;
964 bool isYUpInFramebuffer() const override;
965 bool isYUpInNDC() const override;
966 bool isClipDepthZeroToOne() const override;
967 QMatrix4x4 clipSpaceCorrMatrix() const override;
968 bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override;
969 bool isFeatureSupported(QRhi::Feature feature) const override;
970 int resourceLimit(QRhi::ResourceLimit limit) const override;
971 const QRhiNativeHandles *nativeHandles() override;
972 QRhiDriverInfo driverInfo() const override;
973 QRhiStats statistics() override;
975 void setQueueSubmitParams(QRhiNativeHandles *params) override;
977 bool isDeviceLost() const override;
978
979 QByteArray pipelineCacheData() override;
980 void setPipelineCacheData(const QByteArray &data) override;
981
982 bool ensureContext(QSurface *surface = nullptr) const;
988 int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc);
989 void enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates);
991 QGles2Buffer *bufD,
995 QGles2Texture *texD,
999 void executeCommandBuffer(QRhiCommandBuffer *cb);
1002 void *ps, uint psGeneration, int glslLocation,
1003 int *texUnit, bool *activeTexUnitAltered);
1005 QRhiGraphicsPipeline *maybeGraphicsPs, QRhiComputePipeline *maybeComputePs,
1006 QRhiShaderResourceBindings *srb,
1007 const uint *dynOfsPairs, int dynOfsCount);
1008 void setUniformValue(const QGles2UniformDescription &uniform, const void *src,
1009 QGles2UniformState *uniformState);
1010 static void setupUniformStateTracking(QGles2UniformDescriptionVector *uniforms,
1011 QGles2UniformDescriptionVector *pushConstantUniforms,
1012 QGles2UniformStateVector *uniformState);
1013 void setUniformsFromBlock(const QGles2UniformDescriptionVector &uniforms, int binding,
1014 const char *blockData, qint64 blockSize, quint32 blockOffset,
1015 QGles2UniformState *uniformState);
1017 bool *wantsColorClear = nullptr, bool *wantsDsClear = nullptr);
1020 std::optional<QShaderVersion> commonGlslEsVersion(const QRhiShaderStage *stages, int stageCount) const;
1021 QByteArray shaderSource(const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion,
1022 std::optional<QShaderVersion> commonVersion = std::nullopt);
1023 bool compileShader(GLuint program, const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion,
1024 std::optional<QShaderVersion> commonVersion = std::nullopt);
1025 bool linkProgram(GLuint program);
1027 void registerUniformIfActive(const QShaderDescription::BlockVariable &var,
1028 const QByteArray &namePrefix, int binding, int baseOffset,
1029 GLuint program,
1030 ActiveUniformLocationTracker *activeUniformLocations,
1031 QGles2UniformDescriptionVector *dst);
1032 void gatherBlockMemberUniforms(GLuint program, const QByteArray &prefix, int binding,
1033 const QList<QShaderDescription::BlockVariable> &members,
1034 ActiveUniformLocationTracker *activeUniformLocations,
1035 QGles2UniformDescriptionVector *dst);
1036 void gatherUniforms(GLuint program, const QShaderDescription::UniformBlock &ub,
1037 ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst);
1038 void gatherPushConstantUniforms(GLuint program, const QShaderDescription::PushConstantBlock &pcb,
1039 ActiveUniformLocationTracker *activeUniformLocations,
1040 QGles2UniformDescriptionVector *dst);
1041 void gatherSamplers(GLuint program, const QShaderDescription::InOutVariable &v,
1042 QGles2SamplerDescriptionVector *dst);
1043 void gatherGeneratedSamplers(GLuint program,
1044 const QShader::SeparateToCombinedImageSamplerMapping &mapping,
1045 QGles2SamplerDescriptionVector *dst);
1046 void sanityCheckVertexFragmentInterface(const QShaderDescription &vsDesc, const QShaderDescription &fsDesc);
1048
1054 ProgramCacheResult tryLoadFromDiskOrPipelineCache(const QRhiShaderStage *stages,
1055 int stageCount,
1056 GLuint program,
1057 const QVector<QShaderDescription::InOutVariable> &inputVars,
1058 QByteArray *cacheKey,
1059 std::optional<QShaderVersion> commonVersion = std::nullopt);
1060 void trySaveToDiskCache(GLuint program, const QByteArray &cacheKey);
1061 void trySaveToPipelineCache(GLuint program, const QByteArray &cacheKey, bool force = false);
1062
1065 bool importedContext = false;
1070 mutable bool needsMakeCurrentDueToSwap = false;
1071 QOpenGLExtensions *f = nullptr;
1074 const void *) = nullptr;
1077 const GLvoid *) = nullptr;
1079 GLsizei) = nullptr;
1081 const GLvoid *) = nullptr;
1083 GLsizei, const GLvoid *) = nullptr;
1085 GLint) = nullptr;
1087 GLint, GLsizei) = nullptr;
1090 void (QOPENGLF_APIENTRYP glObjectLabel)(GLenum, GLuint, GLsizei, const GLchar *) = nullptr;
1098 // Resolved when caps.baseInstance is true, left null otherwise.
1102 uint vao = 0;
1103 struct Caps {
1105 : ctxMajor(2),
1106 ctxMinor(0),
1107 maxTextureSize(2048),
1108 maxDrawBuffers(4),
1109 maxSamples(16),
1116 maxUniformVectors(4096),
1117 maxVertexInputs(8),
1121 msaaRenderBuffer(false),
1122 multisampledTexture(false),
1123 npotTextureFull(true),
1124 gles(false),
1126 bgraExternalFormat(false),
1127 bgraInternalFormat(false),
1128 r8Format(false),
1129 r16Format(false),
1130 r32uiFormat(false),
1131 floatFormats(false),
1132 rgb10Formats(false),
1133 depthTexture(false),
1134 packedDepthStencil(false),
1136 srgbTextureFormat(false),
1137 srgbGenerateMipmap(false),
1139 srgbWriteControl(false),
1140 coreProfile(false),
1141 vertexArrayObject(false),
1142 uniformBuffers(false),
1143 elementIndexUint(false),
1144 depth24(false),
1145 rgba8Format(false),
1146 instancing(false),
1147 baseVertex(false),
1148 baseInstance(false),
1149 compute(false),
1150 textureCompareMode(false),
1151 depthClamp(false),
1152 properMapBuffer(false),
1154 texelFetch(false),
1155 intAttributes(true),
1157 programBinary(false),
1158 texture3D(false),
1159 tessellation(false),
1160 geometryShader(false),
1161 texture1D(false),
1162 hasDrawBuffersFunc(false),
1163 halfAttributes(false),
1164 multiView(false),
1165 timestamps(false),
1166 objectLabel(false),
1169 unpackRowLength(false),
1171 dispatchIndirect(false),
1172 drawIndirectCount(false),
1173 copyBuffer(false)
1174 { }
1191 // Multisample fb and blit are supported (GLES 3.0 or OpenGL 3.x). Not
1192 // the same as multisample textures!
1196 uint gles : 1;
1200 uint r8Format : 1;
1201 uint r16Format : 1;
1202 uint r32uiFormat : 1;
1212 uint coreProfile : 1;
1216 uint depth24 : 1;
1217 uint rgba8Format : 1;
1218 uint instancing : 1;
1219 uint baseVertex : 1;
1221 uint compute : 1;
1223 uint depthClamp : 1;
1226 uint texelFetch : 1;
1230 uint texture3D : 1;
1233 uint texture1D : 1;
1236 uint multiView : 1;
1237 uint timestamps : 1;
1238 uint objectLabel : 1;
1250 uint copyBuffer : 1;
1251 } caps;
1257 mutable bool contextLost = false;
1258 uint frameNo = 0;
1259
1269 union {
1270 struct {
1272 } buffer;
1273 struct {
1275 } pipeline;
1276 struct {
1278 } texture;
1279 struct {
1282 } renderbuffer;
1283 struct {
1286 } textureRenderTarget;
1287 };
1288 };
1290
1292 OffscreenFrame(QRhiImplementation *rhi) : cbWrapper(rhi) { }
1293 bool active = false;
1296 } ofr;
1297
1298 // Keyed by version too: it depends on the other stages of the program.
1300
1306
1326};
1327
1329
1330QT_END_NAMESPACE
1331
1332#endif
friend bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
Returns true if lhs and rhs are equal, otherwise returns false.
Definition qbytearray.h:842
friend bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
Returns true if lhs and rhs are different, otherwise returns false.
Definition qbytearray.h:853
QRhiBackendCommandList()=default
T * cend() const
Definition qrhi_p.h:853
T * cbegin() const
Definition qrhi_p.h:852
bool isEmpty() const
Definition qrhi_p.h:838
void execute(QRhiCommandBuffer *cb, quint32 firstCommand, quint32 commandCount)
Definition qrhi.cpp:9337
QRhiBufferBackedIndirectCommandBuffer(QRhiImplementation *rhi, Type type, quint32 maxCommandCount)
\variable QRhiIndirectCommandBufferBuildInfo::topology
Definition qrhi.cpp:9247
void enqueueUpload(QRhiResourceUpdateBatch *u)
Definition qrhi.cpp:9301
QRhiIndirectCommandBufferBuildInfo buildInfo
Definition qrhi_p.h:332
void build(const QRhiIndirectCommandBufferBuildInfo &info)
Definition qrhi.cpp:9324
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
Definition qrhi.cpp:9259
bool create() override
Creates the corresponding native objects.
Definition qrhi.cpp:9282
void assign(QByteArray data)
Definition qrhi_p.h:455
QRhiBufferData()=default
void assign(const char *s, quint32 size)
Definition qrhi_p.h:436
quint32 size() const
Definition qrhi_p.h:428
QRhiBufferData(const QRhiBufferData &other)
Definition qrhi_p.h:407
quint32 largeAlloc() const
Definition qrhi_p.h:432
QRhiBufferData & operator=(const QRhiBufferData &other)
Definition qrhi_p.h:413
const char * constData() const
Definition qrhi_p.h:424
const GLvoid const GLvoid GLenum
QRhiStats statistics() override
bool contextLost
void(QOPENGLF_APIENTRYP glGetQueryObjectui64v)(GLuint
const QRhiNativeHandles * nativeHandles(QRhiCommandBuffer *cb) override
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
QOpenGLContext * maybeShareContext
void gatherUniforms(GLuint program, const QShaderDescription::UniformBlock &ub, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void trackedBufferBarrier(QGles2CommandBuffer *cbD, QGles2Buffer *bufD, QGles2Buffer::Access access)
void gatherBlockMemberUniforms(GLuint program, const QByteArray &prefix, int binding, const QList< QShaderDescription::BlockVariable > &members, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
const GLvoid GLenum
std::optional< QShaderVersion > commonGlslEsVersion(const QRhiShaderStage *stages, int stageCount) const
void enqueueBarriersForPass(QGles2CommandBuffer *cbD)
QList< DeferredReleaseEntry > releaseQueue
void drawIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
int resourceLimit(QRhi::ResourceLimit limit) const override
void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void(QOPENGLF_APIENTRYP glRenderbufferStorageMultisampleEXT)(GLenum
bool isFeatureSupported(QRhi::Feature feature) const override
static void setupUniformStateTracking(QGles2UniformDescriptionVector *uniforms, QGles2UniformDescriptionVector *pushConstantUniforms, QGles2UniformStateVector *uniformState)
quint64 GLuint
QRhiGraphicsPipeline * createGraphicsPipeline() override
void bindShaderResources(QGles2CommandBuffer *cbD, QRhiGraphicsPipeline *maybeGraphicsPs, QRhiComputePipeline *maybeComputePs, QRhiShaderResourceBindings *srb, const uint *dynOfsPairs, int dynOfsCount)
bool create(QRhi::Flags flags) override
void trackedRegisterTexture(QRhiPassResourceTracker *passResTracker, QGles2Texture *texD, QRhiPassResourceTracker::TextureAccess access, QRhiPassResourceTracker::TextureStage stage)
void executeBindGraphicsPipeline(QGles2CommandBuffer *cbD, QGles2GraphicsPipeline *psD)
void dispatchIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
QRhiDriverInfo driverInfo() const override
QSurfaceFormat requestedFormat
QHash< QByteArray, PipelineCacheData > m_pipelineCache
bool isProgramBinaryDiskCacheEnabled() const
void(QOPENGLF_APIENTRYP glFramebufferTextureMultisampleMultiviewOVR)(GLenum
bool needsMakeCurrentDueToSwap
QRhiShadingRateMap * createShadingRateMap() override
void setUniformsFromBlock(const QGles2UniformDescriptionVector &uniforms, int binding, const char *blockData, qint64 blockSize, quint32 blockOffset, QGles2UniformState *uniformState)
void trackedImageBarrier(QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Texture::Access access)
QOpenGLExtensions * f
void trackedRegisterBuffer(QRhiPassResourceTracker *passResTracker, QGles2Buffer *bufD, QRhiPassResourceTracker::BufferAccess access, QRhiPassResourceTracker::BufferStage stage)
void setShadingRate(QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
void gatherPushConstantUniforms(GLuint program, const QShaderDescription::PushConstantBlock &pcb, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
QRhiComputePipeline * createComputePipeline() override
QRhiDriverInfo driverInfoStruct
QSurface * evaluateFallbackSurface() const
void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void sanityCheckVertexFragmentInterface(const QShaderDescription &vsDesc, const QShaderDescription &fsDesc)
QRhiGles2NativeHandles nativeHandlesStruct
QMatrix4x4 clipSpaceCorrMatrix() const override
QRhi::FrameOpResult finish() override
void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void(QOPENGLF_APIENTRYP glMultiDrawArraysIndirect)(GLenum
QList< int > supportedSampleCounts() const override
void gatherSamplers(GLuint program, const QShaderDescription::InOutVariable &v, QGles2SamplerDescriptionVector *dst)
QSet< GLint > supportedCompressedFormats
void(QOPENGLF_APIENTRYP glMultiDrawElementsIndirectCount)(GLenum
static constexpr quint32 MAX_PUSH_CONSTANTS_SIZE
QRhiSwapChain * createSwapChain() override
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
void destroy() override
QRhiRenderBuffer * createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
void executeCommandBuffer(QRhiCommandBuffer *cb)
void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
QList< QShaderVersion > glslVersionsToTry() const
QSurface * fallbackSurface
QRhiGles2(QRhiGles2InitParams *params, QRhiGles2NativeHandles *importDevice=nullptr)
QRhi::Flags rhiFlags
void trySaveToDiskCache(GLuint program, const QByteArray &cacheKey)
GLbitfield barriersForNextDispatch(QGles2CommandBuffer *cbD)
QList< QSize > supportedShadingRates(int sampleCount) const override
void drawIndexedIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
void(QOPENGLF_APIENTRYP glTexSubImage1D)(GLenum
const void GLuint
QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
void bindCombinedSampler(QGles2CommandBuffer *cbD, QGles2Texture *texD, QGles2Sampler *samplerD, void *ps, uint psGeneration, int glslLocation, int *texUnit, bool *activeTexUnitAltered)
void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QByteArray shaderSource(const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
void(QOPENGLF_APIENTRYP glMultiDrawElementsIndirect)(GLenum
QOpenGLContext * ctx
QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
QGles2SwapChain * currentSwapChain
bool isDeviceLost() const override
QRhiShaderResourceBindings * createShaderResourceBindings() override
void drawIndexedIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
bool isYUpInNDC() const override
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
void enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates)
void setQueueSubmitParams(QRhiNativeHandles *params) override
bool makeThreadLocalNativeContextCurrent() override
int ubufAlignment() const override
void beginExternal(QRhiCommandBuffer *cb) override
const GLvoid GLint
void endExternal(QRhiCommandBuffer *cb) override
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override
ProgramCacheResult tryLoadFromDiskOrPipelineCache(const QRhiShaderStage *stages, int stageCount, GLuint program, const QVector< QShaderDescription::InOutVariable > &inputVars, QByteArray *cacheKey, std::optional< QShaderVersion > commonVersion=std::nullopt)
QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
void(QOPENGLF_APIENTRYP glCompressedTexImage1D)(GLenum
const void GLintptr
bool importedContext
void(QOPENGLF_APIENTRYP glDrawElementsInstancedBaseVertexBaseInstance)(GLenum
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void setUniformValue(const QGles2UniformDescription &uniform, const void *src, QGles2UniformState *uniformState)
void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override
bool ensureContext(QSurface *surface=nullptr) const
void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void(QOPENGLF_APIENTRYP glQueryCounter)(GLuint
QHash< std::pair< QRhiShaderStage, QShaderVersion >, uint > m_shaderCache
void(QOPENGLF_APIENTRYP glDrawArraysInstancedBaseInstance)(GLenum
void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
bool isYUpInFramebuffer() const override
bool linkProgram(GLuint program)
void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override
QGles2RenderTargetData * enqueueBindFramebuffer(QRhiRenderTarget *rt, QGles2CommandBuffer *cbD, bool *wantsColorClear=nullptr, bool *wantsDsClear=nullptr)
void debugMarkEnd(QRhiCommandBuffer *cb) override
void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override
void registerUniformIfActive(const QShaderDescription::BlockVariable &var, const QByteArray &namePrefix, int binding, int baseOffset, GLuint program, ActiveUniformLocationTracker *activeUniformLocations, QGles2UniformDescriptionVector *dst)
void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
void releaseCachedResources() override
bool isClipDepthZeroToOne() const override
void trySaveToPipelineCache(GLuint program, const QByteArray &cacheKey, bool force=false)
bool compileShader(GLuint program, const QRhiShaderStage &shaderStage, QShaderVersion *shaderVersion, std::optional< QShaderVersion > commonVersion=std::nullopt)
void executeDeferredReleases()
QByteArray pipelineCacheData() override
double lastCompletedGpuTime(QRhiCommandBuffer *cb) override
QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
QList< int > supportedSampleCountList
QPointer< QWindow > maybeWindow
void enqueueSubresUpload(QGles2Texture *texD, QGles2CommandBuffer *cbD, int layer, int level, const QRhiTextureSubresourceUploadDescription &subresDesc)
void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size, const void *data) override
QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
void setPipelineCacheData(const QByteArray &data) override
QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override
void gatherGeneratedSamplers(GLuint program, const QShader::SeparateToCombinedImageSamplerMapping &mapping, QGles2SamplerDescriptionVector *dst)
const QRhiNativeHandles * nativeHandles() override
void setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
Definition qrhinull.cpp:264
double lastCompletedGpuTime(QRhiCommandBuffer *cb) override
Definition qrhinull.cpp:449
QRhi::FrameOpResult endOffscreenFrame(QRhi::EndFrameFlags flags) override
Definition qrhinull.cpp:478
void setPushConstants(QRhiCommandBuffer *cb, quint32 offset, quint32 size, const void *data) override
Definition qrhinull.cpp:311
void dispatchIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
Definition qrhinull.cpp:425
bool isFeatureSupported(QRhi::Feature feature) const override
Definition qrhinull.cpp:114
QRhiNull(QRhiNullInitParams *params)
Definition qrhinull.cpp:45
void debugMarkMsg(QRhiCommandBuffer *cb, const QByteArray &msg) override
Definition qrhinull.cpp:405
void dispatch(QRhiCommandBuffer *cb, int x, int y, int z) override
Definition qrhinull.cpp:417
QRhi::FrameOpResult beginFrame(QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
Definition qrhinull.cpp:455
void resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
Definition qrhinull.cpp:564
void drawIndexed(QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
Definition qrhinull.cpp:335
void beginComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
Definition qrhinull.cpp:664
void beginPass(QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
Definition qrhinull.cpp:637
void setQueueSubmitParams(QRhiNativeHandles *params) override
Definition qrhinull.cpp:186
bool isClipDepthZeroToOne() const override
Definition qrhinull.cpp:97
void endComputePass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
Definition qrhinull.cpp:673
QNullCommandBuffer offscreenCommandBuffer
Definition qrhinull_p.h:313
void endPass(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
Definition qrhinull.cpp:658
QRhi::FrameOpResult endFrame(QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
Definition qrhinull.cpp:462
QRhi::FrameOpResult beginOffscreenFrame(QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
Definition qrhinull.cpp:471
bool isYUpInNDC() const override
Definition qrhinull.cpp:92
QRhiDriverInfo driverInfo() const override
Definition qrhinull.cpp:168
void setScissor(QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
Definition qrhinull.cpp:293
void simulateTextureUpload(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
Definition qrhinull.cpp:489
QRhiComputePipeline * createComputePipeline() override
Definition qrhinull.cpp:248
void setPipelineCacheData(const QByteArray &data) override
Definition qrhinull.cpp:206
void setVertexInput(QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
Definition qrhinull.cpp:274
void debugMarkBegin(QRhiCommandBuffer *cb, const QByteArray &name) override
Definition qrhinull.cpp:394
void draw(QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
Definition qrhinull.cpp:325
QByteArray pipelineCacheData() override
Definition qrhinull.cpp:201
void drawIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
Definition qrhinull.cpp:366
void drawIndexedIndirectCount(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCount, quint32 stride) override
Definition qrhinull.cpp:380
void destroy() override
Definition qrhinull.cpp:57
const QRhiNativeHandles * nativeHandles() override
Definition qrhinull.cpp:163
void setGraphicsPipeline(QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
Definition qrhinull.cpp:258
void releaseCachedResources() override
Definition qrhinull.cpp:191
void simulateTextureCopy(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
Definition qrhinull.cpp:540
QRhiTexture * createTexture(QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
Definition qrhinull.cpp:218
QList< QSize > supportedShadingRates(int sampleCount) const override
Definition qrhinull.cpp:66
void simulateTextureGenMips(const QRhiResourceUpdateBatchPrivate::TextureOp &u)
Definition qrhinull.cpp:555
void setShadingRate(QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
Definition qrhinull.cpp:319
QRhiRenderBuffer * createRenderBuffer(QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
Definition qrhinull.cpp:211
bool makeThreadLocalNativeContextCurrent() override
Definition qrhinull.cpp:180
void drawIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
Definition qrhinull.cpp:346
const QRhiNativeHandles * nativeHandles(QRhiCommandBuffer *cb) override
Definition qrhinull.cpp:433
QRhiNullNativeHandles nativeHandlesStruct
Definition qrhinull_p.h:311
bool isYUpInFramebuffer() const override
Definition qrhinull.cpp:87
QRhi::FrameOpResult finish() override
Definition qrhinull.cpp:484
void setComputePipeline(QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
Definition qrhinull.cpp:411
QRhiBuffer * createBuffer(QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
Definition qrhinull.cpp:77
QRhiStats statistics() override
Definition qrhinull.cpp:175
QRhiShadingRateMap * createShadingRateMap() override
Definition qrhinull.cpp:238
void beginExternal(QRhiCommandBuffer *cb) override
Definition qrhinull.cpp:439
QRhiSwapChain * createSwapChain() override
Definition qrhinull.cpp:72
void setViewport(QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
Definition qrhinull.cpp:287
QRhiTextureRenderTarget * createTextureRenderTarget(const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
Definition qrhinull.cpp:232
QRhiGraphicsPipeline * createGraphicsPipeline() override
Definition qrhinull.cpp:243
bool create(QRhi::Flags flags) override
Definition qrhinull.cpp:51
void setStencilRef(QRhiCommandBuffer *cb, quint32 refValue) override
Definition qrhinull.cpp:305
void debugMarkEnd(QRhiCommandBuffer *cb) override
Definition qrhinull.cpp:400
QList< int > supportedSampleCounts() const override
Definition qrhinull.cpp:61
QMatrix4x4 clipSpaceCorrMatrix() const override
Definition qrhinull.cpp:102
QRhiSampler * createSampler(QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
Definition qrhinull.cpp:225
void drawIndexedIndirect(QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
Definition qrhinull.cpp:356
QRhiSwapChain * currentSwapChain
Definition qrhinull_p.h:312
int ubufAlignment() const override
Definition qrhinull.cpp:82
bool isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture::Flags flags) const override
Definition qrhinull.cpp:107
int resourceLimit(QRhi::ResourceLimit limit) const override
Definition qrhinull.cpp:120
QRhiShaderResourceBindings * createShaderResourceBindings() override
Definition qrhinull.cpp:253
void setBlendConstants(QRhiCommandBuffer *cb, const QColor &c) override
Definition qrhinull.cpp:299
void endExternal(QRhiCommandBuffer *cb) override
Definition qrhinull.cpp:444
bool isDeviceLost() const override
Definition qrhinull.cpp:196
static TextureStage toPassTrackerTextureStage(QRhiShaderResourceBinding::StageFlags stages)
Definition qrhi.cpp:13648
const QVarLengthFlatMap< QRhiBuffer *, Buffer, 12 > & buffers() const
Definition qrhi_p.h:810
static BufferStage toPassTrackerBufferStage(QRhiShaderResourceBinding::StageFlags stages)
Definition qrhi.cpp:13629
const QVarLengthFlatMap< QRhiTexture *, Texture, 12 > & textures() const
Definition qrhi_p.h:818
bool isEmpty() const
Definition qrhi.cpp:13538
void registerBuffer(QRhiBuffer *buf, int slot, BufferAccess *access, BufferStage *stage, const UsageState &state)
Definition qrhi.cpp:13555
void registerTexture(QRhiTexture *tex, TextureAccess *access, TextureStage *stage, const UsageState &state)
Definition qrhi.cpp:13595
QRhiPipelineCacheDataReader(const char *data, quint32 size)
Definition qrhi_p.h:951
bool readByteArray(QByteArray *dst)
Definition qrhi_p.h:966
bool readUInt32(quint32 *dst)
Definition qrhi_p.h:956
QVarLengthArray< BufferOp, BUFFER_OPS_STATIC_ALLOC > bufferOps
Definition qrhi_p.h:650
QRhiImplementation * rhi
Definition qrhi_p.h:657
QVarLengthArray< TextureOp, TEXTURE_OPS_STATIC_ALLOC > textureOps
Definition qrhi_p.h:654
static const int BUFFER_OPS_STATIC_ALLOC
Definition qrhi_p.h:649
static QRhiResourceUpdateBatchPrivate * get(QRhiResourceUpdateBatch *b)
Definition qrhi_p.h:665
void merge(QRhiResourceUpdateBatchPrivate *other)
Definition qrhi.cpp:11316
QRhiResourceUpdateBatch * q
Definition qrhi_p.h:656
static const int TEXTURE_OPS_STATIC_ALLOC
Definition qrhi_p.h:653
Combined button and popup list for selecting options.
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
#define QOPENGLF_APIENTRYP
Definition qopengl.h:275
static const char * resourceTypeStr(const QRhiResource *res)
Definition qrhi.cpp:9498
static QRhiPassResourceTracker::BufferStage earlierStage(QRhiPassResourceTracker::BufferStage a, QRhiPassResourceTracker::BufferStage b)
Definition qrhi.cpp:13549
QDebug operator<<(QDebug dbg, const QRhiSwapChainHdrInfo &info)
Definition qrhi.cpp:8550
static bool isImageLoadStore(QRhiPassResourceTracker::TextureAccess access)
Definition qrhi.cpp:13588
static const char * deviceTypeStr(QRhiDriverInfo::DeviceType type)
\variable QRhiDriverInfo::deviceName
Definition qrhi.cpp:10481
static QRhiPassResourceTracker::TextureStage earlierStage(QRhiPassResourceTracker::TextureStage a, QRhiPassResourceTracker::TextureStage b)
Definition qrhi.cpp:13582
QRhiTargetRectBoundMode
Definition qrhi_p.h:336
@ UnBounded
Definition qrhi_p.h:337
@ Bounded
Definition qrhi_p.h:338
Q_DECLARE_TYPEINFO(QRhiPassResourceTracker::Texture, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QRhiBufferData, Q_RELOCATABLE_TYPE)
T * qrhi_objectFromProxyData(QRhiSwapChainProxyData *pd, QWindow *window, QRhi::Implementation impl, uint objectIndex)
Definition qrhi_p.h:940
bool operator!=(const QRhiRenderTargetAttachmentTracker::ResId &a, const QRhiRenderTargetAttachmentTracker::ResId &b)
Definition qrhi_p.h:880
Q_DECLARE_TYPEINFO(QRhiPassResourceTracker::Buffer, Q_RELOCATABLE_TYPE)
#define QRHI_RES(t, x)
Definition qrhi_p.h:30
bool operator==(const QRhiRenderTargetAttachmentTracker::ResId &a, const QRhiRenderTargetAttachmentTracker::ResId &b)
Definition qrhi_p.h:875
bool qrhi_toTopLeftRenderTargetRect(const QSize &outputSize, const std::array< T, N > &r, T *x, T *y, T *w, T *h)
Definition qrhi_p.h:342
bool operator!=(const QGles2CommandBuffer::GraphicsPassState::Blend &a, const QGles2CommandBuffer::GraphicsPassState::Blend &b)
bool operator!=(const QGles2SamplerData &a, const QGles2SamplerData &b)
bool operator==(const QGles2CommandBuffer::GraphicsPassState::StencilFace &a, const QGles2CommandBuffer::GraphicsPassState::StencilFace &b)
bool operator==(const QGles2CommandBuffer::GraphicsPassState::Blend &a, const QGles2CommandBuffer::GraphicsPassState::Blend &b)
Q_DECLARE_TYPEINFO(QRhiGles2::DeferredReleaseEntry, Q_RELOCATABLE_TYPE)
bool operator!=(const QGles2CommandBuffer::GraphicsPassState::ColorMask &a, const QGles2CommandBuffer::GraphicsPassState::ColorMask &b)
bool operator==(const QGles2CommandBuffer::GraphicsPassState::ColorMask &a, const QGles2CommandBuffer::GraphicsPassState::ColorMask &b)
Q_DECLARE_TYPEINFO(QGles2SamplerDescription, Q_RELOCATABLE_TYPE)
bool operator==(const QGles2SamplerData &a, const QGles2SamplerData &b)
Definition qrhigles2_p.h:95
bool operator!=(const QGles2CommandBuffer::GraphicsPassState::StencilFace &a, const QGles2CommandBuffer::GraphicsPassState::StencilFace &b)
Q_DECLARE_TYPEINFO(QGles2UniformState, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO(QGles2UniformDescription, Q_RELOCATABLE_TYPE)
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept
Definition qsize.h:192
QGles2Buffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size)
@ AccessStorageReadWrite
Definition qrhigles2_p.h:55
QByteArray data
Definition qrhigles2_p.h:47
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
char * beginFullDynamicBufferUpdateForCurrentFrame() override
void endFullDynamicBufferUpdateForCurrentFrame() override
To be called when the entire contents of the buffer data has been updated in the memory block returne...
QRhiBuffer::NativeBuffer nativeBuffer() override
bool create() override
Creates the corresponding native graphics resources.
GLenum targetForDataOps
Definition qrhigles2_p.h:46
quint32 nonZeroSize
Definition qrhigles2_p.h:44
void fullDynamicBufferUpdateForCurrentFrame(const void *data, quint32 size) override
UsageState usageState
Definition qrhigles2_p.h:62
GLuint buffer
Definition qrhigles2_p.h:45
QVarLengthArray< QImage, 4 > imageRetainPool
QRhiShaderResourceBindings * currentGraphicsSrb
QVarLengthArray< QRhiBufferData, 4 > bufferDataRetainPool
QRhiBackendCommandList< Command > commands
QRhiComputePipeline * currentComputePipeline
QRhiRenderTarget * currentTarget
QRhiShaderResourceBindings * currentComputeSrb
QVarLengthArray< QRhiPassResourceTracker, 8 > passResTrackers
QVarLengthArray< char, 128 > pushConstantData
QGles2CommandBuffer(QRhiImplementation *rhi)
const void * retainImage(const QImage &image)
const void * retainData(const QByteArray &data)
QVarLengthArray< char, 1024 > pushConstantPool
QVarLengthArray< uint, 32 > dynamicOffsetPool
const uchar * retainBufferData(const QRhiBufferData &data)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QRhiGraphicsPipeline * currentGraphicsPipeline
QVarLengthArray< QByteArray, 4 > dataRetainPool
QGles2UniformDescriptionVector pushConstantUniforms
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2UniformDescriptionVector uniforms
QRhiShaderResourceBindings * currentSrb
QGles2UniformStateVector uniformState
QGles2ComputePipeline(QRhiImplementation *rhi)
QGles2SamplerDescriptionVector samplers
bool create() override
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2SamplerDescriptionVector samplers
bool create() override
Creates the corresponding native graphics resources.
QGles2GraphicsPipeline(QRhiImplementation *rhi)
QGles2UniformDescriptionVector pushConstantUniforms
QGles2UniformStateVector uniformState
QRhiShaderResourceBindings * currentSrb
QGles2UniformDescriptionVector uniforms
bool create() override
Creates the corresponding native graphics resources.
QGles2RenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)
bool createFrom(NativeRenderBuffer src) override
Similar to create() except that no new native renderbuffer objects are created.
QRhiTexture::Format backingFormat() const override
GLuint stencilRenderbuffer
Definition qrhigles2_p.h:78
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.
QVector< quint32 > serializedFormat() const override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const override
bool isCompatible(const QRhiRenderPassDescriptor *other) const override
QGles2RenderPassDescriptor(QRhiImplementation *rhi)
QGles2RenderTargetData(QRhiImplementation *)
std::optional< QRhiSwapChain::StereoTargetBuffer > stereoTarget
QGles2RenderPassDescriptor * rp
QRhiRenderTargetAttachmentTracker::ResIdList currentResIdList
GLenum gltexcomparefunc
Definition qrhigles2_p.h:92
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
bool create() override
QGles2SamplerData d
QGles2Sampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void updateResources(UpdateFlags flags) override
bool create() override
Creates the corresponding resource binding set.
QGles2ShaderResourceBindings(QRhiImplementation *rhi)
float devicePixelRatio() const override
QGles2SwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain)
QSize pixelSize() const override
int sampleCount() const override
QGles2RenderTargetData d
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
void prepare(QRhiGles2 *rhiD)
bool active[TIMESTAMP_PAIRS]
bool tryQueryTimestamps(int pairIndex, QRhiGles2 *rhiD, double *elapsedSec)
static const int TIMESTAMP_PAIRS
GLuint query[TIMESTAMP_PAIRS *2]
void destroy(QRhiGles2 *rhiD)
void initSwapChainRenderTarget(QGles2SwapChainRenderTarget *rt)
QGles2SwapChainRenderTarget rtRight
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
QGles2CommandBuffer cb
QGles2SwapChainRenderTarget rt
QSurface * surface
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
int currentTimestampPairIndex
bool isFormatSupported(Format f) override
bool createOrResize() override
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
QGles2SwapChainTimestamps timestamps
QGles2SwapChain(QRhiImplementation *rhi)
QRhiCommandBuffer * currentFrameCommandBuffer() override
QRhiRenderTarget * currentFrameRenderTarget(StereoTargetBuffer targetBuffer) override
QGles2SwapChainRenderTarget rtLeft
QSize surfacePixelSize() override
QRhiRenderTarget * currentFrameRenderTarget() override
int sampleCount() const override
QGles2TextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags)
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
float devicePixelRatio() const override
QSize pixelSize() const override
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
bool create() override
Creates the corresponding native graphics resources.
QGles2RenderTargetData d
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
QGles2Texture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, Flags flags)
QGles2SamplerData samplerState
GLenum glsizedintformat
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
UsageState usageState
bool prepareCreate(QSize *adjustedSize=nullptr)
GLenum glintformat
bool create() override
Creates the corresponding native graphics resources.
NativeTexture nativeTexture() override
char * data
Definition qrhinull_p.h:31
QNullBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, quint32 size)
Definition qrhinull.cpp:679
bool create() override
Creates the corresponding native graphics resources.
Definition qrhinull.cpp:699
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
Definition qrhinull.cpp:689
char * beginFullDynamicBufferUpdateForCurrentFrame() override
Definition qrhinull.cpp:713
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.
bool create() override
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.
Definition qrhinull.cpp:731
bool create() override
Creates the corresponding native graphics resources.
Definition qrhinull.cpp:740
QNullRenderBuffer(QRhiImplementation *rhi, Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint)
Definition qrhinull.cpp:719
QRhiTexture::Format backingFormat() const override
Definition qrhinull.cpp:754
QNullRenderPassDescriptor(QRhiImplementation *rhi)
Definition qrhinull.cpp:864
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() const override
Definition qrhinull.cpp:887
QVector< quint32 > serializedFormat() const override
Definition qrhinull.cpp:895
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
Definition qrhinull.cpp:874
bool isCompatible(const QRhiRenderPassDescriptor *other) const override
Definition qrhinull.cpp:881
QRhiRenderTargetAttachmentTracker::ResIdList currentResIdList
Definition qrhinull_p.h:88
QNullRenderPassDescriptor * rp
Definition qrhinull_p.h:85
QNullRenderTargetData(QRhiImplementation *)
Definition qrhinull_p.h:83
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
Definition qrhinull.cpp:850
QNullSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w)
Definition qrhinull.cpp:839
bool create() override
Definition qrhinull.cpp:857
QNullShaderResourceBindings(QRhiImplementation *rhi)
Definition qrhinull.cpp:995
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.
QSize pixelSize() const override
Definition qrhinull.cpp:915
float devicePixelRatio() const override
Definition qrhinull.cpp:920
QNullRenderTargetData d
Definition qrhinull_p.h:101
QNullSwapChainRenderTarget(QRhiImplementation *rhi, QRhiSwapChain *swapchain)
Definition qrhinull.cpp:900
int sampleCount() const override
Definition qrhinull.cpp:925
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
Definition qrhinull.cpp:911
bool createOrResize() override
Creates the swapchain if not already done and resizes the swapchain buffers to match the current size...
QWindow * window
Definition qrhinull_p.h:167
QSize surfacePixelSize() override
QNullSwapChainRenderTarget rt
Definition qrhinull_p.h:168
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)
QNullCommandBuffer cb
Definition qrhinull_p.h:169
QSize pixelSize() const override
Definition qrhinull.cpp:977
int sampleCount() const override
Definition qrhinull.cpp:990
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
Definition qrhinull.cpp:943
QRhiRenderPassDescriptor * newCompatibleRenderPassDescriptor() override
Definition qrhinull.cpp:950
bool create() override
Creates the corresponding native graphics resources.
Definition qrhinull.cpp:958
QNullTextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags)
Definition qrhinull.cpp:930
QNullRenderTargetData d
Definition qrhinull_p.h:117
float devicePixelRatio() const override
Definition qrhinull.cpp:985
bool create() override
Creates the corresponding native graphics resources.
Definition qrhinull.cpp:779
bool createFrom(NativeTexture src) override
Similar to create(), except that no new native textures are created.
Definition qrhinull.cpp:823
QVarLengthArray< std::array< QImage, QRhi::MAX_MIP_LEVELS >, 6 > image
Definition qrhinull_p.h:58
QNullTexture(QRhiImplementation *rhi, Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, Flags flags)
Definition qrhinull.cpp:759
uint generation
Definition qrhinull_p.h:59
void destroy() override
Releases (or requests deferred releasing of) the underlying native graphics resources.
Definition qrhinull.cpp:770
bool operator!=(const Batch &other) const
Definition qrhi_p.h:705
QVector< T > resources
Definition qrhi_p.h:698
bool operator==(const Batch &other) const
Definition qrhi_p.h:700
void feed(int binding, T resource)
Definition qrhi_p.h:671
QVector< Batch > batches
Definition qrhi_p.h:714
bool operator!=(const QRhiBatchedBindings< T > &other) const
Definition qrhi_p.h:721
bool operator==(const QRhiBatchedBindings< T > &other) const
Definition qrhi_p.h:716
char smallData[SMALL_DATA_SIZE]
Definition qrhi_p.h:394
QByteArray largeData
Definition qrhi_p.h:392
static constexpr quint32 SMALL_DATA_SIZE
Definition qrhi_p.h:393
void(* frameEnd)(QRhiImplementation *d, QRhiSwapChain *swapChain, QRhiCommandBuffer *cb)
Definition qrhi_p.h:308
void(* rhiAboutToBeDestroyed)(QRhiImplementation *d)
Definition qrhi_p.h:309
uint needsDepthStencilCombinedAttach
uint perRenderTargetBlending
int maxThreadGroupsPerDimension
uint glesMultisampleRenderToTexture
uint srgbTextureRenderTarget
int maxFragmentStorageBuffers
uint fixedIndexPrimitiveRestart
uint screenSpaceDerivatives
uint nonBaseLevelFramebufferTexture
uint glesMultiviewMultisampleRenderToTexture
OffscreenFrame(QRhiImplementation *rhi)
QGles2CommandBuffer cbWrapper
QVarLengthArray< data32_t, 128 > packedArray
QVarLengthArray< SeparateTexture, 8 > separateTextureBindings
QVarLengthArray< SeparateSampler, 4 > separateSamplerBindings
static void updateResIdList(const QRhiTextureRenderTargetDescription &desc, ResIdList *dst)
Definition qrhi_p.h:886
static bool isUpToDate(const QRhiTextureRenderTargetDescription &desc, const ResIdList &currentResIdList)
Definition qrhi_p.h:924
static void changeToDynamicUpdate(BufferOp *op, QRhiBuffer *buf, quint32 offset, QByteArray data)
Definition qrhi_p.h:520
static void changeToStaticUpload(BufferOp *op, QRhiBuffer *buf, quint32 offset, QByteArray data)
Definition qrhi_p.h:551
static void changeToStaticUpload(BufferOp *op, QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Definition qrhi_p.h:535
static BufferOp dynamicUpdate(QRhiBuffer *buf, quint32 offset, QByteArray data)
Definition qrhi_p.h:513
static BufferOp staticUpload(QRhiBuffer *buf, quint32 offset, QByteArray data)
Definition qrhi_p.h:544
static BufferOp copy(QRhiBuffer *dst, QRhiBuffer *src, quint32 dstOffset, quint32 srcOffset, quint32 size)
Definition qrhi_p.h:570
static BufferOp staticUpload(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Definition qrhi_p.h:528
static BufferOp read(QRhiBuffer *buf, quint32 offset, quint32 size, QRhiReadbackResult *result)
Definition qrhi_p.h:559
static BufferOp dynamicUpdate(QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Definition qrhi_p.h:497
static void changeToDynamicUpdate(BufferOp *op, QRhiBuffer *buf, quint32 offset, quint32 size, const void *data)
Definition qrhi_p.h:504
QRhiTextureCopyDescription desc
Definition qrhi_p.h:600
static TextureOp copy(QRhiTexture *dst, QRhiTexture *src, const QRhiTextureCopyDescription &desc)
Definition qrhi_p.h:620
QVarLengthArray< MipLevelUploadList, 6 > subresDesc
Definition qrhi_p.h:598
static TextureOp upload(QRhiTexture *tex, const QRhiTextureUploadDescription &desc)
Definition qrhi_p.h:604
static TextureOp genMips(QRhiTexture *tex)
Definition qrhi_p.h:639
static TextureOp read(const QRhiReadbackDescription &rb, QRhiReadbackResult *result)
Definition qrhi_p.h:630
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:1590
LimitsType limitsType
Definition qrhi.h:1601
float maxPotentialColorComponentValue
Definition qrhi.h:1609
LuminanceBehavior luminanceBehavior
Definition qrhi.h:1612
float maxColorComponentValue
Definition qrhi.h:1608
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:1623
void * reserved[2]
Definition qrhi.h:1624
QRhiShaderResourceBindings * srb
QRhiGraphicsPipeline * maybeGraphicsPs
QRhiComputePipeline * maybeComputePs
QRhiSwapChain::StereoTargetBuffer stereoTarget