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
QRhiVulkan Class Reference

#include <qrhivulkan_p.h>

Inheritance diagram for QRhiVulkan:
Collaboration diagram for QRhiVulkan:

Classes

struct  DescriptorPoolData
struct  OffscreenFrame
struct  TextureReadback
struct  BufferReadback
struct  DeferredReleaseEntry
struct  [struct].caps

Public Types

using BufferImageCopyList = QVarLengthArray<VkBufferImageCopy, 16>

Public Member Functions

 QRhiVulkan (QRhiVulkanInitParams *paramsparams, QRhiVulkanNativeHandles *importParams=nullptr)
bool create (QRhi::Flags flagsflags) override
void destroy () override
QRhi::AdapterList enumerateAdaptersBeforeCreate (QRhiNativeHandles *nativeHandles) const override
QRhiGraphicsPipeline * createGraphicsPipeline () override
QRhiComputePipeline * createComputePipeline () override
QRhiShaderResourceBindings * createShaderResourceBindings () override
QRhiBuffer * createBuffer (QRhiBuffer::Type typetype, QRhiBuffer::UsageFlags usageusage, quint32 sizesize) override
QRhiRenderBuffer * createRenderBuffer (QRhiRenderBuffer::Type typetype, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flagsflags, QRhiTexture::Format backingFormatHint) override
QRhiTexture * createTexture (QRhiTexture::Format formatformat, const QSize &pixelSize, int depthdepth, int arraySize, int sampleCount, QRhiTexture::Flags flagsflags) override
QRhiSampler * createSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode vv, QRhiSampler::AddressMode ww) override
QRhiTextureRenderTarget * createTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flagsflags) override
QRhiShadingRateMap * createShadingRateMap () override
QRhiSwapChain * createSwapChain () override
QRhi::FrameOpResult beginFrame (QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flagsflags) override
QRhi::FrameOpResult endFrame (QRhiSwapChain *swapChain, QRhi::EndFrameFlags flagsflags) override
QRhi::FrameOpResult beginOffscreenFrame (QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flagsflags) override
QRhi::FrameOpResult endOffscreenFrame (QRhi::EndFrameFlags flagsflags) override
QRhi::FrameOpResult finish () override
void resourceUpdate (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void beginPass (QRhiCommandBuffer *cb, QRhiRenderTarget *rt, const QColor &colorClearValue, const QRhiDepthStencilClearValue &depthStencilClearValue, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flagsflags) override
void endPass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setGraphicsPipeline (QRhiCommandBuffer *cb, QRhiGraphicsPipeline *ps) override
void setShaderResources (QRhiCommandBuffer *cb, QRhiShaderResourceBindings *srb, int dynamicOffsetCount, const QRhiCommandBuffer::DynamicOffset *dynamicOffsets) override
void setVertexInput (QRhiCommandBuffer *cb, int startBinding, int bindingCount, const QRhiCommandBuffer::VertexInput *bindings, QRhiBuffer *indexBuf, quint32 indexOffset, QRhiCommandBuffer::IndexFormat indexFormat) override
void setViewport (QRhiCommandBuffer *cb, const QRhiViewport &viewport) override
void setScissor (QRhiCommandBuffer *cb, const QRhiScissor &scissor) override
void setBlendConstants (QRhiCommandBuffer *cb, const QColor &cc) override
void setStencilRef (QRhiCommandBuffer *cb, quint32 refValue) override
void setPushConstants (QRhiCommandBuffer *cb, quint32 offsetoffset, quint32 sizesize, const void *datadata) override
void setShadingRate (QRhiCommandBuffer *cb, const QSize &coarsePixelSize) override
void draw (QRhiCommandBuffer *cb, quint32 vertexCount, quint32 instanceCount, quint32 firstVertex, quint32 firstInstance) override
void drawIndexed (QRhiCommandBuffer *cb, quint32 indexCount, quint32 instanceCount, quint32 firstIndex, qint32 vertexOffset, quint32 firstInstance) override
void drawIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCountdrawCount, quint32 stridestride) override
void drawIndexedIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCountdrawCount, quint32 stridestride) override
void drawIndirectCount (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCountmaxDrawCount, quint32 stridestride) override
void drawIndexedIndirectCount (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, QRhiBuffer *countBuffer, quint32 countBufferOffset, quint32 maxDrawCountmaxDrawCount, quint32 stridestride) override
void dispatchIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset) override
void debugMarkBegin (QRhiCommandBuffer *cb, const QByteArray &namename) override
void debugMarkEnd (QRhiCommandBuffer *cb) override
void debugMarkMsg (QRhiCommandBuffer *cb, const QByteArray &msg) override
void beginComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flagsflags) override
void endComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setComputePipeline (QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void dispatch (QRhiCommandBuffer *cb, int xx, int yy, int zz) override
const QRhiNativeHandles * nativeHandles (QRhiCommandBuffer *cb) override
void beginExternal (QRhiCommandBuffer *cb) override
void endExternal (QRhiCommandBuffer *cb) override
double lastCompletedGpuTime (QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts () const override
QList< QSize > supportedShadingRates (int sampleCount) const override
int ubufAlignment () const override
bool isYUpInFramebuffer () const override
bool isYUpInNDC () const override
bool isClipDepthZeroToOne () const override
QMatrix4x4 clipSpaceCorrMatrix () const override
bool isTextureFormatSupported (QRhiTexture::Format formatformat, QRhiTexture::Flags flagsflags) const override
bool isFeatureSupported (QRhi::Feature feature) const override
int resourceLimit (QRhi::ResourceLimit limitlimit) const override
const QRhiNativeHandles * nativeHandles () override
QRhiDriverInfo driverInfo () const override
QRhiStats statistics () override
bool makeThreadLocalNativeContextCurrent () override
void setQueueSubmitParams (QRhiNativeHandles *paramsparams) override
void releaseCachedResources () override
bool isDeviceLost () const override
QByteArray pipelineCacheData () override
void setPipelineCacheData (const QByteArray &datadata) override
VkResult createDescriptorPool (VkDescriptorPool *pool)
bool allocateDescriptorSet (VkDescriptorSetAllocateInfo *allocInfo, VkDescriptorSet *resultresult, int *resultPoolIndex)
uint32_t chooseTransientImageMemType (VkImage imgimg, uint32_t startIndex)
bool createTransientImage (VkFormat formatformat, const QSize &pixelSize, VkImageUsageFlags usageusage, VkImageAspectFlags aspectMask, VkSampleCountFlagBits samplessamples, VkDeviceMemory *mem, VkImage *images, VkImageView *views, int countcount)
bool recreateSwapChain (QRhiSwapChain *swapChain)
void releaseSwapChainResources (QRhiSwapChain *swapChain)
VkFormat optimalDepthStencilFormat ()
VkSampleCountFlagBits effectiveSampleCountBits (int sampleCount)
bool createDefaultRenderPass (QVkRenderPassDescriptor *rpD, bool hasDepthStencil, VkSampleCountFlagBits samplessamples, VkFormat colorFormatcolorFormat, QRhiShadingRateMap *shadingRateMap)
bool createOffscreenRenderPass (QVkRenderPassDescriptor *rpD, const QRhiColorAttachment *colorAttachmentsBegin, const QRhiColorAttachment *colorAttachmentsEnd, bool preserveColor, bool preserveDs, bool storeDs, QRhiRenderBuffer *depthStencilBuffer, QRhiTexture *depthTexture, QRhiTexture *depthResolveTexture, int depthLayer, QRhiShadingRateMap *shadingRateMap)
bool ensurePipelineCache (const void *initialData=nullptr, size_t initialDataSize=0)
VkShaderModule createShader (const QByteArray &spirv)
void prepareNewFrame (QRhiCommandBuffer *cb)
VkCommandBuffer startSecondaryCommandBuffer (QVkRenderTargetData *rtD=nullptr)
void endAndEnqueueSecondaryCommandBuffer (VkCommandBuffer cb, QVkCommandBuffer *cbD)
QRhi::FrameOpResult startPrimaryCommandBuffer (VkCommandBuffer *cb)
QRhi::FrameOpResult endAndSubmitPrimaryCommandBuffer (VkCommandBuffer cb, VkFence cmdFence, VkSemaphore *waitSem, VkSemaphore *signalSem)
QRhi::FrameOpResult waitCommandCompletion (int frameSlot)
VkDeviceSize subresUploadByteSize (const QRhiTextureSubresourceUploadDescription &subresDesc) const
void prepareUploadSubres (QVkTexture *texD, int layerlayer, int levellevel, const QRhiTextureSubresourceUploadDescription &subresDesc, size_t *curOfs, void *mp, BufferImageCopyList *copyInfos)
void enqueueResourceUpdates (QVkCommandBuffer *cbD, QRhiResourceUpdateBatch *resourceUpdates)
void executeBufferHostWritesForSlot (QVkBuffer *bufD, int slot)
void enqueueTransitionPassResources (QVkCommandBuffer *cbD)
void recordPrimaryCommandBuffer (QVkCommandBuffer *cbD)
void trackedRegisterBuffer (QRhiPassResourceTracker *passResTracker, QVkBuffer *bufD, int slot, QRhiPassResourceTracker::BufferAccess accessaccess, QRhiPassResourceTracker::BufferStage stage)
void trackedRegisterTexture (QRhiPassResourceTracker *passResTracker, QVkTexture *texD, QRhiPassResourceTracker::TextureAccess accessaccess, QRhiPassResourceTracker::TextureStage stage)
void collectComputeBarriers (QVkCommandBuffer *cbD, QVarLengthArray< VkImageMemoryBarrier, 8 > *imageBarriers, QVarLengthArray< VkBufferMemoryBarrier, 8 > *bufferBarriers)
void recordTransitionPassResources (QVkCommandBuffer *cbD, const QRhiPassResourceTracker &tracker)
void activateTextureRenderTarget (QVkCommandBuffer *cbD, QVkTextureRenderTarget *rtD)
void executeDeferredReleases (bool forced=false)
void finishActiveReadbacks (bool forced=false)
void setAllocationName (QVkAlloc allocation, const QByteArray &namename, int slot=-1)
void setObjectName (uint64_t objectobject, VkObjectType typetype, const QByteArray &namename, int slot=-1)
void trackedBufferBarrier (QVkCommandBuffer *cbD, QVkBuffer *bufD, int slot, VkAccessFlags accessaccess, VkPipelineStageFlags stage)
void trackedImageBarrier (QVkCommandBuffer *cbD, QVkTexture *texD, VkImageLayout layout, VkAccessFlags accessaccess, VkPipelineStageFlags stage)
void depthStencilExplicitBarrier (QVkCommandBuffer *cbD, QVkRenderBuffer *rbD)
void subresourceBarrier (QVkCommandBuffer *cbD, VkImage imageimage, VkImageLayout oldLayout, VkImageLayout newLayout, VkAccessFlags srcAccess, VkAccessFlags dstAccess, VkPipelineStageFlags srcStage, VkPipelineStageFlags dstStage, int startLayer, int layerCount, int startLevel, int levelCount)
void updateShaderResourceBindings (QRhiShaderResourceBindings *srb)
void ensureCommandPoolForNewFrame ()
double elapsedSecondsFromTimestamp (quint64 timestamp[2], bool *ok)
void printExtraErrorInfo (VkResult err)
Q_DECL_COLD_FUNCTION void printDeviceLossErrorInfo () const
void setDefaultScissor (QVkCommandBuffer *cbD)
void recordStencilRef (QVkCommandBuffer *cbD, quint32 refValue)
Public Member Functions inherited from QRhiImplementation
virtual ~QRhiImplementation ()
virtual QRhiIndirectCommandBuffer * createIndirectCommandBuffer (QRhiIndirectCommandBuffer::Type typetype, quint32 maxCommandCount)
virtual void buildIndirect (QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb, const QRhiIndirectCommandBufferBuildInfo &info)
virtual void executeIndirect (QRhiCommandBuffer *cb, QRhiIndirectCommandBuffer *icb, quint32 firstCommand, quint32 commandCount)
virtual void commitIndirectCommandBuffer (QRhiResourceUpdateBatch *u, QRhiIndirectCommandBuffer *icb)
void prepareForCreate (QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flagsflags, QRhiAdapter *adapter)
bool isCompressedFormat (QRhiTexture::Format formatformat) const
bool compressedFormatInfo (QRhiTexture::Format formatformat, const QSize &sizesize, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
bool textureFormatInfo (QRhiTexture::Format formatformat, const QSize &sizesize, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const
bool isStencilSupportingFormat (QRhiTexture::Format formatformat) const
void registerResource (QRhiResource *resres, bool ownsNativeResources=true)
void unregisterResource (QRhiResource *resres)
void addDeleteLater (QRhiResource *resres)
void addCleanupCallback (const QRhi::CleanupCallback &callback)
void addCleanupCallback (const void *keykey, const QRhi::CleanupCallback &callback)
void removeCleanupCallback (const void *keykey)
bool sanityCheckGraphicsPipeline (QRhiGraphicsPipeline *ps)
bool sanityCheckShaderResourceBindings (QRhiShaderResourceBindings *srb)
bool sanityCheckResourceOwnership (QRhiResource *maybeResource)
void updateLayoutDesc (QRhiShaderResourceBindings *srb)
quint32 pipelineCacheRhiId () const
void pipelineCreationStart ()
void pipelineCreationEnd ()
qint64 totalPipelineCreationTime () const
QRhiVertexInputAttribute::Format shaderDescVariableFormatToVertexInputFormat (QShaderDescription::VariableType typetype) const
quint32 byteSizePerVertexForVertexInputFormat (QRhiVertexInputAttribute::Format formatformat) const
int effectiveSampleCount (int sampleCount) const
QSize clampedSubResourceUploadSize (QSize sizesize, QPoint dstPos, int levellevel, QSize textureSizeAtLevelZero, bool warn=true)
QSize clampedSubResourceUploadSizeForSourceData (QSize sizesize, quint32 bpl, quint32 bytesPerPixel, qsizetype dataSizedataSize, bool warn=true)
void runCleanup ()

Public Attributes

QVulkanInstance * inst = nullptr
QWindow * maybeWindow = nullptr
QByteArrayList requestedDeviceExtensions
bool importedDevice = false
VkPhysicalDevice physDev = VK_NULL_HANDLE
VkDevice dev = VK_NULL_HANDLE
VkCommandPool cmdPool [QVK_FRAMES_IN_FLIGHT] = {}
quint32 gfxQueueFamilyIdx = 0
quint32 gfxQueueIdx = 0
VkDeviceQueueCreateFlags gfxQueueFlags = 0
VkQueue gfxQueue = VK_NULL_HANDLE
quint32 timestampValidBits = 0
bool importedAllocator = false
QVkAllocator allocator = nullptr
QVulkanFunctions * f = nullptr
QVulkanDeviceFunctions * df = nullptr
QRhi::Flags rhiFlags
VkPhysicalDeviceFeatures physDevFeatures
VkPhysicalDeviceProperties physDevProperties
VkDeviceSize ubufAlign
VkDeviceSize texbufAlign
bool deviceLost = false
bool releaseCachedResourcesCalledBeforeFrameStart = false
PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = nullptr
PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR
PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR
PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR
PFN_vkQueuePresentKHR vkQueuePresentKHR
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR
struct  caps
VkPipelineCache pipelineCache = VK_NULL_HANDLE
QVarLengthArray< DescriptorPoolData, 8 > descriptorPools
QVarLengthArray< VkCommandBuffer, 4 > freeSecondaryCbs [QVK_FRAMES_IN_FLIGHT]
VkQueryPool timestampQueryPool = VK_NULL_HANDLE
QBitArray timestampQueryPoolMap
VkFormat optimalDsFormat = VK_FORMAT_UNDEFINED
QMatrix4x4 clipCorrectMatrix
QVkSwapChain * currentSwapChain = nullptr
QSet< QVkSwapChain * > swapchains
QRhiVulkanNativeHandles nativeHandlesStruct
QRhiDriverInfo driverInfoStruct
struct QRhiVulkan::OffscreenFrame ofr
QVarLengthArray< TextureReadback, 2 > activeTextureReadbacks
QVarLengthArray< BufferReadback, 2 > activeBufferReadbacks
QList< DeferredReleaseEntry > releaseQueue
QVarLengthArray< VkSemaphore, 4 > waitSemaphoresForQueueSubmit
QVarLengthArray< VkPipelineStageFlags, 4 > semaphoresWaitMasksForQueueSubmit
QVarLengthArray< VkSemaphore, 4 > signalSemaphoresForQueueSubmit
QVarLengthArray< VkSemaphore, 4 > waitSemaphoresForPresent
Public Attributes inherited from QRhiImplementation
QRhi * q
bool debugMarkers = false
bool timestamps = false
int currentFrameSlot = 0
bool inFrame = false
QRhiCommandBuffer * currentOffscreenCb = nullptr
QRhiAdapter * requestedRhiAdapter = nullptr
QHash< QRhiResource *, bool > resources

Additional Inherited Members

Static Public Member Functions inherited from QRhiImplementation
static QRhiImplementation * newInstance (QRhi::Implementation impl, QRhiInitParams *paramsparams, QRhiNativeHandles *importDevice)
static const QRhiShaderResourceBinding::Data * shaderResourceBindingData (const QRhiShaderResourceBinding &binding)
static QRhiShaderResourceBinding::Data * shaderResourceBindingData (QRhiShaderResourceBinding &binding)
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &aa, const QRhiShaderResourceBinding &bb)
Static Public Attributes inherited from QRhiImplementation
static const int MAX_SHADER_CACHE_ENTRIES = 128
static const quint32 MAX_BINARY_CACHE_BYTES = 16 * 1024 * 1024

Detailed Description

Definition at line 772 of file qrhivulkan_p.h.

Member Typedef Documentation

◆ BufferImageCopyList

using QRhiVulkan::BufferImageCopyList = QVarLengthArray<VkBufferImageCopy, 16>

Definition at line 948 of file qrhivulkan_p.h.

Constructor & Destructor Documentation

◆ QRhiVulkan()

QRhiVulkan::QRhiVulkan ( QRhiVulkanInitParams * params,
QRhiVulkanNativeHandles * importParams = nullptr )

Definition at line 476 of file qrhivulkan.cpp.

References QRhiVulkan(), allocator, importedAllocator, importedDevice, and maybeWindow.

Referenced by QRhiVulkan().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ activateTextureRenderTarget()

void QRhiVulkan::activateTextureRenderTarget ( QVkCommandBuffer * cbD,
QVkTextureRenderTarget * rtD )

Definition at line 3354 of file qrhivulkan.cpp.

References QVkTextureRenderTarget::create(), QVkCommandBuffer::currentPassResTrackerIndex, depthStencilExplicitBarrier(), QVkRenderBuffer::lastActiveFrameSlot, QVkTexture::lastActiveFrameSlot, QVkTextureRenderTarget::lastActiveFrameSlot, QRhiPassResourceTracker::TexColorOutput, QRhiPassResourceTracker::TexColorOutputStage, QRhiPassResourceTracker::TexDepthOutput, QRhiPassResourceTracker::TexDepthOutputStage, QRhiPassResourceTracker::TexDepthResolveOutput, QRhiPassResourceTracker::TexShadingRate, QVkShadingRateMap::texture, and trackedRegisterTexture().

Referenced by beginPass().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateDescriptorSet()

bool QRhiVulkan::allocateDescriptorSet ( VkDescriptorSetAllocateInfo * allocInfo,
VkDescriptorSet * result,
int * resultPoolIndex )

Definition at line 1408 of file qrhivulkan.cpp.

References df.

◆ beginComputePass()

void QRhiVulkan::beginComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates,
QRhiCommandBuffer::BeginPassFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 3627 of file qrhivulkan.cpp.

References QVkCommandBuffer::ComputePass, enqueueResourceUpdates(), enqueueTransitionPassResources(), QVkCommandBuffer::NoPass, QVkCommandBuffer::passUsesSecondaryCb, QVkCommandBuffer::recordingPass, and QVkCommandBuffer::resetPerPassState().

Here is the call graph for this function:

◆ beginExternal()

void QRhiVulkan::beginExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 7270 of file qrhivulkan.cpp.

References QVkCommandBuffer::inExternal, QVkCommandBuffer::NoPass, QVkCommandBuffer::passUsesSecondaryCb, QVkCommandBuffer::recordingPass, recordPrimaryCommandBuffer(), and QVkCommandBuffer::resetCommands().

Here is the call graph for this function:

◆ beginFrame()

QRhi::FrameOpResult QRhiVulkan::beginFrame ( QRhiSwapChain * swapChain,
QRhi::BeginFrameFlags flags )
overridevirtual

◆ beginOffscreenFrame()

QRhi::FrameOpResult QRhiVulkan::beginOffscreenFrame ( QRhiCommandBuffer ** cb,
QRhi::BeginFrameFlags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 3176 of file qrhivulkan.cpp.

References df, ensureCommandPoolForNewFrame(), QVkCommandBuffer::lastGpuTime, and prepareNewFrame().

Here is the call graph for this function:

◆ beginPass()

◆ chooseTransientImageMemType()

uint32_t QRhiVulkan::chooseTransientImageMemType ( VkImage img,
uint32_t startIndex )

Definition at line 1642 of file qrhivulkan.cpp.

References df, and f.

◆ clipSpaceCorrMatrix()

QMatrix4x4 QRhiVulkan::clipSpaceCorrMatrix ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5972 of file qrhivulkan.cpp.

◆ collectComputeBarriers()

void QRhiVulkan::collectComputeBarriers ( QVkCommandBuffer * cbD,
QVarLengthArray< VkImageMemoryBarrier, 8 > * imageBarriers,
QVarLengthArray< VkBufferMemoryBarrier, 8 > * bufferBarriers )

Definition at line 3724 of file qrhivulkan.cpp.

◆ create()

bool QRhiVulkan::create ( QRhi::Flags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 580 of file qrhivulkan.cpp.

References allocator, deviceLost, df, f, fillDriverInfo(), globalVulkanInstance, importedAllocator, importedDevice, QVK_FRAMES_IN_FLIGHT, and QVK_MAX_ACTIVE_TIMESTAMP_PAIRS.

Here is the call graph for this function:

◆ createBuffer()

QRhiBuffer * QRhiVulkan::createBuffer ( QRhiBuffer::Type type,
QRhiBuffer::UsageFlags usage,
quint32 size )
overridevirtual

Implements QRhiImplementation.

Definition at line 5947 of file qrhivulkan.cpp.

◆ createComputePipeline()

QRhiComputePipeline * QRhiVulkan::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6405 of file qrhivulkan.cpp.

◆ createDefaultRenderPass()

bool QRhiVulkan::createDefaultRenderPass ( QVkRenderPassDescriptor * rpD,
bool hasDepthStencil,
VkSampleCountFlagBits samples,
VkFormat colorFormat,
QRhiShadingRateMap * shadingRateMap )

Definition at line 2059 of file qrhivulkan.cpp.

References addSelfDependency(), df, QVkRenderPassDescriptor::hasDepthStencil, QVkRenderPassDescriptor::hasDepthStencilResolve, and QVkRenderPassDescriptor::hasShadingRateMap.

Here is the call graph for this function:

◆ createDescriptorPool()

VkResult QRhiVulkan::createDescriptorPool ( VkDescriptorPool * pool)

Definition at line 1385 of file qrhivulkan.cpp.

References df, and QVK_DESC_SETS_PER_POOL.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiVulkan::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6400 of file qrhivulkan.cpp.

◆ createOffscreenRenderPass()

bool QRhiVulkan::createOffscreenRenderPass ( QVkRenderPassDescriptor * rpD,
const QRhiColorAttachment * colorAttachmentsBegin,
const QRhiColorAttachment * colorAttachmentsEnd,
bool preserveColor,
bool preserveDs,
bool storeDs,
QRhiRenderBuffer * depthStencilBuffer,
QRhiTexture * depthTexture,
QRhiTexture * depthResolveTexture,
int depthLayer,
QRhiShadingRateMap * shadingRateMap )

Definition at line 2195 of file qrhivulkan.cpp.

References addSelfDependency(), df, QVkRenderPassDescriptor::hasDepthStencil, QVkRenderPassDescriptor::hasDepthStencilResolve, and QVkRenderPassDescriptor::hasShadingRateMap.

Here is the call graph for this function:

◆ createRenderBuffer()

QRhiRenderBuffer * QRhiVulkan::createRenderBuffer ( QRhiRenderBuffer::Type type,
const QSize & pixelSize,
int sampleCount,
QRhiRenderBuffer::Flags flags,
QRhiTexture::Format backingFormatHint )
overridevirtual

Implements QRhiImplementation.

Definition at line 6368 of file qrhivulkan.cpp.

◆ createSampler()

QRhiSampler * QRhiVulkan::createSampler ( QRhiSampler::Filter magFilter,
QRhiSampler::Filter minFilter,
QRhiSampler::Filter mipmapMode,
QRhiSampler::AddressMode u,
QRhiSampler::AddressMode v,
QRhiSampler::AddressMode w )
overridevirtual

Implements QRhiImplementation.

Definition at line 6382 of file qrhivulkan.cpp.

◆ createShader()

VkShaderModule QRhiVulkan::createShader ( const QByteArray & spirv)

Definition at line 4063 of file qrhivulkan.cpp.

References df.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiVulkan::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6410 of file qrhivulkan.cpp.

◆ createShadingRateMap()

QRhiShadingRateMap * QRhiVulkan::createShadingRateMap ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6389 of file qrhivulkan.cpp.

◆ createSwapChain()

QRhiSwapChain * QRhiVulkan::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5934 of file qrhivulkan.cpp.

◆ createTexture()

QRhiTexture * QRhiVulkan::createTexture ( QRhiTexture::Format format,
const QSize & pixelSize,
int depth,
int arraySize,
int sampleCount,
QRhiTexture::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 6375 of file qrhivulkan.cpp.

◆ createTextureRenderTarget()

QRhiTextureRenderTarget * QRhiVulkan::createTextureRenderTarget ( const QRhiTextureRenderTargetDescription & desc,
QRhiTextureRenderTarget::Flags flags )
overridevirtual

Implements QRhiImplementation.

Definition at line 6394 of file qrhivulkan.cpp.

◆ createTransientImage()

bool QRhiVulkan::createTransientImage ( VkFormat format,
const QSize & pixelSize,
VkImageUsageFlags usage,
VkImageAspectFlags aspectMask,
VkSampleCountFlagBits samples,
VkDeviceMemory * mem,
VkImage * images,
VkImageView * views,
int count )

Definition at line 1674 of file qrhivulkan.cpp.

References df.

◆ debugMarkBegin()

void QRhiVulkan::debugMarkBegin ( QRhiCommandBuffer * cb,
const QByteArray & name )
overridevirtual

Implements QRhiImplementation.

Definition at line 7175 of file qrhivulkan.cpp.

◆ debugMarkEnd()

void QRhiVulkan::debugMarkEnd ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 7201 of file qrhivulkan.cpp.

◆ debugMarkMsg()

void QRhiVulkan::debugMarkMsg ( QRhiCommandBuffer * cb,
const QByteArray & msg )
overridevirtual

Implements QRhiImplementation.

Definition at line 7219 of file qrhivulkan.cpp.

◆ depthStencilExplicitBarrier()

void QRhiVulkan::depthStencilExplicitBarrier ( QVkCommandBuffer * cbD,
QVkRenderBuffer * rbD )

Definition at line 4334 of file qrhivulkan.cpp.

References QVkCommandBuffer::Command::cmd, QVkCommandBuffer::Command::ImageBarrier, QVkCommandBuffer::NoPass, and QVkCommandBuffer::recordingPass.

Referenced by activateTextureRenderTarget().

Here is the caller graph for this function:

◆ destroy()

void QRhiVulkan::destroy ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 1279 of file qrhivulkan.cpp.

References allocator, deviceLost, df, executeDeferredReleases(), f, finishActiveReadbacks(), importedAllocator, importedDevice, and QVK_FRAMES_IN_FLIGHT.

Here is the call graph for this function:

◆ dispatch()

◆ dispatchIndirect()

◆ draw()

void QRhiVulkan::draw ( QRhiCommandBuffer * cb,
quint32 vertexCount,
quint32 instanceCount,
quint32 firstVertex,
quint32 firstInstance )
overridevirtual

◆ drawIndexed()

void QRhiVulkan::drawIndexed ( QRhiCommandBuffer * cb,
quint32 indexCount,
quint32 instanceCount,
quint32 firstIndex,
qint32 vertexOffset,
quint32 firstInstance )
overridevirtual

◆ drawIndexedIndirect()

void QRhiVulkan::drawIndexedIndirect ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
quint32 drawCount,
quint32 stride )
overridevirtual

◆ drawIndexedIndirectCount()

void QRhiVulkan::drawIndexedIndirectCount ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
QRhiBuffer * countBuffer,
quint32 countBufferOffset,
quint32 maxDrawCount,
quint32 stride )
overridevirtual

◆ drawIndirect()

void QRhiVulkan::drawIndirect ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
quint32 drawCount,
quint32 stride )
overridevirtual

◆ drawIndirectCount()

void QRhiVulkan::drawIndirectCount ( QRhiCommandBuffer * cb,
QRhiBuffer * indirectBuffer,
quint32 indirectBufferOffset,
QRhiBuffer * countBuffer,
quint32 countBufferOffset,
quint32 maxDrawCount,
quint32 stride )
overridevirtual

◆ driverInfo()

QRhiDriverInfo QRhiVulkan::driverInfo ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 6184 of file qrhivulkan.cpp.

◆ effectiveSampleCountBits()

VkSampleCountFlagBits QRhiVulkan::effectiveSampleCountBits ( int sampleCount)

Definition at line 5424 of file qrhivulkan.cpp.

◆ elapsedSecondsFromTimestamp()

double QRhiVulkan::elapsedSecondsFromTimestamp ( quint64 timestamp[2],
bool * ok )

Definition at line 2779 of file qrhivulkan.cpp.

◆ endAndEnqueueSecondaryCommandBuffer()

◆ endAndSubmitPrimaryCommandBuffer()

QRhi::FrameOpResult QRhiVulkan::endAndSubmitPrimaryCommandBuffer ( VkCommandBuffer cb,
VkFence cmdFence,
VkSemaphore * waitSem,
VkSemaphore * signalSem )

Definition at line 3078 of file qrhivulkan.cpp.

References deviceLost, and df.

◆ endComputePass()

void QRhiVulkan::endComputePass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 3650 of file qrhivulkan.cpp.

References QVkCommandBuffer::ComputePass, enqueueResourceUpdates(), QVkCommandBuffer::NoPass, QVkCommandBuffer::passUsesSecondaryCb, and QVkCommandBuffer::recordingPass.

Here is the call graph for this function:

◆ endExternal()

void QRhiVulkan::endExternal ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 7307 of file qrhivulkan.cpp.

References QVkCommandBuffer::currentPassResTrackerIndex, QVkCommandBuffer::inExternal, QVkCommandBuffer::NoPass, QVkCommandBuffer::recordingPass, and QVkCommandBuffer::resetPerPassState().

Here is the call graph for this function:

◆ endFrame()

◆ endOffscreenFrame()

QRhi::FrameOpResult QRhiVulkan::endOffscreenFrame ( QRhi::EndFrameFlags flags)
overridevirtual

Implements QRhiImplementation.

Definition at line 3232 of file qrhivulkan.cpp.

References df, finishActiveReadbacks(), and recordPrimaryCommandBuffer().

Here is the call graph for this function:

◆ endPass()

void QRhiVulkan::endPass ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 3606 of file qrhivulkan.cpp.

References QVkCommandBuffer::Command::cmd, QVkCommandBuffer::Command::EndRenderPass, enqueueResourceUpdates(), QVkCommandBuffer::NoPass, QVkCommandBuffer::passUsesSecondaryCb, QVkCommandBuffer::recordingPass, and QVkCommandBuffer::RenderPass.

Here is the call graph for this function:

◆ enqueueResourceUpdates()

void QRhiVulkan::enqueueResourceUpdates ( QVkCommandBuffer * cbD,
QRhiResourceUpdateBatch * resourceUpdates )

Definition at line 4605 of file qrhivulkan.cpp.

References QRhiResourceUpdateBatchPrivate::activeBufferOpCount, QRhiVulkan::BufferReadback::activeFrameSlot, QRhiVulkan::TextureReadback::activeFrameSlot, QRhiResourceUpdateBatchPrivate::activeTextureOpCount, QVkCommandBuffer::Command::BlitImage, QRhiResourceUpdateBatchPrivate::BufferOp::Clear, QVkCommandBuffer::Command::cmd, QRhiResourceUpdateBatchPrivate::BufferOp::Copy, QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QVkCommandBuffer::Command::CopyBuffer, QVkCommandBuffer::Command::CopyBufferToImage, QVkCommandBuffer::Command::CopyImage, QVkCommandBuffer::Command::CopyImageToBuffer, currentSwapChain, QRhiResourceUpdateBatchPrivate::TextureOp::dst, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, executeBufferHostWritesForSlot(), QVkCommandBuffer::Command::FillBuffer, QRhiResourceUpdateBatchPrivate::free(), QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QRhiVulkan::DeferredReleaseEntry::lastActiveFrameSlot, QVkBuffer::lastActiveFrameSlot, QVkTexture::lastActiveFrameSlot, QVkSwapChain::ImageResources::lastUse, QVkTexture::mipLevelCount, QVK_FRAMES_IN_FLIGHT, QRhiResourceUpdateBatchPrivate::BufferOp::Read, QRhiResourceUpdateBatchPrivate::TextureOp::Read, QVkSwapChain::ImageResources::ScImageUseRender, QVkSwapChain::ImageResources::ScImageUseTransferSource, QRhiResourceUpdateBatchPrivate::TextureOp::src, QRhiVulkan::BufferReadback::stagingAlloc, QRhiVulkan::TextureReadback::stagingAlloc, QRhiVulkan::DeferredReleaseEntry::StagingBuffer, QRhiResourceUpdateBatchPrivate::BufferOp::StaticUpload, QVkSwapChain::supportsReadback, QRhiResourceUpdateBatchPrivate::BufferOp::type, QRhiResourceUpdateBatchPrivate::TextureOp::type, QRhiVulkan::DeferredReleaseEntry::type, and QRhiResourceUpdateBatchPrivate::TextureOp::Upload.

Referenced by beginComputePass(), beginPass(), endComputePass(), endPass(), and resourceUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enqueueTransitionPassResources()

void QRhiVulkan::enqueueTransitionPassResources ( QVkCommandBuffer * cbD)

Definition at line 5459 of file qrhivulkan.cpp.

References QVkCommandBuffer::Command::cmd, QVkCommandBuffer::currentPassResTrackerIndex, and QVkCommandBuffer::Command::TransitionPassResources.

Referenced by beginComputePass(), and beginPass().

Here is the caller graph for this function:

◆ ensureCommandPoolForNewFrame()

void QRhiVulkan::ensureCommandPoolForNewFrame ( )

Definition at line 2765 of file qrhivulkan.cpp.

References df, and releaseCachedResourcesCalledBeforeFrameStart.

Referenced by beginFrame(), beginOffscreenFrame(), and finish().

Here is the caller graph for this function:

◆ ensurePipelineCache()

bool QRhiVulkan::ensurePipelineCache ( const void * initialData = nullptr,
size_t initialDataSize = 0 )

Definition at line 4078 of file qrhivulkan.cpp.

References df.

◆ enumerateAdaptersBeforeCreate()

QRhi::AdapterList QRhiVulkan::enumerateAdaptersBeforeCreate ( QRhiNativeHandles * nativeHandles) const
overridevirtual

Reimplemented from QRhiImplementation.

Definition at line 1345 of file qrhivulkan.cpp.

◆ executeBufferHostWritesForSlot()

void QRhiVulkan::executeBufferHostWritesForSlot ( QVkBuffer * bufD,
int slot )

Definition at line 5159 of file qrhivulkan.cpp.

Referenced by dispatchIndirect(), drawIndexedIndirect(), drawIndexedIndirectCount(), drawIndirect(), drawIndirectCount(), enqueueResourceUpdates(), QVkBuffer::nativeBuffer(), setShaderResources(), and setVertexInput().

Here is the caller graph for this function:

◆ executeDeferredReleases()

void QRhiVulkan::executeDeferredReleases ( bool forced = false)

◆ finish()

QRhi::FrameOpResult QRhiVulkan::finish ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 3282 of file qrhivulkan.cpp.

References currentSwapChain, df, ensureCommandPoolForNewFrame(), executeDeferredReleases(), finishActiveReadbacks(), QVkSwapChain::FrameResources::imageSemWaitable, QVkCommandBuffer::NoPass, QVkCommandBuffer::recordingPass, recordPrimaryCommandBuffer(), and QVkCommandBuffer::resetCommands().

Here is the call graph for this function:

◆ finishActiveReadbacks()

void QRhiVulkan::finishActiveReadbacks ( bool forced = false)

Definition at line 5284 of file qrhivulkan.cpp.

Referenced by destroy(), endOffscreenFrame(), finish(), and prepareNewFrame().

Here is the caller graph for this function:

◆ isClipDepthZeroToOne()

bool QRhiVulkan::isClipDepthZeroToOne ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5967 of file qrhivulkan.cpp.

◆ isDeviceLost()

bool QRhiVulkan::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 6239 of file qrhivulkan.cpp.

References deviceLost.

◆ isFeatureSupported()

bool QRhiVulkan::isFeatureSupported ( QRhi::Feature feature) const
overridevirtual

Implements QRhiImplementation.

Definition at line 6010 of file qrhivulkan.cpp.

◆ isTextureFormatSupported()

bool QRhiVulkan::isTextureFormatSupported ( QRhiTexture::Format format,
QRhiTexture::Flags flags ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5984 of file qrhivulkan.cpp.

References f.

◆ isYUpInFramebuffer()

bool QRhiVulkan::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5957 of file qrhivulkan.cpp.

◆ isYUpInNDC()

bool QRhiVulkan::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5962 of file qrhivulkan.cpp.

◆ lastCompletedGpuTime()

double QRhiVulkan::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 7323 of file qrhivulkan.cpp.

References QVkCommandBuffer::lastGpuTime.

◆ makeThreadLocalNativeContextCurrent()

bool QRhiVulkan::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6209 of file qrhivulkan.cpp.

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiVulkan::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6179 of file qrhivulkan.cpp.

◆ nativeHandles() [2/2]

const QRhiNativeHandles * QRhiVulkan::nativeHandles ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 7245 of file qrhivulkan.cpp.

◆ optimalDepthStencilFormat()

VkFormat QRhiVulkan::optimalDepthStencilFormat ( )

Definition at line 1787 of file qrhivulkan.cpp.

References f.

◆ pipelineCacheData()

QByteArray QRhiVulkan::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6256 of file qrhivulkan.cpp.

References df.

◆ prepareNewFrame()

void QRhiVulkan::prepareNewFrame ( QRhiCommandBuffer * cb)

Definition at line 3020 of file qrhivulkan.cpp.

References executeDeferredReleases(), finishActiveReadbacks(), and releaseCachedResourcesCalledBeforeFrameStart.

Referenced by beginFrame(), and beginOffscreenFrame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareUploadSubres()

void QRhiVulkan::prepareUploadSubres ( QVkTexture * texD,
int layer,
int level,
const QRhiTextureSubresourceUploadDescription & subresDesc,
size_t * curOfs,
void * mp,
BufferImageCopyList * copyInfos )

Definition at line 4404 of file qrhivulkan.cpp.

◆ printDeviceLossErrorInfo()

void QRhiVulkan::printDeviceLossErrorInfo ( ) const

Definition at line 4528 of file qrhivulkan.cpp.

◆ printExtraErrorInfo()

void QRhiVulkan::printExtraErrorInfo ( VkResult err)

Definition at line 4520 of file qrhivulkan.cpp.

◆ recordPrimaryCommandBuffer()

void QRhiVulkan::recordPrimaryCommandBuffer ( QVkCommandBuffer * cbD)

Definition at line 5469 of file qrhivulkan.cpp.

References QVkCommandBuffer::Command::BeginRenderPass, QVkCommandBuffer::Command::BindDescriptorSet, QVkCommandBuffer::Command::BindIndexBuffer, QVkCommandBuffer::Command::BindPipeline, QVkCommandBuffer::Command::BindVertexBuffer, QVkCommandBuffer::Command::BlitImage, QVkCommandBuffer::Command::BufferBarrier, QVkCommandBuffer::Command::cmd, QVkCommandBuffer::Command::CopyBuffer, QVkCommandBuffer::Command::CopyBufferToImage, QVkCommandBuffer::Command::CopyImage, QVkCommandBuffer::Command::CopyImageToBuffer, QVkCommandBuffer::Command::DebugMarkerBegin, QVkCommandBuffer::Command::DebugMarkerEnd, QVkCommandBuffer::Command::DebugMarkerInsert, df, QVkCommandBuffer::Command::Dispatch, QVkCommandBuffer::Command::DispatchIndirect, QVkCommandBuffer::Command::Draw, QVkCommandBuffer::Command::DrawIndexed, QVkCommandBuffer::Command::DrawIndexedIndirect, QVkCommandBuffer::Command::DrawIndirect, QVkCommandBuffer::Command::EndRenderPass, QVkCommandBuffer::Command::ExecuteSecondary, QVkCommandBuffer::Command::FillBuffer, QVkCommandBuffer::Command::ImageAndBufferBarrier, QVkCommandBuffer::Command::ImageBarrier, QVkCommandBuffer::Command::MemoryBarrier, QVkCommandBuffer::NoPass, QVkCommandBuffer::recordingPass, recordTransitionPassResources(), QVkCommandBuffer::Command::SetBlendConstants, QVkCommandBuffer::Command::SetPushConstants, QVkCommandBuffer::Command::SetScissor, QVkCommandBuffer::Command::SetShadingRate, QVkCommandBuffer::Command::SetStencilRef, QVkCommandBuffer::Command::SetViewport, and QVkCommandBuffer::Command::TransitionPassResources.

Referenced by beginExternal(), endFrame(), endOffscreenFrame(), and finish().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recordStencilRef()

◆ recordTransitionPassResources()

void QRhiVulkan::recordTransitionPassResources ( QVkCommandBuffer * cbD,
const QRhiPassResourceTracker & tracker )

Definition at line 5871 of file qrhivulkan.cpp.

References QRhiPassResourceTracker::isEmpty().

Referenced by recordPrimaryCommandBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recreateSwapChain()

◆ releaseCachedResources()

void QRhiVulkan::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6234 of file qrhivulkan.cpp.

References releaseCachedResourcesCalledBeforeFrameStart.

◆ releaseSwapChainResources()

void QRhiVulkan::releaseSwapChainResources ( QRhiSwapChain * swapChain)

Definition at line 2700 of file qrhivulkan.cpp.

References QVkSwapChain::bufferCount, QVkSwapChain::FrameResources::cmdFenceWaitable, deviceLost, df, QVK_FRAMES_IN_FLIGHT, and QVkSwapChain::stereo.

Referenced by recreateSwapChain().

Here is the caller graph for this function:

◆ resourceLimit()

int QRhiVulkan::resourceLimit ( QRhi::ResourceLimit limit) const
overridevirtual

Implements QRhiImplementation.

Definition at line 6134 of file qrhivulkan.cpp.

References QVK_FRAMES_IN_FLIGHT.

◆ resourceUpdate()

void QRhiVulkan::resourceUpdate ( QRhiCommandBuffer * cb,
QRhiResourceUpdateBatch * resourceUpdates )
overridevirtual

Implements QRhiImplementation.

Definition at line 3418 of file qrhivulkan.cpp.

References enqueueResourceUpdates(), QVkCommandBuffer::NoPass, and QVkCommandBuffer::recordingPass.

Here is the call graph for this function:

◆ setAllocationName()

void QRhiVulkan::setAllocationName ( QVkAlloc allocation,
const QByteArray & name,
int slot = -1 )

Definition at line 7329 of file qrhivulkan.cpp.

◆ setBlendConstants()

◆ setComputePipeline()

◆ setDefaultScissor()

void QRhiVulkan::setDefaultScissor ( QVkCommandBuffer * cbD)

Definition at line 6822 of file qrhivulkan.cpp.

References Bounded, QVkCommandBuffer::Command::cmd, df, QVkCommandBuffer::hasCustomScissorSet, QVkCommandBuffer::passUsesSecondaryCb, and QVkCommandBuffer::Command::SetScissor.

Referenced by setGraphicsPipeline(), and setViewport().

Here is the caller graph for this function:

◆ setGraphicsPipeline()

◆ setObjectName()

void QRhiVulkan::setObjectName ( uint64_t object,
VkObjectType type,
const QByteArray & name,
int slot = -1 )

Definition at line 7342 of file qrhivulkan.cpp.

◆ setPipelineCacheData()

void QRhiVulkan::setPipelineCacheData ( const QByteArray & data)
overridevirtual

Implements QRhiImplementation.

Definition at line 6294 of file qrhivulkan.cpp.

References df.

◆ setPushConstants()

◆ setQueueSubmitParams()

void QRhiVulkan::setQueueSubmitParams ( QRhiNativeHandles * params)
overridevirtual

Implements QRhiImplementation.

Definition at line 6215 of file qrhivulkan.cpp.

◆ setScissor()

◆ setShaderResources()

void QRhiVulkan::setShaderResources ( QRhiCommandBuffer * cb,
QRhiShaderResourceBindings * srb,
int dynamicOffsetCount,
const QRhiCommandBuffer::DynamicOffset * dynamicOffsets )
overridevirtual

◆ setShadingRate()

void QRhiVulkan::setShadingRate ( QRhiCommandBuffer * cb,
const QSize & coarsePixelSize )
overridevirtual

Implements QRhiImplementation.

Definition at line 6998 of file qrhivulkan.cpp.

◆ setStencilRef()

void QRhiVulkan::setStencilRef ( QRhiCommandBuffer * cb,
quint32 refValue )
overridevirtual

◆ setVertexInput()

◆ setViewport()

void QRhiVulkan::setViewport ( QRhiCommandBuffer * cb,
const QRhiViewport & viewport )
overridevirtual

Implements QRhiImplementation.

Definition at line 6855 of file qrhivulkan.cpp.

References QVkCommandBuffer::Command::cmd, df, QVkCommandBuffer::passUsesSecondaryCb, QVkCommandBuffer::recordingPass, QVkCommandBuffer::RenderPass, setDefaultScissor(), QVkCommandBuffer::Command::SetViewport, and UnBounded.

Here is the call graph for this function:

◆ startPrimaryCommandBuffer()

QRhi::FrameOpResult QRhiVulkan::startPrimaryCommandBuffer ( VkCommandBuffer * cb)

Definition at line 3038 of file qrhivulkan.cpp.

References deviceLost, and df.

◆ startSecondaryCommandBuffer()

VkCommandBuffer QRhiVulkan::startSecondaryCommandBuffer ( QVkRenderTargetData * rtD = nullptr)

Definition at line 3426 of file qrhivulkan.cpp.

References df, and QVkRenderTargetData::rp.

◆ statistics()

QRhiStats QRhiVulkan::statistics ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 6189 of file qrhivulkan.cpp.

◆ subresourceBarrier()

void QRhiVulkan::subresourceBarrier ( QVkCommandBuffer * cbD,
VkImage image,
VkImageLayout oldLayout,
VkImageLayout newLayout,
VkAccessFlags srcAccess,
VkAccessFlags dstAccess,
VkPipelineStageFlags srcStage,
VkPipelineStageFlags dstStage,
int startLayer,
int layerCount,
int startLevel,
int levelCount )

◆ subresUploadByteSize()

VkDeviceSize QRhiVulkan::subresUploadByteSize ( const QRhiTextureSubresourceUploadDescription & subresDesc) const

Definition at line 4394 of file qrhivulkan.cpp.

◆ supportedSampleCounts()

QList< int > QRhiVulkan::supportedSampleCounts ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5404 of file qrhivulkan.cpp.

◆ supportedShadingRates()

QList< QSize > QRhiVulkan::supportedShadingRates ( int sampleCount) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5436 of file qrhivulkan.cpp.

◆ trackedBufferBarrier()

void QRhiVulkan::trackedBufferBarrier ( QVkCommandBuffer * cbD,
QVkBuffer * bufD,
int slot,
VkAccessFlags access,
VkPipelineStageFlags stage )

◆ trackedImageBarrier()

void QRhiVulkan::trackedImageBarrier ( QVkCommandBuffer * cbD,
QVkTexture * texD,
VkImageLayout layout,
VkAccessFlags access,
VkPipelineStageFlags stage )

◆ trackedRegisterBuffer()

void QRhiVulkan::trackedRegisterBuffer ( QRhiPassResourceTracker * passResTracker,
QVkBuffer * bufD,
int slot,
QRhiPassResourceTracker::BufferAccess access,
QRhiPassResourceTracker::BufferStage stage )

Definition at line 5834 of file qrhivulkan.cpp.

References QRhiPassResourceTracker::registerBuffer(), and toPassTrackerUsageState().

Referenced by dispatchIndirect(), drawIndexedIndirect(), drawIndexedIndirectCount(), drawIndirect(), drawIndirectCount(), setShaderResources(), and setVertexInput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trackedRegisterTexture()

void QRhiVulkan::trackedRegisterTexture ( QRhiPassResourceTracker * passResTracker,
QVkTexture * texD,
QRhiPassResourceTracker::TextureAccess access,
QRhiPassResourceTracker::TextureStage stage )

Definition at line 5852 of file qrhivulkan.cpp.

References QRhiPassResourceTracker::registerTexture(), and toPassTrackerUsageState().

Referenced by activateTextureRenderTarget(), beginPass(), and setShaderResources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ubufAlignment()

int QRhiVulkan::ubufAlignment ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5952 of file qrhivulkan.cpp.

◆ updateShaderResourceBindings()

void QRhiVulkan::updateShaderResourceBindings ( QRhiShaderResourceBindings * srb)

◆ waitCommandCompletion()

QRhi::FrameOpResult QRhiVulkan::waitCommandCompletion ( int frameSlot)

Definition at line 3133 of file qrhivulkan.cpp.

References deviceLost, and df.

Member Data Documentation

◆ activeBufferReadbacks

QVarLengthArray<BufferReadback, 2> QRhiVulkan::activeBufferReadbacks

Definition at line 1157 of file qrhivulkan_p.h.

◆ activeTextureReadbacks

QVarLengthArray<TextureReadback, 2> QRhiVulkan::activeTextureReadbacks

Definition at line 1149 of file qrhivulkan_p.h.

◆ allocator

QVkAllocator QRhiVulkan::allocator = nullptr

Definition at line 1009 of file qrhivulkan_p.h.

Referenced by QRhiVulkan(), create(), destroy(), and executeDeferredReleases().

◆ caps

struct QRhiVulkan::[struct].caps QRhiVulkan::caps

◆ clipCorrectMatrix

QMatrix4x4 QRhiVulkan::clipCorrectMatrix

Definition at line 1110 of file qrhivulkan_p.h.

◆ cmdPool

VkCommandPool QRhiVulkan::cmdPool[QVK_FRAMES_IN_FLIGHT] = {}

Definition at line 1002 of file qrhivulkan_p.h.

◆ currentSwapChain

QVkSwapChain* QRhiVulkan::currentSwapChain = nullptr

Definition at line 1112 of file qrhivulkan_p.h.

Referenced by beginFrame(), beginPass(), endFrame(), enqueueResourceUpdates(), and finish().

◆ descriptorPools

QVarLengthArray<DescriptorPoolData, 8> QRhiVulkan::descriptorPools

Definition at line 1103 of file qrhivulkan_p.h.

◆ dev

VkDevice QRhiVulkan::dev = VK_NULL_HANDLE

Definition at line 1001 of file qrhivulkan_p.h.

◆ deviceLost

◆ df

◆ driverInfoStruct

QRhiDriverInfo QRhiVulkan::driverInfoStruct

Definition at line 1115 of file qrhivulkan_p.h.

◆ f

◆ freeSecondaryCbs

QVarLengthArray<VkCommandBuffer, 4> QRhiVulkan::freeSecondaryCbs[QVK_FRAMES_IN_FLIGHT]

Definition at line 1104 of file qrhivulkan_p.h.

◆ gfxQueue

VkQueue QRhiVulkan::gfxQueue = VK_NULL_HANDLE

Definition at line 1006 of file qrhivulkan_p.h.

◆ gfxQueueFamilyIdx

quint32 QRhiVulkan::gfxQueueFamilyIdx = 0

Definition at line 1003 of file qrhivulkan_p.h.

◆ gfxQueueFlags

VkDeviceQueueCreateFlags QRhiVulkan::gfxQueueFlags = 0

Definition at line 1005 of file qrhivulkan_p.h.

◆ gfxQueueIdx

quint32 QRhiVulkan::gfxQueueIdx = 0

Definition at line 1004 of file qrhivulkan_p.h.

◆ importedAllocator

bool QRhiVulkan::importedAllocator = false

Definition at line 1008 of file qrhivulkan_p.h.

Referenced by QRhiVulkan(), create(), and destroy().

◆ importedDevice

bool QRhiVulkan::importedDevice = false

Definition at line 999 of file qrhivulkan_p.h.

Referenced by QRhiVulkan(), create(), and destroy().

◆ inst

QVulkanInstance* QRhiVulkan::inst = nullptr

Definition at line 996 of file qrhivulkan_p.h.

◆ maybeWindow

QWindow* QRhiVulkan::maybeWindow = nullptr

Definition at line 997 of file qrhivulkan_p.h.

Referenced by QRhiVulkan().

◆ nativeHandlesStruct

QRhiVulkanNativeHandles QRhiVulkan::nativeHandlesStruct

Definition at line 1114 of file qrhivulkan_p.h.

◆ ofr

struct QRhiVulkan::OffscreenFrame QRhiVulkan::ofr

◆ optimalDsFormat

VkFormat QRhiVulkan::optimalDsFormat = VK_FORMAT_UNDEFINED

Definition at line 1109 of file qrhivulkan_p.h.

◆ physDev

VkPhysicalDevice QRhiVulkan::physDev = VK_NULL_HANDLE

Definition at line 1000 of file qrhivulkan_p.h.

◆ physDevFeatures

VkPhysicalDeviceFeatures QRhiVulkan::physDevFeatures

Definition at line 1013 of file qrhivulkan_p.h.

◆ physDevProperties

VkPhysicalDeviceProperties QRhiVulkan::physDevProperties

Definition at line 1028 of file qrhivulkan_p.h.

◆ pipelineCache

VkPipelineCache QRhiVulkan::pipelineCache = VK_NULL_HANDLE

Definition at line 1093 of file qrhivulkan_p.h.

◆ releaseCachedResourcesCalledBeforeFrameStart

bool QRhiVulkan::releaseCachedResourcesCalledBeforeFrameStart = false

◆ releaseQueue

QList<DeferredReleaseEntry> QRhiVulkan::releaseQueue

Definition at line 1225 of file qrhivulkan_p.h.

◆ requestedDeviceExtensions

QByteArrayList QRhiVulkan::requestedDeviceExtensions

Definition at line 998 of file qrhivulkan_p.h.

◆ rhiFlags

QRhi::Flags QRhiVulkan::rhiFlags

Definition at line 1012 of file qrhivulkan_p.h.

◆ semaphoresWaitMasksForQueueSubmit

QVarLengthArray<VkPipelineStageFlags, 4> QRhiVulkan::semaphoresWaitMasksForQueueSubmit

Definition at line 1233 of file qrhivulkan_p.h.

◆ signalSemaphoresForQueueSubmit

QVarLengthArray<VkSemaphore, 4> QRhiVulkan::signalSemaphoresForQueueSubmit

Definition at line 1234 of file qrhivulkan_p.h.

◆ swapchains

QSet<QVkSwapChain *> QRhiVulkan::swapchains

Definition at line 1113 of file qrhivulkan_p.h.

◆ texbufAlign

VkDeviceSize QRhiVulkan::texbufAlign

Definition at line 1030 of file qrhivulkan_p.h.

◆ timestampQueryPool

VkQueryPool QRhiVulkan::timestampQueryPool = VK_NULL_HANDLE

Definition at line 1106 of file qrhivulkan_p.h.

◆ timestampQueryPoolMap

QBitArray QRhiVulkan::timestampQueryPoolMap

Definition at line 1107 of file qrhivulkan_p.h.

◆ timestampValidBits

quint32 QRhiVulkan::timestampValidBits = 0

Definition at line 1007 of file qrhivulkan_p.h.

◆ ubufAlign

VkDeviceSize QRhiVulkan::ubufAlign

Definition at line 1029 of file qrhivulkan_p.h.

◆ vkAcquireNextImageKHR

PFN_vkAcquireNextImageKHR QRhiVulkan::vkAcquireNextImageKHR

Definition at line 1050 of file qrhivulkan_p.h.

◆ vkCreateSwapchainKHR

PFN_vkCreateSwapchainKHR QRhiVulkan::vkCreateSwapchainKHR = nullptr

Definition at line 1047 of file qrhivulkan_p.h.

◆ vkDestroySwapchainKHR

PFN_vkDestroySwapchainKHR QRhiVulkan::vkDestroySwapchainKHR

Definition at line 1048 of file qrhivulkan_p.h.

◆ vkGetPhysicalDeviceSurfaceCapabilitiesKHR

PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR QRhiVulkan::vkGetPhysicalDeviceSurfaceCapabilitiesKHR

Definition at line 1052 of file qrhivulkan_p.h.

◆ vkGetPhysicalDeviceSurfaceFormatsKHR

PFN_vkGetPhysicalDeviceSurfaceFormatsKHR QRhiVulkan::vkGetPhysicalDeviceSurfaceFormatsKHR

Definition at line 1053 of file qrhivulkan_p.h.

◆ vkGetPhysicalDeviceSurfacePresentModesKHR

PFN_vkGetPhysicalDeviceSurfacePresentModesKHR QRhiVulkan::vkGetPhysicalDeviceSurfacePresentModesKHR

Definition at line 1054 of file qrhivulkan_p.h.

◆ vkGetSwapchainImagesKHR

PFN_vkGetSwapchainImagesKHR QRhiVulkan::vkGetSwapchainImagesKHR

Definition at line 1049 of file qrhivulkan_p.h.

◆ vkQueuePresentKHR

PFN_vkQueuePresentKHR QRhiVulkan::vkQueuePresentKHR

Definition at line 1051 of file qrhivulkan_p.h.

◆ waitSemaphoresForPresent

QVarLengthArray<VkSemaphore, 4> QRhiVulkan::waitSemaphoresForPresent

Definition at line 1235 of file qrhivulkan_p.h.

◆ waitSemaphoresForQueueSubmit

QVarLengthArray<VkSemaphore, 4> QRhiVulkan::waitSemaphoresForQueueSubmit

Definition at line 1232 of file qrhivulkan_p.h.


The documentation for this class was generated from the following files: