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

Public Types

using BufferImageCopyList = QVarLengthArray<VkBufferImageCopy, 16>

Public Member Functions

 QRhiVulkan (QRhiVulkanInitParams *params, QRhiVulkanNativeHandles *importParams=nullptr)
bool create (QRhi::Flags flags) override
void destroy () override
QRhi::AdapterList enumerateAdaptersBeforeCreate (QRhiNativeHandles *nativeHandles) const override
QRhiGraphicsPipelinecreateGraphicsPipeline () override
QRhiComputePipelinecreateComputePipeline () override
QRhiShaderResourceBindingscreateShaderResourceBindings () override
QRhiBuffercreateBuffer (QRhiBuffer::Type type, QRhiBuffer::UsageFlags usage, quint32 size) override
QRhiRenderBuffercreateRenderBuffer (QRhiRenderBuffer::Type type, const QSize &pixelSize, int sampleCount, QRhiRenderBuffer::Flags flags, QRhiTexture::Format backingFormatHint) override
QRhiTexturecreateTexture (QRhiTexture::Format format, const QSize &pixelSize, int depth, int arraySize, int sampleCount, QRhiTexture::Flags flags) override
QRhiSamplercreateSampler (QRhiSampler::Filter magFilter, QRhiSampler::Filter minFilter, QRhiSampler::Filter mipmapMode, QRhiSampler::AddressMode u, QRhiSampler::AddressMode v, QRhiSampler::AddressMode w) override
QRhiTextureRenderTargetcreateTextureRenderTarget (const QRhiTextureRenderTargetDescription &desc, QRhiTextureRenderTarget::Flags flags) override
QRhiShadingRateMapcreateShadingRateMap () override
QRhiSwapChaincreateSwapChain () override
QRhi::FrameOpResult beginFrame (QRhiSwapChain *swapChain, QRhi::BeginFrameFlags flags) override
QRhi::FrameOpResult endFrame (QRhiSwapChain *swapChain, QRhi::EndFrameFlags flags) override
QRhi::FrameOpResult beginOffscreenFrame (QRhiCommandBuffer **cb, QRhi::BeginFrameFlags flags) override
QRhi::FrameOpResult endOffscreenFrame (QRhi::EndFrameFlags flags) 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 flags) 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 &c) override
void setStencilRef (QRhiCommandBuffer *cb, quint32 refValue) 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 drawCount, quint32 stride) override
void drawIndexedIndirect (QRhiCommandBuffer *cb, QRhiBuffer *indirectBuffer, quint32 indirectBufferOffset, quint32 drawCount, quint32 stride) override
void debugMarkBegin (QRhiCommandBuffer *cb, const QByteArray &name) override
void debugMarkEnd (QRhiCommandBuffer *cb) override
void debugMarkMsg (QRhiCommandBuffer *cb, const QByteArray &msg) override
void beginComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates, QRhiCommandBuffer::BeginPassFlags flags) override
void endComputePass (QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *resourceUpdates) override
void setComputePipeline (QRhiCommandBuffer *cb, QRhiComputePipeline *ps) override
void dispatch (QRhiCommandBuffer *cb, int x, int y, int z) override
const QRhiNativeHandlesnativeHandles (QRhiCommandBuffer *cb) override
void beginExternal (QRhiCommandBuffer *cb) override
void endExternal (QRhiCommandBuffer *cb) override
double lastCompletedGpuTime (QRhiCommandBuffer *cb) override
QList< int > supportedSampleCounts () const override
QList< QSizesupportedShadingRates (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 format, QRhiTexture::Flags flags) const override
bool isFeatureSupported (QRhi::Feature feature) const override
int resourceLimit (QRhi::ResourceLimit limit) const override
const QRhiNativeHandlesnativeHandles () override
QRhiDriverInfo driverInfo () const override
QRhiStats statistics () override
bool makeThreadLocalNativeContextCurrent () override
void setQueueSubmitParams (QRhiNativeHandles *params) override
void releaseCachedResources () override
bool isDeviceLost () const override
QByteArray pipelineCacheData () override
void setPipelineCacheData (const QByteArray &data) override
VkResult createDescriptorPool (VkDescriptorPool *pool)
bool allocateDescriptorSet (VkDescriptorSetAllocateInfo *allocInfo, VkDescriptorSet *result, int *resultPoolIndex)
uint32_t chooseTransientImageMemType (VkImage img, uint32_t startIndex)
bool createTransientImage (VkFormat format, const QSize &pixelSize, VkImageUsageFlags usage, VkImageAspectFlags aspectMask, VkSampleCountFlagBits samples, VkDeviceMemory *mem, VkImage *images, VkImageView *views, int count)
bool recreateSwapChain (QRhiSwapChain *swapChain)
void releaseSwapChainResources (QRhiSwapChain *swapChain)
VkFormat optimalDepthStencilFormat ()
VkSampleCountFlagBits effectiveSampleCountBits (int sampleCount)
bool createDefaultRenderPass (QVkRenderPassDescriptor *rpD, bool hasDepthStencil, VkSampleCountFlagBits samples, VkFormat colorFormat, QRhiShadingRateMap *shadingRateMap)
bool createOffscreenRenderPass (QVkRenderPassDescriptor *rpD, const QRhiColorAttachment *colorAttachmentsBegin, const QRhiColorAttachment *colorAttachmentsEnd, bool preserveColor, bool preserveDs, bool storeDs, QRhiRenderBuffer *depthStencilBuffer, QRhiTexture *depthTexture, QRhiTexture *depthResolveTexture, 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 layer, int level, 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 access, QRhiPassResourceTracker::BufferStage stage)
void trackedRegisterTexture (QRhiPassResourceTracker *passResTracker, QVkTexture *texD, QRhiPassResourceTracker::TextureAccess access, QRhiPassResourceTracker::TextureStage stage)
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 &name, int slot=-1)
void setObjectName (uint64_t object, VkObjectType type, const QByteArray &name, int slot=-1)
void trackedBufferBarrier (QVkCommandBuffer *cbD, QVkBuffer *bufD, int slot, VkAccessFlags access, VkPipelineStageFlags stage)
void trackedImageBarrier (QVkCommandBuffer *cbD, QVkTexture *texD, VkImageLayout layout, VkAccessFlags access, VkPipelineStageFlags stage)
void depthStencilExplicitBarrier (QVkCommandBuffer *cbD, QVkRenderBuffer *rbD)
void 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)
void updateShaderResourceBindings (QRhiShaderResourceBindings *srb)
void ensureCommandPoolForNewFrame ()
double elapsedSecondsFromTimestamp (quint64 timestamp[2], bool *ok)
void printExtraErrorInfo (VkResult err)
void printDeviceLossErrorInfo () const
void setDefaultScissor (QVkCommandBuffer *cbD)
Public Member Functions inherited from QRhiImplementation
virtual ~QRhiImplementation ()
void prepareForCreate (QRhi *rhi, QRhi::Implementation impl, QRhi::Flags flags, QRhiAdapter *adapter)
bool isCompressedFormat (QRhiTexture::Format format) const
void compressedFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, QSize *blockDim) const
void textureFormatInfo (QRhiTexture::Format format, const QSize &size, quint32 *bpl, quint32 *byteSize, quint32 *bytesPerPixel) const
bool isStencilSupportingFormat (QRhiTexture::Format format) const
void registerResource (QRhiResource *res, bool ownsNativeResources=true)
void unregisterResource (QRhiResource *res)
void addDeleteLater (QRhiResource *res)
void addCleanupCallback (const QRhi::CleanupCallback &callback)
void addCleanupCallback (const void *key, const QRhi::CleanupCallback &callback)
void removeCleanupCallback (const void *key)
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 type) const
quint32 byteSizePerVertexForVertexInputFormat (QRhiVertexInputAttribute::Format format) const
int effectiveSampleCount (int sampleCount) const
QSize clampedSubResourceUploadSize (QSize size, QPoint dstPos, int level, QSize textureSizeAtLevelZero, bool warn=true)
void runCleanup ()

Public Attributes

QVulkanInstanceinst = nullptr
QWindowmaybeWindow = 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
VkQueue gfxQueue = VK_NULL_HANDLE
quint32 timestampValidBits = 0
bool importedAllocator = false
QVkAllocator allocator = nullptr
QVulkanFunctionsf = nullptr
QVulkanDeviceFunctionsdf = 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 { 
   bool   compute = false 
   bool   depthClamp = false 
   bool   wideLines = false 
   bool   debugUtils = false 
   bool   deviceFault = false 
   bool   vertexAttribDivisor = false 
   bool   texture3DSliceAs2D = false 
   bool   tessellation = false 
   bool   geometryShader = false 
   bool   nonFillPolygonMode = false 
   bool   multiView = false 
   bool   renderPass2KHR = false 
   bool   depthStencilResolveKHR = false 
   bool   perDrawShadingRate = false 
   bool   imageBasedShadingRate = false 
   QVersionNumber   apiVersion 
   int   imageBasedShadingRateTileSize = 0 
   bool   drawIndirectMulti = false 
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
QVkSwapChaincurrentSwapChain = nullptr
QSet< QVkSwapChain * > swapchains
QRhiVulkanNativeHandles nativeHandlesStruct
QRhiDriverInfo driverInfoStruct
struct QRhiVulkan::OffscreenFrame ofr
QVarLengthArray< TextureReadback, 2 > activeTextureReadbacks
QVarLengthArray< BufferReadback, 2 > activeBufferReadbacks
QList< DeferredReleaseEntryreleaseQueue
QVarLengthArray< VkSemaphore, 4 > waitSemaphoresForQueueSubmit
QVarLengthArray< VkPipelineStageFlags, 4 > semaphoresWaitMasksForQueueSubmit
QVarLengthArray< VkSemaphore, 4 > signalSemaphoresForQueueSubmit
QVarLengthArray< VkSemaphore, 4 > waitSemaphoresForPresent
Public Attributes inherited from QRhiImplementation
QRhiq
bool debugMarkers = false
int currentFrameSlot = 0
bool inFrame = false
QRhiAdapterrequestedRhiAdapter = nullptr

Additional Inherited Members

Static Public Member Functions inherited from QRhiImplementation
static QRhiImplementationnewInstance (QRhi::Implementation impl, QRhiInitParams *params, QRhiNativeHandles *importDevice)
static const QRhiShaderResourceBinding::DatashaderResourceBindingData (const QRhiShaderResourceBinding &binding)
static QRhiShaderResourceBinding::DatashaderResourceBindingData (QRhiShaderResourceBinding &binding)
static bool sortedBindingLessThan (const QRhiShaderResourceBinding &a, const QRhiShaderResourceBinding &b)
Static Public Attributes inherited from QRhiImplementation
static const int MAX_SHADER_CACHE_ENTRIES = 128

Detailed Description

Definition at line 718 of file qrhivulkan_p.h.

Member Typedef Documentation

◆ BufferImageCopyList

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

Definition at line 880 of file qrhivulkan_p.h.

Constructor & Destructor Documentation

◆ QRhiVulkan()

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

Definition at line 432 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 3188 of file qrhivulkan.cpp.

References QVkTextureRenderTarget::create(), QVkCommandBuffer::currentPassResTrackerIndex, depthStencilExplicitBarrier(), QRhiPassResourceTracker::TexColorOutput, QRhiPassResourceTracker::TexColorOutputStage, QRhiPassResourceTracker::TexDepthOutput, QRhiPassResourceTracker::TexDepthOutputStage, 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 1300 of file qrhivulkan.cpp.

References df.

◆ beginComputePass()

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

Implements QRhiImplementation.

Definition at line 3461 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 6635 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

Implements QRhiImplementation.

Definition at line 2650 of file qrhivulkan.cpp.

References QVkSwapChain::bufferCount, currentSwapChain, deviceLost, df, ensureCommandPoolForNewFrame(), QVkSwapChain::FrameResources::imageAcquired, QVkSwapChain::FrameResources::imageSemWaitable, prepareNewFrame(), QVkSwapChain::stereo, and QVkSwapChain::FrameResources::timestampQueryIndex.

Here is the call graph for this function:

◆ beginOffscreenFrame()

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

Implements QRhiImplementation.

Definition at line 3015 of file qrhivulkan.cpp.

References df, ensureCommandPoolForNewFrame(), and prepareNewFrame().

Here is the call graph for this function:

◆ beginPass()

◆ chooseTransientImageMemType()

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

Definition at line 1534 of file qrhivulkan.cpp.

References df, and f.

◆ clipSpaceCorrMatrix()

QMatrix4x4 QRhiVulkan::clipSpaceCorrMatrix ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5411 of file qrhivulkan.cpp.

◆ create()

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

Implements QRhiImplementation.

Definition at line 535 of file qrhivulkan.cpp.

References allocator, deviceLost, df, f, fillDriverInfo(), 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 5386 of file qrhivulkan.cpp.

◆ createComputePipeline()

QRhiComputePipeline * QRhiVulkan::createComputePipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5828 of file qrhivulkan.cpp.

◆ createDefaultRenderPass()

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

◆ createDescriptorPool()

VkResult QRhiVulkan::createDescriptorPool ( VkDescriptorPool * pool)

Definition at line 1277 of file qrhivulkan.cpp.

References df, and QVK_DESC_SETS_PER_POOL.

◆ createGraphicsPipeline()

QRhiGraphicsPipeline * QRhiVulkan::createGraphicsPipeline ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5823 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,
QRhiShadingRateMap * shadingRateMap )

◆ createRenderBuffer()

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

Implements QRhiImplementation.

Definition at line 5791 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 5805 of file qrhivulkan.cpp.

◆ createShader()

VkShaderModule QRhiVulkan::createShader ( const QByteArray & spirv)

Definition at line 3676 of file qrhivulkan.cpp.

References df.

◆ createShaderResourceBindings()

QRhiShaderResourceBindings * QRhiVulkan::createShaderResourceBindings ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5833 of file qrhivulkan.cpp.

◆ createShadingRateMap()

QRhiShadingRateMap * QRhiVulkan::createShadingRateMap ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5812 of file qrhivulkan.cpp.

◆ createSwapChain()

QRhiSwapChain * QRhiVulkan::createSwapChain ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5373 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 5798 of file qrhivulkan.cpp.

◆ createTextureRenderTarget()

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

Implements QRhiImplementation.

Definition at line 5817 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 1566 of file qrhivulkan.cpp.

References df.

◆ debugMarkBegin()

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

Implements QRhiImplementation.

Definition at line 6540 of file qrhivulkan.cpp.

◆ debugMarkEnd()

void QRhiVulkan::debugMarkEnd ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 6566 of file qrhivulkan.cpp.

◆ debugMarkMsg()

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

Implements QRhiImplementation.

Definition at line 6584 of file qrhivulkan.cpp.

◆ depthStencilExplicitBarrier()

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

Definition at line 3956 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 1174 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()

◆ 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

◆ drawIndirect()

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

◆ driverInfo()

QRhiDriverInfo QRhiVulkan::driverInfo ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5607 of file qrhivulkan.cpp.

◆ effectiveSampleCountBits()

VkSampleCountFlagBits QRhiVulkan::effectiveSampleCountBits ( int sampleCount)

Definition at line 4917 of file qrhivulkan.cpp.

◆ elapsedSecondsFromTimestamp()

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

Definition at line 2632 of file qrhivulkan.cpp.

◆ endAndEnqueueSecondaryCommandBuffer()

◆ endAndSubmitPrimaryCommandBuffer()

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

Definition at line 2933 of file qrhivulkan.cpp.

References deviceLost, and df.

◆ endComputePass()

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

Implements QRhiImplementation.

Definition at line 3484 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 6672 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 3064 of file qrhivulkan.cpp.

References df, finishActiveReadbacks(), QVkCommandBuffer::lastGpuTime, and recordPrimaryCommandBuffer().

Here is the call graph for this function:

◆ endPass()

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

Implements QRhiImplementation.

Definition at line 3440 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 4219 of file qrhivulkan.cpp.

References QRhiResourceUpdateBatchPrivate::activeBufferOpCount, QRhiResourceUpdateBatchPrivate::activeTextureOpCount, QVkCommandBuffer::Command::BlitImage, QVkCommandBuffer::Command::cmd, QRhiBufferData::constData(), QRhiResourceUpdateBatchPrivate::TextureOp::Copy, QVkCommandBuffer::Command::CopyBuffer, QVkCommandBuffer::Command::CopyBufferToImage, QVkCommandBuffer::Command::CopyImage, QVkCommandBuffer::Command::CopyImageToBuffer, currentSwapChain, QRhiResourceUpdateBatchPrivate::BufferOp::data, QRhiResourceUpdateBatchPrivate::TextureOp::dst, QRhiResourceUpdateBatchPrivate::BufferOp::DynamicUpdate, executeBufferHostWritesForSlot(), QRhiResourceUpdateBatchPrivate::free(), QRhiResourceUpdateBatchPrivate::TextureOp::GenMips, QRhiResourceUpdateBatchPrivate::get(), QVkSwapChain::ImageResources::lastUse, 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 4952 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 2618 of file qrhivulkan.cpp.

References df.

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 3691 of file qrhivulkan.cpp.

References df.

◆ enumerateAdaptersBeforeCreate()

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

Reimplemented from QRhiImplementation.

Definition at line 1237 of file qrhivulkan.cpp.

◆ executeBufferHostWritesForSlot()

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

Definition at line 4710 of file qrhivulkan.cpp.

Referenced by drawIndexedIndirect(), drawIndirect(), 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 3122 of file qrhivulkan.cpp.

References currentSwapChain, df, ensureCommandPoolForNewFrame(), executeDeferredReleases(), finishActiveReadbacks(), 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 4831 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 5406 of file qrhivulkan.cpp.

◆ isDeviceLost()

bool QRhiVulkan::isDeviceLost ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5662 of file qrhivulkan.cpp.

References deviceLost.

◆ isFeatureSupported()

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

Implements QRhiImplementation.

Definition at line 5452 of file qrhivulkan.cpp.

◆ isTextureFormatSupported()

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

Implements QRhiImplementation.

Definition at line 5426 of file qrhivulkan.cpp.

References f.

◆ isYUpInFramebuffer()

bool QRhiVulkan::isYUpInFramebuffer ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5396 of file qrhivulkan.cpp.

◆ isYUpInNDC()

bool QRhiVulkan::isYUpInNDC ( ) const
overridevirtual

Implements QRhiImplementation.

Definition at line 5401 of file qrhivulkan.cpp.

◆ lastCompletedGpuTime()

double QRhiVulkan::lastCompletedGpuTime ( QRhiCommandBuffer * cb)
overridevirtual

Implements QRhiImplementation.

Definition at line 6688 of file qrhivulkan.cpp.

References QVkCommandBuffer::lastGpuTime.

◆ makeThreadLocalNativeContextCurrent()

bool QRhiVulkan::makeThreadLocalNativeContextCurrent ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5632 of file qrhivulkan.cpp.

◆ nativeHandles() [1/2]

const QRhiNativeHandles * QRhiVulkan::nativeHandles ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5602 of file qrhivulkan.cpp.

◆ nativeHandles() [2/2]

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

Implements QRhiImplementation.

Definition at line 6610 of file qrhivulkan.cpp.

◆ optimalDepthStencilFormat()

VkFormat QRhiVulkan::optimalDepthStencilFormat ( )

Definition at line 1655 of file qrhivulkan.cpp.

References f.

◆ pipelineCacheData()

QByteArray QRhiVulkan::pipelineCacheData ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5679 of file qrhivulkan.cpp.

References df.

◆ prepareNewFrame()

void QRhiVulkan::prepareNewFrame ( QRhiCommandBuffer * cb)

Definition at line 2870 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 4026 of file qrhivulkan.cpp.

◆ printDeviceLossErrorInfo()

void QRhiVulkan::printDeviceLossErrorInfo ( ) const

Definition at line 4144 of file qrhivulkan.cpp.

Referenced by printExtraErrorInfo().

Here is the caller graph for this function:

◆ printExtraErrorInfo()

void QRhiVulkan::printExtraErrorInfo ( VkResult err)

Definition at line 4136 of file qrhivulkan.cpp.

References printDeviceLossErrorInfo().

Here is the call graph for this function:

◆ recordPrimaryCommandBuffer()

void QRhiVulkan::recordPrimaryCommandBuffer ( QVkCommandBuffer * cbD)

Definition at line 4962 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::Draw, QVkCommandBuffer::Command::DrawIndexed, QVkCommandBuffer::Command::DrawIndexedIndirect, QVkCommandBuffer::Command::DrawIndirect, QVkCommandBuffer::Command::EndRenderPass, QVkCommandBuffer::Command::ExecuteSecondary, QVkCommandBuffer::Command::ImageBarrier, QVkCommandBuffer::Command::MemoryBarrier, QVkCommandBuffer::NoPass, QVkCommandBuffer::recordingPass, recordTransitionPassResources(), QVkCommandBuffer::Command::SetBlendConstants, 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:

◆ recordTransitionPassResources()

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

Definition at line 5310 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()

bool QRhiVulkan::recreateSwapChain ( QRhiSwapChain * swapChain)

Definition at line 2257 of file qrhivulkan.cpp.

References QVkSwapChain::bufferCount, QVkSwapChain::FrameResources::cmdFenceWaitable, df, QVkSwapChain::FrameResources::imageAcquired, QVkSwapChain::FrameResources::imageSemWaitable, QVkSwapChain::ImageResources::lastUse, QVK_FRAMES_IN_FLIGHT, releaseSwapChainResources(), QVkSwapChain::ImageResources::ScImageUseNone, QVkSwapChain::stereo, and QVkShadingRateMap::texture.

Referenced by QVkSwapChain::createOrResize().

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

◆ releaseCachedResources()

void QRhiVulkan::releaseCachedResources ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5657 of file qrhivulkan.cpp.

References releaseCachedResourcesCalledBeforeFrameStart.

◆ releaseSwapChainResources()

void QRhiVulkan::releaseSwapChainResources ( QRhiSwapChain * swapChain)

Definition at line 2553 of file qrhivulkan.cpp.

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

Referenced by QVkSwapChain::destroy(), and recreateSwapChain().

Here is the caller graph for this function:

◆ resourceLimit()

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

Implements QRhiImplementation.

Definition at line 5562 of file qrhivulkan.cpp.

References QVK_FRAMES_IN_FLIGHT.

◆ resourceUpdate()

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

Implements QRhiImplementation.

Definition at line 3252 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 6694 of file qrhivulkan.cpp.

◆ setBlendConstants()

◆ setComputePipeline()

◆ setDefaultScissor()

void QRhiVulkan::setDefaultScissor ( QVkCommandBuffer * cbD)

Definition at line 6232 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()

void QRhiVulkan::setGraphicsPipeline ( QRhiCommandBuffer * cb,
QRhiGraphicsPipeline * ps )
overridevirtual

Implements QRhiImplementation.

Definition at line 5838 of file qrhivulkan.cpp.

References QVkCommandBuffer::Command::BindPipeline, QVkCommandBuffer::Command::cmd, df, QVkCommandBuffer::hasCustomScissorSet, QVkCommandBuffer::passUsesSecondaryCb, QVkCommandBuffer::recordingPass, QVkCommandBuffer::RenderPass, and setDefaultScissor().

Here is the call graph for this function:

◆ setObjectName()

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

Definition at line 6707 of file qrhivulkan.cpp.

◆ setPipelineCacheData()

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

Implements QRhiImplementation.

Definition at line 5717 of file qrhivulkan.cpp.

References df.

◆ setQueueSubmitParams()

void QRhiVulkan::setQueueSubmitParams ( QRhiNativeHandles * params)
overridevirtual

Implements QRhiImplementation.

Definition at line 5638 of file qrhivulkan.cpp.

◆ setScissor()

◆ setShaderResources()

◆ setShadingRate()

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

Implements QRhiImplementation.

Definition at line 6363 of file qrhivulkan.cpp.

◆ setStencilRef()

◆ setVertexInput()

◆ setViewport()

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

Implements QRhiImplementation.

Definition at line 6265 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 2893 of file qrhivulkan.cpp.

References deviceLost, and df.

◆ startSecondaryCommandBuffer()

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

Definition at line 3260 of file qrhivulkan.cpp.

References df, and QVkRenderTargetData::rp.

◆ statistics()

QRhiStats QRhiVulkan::statistics ( )
overridevirtual

Implements QRhiImplementation.

Definition at line 5612 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 4016 of file qrhivulkan.cpp.

◆ supportedSampleCounts()

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

Implements QRhiImplementation.

Definition at line 4897 of file qrhivulkan.cpp.

◆ supportedShadingRates()

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

Implements QRhiImplementation.

Definition at line 4929 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 5273 of file qrhivulkan.cpp.

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

Referenced by drawIndexedIndirect(), drawIndirect(), 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 5291 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 5391 of file qrhivulkan.cpp.

◆ updateShaderResourceBindings()

void QRhiVulkan::updateShaderResourceBindings ( QRhiShaderResourceBindings * srb)

Definition at line 3708 of file qrhivulkan.cpp.

References df.

◆ waitCommandCompletion()

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

Definition at line 2988 of file qrhivulkan.cpp.

Member Data Documentation

◆ activeBufferReadbacks

QVarLengthArray<BufferReadback, 2> QRhiVulkan::activeBufferReadbacks

Definition at line 1069 of file qrhivulkan_p.h.

◆ activeTextureReadbacks

QVarLengthArray<TextureReadback, 2> QRhiVulkan::activeTextureReadbacks

Definition at line 1061 of file qrhivulkan_p.h.

◆ allocator

QVkAllocator QRhiVulkan::allocator = nullptr

Definition at line 935 of file qrhivulkan_p.h.

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

◆ apiVersion

QVersionNumber QRhiVulkan::apiVersion

Definition at line 1005 of file qrhivulkan_p.h.

◆ [struct]

struct { ... } QRhiVulkan::caps

◆ clipCorrectMatrix

QMatrix4x4 QRhiVulkan::clipCorrectMatrix

Definition at line 1027 of file qrhivulkan_p.h.

◆ cmdPool

VkCommandPool QRhiVulkan::cmdPool[QVK_FRAMES_IN_FLIGHT] = {}

Definition at line 929 of file qrhivulkan_p.h.

◆ compute

bool QRhiVulkan::compute = false

Definition at line 990 of file qrhivulkan_p.h.

◆ currentSwapChain

QVkSwapChain* QRhiVulkan::currentSwapChain = nullptr

Definition at line 1029 of file qrhivulkan_p.h.

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

◆ debugUtils

bool QRhiVulkan::debugUtils = false

Definition at line 993 of file qrhivulkan_p.h.

◆ depthClamp

bool QRhiVulkan::depthClamp = false

Definition at line 991 of file qrhivulkan_p.h.

◆ depthStencilResolveKHR

bool QRhiVulkan::depthStencilResolveKHR = false

Definition at line 1002 of file qrhivulkan_p.h.

◆ descriptorPools

QVarLengthArray<DescriptorPoolData, 8> QRhiVulkan::descriptorPools

Definition at line 1020 of file qrhivulkan_p.h.

◆ dev

VkDevice QRhiVulkan::dev = VK_NULL_HANDLE

Definition at line 928 of file qrhivulkan_p.h.

◆ deviceFault

bool QRhiVulkan::deviceFault = false

Definition at line 994 of file qrhivulkan_p.h.

◆ deviceLost

◆ df

◆ drawIndirectMulti

bool QRhiVulkan::drawIndirectMulti = false

Definition at line 1007 of file qrhivulkan_p.h.

◆ driverInfoStruct

QRhiDriverInfo QRhiVulkan::driverInfoStruct

Definition at line 1032 of file qrhivulkan_p.h.

◆ f

◆ freeSecondaryCbs

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

Definition at line 1021 of file qrhivulkan_p.h.

◆ geometryShader

bool QRhiVulkan::geometryShader = false

Definition at line 998 of file qrhivulkan_p.h.

◆ gfxQueue

VkQueue QRhiVulkan::gfxQueue = VK_NULL_HANDLE

Definition at line 932 of file qrhivulkan_p.h.

◆ gfxQueueFamilyIdx

quint32 QRhiVulkan::gfxQueueFamilyIdx = 0

Definition at line 930 of file qrhivulkan_p.h.

◆ gfxQueueIdx

quint32 QRhiVulkan::gfxQueueIdx = 0

Definition at line 931 of file qrhivulkan_p.h.

◆ imageBasedShadingRate

bool QRhiVulkan::imageBasedShadingRate = false

Definition at line 1004 of file qrhivulkan_p.h.

◆ imageBasedShadingRateTileSize

int QRhiVulkan::imageBasedShadingRateTileSize = 0

Definition at line 1006 of file qrhivulkan_p.h.

◆ importedAllocator

bool QRhiVulkan::importedAllocator = false

Definition at line 934 of file qrhivulkan_p.h.

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

◆ importedDevice

bool QRhiVulkan::importedDevice = false

Definition at line 926 of file qrhivulkan_p.h.

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

◆ inst

QVulkanInstance* QRhiVulkan::inst = nullptr

Definition at line 923 of file qrhivulkan_p.h.

◆ maybeWindow

QWindow* QRhiVulkan::maybeWindow = nullptr

Definition at line 924 of file qrhivulkan_p.h.

Referenced by QRhiVulkan().

◆ multiView

bool QRhiVulkan::multiView = false

Definition at line 1000 of file qrhivulkan_p.h.

◆ nativeHandlesStruct

QRhiVulkanNativeHandles QRhiVulkan::nativeHandlesStruct

Definition at line 1031 of file qrhivulkan_p.h.

◆ nonFillPolygonMode

bool QRhiVulkan::nonFillPolygonMode = false

Definition at line 999 of file qrhivulkan_p.h.

◆ ofr

struct QRhiVulkan::OffscreenFrame QRhiVulkan::ofr

◆ optimalDsFormat

VkFormat QRhiVulkan::optimalDsFormat = VK_FORMAT_UNDEFINED

Definition at line 1026 of file qrhivulkan_p.h.

◆ perDrawShadingRate

bool QRhiVulkan::perDrawShadingRate = false

Definition at line 1003 of file qrhivulkan_p.h.

◆ physDev

VkPhysicalDevice QRhiVulkan::physDev = VK_NULL_HANDLE

Definition at line 927 of file qrhivulkan_p.h.

◆ physDevFeatures

VkPhysicalDeviceFeatures QRhiVulkan::physDevFeatures

Definition at line 939 of file qrhivulkan_p.h.

◆ physDevProperties

VkPhysicalDeviceProperties QRhiVulkan::physDevProperties

Definition at line 953 of file qrhivulkan_p.h.

◆ pipelineCache

VkPipelineCache QRhiVulkan::pipelineCache = VK_NULL_HANDLE

Definition at line 1010 of file qrhivulkan_p.h.

◆ releaseCachedResourcesCalledBeforeFrameStart

bool QRhiVulkan::releaseCachedResourcesCalledBeforeFrameStart = false

Definition at line 957 of file qrhivulkan_p.h.

Referenced by prepareNewFrame(), and releaseCachedResources().

◆ releaseQueue

QList<DeferredReleaseEntry> QRhiVulkan::releaseQueue

Definition at line 1137 of file qrhivulkan_p.h.

◆ renderPass2KHR

bool QRhiVulkan::renderPass2KHR = false

Definition at line 1001 of file qrhivulkan_p.h.

◆ requestedDeviceExtensions

QByteArrayList QRhiVulkan::requestedDeviceExtensions

Definition at line 925 of file qrhivulkan_p.h.

◆ rhiFlags

QRhi::Flags QRhiVulkan::rhiFlags

Definition at line 938 of file qrhivulkan_p.h.

◆ semaphoresWaitMasksForQueueSubmit

QVarLengthArray<VkPipelineStageFlags, 4> QRhiVulkan::semaphoresWaitMasksForQueueSubmit

Definition at line 1145 of file qrhivulkan_p.h.

◆ signalSemaphoresForQueueSubmit

QVarLengthArray<VkSemaphore, 4> QRhiVulkan::signalSemaphoresForQueueSubmit

Definition at line 1146 of file qrhivulkan_p.h.

◆ swapchains

QSet<QVkSwapChain *> QRhiVulkan::swapchains

Definition at line 1030 of file qrhivulkan_p.h.

◆ tessellation

bool QRhiVulkan::tessellation = false

Definition at line 997 of file qrhivulkan_p.h.

◆ texbufAlign

VkDeviceSize QRhiVulkan::texbufAlign

Definition at line 955 of file qrhivulkan_p.h.

◆ texture3DSliceAs2D

bool QRhiVulkan::texture3DSliceAs2D = false

Definition at line 996 of file qrhivulkan_p.h.

◆ timestampQueryPool

VkQueryPool QRhiVulkan::timestampQueryPool = VK_NULL_HANDLE

Definition at line 1023 of file qrhivulkan_p.h.

◆ timestampQueryPoolMap

QBitArray QRhiVulkan::timestampQueryPoolMap

Definition at line 1024 of file qrhivulkan_p.h.

◆ timestampValidBits

quint32 QRhiVulkan::timestampValidBits = 0

Definition at line 933 of file qrhivulkan_p.h.

◆ ubufAlign

VkDeviceSize QRhiVulkan::ubufAlign

Definition at line 954 of file qrhivulkan_p.h.

◆ vertexAttribDivisor

bool QRhiVulkan::vertexAttribDivisor = false

Definition at line 995 of file qrhivulkan_p.h.

◆ vkAcquireNextImageKHR

PFN_vkAcquireNextImageKHR QRhiVulkan::vkAcquireNextImageKHR

Definition at line 975 of file qrhivulkan_p.h.

◆ vkCreateSwapchainKHR

PFN_vkCreateSwapchainKHR QRhiVulkan::vkCreateSwapchainKHR = nullptr

Definition at line 972 of file qrhivulkan_p.h.

◆ vkDestroySwapchainKHR

PFN_vkDestroySwapchainKHR QRhiVulkan::vkDestroySwapchainKHR

Definition at line 973 of file qrhivulkan_p.h.

◆ vkGetPhysicalDeviceSurfaceCapabilitiesKHR

PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR QRhiVulkan::vkGetPhysicalDeviceSurfaceCapabilitiesKHR

Definition at line 977 of file qrhivulkan_p.h.

◆ vkGetPhysicalDeviceSurfaceFormatsKHR

PFN_vkGetPhysicalDeviceSurfaceFormatsKHR QRhiVulkan::vkGetPhysicalDeviceSurfaceFormatsKHR

Definition at line 978 of file qrhivulkan_p.h.

◆ vkGetPhysicalDeviceSurfacePresentModesKHR

PFN_vkGetPhysicalDeviceSurfacePresentModesKHR QRhiVulkan::vkGetPhysicalDeviceSurfacePresentModesKHR

Definition at line 979 of file qrhivulkan_p.h.

◆ vkGetSwapchainImagesKHR

PFN_vkGetSwapchainImagesKHR QRhiVulkan::vkGetSwapchainImagesKHR

Definition at line 974 of file qrhivulkan_p.h.

◆ vkQueuePresentKHR

PFN_vkQueuePresentKHR QRhiVulkan::vkQueuePresentKHR

Definition at line 976 of file qrhivulkan_p.h.

◆ waitSemaphoresForPresent

QVarLengthArray<VkSemaphore, 4> QRhiVulkan::waitSemaphoresForPresent

Definition at line 1147 of file qrhivulkan_p.h.

◆ waitSemaphoresForQueueSubmit

QVarLengthArray<VkSemaphore, 4> QRhiVulkan::waitSemaphoresForQueueSubmit

Definition at line 1144 of file qrhivulkan_p.h.

◆ wideLines

bool QRhiVulkan::wideLines = false

Definition at line 992 of file qrhivulkan_p.h.


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