|
KiCad PCB EDA Suite
|
Classes | |
| struct | BindGroupAllocation |
| struct | BindGroupLayoutAllocation |
| struct | BufferAllocation |
| struct | ComputePipelineAllocation |
| struct | DescriptorPoolEntry |
| struct | FramebufferAllocation |
| struct | PipelineAllocation |
| struct | RenderPassAllocation |
| struct | ShaderAllocation |
| struct | StagingBuffer |
| struct | SurfaceAllocation |
| struct | SwapchainAllocation |
| struct | TextureAllocation |
| struct | VkSwapchainTry |
Public Member Functions | |
| RHI_VULKAN_DEVICE (bool enableValidation) | |
| ~RHI_VULKAN_DEVICE () override | |
| const char * | GetName () const override |
| Backend and GPU name for display, such as "Vulkan (GeForce RTX 3080)". | |
| RHI_BACKEND | GetBackend () const override |
| uint32_t | MaxTextureSize () const override |
| Largest texture width or height in texels. | |
| bool | IsInitialized () const override |
| bool | SupportsCompute () const override |
| Compute defaults keep backends without compute support usable for graphics. | |
| RHI_COMPUTE_DEVICE_LIMITS | ComputeDeviceLimits () const override |
| RHI_ComputePipelineHandle | CreateComputePipeline (const RHI_COMPUTE_PIPELINE_DESC &aDesc) override |
| void | DestroyComputePipeline (RHI_ComputePipelineHandle aHandle) override |
| RHI_COMPUTE_PIPELINE_LIMITS | ComputePipelineLimits (RHI_ComputePipelineHandle aHandle) const override |
| RHI_COMPUTE_RESULT | ExecuteCompute (const RHI_COMPUTE_JOB &aJob) override |
| Submit, wait for completion, and copy all readbacks before returning. | |
| RHI_BufferHandle | ReserveBufferHandle () override |
| Reserve a handle without creating the GPU buffer, so the UI thread can hand out handles while RealizeBuffer() runs later on the render thread. | |
| bool | RealizeBuffer (RHI_BufferHandle handle, const RHI_BUFFER_DESC &desc) override |
| Create the GPU buffer for a reserved handle. | |
| void | DestroyBuffer (RHI_BufferHandle handle) override |
| The handle's generation is retired, so later use of the stale handle is detected. | |
| void | UpdateBuffer (RHI_BufferHandle handle, const void *data, size_t sizeBytes, size_t offset=0) override |
| The buffer need not be mappable. | |
| RHI_TextureHandle | ReserveTextureHandle () override |
| Thread-safe handle reservation, realized later by RealizeTexture(). | |
| bool | RealizeTexture (RHI_TextureHandle handle, const RHI_TEXTURE_DESC &desc) override |
| Create the GPU texture for a reserved handle. | |
| void | DestroyTexture (RHI_TextureHandle handle) override |
| Render thread only. | |
| void | UploadTexture (RHI_TextureHandle handle, const void *data, size_t sizeBytes) override |
| Data is tightly packed rows in the texture's format, exactly width * height * bpp bytes. | |
| RHI_ShaderHandle | CreateShader (const RHI_SHADER_DESC &desc) override |
| Returns a null handle on failure. | |
| void | DestroyShader (RHI_ShaderHandle handle) override |
| RHI_PipelineHandle | CreatePipeline (const RHI_PIPELINE_DESC &desc) override |
| Returns a null handle on failure. | |
| void | DestroyPipeline (RHI_PipelineHandle handle) override |
| RHI_BindGroupLayoutHandle | CreateBindGroupLayout (const RHI_BIND_GROUP_LAYOUT_DESC &desc) override |
| Returns a null handle on failure. | |
| void | DestroyBindGroupLayout (RHI_BindGroupLayoutHandle handle) override |
| RHI_BindGroupHandle | CreateBindGroup (const RHI_BIND_GROUP_DESC &desc) override |
| Returns a null handle on failure. | |
| void | DestroyBindGroup (RHI_BindGroupHandle handle) override |
| void | BindGroup (uint32_t groupIndex, RHI_BindGroupHandle group) override |
| Only valid inside a render pass with a bound pipeline. | |
| RHI_RenderPassHandle | CreateRenderPass (const RHI_RENDER_PASS_DESC &desc) override |
| Returns a null handle on failure. | |
| void | DestroyRenderPass (RHI_RenderPassHandle handle) override |
| RHI_FramebufferHandle | CreateFramebuffer (const RHI_FRAMEBUFFER_DESC &desc) override |
| Returns a null handle on failure. | |
| void | DestroyFramebuffer (RHI_FramebufferHandle handle) override |
| RHI_TextureHandle | GetFramebufferColorTexture (RHI_FramebufferHandle handle, uint32_t attachmentIndex=0) const override |
| The texture lets a later pass sample the framebuffer. | |
| bool | BeginRenderPass (const RHI_RENDER_PASS_BEGIN_DESC &desc) override |
| Draws and dynamic state changes must come between this and EndRenderPass(). | |
| bool | EndRenderPass () override |
| Returns false if no render pass is active. | |
| void | SetViewport (const RHI_VIEWPORT &viewport) override |
| Only valid inside a render pass. | |
| void | SetScissor (const RHI_SCISSOR_RECT &scissor) override |
| Only valid inside a render pass. | |
| void | BindPipeline (RHI_PipelineHandle pipeline) override |
| Only valid inside a render pass. | |
| void | SetPushConstants (const void *data, size_t sizeBytes) override |
| Size must not exceed RHI_MAX_PUSH_CONSTANT_BYTES. | |
| void | BindVertexBuffer (uint32_t slot, RHI_BufferHandle buffer) override |
| Only valid inside a render pass. | |
| void | BindIndexBuffer (RHI_BufferHandle buffer) override |
| Indices are 16 bits on every backend. | |
| void | Draw (uint32_t vertexCount, uint32_t firstVertex=0) override |
| Draws are only valid inside a render pass with a bound pipeline. | |
| void | DrawInstanced (uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex=0, int32_t vertexOffset=0, uint32_t firstInstance=0) override |
| Non-indexed, so vertexOffset is ignored. | |
| void | DrawIndexedInstanced (uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex=0, int32_t vertexOffset=0, uint32_t firstInstance=0) override |
| Reads 16-bit indices from the bound index buffer. | |
| RHI_SurfaceHandle | CreateSurface (const RHI_SURFACE_DESC &desc) override |
| Returns a null handle if the native window handle is invalid. | |
| void | DestroySurface (RHI_SurfaceHandle handle) override |
| Destroy the surface's swapchain first. | |
| RHI_SwapchainHandle | CreateSwapchain (const RHI_SWAPCHAIN_DESC &desc) override |
| Returns a null handle on failure. | |
| bool | ResizeSwapchain (RHI_SwapchainHandle handle, uint32_t width, uint32_t height, float dpiScale) override |
| Call when the window size or DPI scale changes. | |
| void | DestroySwapchain (RHI_SwapchainHandle handle) override |
| bool | WaitForPresentSlot (RHI_SwapchainHandle aSwapchain, std::chrono::milliseconds aTimeout, int aAllowed) override |
Wait until fewer than aAllowed presents are queued for the display or the timeout passes, so the next frame renders from the newest input. | |
| RHI_SURFACE_EXTENT_POLL_RESULT | PollSurfaceExtent (RHI_SwapchainHandle aSwapchain) override |
| Retry a fixed surface extent that lagged behind the requested window size. | |
| bool | PresentWaitsForDisplay (RHI_SwapchainHandle aSwapchain) const override |
| False when presents show at once instead of at the next vertical blank, so frames drawn faster than the display refreshes are never seen. | |
| bool | PresentReplacesQueued (RHI_SwapchainHandle aSwapchain) const override |
| True when a present replaces one still queued for the next vertical blank, as in Vulkan MAILBOX mode, so frames drawn faster than the display only cost GPU time. | |
| RHI_FRAME_OP_RESULT | Present (RHI_SwapchainHandle handle, RHI_FramebufferHandle aSrcFBO={}, const RHI_SCISSOR_RECT *aSourceRect=nullptr) override |
When aSrcFBO is valid its first color attachment is copied to the swapchain first. | |
| bool | ReadbackFramebufferPixels (RHI_FramebufferHandle handle, uint32_t attachmentIndex, void *buffer, size_t bufferSize) override |
buffer must hold at least width * height * bpp bytes. | |
| bool | CopyFramebufferDepth (RHI_FramebufferHandle aSource, RHI_FramebufferHandle aDestination, uint32_t aSourceX=0, uint32_t aSourceY=0) override |
Fill all of aDestination with source depth from (aSourceX, aSourceY) on, ordered after passes already issued. | |
| void | BeginUploadBatch () override |
| UpdateBuffer() and UploadTexture() calls between these share one submission instead of syncing with the GPU each time. | |
| void | EndUploadBatch () override |
| RHI_BufferHandle | CreateBuffer (const RHI_BUFFER_DESC &desc) |
| Reserve and realize in one call, so render thread only. | |
| RHI_TextureHandle | CreateTexture (const RHI_TEXTURE_DESC &desc) |
| Reserve and realize in one call, so render thread only. | |
| void | Release (RHI_BufferHandle &aHandle) |
| Destroy the resource, if there is one, and clear the handle. | |
| void | Release (RHI_TextureHandle &aHandle) |
| void | Release (RHI_ShaderHandle &aHandle) |
| void | Release (RHI_PipelineHandle &aHandle) |
| void | Release (RHI_BindGroupLayoutHandle &aHandle) |
| void | Release (RHI_RenderPassHandle &aHandle) |
| void | Release (RHI_FramebufferHandle &aHandle) |
| void | Release (RHI_BindGroupHandle &aHandle) |
| void | Release (RHI_SurfaceHandle &aHandle) |
| void | Release (RHI_SwapchainHandle &aHandle) |
| virtual std::optional< std::chrono::steady_clock::time_point > | LastDisplayRefresh (RHI_SwapchainHandle aSwapchain) const |
| The vertical blank at which the display last showed a frame, or nothing if the backend cannot tell. | |
| virtual void | EndFrame () |
| Retire deferred releases that are due. | |
| size_t | PendingDeferredReleases () const |
| Releases still waiting on later frames, which only EndFrame() retires. | |
Protected Member Functions | |
| template<typename Tag> | |
| void | deferDestroy (RHI_HANDLE_POOL< Tag > &aPool, RHI_DEFERRED_RESOURCE_TYPE aType, RHI_HANDLE< Tag > aHandle) |
| Only the destroy that wins the pending-destroy claim enqueues, so racing destroys of one handle cannot free it twice. | |
Protected Attributes | |
| uint64_t | m_frameCounter = 0 |
| RHI_DEFERRED_RELEASE_QUEUE | m_deferredReleaseQueue |
Private Member Functions | |
| bool | InitLoader () |
| bool | CreateVkInstance (bool enableValidation) |
| bool | SelectPhysicalDevice () |
| bool | CreateLogicalDevice () |
| void | LoadDeviceFunctions () |
| bool | InitVMA () |
| bool | InitCommandPool () |
| void | ReadDeviceProperties () |
| void * | LoadVulkanFunction (const char *name) |
| void * | LoadInstanceFunction (const char *name) |
| VkRenderPass | makeRenderPass (const std::vector< VK_ATTACHMENT > &aColor, const std::optional< VK_ATTACHMENT > &aDepth) |
| void * | LoadDeviceFunction (const char *name) |
| bool | allocateCommandBuffer (VkCommandBuffer &aCmd) |
| VkResult | beginOneTimeCommands (VkCommandBuffer aCmd) |
| VkResult | submitCommands (VkCommandBuffer aCmd) |
| VkCommandBuffer | beginUploadCommands (std::unique_lock< std::recursive_mutex > &aLock) |
| bool | endUploadCommands (VkCommandBuffer aCmd, const std::unique_lock< std::recursive_mutex > &aLock) |
| bool | SubmitOneShot (VkCommandBuffer cmd) |
| VkCommandBuffer | EnsureUploadCmdBuf () |
| bool | CurrentThreadOwnsUploadBatch () const |
| int | AcquireStaging (size_t aSizeBytes) |
| void | ReleaseStaging (int aIndex) |
| int | stageData (const void *aData, size_t aSizeBytes, VkBuffer &aBuffer) |
| void | endStagedUpload (VkCommandBuffer aCmd, std::unique_lock< std::recursive_mutex > &aLock, int aStaging) |
| void | DestroyStagingPool () |
| VkDescriptorPool | AcquireDescriptorPool () |
| void | ReleaseDescriptorSet (VkDescriptorPool pool, VkDescriptorSet dset=VK_NULL_HANDLE) |
| void | TransitionTexture (VkCommandBuffer cmd, TextureAllocation &tex, VkImageLayout newLayout, VkPipelineStageFlags srcStage, VkPipelineStageFlags dstStage) |
| void | destroyFramebufferObjects (FramebufferAllocation &aFb) |
| void | destroyTexture (TextureAllocation &aTexture) |
| bool | createImage2D (VkFormat aFormat, uint32_t aWidth, uint32_t aHeight, VkImageUsageFlags aUsage, bool aDedicated, VkImage &aImage, VmaAllocation &aAllocation) |
| VkImageView | createView (VkImage aImage, VkFormat aFormat, VkImageAspectFlags aAspect) |
| VkSampler | createSampler (VkFilter aFilter) |
| bool | acquirePassCmd (VkCommandBuffer &aCmd) |
| VkResult | submitPassCmd (VkCommandBuffer aCmd) |
| VkDescriptorSetLayout | createSetLayout (const RHI_BIND_GROUP_LAYOUT_DESC &aDesc) |
| VkResult | buildPipeline (VkShaderModule aVertex, VkShaderModule aFragment, const VkPipelineVertexInputStateCreateInfo &aVertexInput, VkPrimitiveTopology aTopology, const std::vector< VkPipelineColorBlendAttachmentState > &aBlend, const VkPipelineDepthStencilStateCreateInfo &aDepthStencil, const std::vector< VkDynamicState > &aDynamicStates, VkPipelineLayout aLayout, VkRenderPass aRenderPass, VkPipeline &aPipeline) |
| void | destroyPipeline (PipelineAllocation &aPipeline) |
| void | ExecuteDeferredReleases () override |
| void | ExecuteDeferredRelease (const RHI_DEFERRED_RELEASE_ENTRY &aEntry) |
| bool | FindPresentQueueFamily (VkSurfaceKHR vkSurface, uint32_t &outFamily) |
| VkPresentModeKHR | ChoosePresentMode (const SurfaceAllocation &aSurface) |
| bool | CreateSwapchainResources (SwapchainAllocation &swa) |
| void | DestroySwapchainResources (SwapchainAllocation &swa, bool aKeepSwapchain=false) |
| void | destroySwapchainObjects (SwapchainAllocation &aSwa) |
| VkSwapchainTry | createVkSwapchain (const SurfaceAllocation &aSurface, const VkSurfaceCapabilitiesKHR &aCaps, VkSurfaceFormatKHR aFormat, VkExtent2D aExtent, VkSwapchainKHR aOld, bool aResize) |
| VkPipeline | EnsurePresentBlit (VkFormat aSwapchainFormat) |
| void | DestroyPresentBlit () |
| void | MarkBufferInUse (BufferAllocation &aBuffer) |
| void | OnQueueIdle () |
| void | SyncSubmittedPasses () |
Static Private Member Functions | |
| static VkBufferUsageFlags | TranslateBufferUsage (RHI_BUFFER_TYPE type) |
| static VkFormat | TranslateTextureFormat (RHI_TEXTURE_FORMAT format) |
| static VkFilter | TranslateFilter (RHI_FILTER filter) |
Static Private Attributes | |
| static constexpr size_t | STAGING_MIN_BYTES = 64 * 1024 |
| static constexpr size_t | STAGING_POOL_BYTES = 256 * 1024 * 1024 |
Definition at line 303 of file rhi_vulkan_device.cpp.
| RHI_VULKAN_DEVICE::RHI_VULKAN_DEVICE | ( | bool | enableValidation | ) |
Definition at line 1806 of file rhi_vulkan_device.cpp.
References CreateLogicalDevice(), CreateVkInstance(), InitCommandPool(), InitLoader(), InitVMA(), m_device, m_deviceName, m_initialized, m_pipelineCache, m_vk, ReadDeviceProperties(), SelectPhysicalDevice(), and traceRhi.
|
override |
Definition at line 1861 of file rhi_vulkan_device.cpp.
References destroyFramebufferObjects(), destroyPipeline(), DestroyPresentBlit(), DestroyStagingPool(), destroySwapchainObjects(), destroyTexture(), ExecuteDeferredRelease(), index, m_allocator, m_bindGroupLayouts, m_buffers, m_commandPool, m_computePipelines, m_currentCmd, m_debugMessenger, RHI_DEVICE::m_deferredReleaseQueue, m_descriptorPools, m_device, m_framebuffers, m_instance, m_pipelineCache, m_pipelines, m_renderPasses, m_shaders, m_surfaces, m_swapchains, m_textures, m_vk, m_vulkanLib, and traceRhi.
|
private |
Definition at line 3376 of file rhi_vulkan_device.cpp.
References m_descriptorPools, m_device, m_deviceMutex, m_storageDescriptors, m_vk, and traceRhi.
Referenced by CreateBindGroup().
|
private |
Definition at line 1491 of file rhi_vulkan_device.cpp.
References allocateCommandBuffer(), and m_freeCmds.
Referenced by BeginRenderPass(), and CopyFramebufferDepth().
|
private |
Definition at line 1620 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::StagingBuffer::allocation, RHI_VULKAN_DEVICE::StagingBuffer::buffer, RHI_VULKAN_DEVICE::StagingBuffer::inUse, m_allocator, m_deviceMutex, m_stagingPool, RHI_VULKAN_DEVICE::StagingBuffer::mapped, RHI_VULKAN_DEVICE::StagingBuffer::size, and STAGING_MIN_BYTES.
Referenced by stageData().
|
private |
Definition at line 1435 of file rhi_vulkan_device.cpp.
References m_commandPool, m_device, and m_vk.
Referenced by acquirePassCmd(), beginUploadCommands(), CreateFramebuffer(), EnsureUploadCmdBuf(), ExecuteCompute(), Present(), and ReadbackFramebufferPixels().
|
private |
Definition at line 1447 of file rhi_vulkan_device.cpp.
References m_vk.
Referenced by BeginRenderPass(), beginUploadCommands(), CopyFramebufferDepth(), CreateFramebuffer(), EnsureUploadCmdBuf(), ExecuteCompute(), Present(), and ReadbackFramebufferPixels().
|
overridevirtual |
Draws and dynamic state changes must come between this and EndRenderPass().
Returns false if a render pass is already active or a handle is invalid.
Implements RHI_DEVICE.
Definition at line 4005 of file rhi_vulkan_device.cpp.
References acquirePassCmd(), beginOneTimeCommands(), CLEAR, RHI_RENDER_PASS_BEGIN_DESC::clearColorOverride, RHI_DEPTH_STENCIL_ATTACHMENT_DESC::clearDepth, RHI_DEPTH_STENCIL_ATTACHMENT_DESC::clearStencil, RHI_VULKAN_DEVICE::RenderPassAllocation::colorDescs, RHI_VULKAN_DEVICE::FramebufferAllocation::depthImage, RHI_DEPTH_STENCIL_ATTACHMENT_DESC::depthLoadOp, RHI_VULKAN_DEVICE::FramebufferAllocation::depthRendered, RHI_VULKAN_DEVICE::RenderPassAllocation::depthStencilDesc, RHI_DEPTH_STENCIL_ATTACHMENT_DESC::enabled, RHI_RENDER_PASS_BEGIN_DESC::framebuffer, RHI_VULKAN_DEVICE::FramebufferAllocation::framebuffer, RHI_RENDER_PASS_BEGIN_DESC::hasClearColorOverride, RHI_VULKAN_DEVICE::FramebufferAllocation::height, m_activePipeline, m_currentCmd, m_deviceMutex, m_framebufferPool, m_framebuffers, m_renderPassActive, m_renderPasses, m_renderPassPool, m_vk, RHI_RENDER_PASS_BEGIN_DESC::renderPass, RHI_VULKAN_DEVICE::RenderPassAllocation::renderPass, RhiHandleIndex(), RHI_DEPTH_STENCIL_ATTACHMENT_DESC::stencilLoadOp, and RHI_VULKAN_DEVICE::FramebufferAllocation::width.
|
overridevirtual |
UpdateBuffer() and UploadTexture() calls between these share one submission instead of syncing with the GPU each time.
The default does nothing.
Reimplemented from RHI_DEVICE.
Definition at line 1592 of file rhi_vulkan_device.cpp.
References m_deviceMutex, m_uploadBatchOwner, and m_uploadCmdBuf.
|
private |
Definition at line 1562 of file rhi_vulkan_device.cpp.
References allocateCommandBuffer(), beginOneTimeCommands(), CurrentThreadOwnsUploadBatch(), and EnsureUploadCmdBuf().
Referenced by UpdateBuffer(), and UploadTexture().
|
overridevirtual |
Only valid inside a render pass with a bound pipeline.
Implements RHI_DEVICE.
Definition at line 3638 of file rhi_vulkan_device.cpp.
References group, m_activePipeline, m_bindGroupPool, m_bindGroups, m_buffers, m_currentCmd, m_deviceMutex, m_pipelinePool, m_pipelines, m_renderPassActive, m_vk, MarkBufferInUse(), RHI_MAX_BIND_GROUPS, RhiHandleIndex(), and traceRhi.
|
overridevirtual |
Indices are 16 bits on every backend.
Only valid inside a render pass.
Implements RHI_DEVICE.
Definition at line 4221 of file rhi_vulkan_device.cpp.
References m_bufferPool, m_buffers, m_currentCmd, m_deviceMutex, m_renderPassActive, m_vk, MarkBufferInUse(), and RhiHandleIndex().
|
overridevirtual |
Only valid inside a render pass.
Implements RHI_DEVICE.
Definition at line 4150 of file rhi_vulkan_device.cpp.
References m_activePipeline, m_currentCmd, m_deviceMutex, m_pipelinePool, m_pipelines, m_renderPassActive, m_vk, and RhiHandleIndex().
|
overridevirtual |
Only valid inside a render pass.
Implements RHI_DEVICE.
Definition at line 4197 of file rhi_vulkan_device.cpp.
References m_bufferPool, m_buffers, m_currentCmd, m_deviceMutex, m_renderPassActive, m_vk, MarkBufferInUse(), and RhiHandleIndex().
|
private |
Definition at line 2860 of file rhi_vulkan_device.cpp.
References m_device, m_pipelineCache, and m_vk.
Referenced by CreatePipeline(), and EnsurePresentBlit().
|
private |
Definition at line 4418 of file rhi_vulkan_device.cpp.
References FIFO, IMMEDIATE, m_physicalDevice, m_vk, MAILBOX, RhiChoosePresentMode(), RHI_VULKAN_DEVICE::SurfaceAllocation::surface, traceRhi, and RHI_VULKAN_DEVICE::SurfaceAllocation::wayland.
Referenced by createVkSwapchain().
|
overridevirtual |
Reimplemented from RHI_DEVICE.
Definition at line 2959 of file rhi_vulkan_device.cpp.
References m_deviceLimits, RHI_COMPUTE_DEVICE_LIMITS::maxDispatchGroups, RHI_COMPUTE_DEVICE_LIMITS::maxSharedMemoryBytes, RHI_COMPUTE_DEVICE_LIMITS::maxStorageBufferRange, RHI_COMPUTE_DEVICE_LIMITS::maxWorkgroupInvocations, RHI_COMPUTE_DEVICE_LIMITS::maxWorkgroupSize, RHI_COMPUTE_DEVICE_LIMITS::minStorageBufferOffsetAlignment, and SupportsCompute().
Referenced by ExecuteCompute().
|
overridevirtual |
Reimplemented from RHI_DEVICE.
Definition at line 3103 of file rhi_vulkan_device.cpp.
References m_computePipelinePool, m_computePipelines, m_computeSubgroupSize, m_deviceLimits, and RhiHandleIndex().
|
overridevirtual |
Fill all of aDestination with source depth from (aSourceX, aSourceY) on, ordered after passes already issued.
The offset counts texels in storage order, which follows normalized device Y on every backend. Must not be called inside a render pass.
Reimplemented from RHI_DEVICE.
Definition at line 5916 of file rhi_vulkan_device.cpp.
References acquirePassCmd(), beginOneTimeCommands(), RHI_VULKAN_DEVICE::FramebufferAllocation::depthImage, RHI_VULKAN_DEVICE::FramebufferAllocation::depthRendered, RHI_VULKAN_DEVICE::FramebufferAllocation::height, imageBarrier(), m_deviceMutex, m_framebufferPool, m_framebuffers, m_freeCmds, m_renderPassActive, m_vk, RhiHandleIndex(), submitPassCmd(), and RHI_VULKAN_DEVICE::FramebufferAllocation::width.
|
overridevirtual |
Returns a null handle on failure.
Implements RHI_DEVICE.
Definition at line 3456 of file rhi_vulkan_device.cpp.
References AcquireDescriptorPool(), RHI_VULKAN_DEVICE::BindGroupAllocation::bufferIndices, COMBINED_TEXTURE_SAMPLER, RHI_VULKAN_DEVICE::BindGroupAllocation::descriptorSet, RHI_BIND_GROUP_DESC::entries, RHI_BIND_GROUP_DESC::layout, RHI_VULKAN_DEVICE::BindGroupAllocation::layout, m_bindGroupLayoutPool, m_bindGroupLayouts, m_bindGroupPool, m_bindGroups, m_bufferPool, m_buffers, m_device, m_deviceMutex, m_texturePool, m_textures, m_vk, RHI_VULKAN_DEVICE::BindGroupAllocation::pool, ReleaseDescriptorSet(), res, RhiHandleIndex(), traceRhi, TranslateBindingType(), RHI_BINDING_ENTRY::type, UNIFORM_BUFFER, and RHI_HANDLE< Tag >::value.
|
overridevirtual |
Returns a null handle on failure.
Implements RHI_DEVICE.
Definition at line 3333 of file rhi_vulkan_device.cpp.
References createSetLayout(), RHI_BIND_GROUP_LAYOUT_DESC::entries, m_bindGroupLayoutPool, m_bindGroupLayouts, m_device, m_storageDescriptors, m_vk, RhiHandleIndex(), STORAGE_BUFFER, STORAGE_BUFFER_READONLY, RHI_BINDING_ENTRY::type, and RHI_BIND_GROUP_LAYOUT_DESC::Validate().
|
inlineinherited |
Reserve and realize in one call, so render thread only.
Returns a null handle on failure.
Definition at line 96 of file rhi_device.h.
References RealizeBuffer(), and ReserveBufferHandle().
|
overridevirtual |
Reimplemented from RHI_DEVICE.
Definition at line 2980 of file rhi_vulkan_device.cpp.
References RHI_COMPUTE_PIPELINE_DESC::bindGroupLayouts, COMPUTE, RHI_COMPUTE_PIPELINE_DESC::constants, createSetLayout(), CreateShader(), RHI_VULKAN_DEVICE::ComputePipelineAllocation::desc, destroyPipeline(), DestroyShader(), RHI_VULKAN_DEVICE::PipelineAllocation::dsLayouts, RHI_BIND_GROUP_LAYOUT_DESC::entries, RHI_VULKAN_DEVICE::PipelineAllocation::layout, m_computePipelinePool, m_computePipelines, m_device, m_deviceLimits, m_deviceMutex, m_pipelineCache, m_shaders, m_vk, RHI_VULKAN_DEVICE::ComputePipelineAllocation::native, RHI_VULKAN_DEVICE::PipelineAllocation::pipeline, RHI_COMPUTE_PIPELINE_DESC::pushConstantBytes, RHI_SPEC_ID_WORKGROUP_X, RHI_SPEC_ID_WORKGROUP_Y, RhiHandleIndex(), RhiValidateComputePipelineDesc(), RHI_COMPUTE_PIPELINE_DESC::shader, RHI_SHADER_BLOB::spirv, RHI_SHADER_BLOB::spirvSize, SupportsCompute(), RHI_COMPUTE_PIPELINE_DESC::workgroupX, and RHI_COMPUTE_PIPELINE_DESC::workgroupY.
|
overridevirtual |
Returns a null handle on failure.
Implements RHI_DEVICE.
Definition at line 3794 of file rhi_vulkan_device.cpp.
References allocateCommandBuffer(), RHI_VULKAN_DEVICE::TextureAllocation::allocation, beginOneTimeCommands(), RHI_VULKAN_DEVICE::FramebufferAllocation::colorAllocations, RHI_FRAMEBUFFER_DESC::colorFormats, RHI_VULKAN_DEVICE::FramebufferAllocation::colorFormats, RHI_VULKAN_DEVICE::FramebufferAllocation::colorImages, RHI_VULKAN_DEVICE::FramebufferAllocation::colorTextureHandles, RHI_VULKAN_DEVICE::FramebufferAllocation::colorViews, createImage2D(), createSampler(), createView(), RHI_VULKAN_DEVICE::FramebufferAllocation::depthAllocation, RHI_VULKAN_DEVICE::FramebufferAllocation::depthImage, RHI_VULKAN_DEVICE::FramebufferAllocation::depthView, destroyFramebufferObjects(), RHI_VULKAN_DEVICE::TextureAllocation::format, RHI_VULKAN_DEVICE::FramebufferAllocation::framebuffer, RHI_FRAMEBUFFER_DESC::hasDepthStencil, RHI_FRAMEBUFFER_DESC::height, RHI_VULKAN_DEVICE::FramebufferAllocation::height, RHI_VULKAN_DEVICE::TextureAllocation::height, image, RHI_VULKAN_DEVICE::TextureAllocation::image, RHI_VULKAN_DEVICE::TextureAllocation::imageView, RHI_VULKAN_DEVICE::FramebufferAllocation::internalRenderPass, m_allocator, m_commandPool, m_device, m_deviceMutex, m_framebufferPool, m_framebuffers, m_submitSerial, m_submittedCmds, m_texturePool, m_textures, m_vk, makeRenderPass(), RHI_VULKAN_DEVICE::TextureAllocation::ownedByFBO, RhiDefaultDepthFormat(), RhiHandleIndex(), RHI_VULKAN_DEVICE::TextureAllocation::sampler, submitCommands(), traceRhi, TransitionTexture(), TranslateTextureFormat(), RHI_FRAMEBUFFER_DESC::width, RHI_VULKAN_DEVICE::FramebufferAllocation::width, and RHI_VULKAN_DEVICE::TextureAllocation::width.
Referenced by LoadDeviceFunctions().
|
private |
Definition at line 1944 of file rhi_vulkan_device.cpp.
References m_allocator.
Referenced by CreateFramebuffer(), and RealizeTexture().
|
private |
Definition at line 1059 of file rhi_vulkan_device.cpp.
References LoadDeviceFunctions(), m_computeQueue, m_device, m_graphicsQueue, m_graphicsQueueFamily, m_physicalDevice, m_presentWait, m_vk, result, and traceRhi.
Referenced by RHI_VULKAN_DEVICE().
|
overridevirtual |
Returns a null handle on failure.
Implements RHI_DEVICE.
Definition at line 2646 of file rhi_vulkan_device.cpp.
References RHI_PIPELINE_DESC::bindGroupLayouts, RHI_PIPELINE_DESC::blendStates, buildPipeline(), RHI_PIPELINE_DESC::colorFormat, createSetLayout(), RHI_DEPTH_STENCIL_STATE::depthCompareOp, RHI_PIPELINE_DESC::depthStencil, RHI_DEPTH_STENCIL_STATE::depthTestEnable, RHI_DEPTH_STENCIL_STATE::depthWriteEnable, RHI_VULKAN_DEVICE::PipelineAllocation::dsLayouts, RHI_PIPELINE_DESC::dynamicStates, RHI_PIPELINE_DESC::fragmentShader, GetName(), INSTANCE, RHI_VULKAN_DEVICE::PipelineAllocation::layout, m_device, m_pipelinePool, m_pipelines, m_shaderPool, m_shaders, m_totalPipelineCreateMs, m_vk, makeRenderPass(), PROF_TIMER::msecs(), RHI_VULKAN_DEVICE::PipelineAllocation::pipeline, RHI_VULKAN_DEVICE::PipelineAllocation::renderPass, result, RHI_MAX_PUSH_CONSTANT_BYTES, RhiDefaultDepthFormat(), RhiHandleIndex(), RhiPipelineUsesDepthStencil(), RHI_PIPELINE_DESC::topology, traceRhi, TranslateBlendFactor(), TranslateBlendOp(), TranslateCompareOp(), TranslateDynamicState(), TranslateTextureFormat(), TranslateTopology(), TranslateVertexFormat(), RHI_PIPELINE_DESC::vertexBuffers, RHI_PIPELINE_DESC::vertexShader, and VkResultToString().
|
overridevirtual |
Returns a null handle on failure.
Implements RHI_DEVICE.
Definition at line 3731 of file rhi_vulkan_device.cpp.
References RHI_RENDER_PASS_DESC::colorAttachments, RHI_VULKAN_DEVICE::RenderPassAllocation::colorDescs, RHI_RENDER_PASS_DESC::depthStencilAttachment, RHI_VULKAN_DEVICE::RenderPassAllocation::depthStencilDesc, RHI_DEPTH_STENCIL_ATTACHMENT_DESC::enabled, LOAD, m_device, m_renderPasses, m_renderPassPool, m_vk, makeRenderPass(), RHI_VULKAN_DEVICE::RenderPassAllocation::renderPass, RhiDefaultDepthFormat(), RhiHandleIndex(), TranslateLoadOp(), TranslateStoreOp(), and TranslateTextureFormat().
Referenced by LoadDeviceFunctions().
|
private |
Definition at line 1991 of file rhi_vulkan_device.cpp.
References m_device, and m_vk.
Referenced by CreateFramebuffer(), and RealizeTexture().
|
private |
Definition at line 2929 of file rhi_vulkan_device.cpp.
References RHI_BINDING_ENTRY::binding, RHI_BIND_GROUP_LAYOUT_DESC::entries, m_device, m_vk, RHI_BINDING_ENTRY::stages, TranslateBindingType(), TranslateShaderStage(), and RHI_BINDING_ENTRY::type.
Referenced by CreateBindGroupLayout(), CreateComputePipeline(), and CreatePipeline().
|
overridevirtual |
Returns a null handle on failure.
Implements RHI_DEVICE.
Definition at line 2468 of file rhi_vulkan_device.cpp.
References RHI_SHADER_DESC::bytecode, m_device, m_shaderPool, m_shaders, m_vk, module, result, RhiHandleIndex(), RHI_SHADER_DESC::sizeBytes, traceRhi, and VkResultToString().
Referenced by CreateComputePipeline().
|
overridevirtual |
Returns a null handle if the native window handle is invalid.
Implements RHI_DEVICE.
Definition at line 4608 of file rhi_vulkan_device.cpp.
References displayName(), RHI_NATIVE_WINDOW_HANDLE::displayType, FindPresentQueueFamily(), m_graphicsQueueFamily, m_initialized, m_instance, m_surfacePool, m_surfaces, m_vk, RHI_NATIVE_WINDOW_HANDLE::nativeDisplay, RHI_NATIVE_WINDOW_HANDLE::nativeHandle, RhiHandleIndex(), RHI_VULKAN_DEVICE::SurfaceAllocation::surface, traceRhi, UNKNOWN, WAYLAND, RHI_VULKAN_DEVICE::SurfaceAllocation::wayland, RHI_SURFACE_DESC::window, WINDOWS, and X11.
|
overridevirtual |
Returns a null handle on failure.
Implements RHI_DEVICE.
Definition at line 4953 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::SwapchainAllocation::colorSpace, CreateSwapchainResources(), createVkSwapchain(), destroySwapchainObjects(), RHI_SWAPCHAIN_DESC::dpiScale, RHI_VULKAN_DEVICE::SwapchainAllocation::dpiScale, RHI_VULKAN_DEVICE::SwapchainAllocation::extent, RHI_VULKAN_DEVICE::SwapchainAllocation::format, formatCount(), RHI_SWAPCHAIN_DESC::height, RHI_VULKAN_DEVICE::SwapchainAllocation::imageAvailable, RHI_VULKAN_DEVICE::VkSwapchainTry::imageCount, RHI_VULKAN_DEVICE::SwapchainAllocation::inFlightFence, m_device, m_initialized, m_physicalDevice, m_surfacePool, m_surfaces, m_swapchainPool, m_swapchains, m_vk, RHI_VULKAN_DEVICE::VkSwapchainTry::preferredMode, RHI_VULKAN_DEVICE::SwapchainAllocation::presentMode, RHI_VULKAN_DEVICE::VkSwapchainTry::presentMode, RHI_VULKAN_DEVICE::SwapchainAllocation::requestedExtent, RHI_VULKAN_DEVICE::VkSwapchainTry::result, RhiHandleIndex(), RHI_SWAPCHAIN_DESC::surface, RHI_VULKAN_DEVICE::SwapchainAllocation::surface, RHI_VULKAN_DEVICE::SwapchainAllocation::swapchain, RHI_VULKAN_DEVICE::VkSwapchainTry::swapchain, swapchainExtent(), traceRhi, RHI_VULKAN_DEVICE::SwapchainAllocation::waitingForSurfaceExtent, and RHI_SWAPCHAIN_DESC::width.
|
private |
Definition at line 4468 of file rhi_vulkan_device.cpp.
References createView(), EnsurePresentBlit(), RHI_VULKAN_DEVICE::SwapchainAllocation::extent, RHI_VULKAN_DEVICE::SwapchainAllocation::format, RHI_VULKAN_DEVICE::SwapchainAllocation::images, RHI_VULKAN_DEVICE::SwapchainAllocation::imageViews, m_device, m_presentBlitDSLayout, m_vk, makeRenderPass(), presentAttachment(), RHI_VULKAN_DEVICE::SwapchainAllocation::presentDescPool, RHI_VULKAN_DEVICE::SwapchainAllocation::presentDescSet, RHI_VULKAN_DEVICE::SwapchainAllocation::presentFramebuffers, RHI_VULKAN_DEVICE::SwapchainAllocation::presentRenderPass, RHI_VULKAN_DEVICE::SwapchainAllocation::renderFinished, and RHI_VULKAN_DEVICE::SwapchainAllocation::swapchain.
Referenced by CreateSwapchain(), and ResizeSwapchain().
|
inlineinherited |
Reserve and realize in one call, so render thread only.
Returns a null handle on failure.
Definition at line 130 of file rhi_device.h.
References RealizeTexture(), and ReserveTextureHandle().
|
private |
Definition at line 1971 of file rhi_vulkan_device.cpp.
References m_device, and m_vk.
Referenced by CreateFramebuffer(), CreateSwapchainResources(), and RealizeTexture().
|
private |
Definition at line 822 of file rhi_vulkan_device.cpp.
References extensions, LOAD_INST_FN, m_debugMessenger, m_instance, m_vk, result, traceRhi, and VulkanDebugCallback().
Referenced by RHI_VULKAN_DEVICE().
|
private |
Definition at line 4826 of file rhi_vulkan_device.cpp.
References ChoosePresentMode(), RHI_VULKAN_DEVICE::VkSwapchainTry::imageCount, m_device, m_vk, RHI_VULKAN_DEVICE::VkSwapchainTry::preferredMode, RHI_VULKAN_DEVICE::VkSwapchainTry::presentMode, RHI_VULKAN_DEVICE::VkSwapchainTry::result, RHI_VULKAN_DEVICE::SurfaceAllocation::surface, RHI_VULKAN_DEVICE::VkSwapchainTry::swapchain, traceRhi, and VkResultToString().
Referenced by CreateSwapchain(), and ResizeSwapchain().
|
private |
Definition at line 1768 of file rhi_vulkan_device.cpp.
References m_uploadBatchOwner.
Referenced by beginUploadCommands().
|
inlineprotectedinherited |
Only the destroy that wins the pending-destroy claim enqueues, so racing destroys of one handle cannot free it twice.
Definition at line 365 of file rhi_device.h.
References m_deferredReleaseQueue, m_frameCounter, RHI_HANDLE_POOL< Tag >::MarkPendingDestroy(), and RHI_HANDLE< Tag >::value.
Referenced by RHI_VULKAN_DEVICE::DestroyBindGroup(), RHI_VULKAN_DEVICE::DestroyBindGroupLayout(), RHI_VULKAN_DEVICE::DestroyBuffer(), RHI_VULKAN_DEVICE::DestroyFramebuffer(), RHI_VULKAN_DEVICE::DestroyPipeline(), RHI_VULKAN_DEVICE::DestroyRenderPass(), RHI_VULKAN_DEVICE::DestroyShader(), and RHI_VULKAN_DEVICE::DestroyTexture().
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 3632 of file rhi_vulkan_device.cpp.
References BIND_GROUP, RHI_DEVICE::deferDestroy(), and m_bindGroupPool.
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 3370 of file rhi_vulkan_device.cpp.
References BIND_GROUP_LAYOUT, RHI_DEVICE::deferDestroy(), and m_bindGroupLayoutPool.
|
overridevirtual |
The handle's generation is retired, so later use of the stale handle is detected.
Render thread only, as it reads the frame counter. The UI thread destroys through RHI_DEVICE_PROXY.
Implements RHI_DEVICE.
Definition at line 2293 of file rhi_vulkan_device.cpp.
References BUFFER, RHI_DEVICE::deferDestroy(), m_allocator, and m_bufferPool.
|
overridevirtual |
Reimplemented from RHI_DEVICE.
Definition at line 3083 of file rhi_vulkan_device.cpp.
References destroyPipeline(), m_computePipelinePool, m_computePipelines, m_deviceMutex, and RhiHandleIndex().
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 3981 of file rhi_vulkan_device.cpp.
References RHI_DEVICE::deferDestroy(), FRAMEBUFFER, and m_framebufferPool.
Referenced by LoadDeviceFunctions().
|
private |
Definition at line 2038 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::FramebufferAllocation::colorAllocations, RHI_VULKAN_DEVICE::FramebufferAllocation::colorImages, RHI_VULKAN_DEVICE::FramebufferAllocation::colorViews, RHI_VULKAN_DEVICE::FramebufferAllocation::depthAllocation, RHI_VULKAN_DEVICE::FramebufferAllocation::depthImage, RHI_VULKAN_DEVICE::FramebufferAllocation::depthView, RHI_VULKAN_DEVICE::FramebufferAllocation::framebuffer, RHI_VULKAN_DEVICE::FramebufferAllocation::internalRenderPass, m_allocator, m_device, and m_vk.
Referenced by CreateFramebuffer(), ExecuteDeferredRelease(), and ~RHI_VULKAN_DEVICE().
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 2854 of file rhi_vulkan_device.cpp.
References RHI_DEVICE::deferDestroy(), m_pipelinePool, and PIPELINE.
Referenced by LoadDeviceFunctions().
|
private |
Definition at line 2026 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::PipelineAllocation::dsLayouts, RHI_VULKAN_DEVICE::PipelineAllocation::layout, m_device, m_vk, RHI_VULKAN_DEVICE::PipelineAllocation::pipeline, and RHI_VULKAN_DEVICE::PipelineAllocation::renderPass.
Referenced by CreateComputePipeline(), DestroyComputePipeline(), ExecuteDeferredRelease(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 4404 of file rhi_vulkan_device.cpp.
References m_device, m_presentBlitDSLayout, m_presentBlitLayout, m_presentBlitPipelines, and m_vk.
Referenced by ~RHI_VULKAN_DEVICE().
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 3788 of file rhi_vulkan_device.cpp.
References RHI_DEVICE::deferDestroy(), m_renderPassPool, and RENDER_PASS.
Referenced by LoadDeviceFunctions().
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 2509 of file rhi_vulkan_device.cpp.
References RHI_DEVICE::deferDestroy(), m_shaderPool, and SHADER.
Referenced by CreateComputePipeline().
|
private |
Definition at line 1755 of file rhi_vulkan_device.cpp.
References m_allocator, m_batchPooledStaging, and m_stagingPool.
Referenced by ~RHI_VULKAN_DEVICE().
|
overridevirtual |
Destroy the surface's swapchain first.
Implements RHI_DEVICE.
Definition at line 4794 of file rhi_vulkan_device.cpp.
References m_instance, m_surfacePool, m_surfaces, m_vk, and RhiHandleIndex().
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 5278 of file rhi_vulkan_device.cpp.
References destroySwapchainObjects(), m_swapchainPool, m_swapchains, and RhiHandleIndex().
|
private |
Definition at line 5295 of file rhi_vulkan_device.cpp.
References DestroySwapchainResources(), RHI_VULKAN_DEVICE::SwapchainAllocation::imageAvailable, RHI_VULKAN_DEVICE::SwapchainAllocation::inFlightFence, RHI_VULKAN_DEVICE::SwapchainAllocation::lastPresentCmd, m_commandPool, m_device, m_deviceMutex, m_vk, and RHI_VULKAN_DEVICE::SwapchainAllocation::renderFinished.
Referenced by CreateSwapchain(), DestroySwapchain(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 4571 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::SwapchainAllocation::images, RHI_VULKAN_DEVICE::SwapchainAllocation::imageViews, RHI_VULKAN_DEVICE::SwapchainAllocation::lastPresentId, m_device, m_presentWait, m_vk, RHI_VULKAN_DEVICE::SwapchainAllocation::presentDescPool, RHI_VULKAN_DEVICE::SwapchainAllocation::presentDescSet, RHI_VULKAN_DEVICE::SwapchainAllocation::presentFramebuffers, RHI_VULKAN_DEVICE::SwapchainAllocation::presentRenderPass, and RHI_VULKAN_DEVICE::SwapchainAllocation::swapchain.
Referenced by destroySwapchainObjects(), and ResizeSwapchain().
|
overridevirtual |
Render thread only.
See DestroyBuffer().
Implements RHI_DEVICE.
Definition at line 2402 of file rhi_vulkan_device.cpp.
References RHI_DEVICE::deferDestroy(), m_texturePool, and TEXTURE.
|
private |
Definition at line 2011 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::TextureAllocation::allocation, RHI_VULKAN_DEVICE::TextureAllocation::image, RHI_VULKAN_DEVICE::TextureAllocation::imageView, m_allocator, m_device, m_vk, RHI_VULKAN_DEVICE::TextureAllocation::ownedByFBO, and RHI_VULKAN_DEVICE::TextureAllocation::sampler.
Referenced by ExecuteDeferredRelease(), RealizeTexture(), and ~RHI_VULKAN_DEVICE().
|
overridevirtual |
Draws are only valid inside a render pass with a bound pipeline.
Implements RHI_DEVICE.
Definition at line 4242 of file rhi_vulkan_device.cpp.
References m_currentCmd, m_deviceMutex, m_renderPassActive, and m_vk.
|
overridevirtual |
Reads 16-bit indices from the bound index buffer.
Implements RHI_DEVICE.
Definition at line 4266 of file rhi_vulkan_device.cpp.
References m_currentCmd, m_deviceMutex, m_renderPassActive, and m_vk.
|
overridevirtual |
Non-indexed, so vertexOffset is ignored.
Implements RHI_DEVICE.
Definition at line 4253 of file rhi_vulkan_device.cpp.
References m_currentCmd, m_deviceMutex, m_renderPassActive, and m_vk.
|
inlinevirtualinherited |
Retire deferred releases that are due.
The render thread must call this once per frame after presenting.
Definition at line 348 of file rhi_device.h.
References ExecuteDeferredReleases(), and m_frameCounter.
|
overridevirtual |
Returns false if no render pass is active.
Implements RHI_DEVICE.
Definition at line 4093 of file rhi_vulkan_device.cpp.
References m_activePipeline, m_currentCmd, m_deviceMutex, m_renderPassActive, m_vk, result, submitPassCmd(), and traceRhi.
|
private |
Definition at line 1704 of file rhi_vulkan_device.cpp.
References endUploadCommands(), m_batchPooledStaging, and ReleaseStaging().
Referenced by UpdateBuffer(), and UploadTexture().
|
overridevirtual |
Reimplemented from RHI_DEVICE.
Definition at line 1601 of file rhi_vulkan_device.cpp.
References index, m_batchPooledStaging, m_deviceMutex, m_uploadBatchOwner, m_uploadCmdBuf, ReleaseStaging(), and SubmitOneShot().
|
private |
Definition at line 1581 of file rhi_vulkan_device.cpp.
References SubmitOneShot().
Referenced by endStagedUpload().
|
private |
Definition at line 4298 of file rhi_vulkan_device.cpp.
References buildPipeline(), m_device, m_presentBlitDSLayout, m_presentBlitLayout, m_presentBlitPipelines, m_vk, makeRenderPass(), presentAttachment(), result, and traceRhi.
Referenced by CreateSwapchainResources(), and Present().
|
private |
Definition at line 1543 of file rhi_vulkan_device.cpp.
References allocateCommandBuffer(), beginOneTimeCommands(), m_deviceMutex, and m_uploadCmdBuf.
Referenced by beginUploadCommands().
|
overridevirtual |
Submit, wait for completion, and copy all readbacks before returning.
Reimplemented from RHI_DEVICE.
Definition at line 3115 of file rhi_vulkan_device.cpp.
References allocateCommandBuffer(), beginOneTimeCommands(), RHI_COMPUTE_PIPELINE_DESC::bindGroupLayouts, RHI_COMPUTE_JOB::Commands(), ComputeDeviceLimits(), copy, RHI_VULKAN_DEVICE::ComputePipelineAllocation::desc, DEVICE_LOST, group, RHI_COMPUTE_JOB_LOOKUP::groupLayout, index, info, INVALID, RHI_VULKAN_DEVICE::PipelineAllocation::layout, m_allocator, m_bindGroupLayouts, m_bindGroupPool, m_bindGroups, m_bufferPool, m_buffers, m_commandPool, m_computePipelinePool, m_computePipelines, m_device, m_deviceMutex, m_graphicsQueue, m_vk, RHI_VULKAN_DEVICE::ComputePipelineAllocation::native, OK, OnQueueIdle(), RHI_COMPUTE_JOB_LOOKUP::pipeline, RHI_VULKAN_DEVICE::PipelineAllocation::pipeline, ReleaseStaging(), result, RhiHandleIndex(), RhiRangeWithinBuffer(), RhiValidateComputeJob(), stageData(), STORAGE, RHI_COMPUTE_JOB_LOOKUP::storageRange, submitCommands(), and SupportsCompute().
|
private |
Definition at line 2073 of file rhi_vulkan_device.cpp.
References BIND_GROUP, BIND_GROUP_LAYOUT, BUFFER, RHI_VULKAN_DEVICE::FramebufferAllocation::colorTextureHandles, destroyFramebufferObjects(), destroyPipeline(), destroyTexture(), FRAMEBUFFER, RHI_DEFERRED_RELEASE_ENTRY::handleValue, m_allocator, m_bindGroupLayoutPool, m_bindGroupLayouts, m_bindGroupPool, m_bindGroups, m_bufferPool, m_buffers, m_device, m_framebufferPool, m_framebuffers, m_pipelinePool, m_pipelines, m_renderPasses, m_renderPassPool, m_shaderPool, m_shaders, m_texturePool, m_textures, m_vk, PIPELINE, ReleaseDescriptorSet(), RENDER_PASS, RHI_HANDLE_INDEX_MASK, RhiHandleIndex(), SHADER, TEXTURE, and RHI_DEFERRED_RELEASE_ENTRY::type.
Referenced by ExecuteDeferredReleases(), and ~RHI_VULKAN_DEVICE().
|
overrideprivatevirtual |
Implements RHI_DEVICE.
Definition at line 2059 of file rhi_vulkan_device.cpp.
References ExecuteDeferredRelease(), RHI_DEVICE::m_deferredReleaseQueue, RHI_DEVICE::m_frameCounter, and SyncSubmittedPasses().
|
private |
Definition at line 4278 of file rhi_vulkan_device.cpp.
References m_graphicsQueueFamily, m_physicalDevice, and m_vk.
Referenced by CreateSurface().
|
overridevirtual |
|
overridevirtual |
The texture lets a later pass sample the framebuffer.
Returns a null handle if the framebuffer or attachment index is invalid. The framebuffer owns the texture, so never destroy or release it.
Implements RHI_DEVICE.
Definition at line 3987 of file rhi_vulkan_device.cpp.
References m_framebuffers, and RhiHandleIndex().
|
overridevirtual |
Backend and GPU name for display, such as "Vulkan (GeForce RTX 3080)".
Implements RHI_DEVICE.
Definition at line 2213 of file rhi_vulkan_device.cpp.
References m_deviceName.
Referenced by CreatePipeline().
|
private |
Definition at line 1421 of file rhi_vulkan_device.cpp.
References m_commandPool, m_device, m_graphicsQueueFamily, and m_vk.
Referenced by RHI_VULKAN_DEVICE().
|
private |
Definition at line 789 of file rhi_vulkan_device.cpp.
References LoadVulkanFunction(), m_vk, and m_vulkanLib.
Referenced by RHI_VULKAN_DEVICE().
|
private |
Definition at line 1282 of file rhi_vulkan_device.cpp.
References m_allocator, m_device, m_instance, m_physicalDevice, and m_vk.
Referenced by RHI_VULKAN_DEVICE().
|
overridevirtual |
Implements RHI_DEVICE.
Definition at line 2225 of file rhi_vulkan_device.cpp.
References m_initialized.
|
inlinevirtualinherited |
The vertical blank at which the display last showed a frame, or nothing if the backend cannot tell.
Definition at line 338 of file rhi_device.h.
|
private |
Definition at line 780 of file rhi_vulkan_device.cpp.
|
private |
Definition at line 1178 of file rhi_vulkan_device.cpp.
References CreateFramebuffer(), CreateRenderPass(), DestroyFramebuffer(), DestroyPipeline(), DestroyRenderPass(), LOAD_DEV_FN, m_presentWait, and m_vk.
Referenced by CreateLogicalDevice().
|
private |
Definition at line 771 of file rhi_vulkan_device.cpp.
References m_instance, m_vk, and name.
|
private |
Definition at line 762 of file rhi_vulkan_device.cpp.
References m_vulkanLib, and name.
Referenced by InitLoader().
|
private |
Definition at line 2588 of file rhi_vulkan_device.cpp.
References colorRefs(), index, m_device, and m_vk.
Referenced by CreateFramebuffer(), CreatePipeline(), CreateRenderPass(), CreateSwapchainResources(), and EnsurePresentBlit().
|
inlineprivate |
Definition at line 751 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::BufferAllocation::lastUseSerial, and m_submitSerial.
Referenced by BindGroup(), BindIndexBuffer(), and BindVertexBuffer().
|
inlineoverridevirtual |
Largest texture width or height in texels.
The default suits every GPU Metal runs on, and a backend that can query its GPU overrides it.
Reimplemented from RHI_DEVICE.
Definition at line 311 of file rhi_vulkan_device.cpp.
References m_maxTextureSize.
|
private |
Definition at line 1518 of file rhi_vulkan_device.cpp.
References m_freeCmds, m_submitSerial, m_submittedCmds, and m_syncedSerial.
Referenced by ExecuteCompute(), SubmitOneShot(), and SyncSubmittedPasses().
|
inlineinherited |
Releases still waiting on later frames, which only EndFrame() retires.
Definition at line 355 of file rhi_device.h.
References m_deferredReleaseQueue.
|
overridevirtual |
Retry a fixed surface extent that lagged behind the requested window size.
Reimplemented from RHI_DEVICE.
Definition at line 5225 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::SwapchainAllocation::dpiScale, FAILED, IDLE, m_deviceMutex, m_physicalDevice, m_surfaces, m_swapchainPool, m_swapchains, m_vk, RHI_VULKAN_DEVICE::SwapchainAllocation::nextSurfaceExtentCheck, RHI_VULKAN_DEVICE::SwapchainAllocation::requestedExtent, RESIZED, ResizeSwapchain(), RhiHandleIndex(), RHI_VULKAN_DEVICE::SwapchainAllocation::surface, traceRhi, WAITING, and RHI_VULKAN_DEVICE::SwapchainAllocation::waitingForSurfaceExtent.
|
overridevirtual |
When aSrcFBO is valid its first color attachment is copied to the swapchain first.
OUT_OF_DATE means the swapchain must be recreated, and SURFACE_LOST means the surface must be too.
| aSourceRect | the part of aSrcFBO to show, in texels in storage order as for CopyFramebufferDepth(), or all of it when null. |
Implements RHI_DEVICE.
Definition at line 5375 of file rhi_vulkan_device.cpp.
References allocateCommandBuffer(), beginOneTimeCommands(), RHI_VULKAN_DEVICE::SwapchainAllocation::currentImageIndex, DEVICE_LOST, RHI_VULKAN_DEVICE::SwapchainAllocation::dpiScale, EnsurePresentBlit(), ERROR, RHI_VULKAN_DEVICE::SwapchainAllocation::extent, RHI_VULKAN_DEVICE::SwapchainAllocation::format, RHI_SCISSOR_RECT::height, RHI_VULKAN_DEVICE::SwapchainAllocation::imageAvailable, imageBarrier(), RHI_VULKAN_DEVICE::SwapchainAllocation::images, RHI_VULKAN_DEVICE::SwapchainAllocation::inFlightFence, RHI_VULKAN_DEVICE::SwapchainAllocation::lastLoggedExtent, RHI_VULKAN_DEVICE::SwapchainAllocation::lastPresentCmd, RHI_VULKAN_DEVICE::SwapchainAllocation::lastPresentId, m_commandPool, m_device, m_deviceMutex, m_framebuffers, m_graphicsQueue, m_presentBlitLayout, m_presentWait, m_swapchainPool, m_swapchains, m_textures, m_vk, RHI_VULKAN_DEVICE::SwapchainAllocation::needsResize, OK, OUT_OF_DATE, RHI_VULKAN_DEVICE::SwapchainAllocation::presentAttemptCount, RHI_VULKAN_DEVICE::SwapchainAllocation::presentDescSet, RHI_VULKAN_DEVICE::SwapchainAllocation::presentFramebuffers, RHI_VULKAN_DEVICE::SwapchainAllocation::presentRenderPass, RHI_VULKAN_DEVICE::SwapchainAllocation::renderFinished, RHI_VULKAN_DEVICE::SwapchainAllocation::requestedExtent, ResizeSwapchain(), RhiHandleIndex(), PROF_TIMER::Start(), PROF_TIMER::Stop(), SURFACE_LOST, RHI_VULKAN_DEVICE::SwapchainAllocation::swapchain, traceRhi, VkElapsedMs(), VkResultToString(), RHI_SCISSOR_RECT::width, RHI_SCISSOR_RECT::x, and RHI_SCISSOR_RECT::y.
|
overridevirtual |
True when a present replaces one still queued for the next vertical blank, as in Vulkan MAILBOX mode, so frames drawn faster than the display only cost GPU time.
Reimplemented from RHI_DEVICE.
Definition at line 5367 of file rhi_vulkan_device.cpp.
References m_swapchains, and RhiHandleIndex().
|
overridevirtual |
False when presents show at once instead of at the next vertical blank, so frames drawn faster than the display refreshes are never seen.
Reimplemented from RHI_DEVICE.
Definition at line 5358 of file rhi_vulkan_device.cpp.
References m_swapchains, and RhiHandleIndex().
|
overridevirtual |
buffer must hold at least width * height * bpp bytes.
Returns false if the handle or attachment index is invalid or the backend cannot read back.
Implements RHI_DEVICE.
Definition at line 5808 of file rhi_vulkan_device.cpp.
References allocateCommandBuffer(), beginOneTimeCommands(), RHI_VULKAN_DEVICE::FramebufferAllocation::colorFormats, RHI_VULKAN_DEVICE::FramebufferAllocation::colorImages, RHI_VULKAN_DEVICE::FramebufferAllocation::height, imageBarrier(), m_allocator, m_deviceMutex, m_framebufferPool, m_framebuffers, m_vk, RhiHandleIndex(), RhiTextureBytesPerPixel(), SubmitOneShot(), and RHI_VULKAN_DEVICE::FramebufferAllocation::width.
|
private |
Definition at line 1258 of file rhi_vulkan_device.cpp.
References m_computeSubgroupSize, m_deviceLimits, m_deviceName, m_maxTextureSize, m_physicalDevice, and m_vk.
Referenced by RHI_VULKAN_DEVICE().
|
overridevirtual |
Create the GPU buffer for a reserved handle.
Render thread only. On failure the handle is released and false is returned.
Implements RHI_DEVICE.
Definition at line 2239 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::BufferAllocation::allocation, RHI_VULKAN_DEVICE::BufferAllocation::buffer, m_allocator, m_bufferPool, m_buffers, RHI_BUFFER_DESC::mappable, RHI_VULKAN_DEVICE::BufferAllocation::mappable, RHI_VULKAN_DEVICE::BufferAllocation::mappedPtr, result, RhiHandleIndex(), RHI_VULKAN_DEVICE::BufferAllocation::size, RHI_BUFFER_DESC::sizeBytes, TranslateBufferUsage(), RHI_BUFFER_DESC::type, and RHI_VULKAN_DEVICE::BufferAllocation::type.
|
overridevirtual |
Create the GPU texture for a reserved handle.
Render thread only. On failure the handle is released and false is returned.
Implements RHI_DEVICE.
Definition at line 2362 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::TextureAllocation::allocation, createImage2D(), createSampler(), createView(), destroyTexture(), RHI_TEXTURE_DESC::filter, RHI_TEXTURE_DESC::format, RHI_VULKAN_DEVICE::TextureAllocation::format, RHI_TEXTURE_DESC::height, RHI_VULKAN_DEVICE::TextureAllocation::height, RHI_VULKAN_DEVICE::TextureAllocation::image, RHI_VULKAN_DEVICE::TextureAllocation::imageView, m_allocator, m_texturePool, m_textures, RhiHandleIndex(), RHI_VULKAN_DEVICE::TextureAllocation::sampler, TranslateFilter(), TranslateTextureFormat(), RHI_TEXTURE_DESC::width, and RHI_VULKAN_DEVICE::TextureAllocation::width.
|
inlineinherited |
Definition at line 267 of file rhi_device.h.
References DestroyBindGroup().
|
inlineinherited |
Definition at line 264 of file rhi_device.h.
References DestroyBindGroupLayout().
|
inlineinherited |
Destroy the resource, if there is one, and clear the handle.
Definition at line 260 of file rhi_device.h.
References DestroyBuffer().
Referenced by destroyDiffCopies().
|
inlineinherited |
Definition at line 266 of file rhi_device.h.
References DestroyFramebuffer().
|
inlineinherited |
Definition at line 263 of file rhi_device.h.
References DestroyPipeline().
|
inlineinherited |
Definition at line 265 of file rhi_device.h.
References DestroyRenderPass().
|
inlineinherited |
Definition at line 262 of file rhi_device.h.
References DestroyShader().
|
inlineinherited |
Definition at line 268 of file rhi_device.h.
References DestroySurface().
|
inlineinherited |
Definition at line 269 of file rhi_device.h.
References DestroySwapchain().
|
inlineinherited |
Definition at line 261 of file rhi_device.h.
References DestroyTexture().
|
private |
Definition at line 3419 of file rhi_vulkan_device.cpp.
References m_descriptorPools, m_device, m_deviceMutex, and m_vk.
Referenced by CreateBindGroup(), and ExecuteDeferredRelease().
|
private |
Definition at line 1714 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::StagingBuffer::allocation, RHI_VULKAN_DEVICE::StagingBuffer::buffer, RHI_VULKAN_DEVICE::StagingBuffer::inUse, m_allocator, m_deviceMutex, m_stagingPool, RHI_VULKAN_DEVICE::StagingBuffer::size, and STAGING_POOL_BYTES.
Referenced by endStagedUpload(), EndUploadBatch(), ExecuteCompute(), UpdateBuffer(), and UploadTexture().
|
overridevirtual |
Reserve a handle without creating the GPU buffer, so the UI thread can hand out handles while RealizeBuffer() runs later on the render thread.
Thread-safe. Returns a null handle when the pool is exhausted.
Implements RHI_DEVICE.
Definition at line 2233 of file rhi_vulkan_device.cpp.
References m_bufferPool.
|
overridevirtual |
Thread-safe handle reservation, realized later by RealizeTexture().
Implements RHI_DEVICE.
Definition at line 2356 of file rhi_vulkan_device.cpp.
References m_texturePool.
|
overridevirtual |
Call when the window size or DPI scale changes.
Returns false on failure.
Implements RHI_DEVICE.
Definition at line 5125 of file rhi_vulkan_device.cpp.
References CreateSwapchainResources(), createVkSwapchain(), DestroySwapchainResources(), RHI_VULKAN_DEVICE::SwapchainAllocation::dpiScale, RHI_VULKAN_DEVICE::SwapchainAllocation::extent, RHI_VULKAN_DEVICE::SwapchainAllocation::images, RHI_VULKAN_DEVICE::SwapchainAllocation::lastPresentId, m_device, m_physicalDevice, m_surfacePool, m_surfaces, m_swapchainPool, m_swapchains, m_vk, RHI_VULKAN_DEVICE::SwapchainAllocation::needsResize, RHI_VULKAN_DEVICE::SwapchainAllocation::nextSurfaceExtentCheck, RHI_VULKAN_DEVICE::SwapchainAllocation::presentMode, RHI_VULKAN_DEVICE::VkSwapchainTry::presentMode, RHI_VULKAN_DEVICE::SwapchainAllocation::requestedExtent, RHI_VULKAN_DEVICE::VkSwapchainTry::result, RhiHandleIndex(), RHI_VULKAN_DEVICE::SwapchainAllocation::surface, RHI_VULKAN_DEVICE::SwapchainAllocation::swapchain, RHI_VULKAN_DEVICE::VkSwapchainTry::swapchain, swapchainExtent(), traceRhi, and RHI_VULKAN_DEVICE::SwapchainAllocation::waitingForSurfaceExtent.
Referenced by PollSurfaceExtent(), and Present().
|
private |
Definition at line 991 of file rhi_vulkan_device.cpp.
References m_instance, m_physicalDevice, m_vk, and traceRhi.
Referenced by RHI_VULKAN_DEVICE().
|
overridevirtual |
Size must not exceed RHI_MAX_PUSH_CONSTANT_BYTES.
Only valid inside a render pass.
Implements RHI_DEVICE.
Definition at line 4173 of file rhi_vulkan_device.cpp.
References m_activePipeline, m_currentCmd, m_deviceMutex, m_pipelinePool, m_pipelines, m_renderPassActive, m_vk, RHI_MAX_PUSH_CONSTANT_BYTES, and RhiHandleIndex().
|
overridevirtual |
Only valid inside a render pass.
Implements RHI_DEVICE.
Definition at line 4135 of file rhi_vulkan_device.cpp.
References RHI_SCISSOR_RECT::height, m_currentCmd, m_deviceMutex, m_renderPassActive, m_vk, RHI_SCISSOR_RECT::width, RHI_SCISSOR_RECT::x, and RHI_SCISSOR_RECT::y.
|
overridevirtual |
Only valid inside a render pass.
Implements RHI_DEVICE.
Definition at line 4116 of file rhi_vulkan_device.cpp.
References RHI_VIEWPORT::height, m_currentCmd, m_deviceMutex, m_renderPassActive, m_vk, RHI_VIEWPORT::maxDepth, RHI_VIEWPORT::minDepth, RHI_VIEWPORT::width, RHI_VIEWPORT::x, and RHI_VIEWPORT::y.
|
private |
Definition at line 1686 of file rhi_vulkan_device.cpp.
References AcquireStaging(), RHI_VULKAN_DEVICE::StagingBuffer::allocation, RHI_VULKAN_DEVICE::StagingBuffer::buffer, index, m_allocator, m_deviceMutex, m_stagingPool, and RHI_VULKAN_DEVICE::StagingBuffer::mapped.
Referenced by ExecuteCompute(), UpdateBuffer(), and UploadTexture().
|
private |
Definition at line 1457 of file rhi_vulkan_device.cpp.
References m_graphicsQueue, and m_vk.
Referenced by CreateFramebuffer(), ExecuteCompute(), SubmitOneShot(), and submitPassCmd().
|
private |
Definition at line 1468 of file rhi_vulkan_device.cpp.
References m_commandPool, m_device, m_deviceMutex, m_graphicsQueue, m_vk, OnQueueIdle(), submitCommands(), and traceRhi.
Referenced by EndUploadBatch(), endUploadCommands(), and ReadbackFramebufferPixels().
|
private |
Definition at line 1502 of file rhi_vulkan_device.cpp.
References m_freeCmds, m_submitSerial, m_submittedCmds, result, and submitCommands().
Referenced by CopyFramebufferDepth(), and EndRenderPass().
|
overridevirtual |
Compute defaults keep backends without compute support usable for graphics.
Reimplemented from RHI_DEVICE.
Definition at line 2953 of file rhi_vulkan_device.cpp.
References m_computeQueue, m_initialized, and m_vk.
Referenced by ComputeDeviceLimits(), CreateComputePipeline(), and ExecuteCompute().
|
private |
Definition at line 1526 of file rhi_vulkan_device.cpp.
References m_deviceMutex, m_graphicsQueue, m_submitSerial, m_syncedSerial, m_vk, OnQueueIdle(), and traceRhi.
Referenced by ExecuteDeferredReleases(), and UpdateBuffer().
|
private |
Definition at line 3439 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::TextureAllocation::currentLayout, RHI_VULKAN_DEVICE::TextureAllocation::image, imageBarrier(), LayoutToAccessMask(), and m_vk.
Referenced by CreateFramebuffer(), and UploadTexture().
|
staticprivate |
Definition at line 1299 of file rhi_vulkan_device.cpp.
References INDEX, STORAGE, UNIFORM, and VERTEX.
Referenced by RealizeBuffer().
|
staticprivate |
Definition at line 1334 of file rhi_vulkan_device.cpp.
References BILINEAR, and filter.
Referenced by RealizeTexture().
|
staticprivate |
Definition at line 1317 of file rhi_vulkan_device.cpp.
References RGBA8.
Referenced by CreateFramebuffer(), CreatePipeline(), CreateRenderPass(), and RealizeTexture().
|
overridevirtual |
The buffer need not be mappable.
The backend may go through a staging copy.
Implements RHI_DEVICE.
Definition at line 2302 of file rhi_vulkan_device.cpp.
References beginUploadCommands(), endStagedUpload(), m_allocator, m_bufferPool, m_buffers, m_deviceMutex, m_syncedSerial, m_vk, ReleaseStaging(), RhiHandleIndex(), RhiRangeWithinBuffer(), stageData(), and SyncSubmittedPasses().
|
overridevirtual |
Data is tightly packed rows in the texture's format, exactly width * height * bpp bytes.
Implements RHI_DEVICE.
Definition at line 2408 of file rhi_vulkan_device.cpp.
References beginUploadCommands(), endStagedUpload(), expected, RHI_VULKAN_DEVICE::TextureAllocation::format, RHI_VULKAN_DEVICE::TextureAllocation::height, RHI_VULKAN_DEVICE::TextureAllocation::image, m_allocator, m_deviceMutex, m_texturePool, m_textures, m_vk, ReleaseStaging(), RhiHandleIndex(), RhiTextureBytesPerPixel(), stageData(), TransitionTexture(), and RHI_VULKAN_DEVICE::TextureAllocation::width.
|
overridevirtual |
Wait until fewer than aAllowed presents are queued for the display or the timeout passes, so the next frame renders from the newest input.
Reimplemented from RHI_DEVICE.
Definition at line 5320 of file rhi_vulkan_device.cpp.
References RHI_VULKAN_DEVICE::SwapchainAllocation::inFlightFence, RHI_VULKAN_DEVICE::SwapchainAllocation::lastPresentId, m_device, m_presentWait, m_swapchainPool, m_swapchains, m_vk, result, RhiHandleIndex(), and RHI_VULKAN_DEVICE::SwapchainAllocation::swapchain.
|
private |
Definition at line 756 of file rhi_vulkan_device.cpp.
Referenced by BeginRenderPass(), BindGroup(), BindPipeline(), EndRenderPass(), and SetPushConstants().
|
private |
Definition at line 466 of file rhi_vulkan_device.cpp.
Referenced by AcquireStaging(), CreateFramebuffer(), createImage2D(), DestroyBuffer(), destroyFramebufferObjects(), DestroyStagingPool(), destroyTexture(), ExecuteCompute(), ExecuteDeferredRelease(), InitVMA(), ReadbackFramebufferPixels(), RealizeBuffer(), RealizeTexture(), ReleaseStaging(), stageData(), UpdateBuffer(), UploadTexture(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 508 of file rhi_vulkan_device.cpp.
Referenced by DestroyStagingPool(), endStagedUpload(), and EndUploadBatch().
|
private |
Definition at line 560 of file rhi_vulkan_device.cpp.
Referenced by CreateBindGroup(), CreateBindGroupLayout(), DestroyBindGroupLayout(), and ExecuteDeferredRelease().
|
private |
Definition at line 561 of file rhi_vulkan_device.cpp.
Referenced by CreateBindGroup(), CreateBindGroupLayout(), ExecuteCompute(), ExecuteDeferredRelease(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 590 of file rhi_vulkan_device.cpp.
Referenced by BindGroup(), CreateBindGroup(), DestroyBindGroup(), ExecuteCompute(), and ExecuteDeferredRelease().
|
private |
Definition at line 591 of file rhi_vulkan_device.cpp.
Referenced by BindGroup(), CreateBindGroup(), ExecuteCompute(), and ExecuteDeferredRelease().
|
private |
Definition at line 520 of file rhi_vulkan_device.cpp.
Referenced by BindIndexBuffer(), BindVertexBuffer(), CreateBindGroup(), DestroyBuffer(), ExecuteCompute(), ExecuteDeferredRelease(), RealizeBuffer(), ReserveBufferHandle(), and UpdateBuffer().
|
private |
Definition at line 521 of file rhi_vulkan_device.cpp.
Referenced by BindGroup(), BindIndexBuffer(), BindVertexBuffer(), CreateBindGroup(), ExecuteCompute(), ExecuteDeferredRelease(), RealizeBuffer(), UpdateBuffer(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 467 of file rhi_vulkan_device.cpp.
Referenced by allocateCommandBuffer(), CreateFramebuffer(), destroySwapchainObjects(), ExecuteCompute(), InitCommandPool(), Present(), SubmitOneShot(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 551 of file rhi_vulkan_device.cpp.
Referenced by ComputePipelineLimits(), CreateComputePipeline(), DestroyComputePipeline(), and ExecuteCompute().
|
private |
Definition at line 552 of file rhi_vulkan_device.cpp.
Referenced by ComputePipelineLimits(), CreateComputePipeline(), DestroyComputePipeline(), ExecuteCompute(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 480 of file rhi_vulkan_device.cpp.
Referenced by CreateLogicalDevice(), and SupportsCompute().
|
private |
Definition at line 481 of file rhi_vulkan_device.cpp.
Referenced by ComputePipelineLimits(), and ReadDeviceProperties().
|
private |
Definition at line 742 of file rhi_vulkan_device.cpp.
Referenced by BeginRenderPass(), BindGroup(), BindIndexBuffer(), BindPipeline(), BindVertexBuffer(), Draw(), DrawIndexedInstanced(), DrawInstanced(), EndRenderPass(), SetPushConstants(), SetScissor(), SetViewport(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 461 of file rhi_vulkan_device.cpp.
Referenced by CreateVkInstance(), and ~RHI_VULKAN_DEVICE().
|
protectedinherited |
Definition at line 373 of file rhi_device.h.
Referenced by deferDestroy(), RHI_VULKAN_DEVICE::ExecuteDeferredReleases(), PendingDeferredReleases(), and RHI_VULKAN_DEVICE::~RHI_VULKAN_DEVICE().
|
private |
Definition at line 570 of file rhi_vulkan_device.cpp.
Referenced by AcquireDescriptorPool(), ReleaseDescriptorSet(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 463 of file rhi_vulkan_device.cpp.
Referenced by AcquireDescriptorPool(), allocateCommandBuffer(), buildPipeline(), CreateBindGroup(), CreateBindGroupLayout(), CreateComputePipeline(), CreateFramebuffer(), CreateLogicalDevice(), CreatePipeline(), CreateRenderPass(), createSampler(), createSetLayout(), CreateShader(), CreateSwapchain(), CreateSwapchainResources(), createView(), createVkSwapchain(), destroyFramebufferObjects(), destroyPipeline(), DestroyPresentBlit(), destroySwapchainObjects(), DestroySwapchainResources(), destroyTexture(), EnsurePresentBlit(), ExecuteCompute(), ExecuteDeferredRelease(), InitCommandPool(), InitVMA(), LoadDeviceFunction(), makeRenderPass(), Present(), ReleaseDescriptorSet(), ResizeSwapchain(), RHI_VULKAN_DEVICE(), SubmitOneShot(), WaitForPresentSlot(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 479 of file rhi_vulkan_device.cpp.
Referenced by ComputeDeviceLimits(), ComputePipelineLimits(), CreateComputePipeline(), and ReadDeviceProperties().
|
private |
Definition at line 471 of file rhi_vulkan_device.cpp.
Referenced by AcquireDescriptorPool(), AcquireStaging(), BeginRenderPass(), BeginUploadBatch(), BindGroup(), BindIndexBuffer(), BindPipeline(), BindVertexBuffer(), CopyFramebufferDepth(), CreateBindGroup(), CreateComputePipeline(), CreateFramebuffer(), DestroyComputePipeline(), destroySwapchainObjects(), Draw(), DrawIndexedInstanced(), DrawInstanced(), EndRenderPass(), EndUploadBatch(), EnsureUploadCmdBuf(), ExecuteCompute(), PollSurfaceExtent(), Present(), ReadbackFramebufferPixels(), ReleaseDescriptorSet(), ReleaseStaging(), SetPushConstants(), SetScissor(), SetViewport(), stageData(), SubmitOneShot(), SyncSubmittedPasses(), UpdateBuffer(), and UploadTexture().
|
private |
Definition at line 485 of file rhi_vulkan_device.cpp.
Referenced by GetName(), ReadDeviceProperties(), and RHI_VULKAN_DEVICE().
|
private |
Definition at line 620 of file rhi_vulkan_device.cpp.
Referenced by BeginRenderPass(), CopyFramebufferDepth(), CreateFramebuffer(), DestroyFramebuffer(), ExecuteDeferredRelease(), and ReadbackFramebufferPixels().
|
private |
Definition at line 621 of file rhi_vulkan_device.cpp.
Referenced by BeginRenderPass(), CopyFramebufferDepth(), CreateFramebuffer(), ExecuteDeferredRelease(), GetFramebufferColorTexture(), Present(), ReadbackFramebufferPixels(), and ~RHI_VULKAN_DEVICE().
|
protectedinherited |
Definition at line 372 of file rhi_device.h.
Referenced by deferDestroy(), EndFrame(), and RHI_VULKAN_DEVICE::ExecuteDeferredReleases().
|
private |
Definition at line 747 of file rhi_vulkan_device.cpp.
Referenced by acquirePassCmd(), CopyFramebufferDepth(), OnQueueIdle(), and submitPassCmd().
|
private |
Definition at line 464 of file rhi_vulkan_device.cpp.
Referenced by CreateLogicalDevice(), ExecuteCompute(), Present(), submitCommands(), SubmitOneShot(), and SyncSubmittedPasses().
|
private |
Definition at line 465 of file rhi_vulkan_device.cpp.
Referenced by CreateLogicalDevice(), CreateSurface(), FindPresentQueueFamily(), and InitCommandPool().
|
private |
Definition at line 486 of file rhi_vulkan_device.cpp.
Referenced by CreateSurface(), CreateSwapchain(), IsInitialized(), RHI_VULKAN_DEVICE(), and SupportsCompute().
|
private |
Definition at line 460 of file rhi_vulkan_device.cpp.
Referenced by CreateSurface(), CreateVkInstance(), DestroySurface(), InitVMA(), LoadInstanceFunction(), SelectPhysicalDevice(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 477 of file rhi_vulkan_device.cpp.
Referenced by MaxTextureSize(), and ReadDeviceProperties().
|
private |
Definition at line 462 of file rhi_vulkan_device.cpp.
Referenced by ChoosePresentMode(), CreateLogicalDevice(), CreateSwapchain(), FindPresentQueueFamily(), InitVMA(), PollSurfaceExtent(), ReadDeviceProperties(), ResizeSwapchain(), and SelectPhysicalDevice().
|
private |
Definition at line 473 of file rhi_vulkan_device.cpp.
Referenced by buildPipeline(), CreateComputePipeline(), RHI_VULKAN_DEVICE(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 542 of file rhi_vulkan_device.cpp.
Referenced by BindGroup(), BindPipeline(), CreatePipeline(), DestroyPipeline(), ExecuteDeferredRelease(), and SetPushConstants().
|
private |
Definition at line 543 of file rhi_vulkan_device.cpp.
Referenced by BindGroup(), BindPipeline(), CreatePipeline(), ExecuteDeferredRelease(), SetPushConstants(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 735 of file rhi_vulkan_device.cpp.
Referenced by CreateSwapchainResources(), DestroyPresentBlit(), and EnsurePresentBlit().
|
private |
Definition at line 734 of file rhi_vulkan_device.cpp.
Referenced by DestroyPresentBlit(), EnsurePresentBlit(), and Present().
|
private |
Definition at line 733 of file rhi_vulkan_device.cpp.
Referenced by DestroyPresentBlit(), and EnsurePresentBlit().
|
private |
Definition at line 755 of file rhi_vulkan_device.cpp.
Referenced by CreateLogicalDevice(), DestroySwapchainResources(), LoadDeviceFunctions(), Present(), and WaitForPresentSlot().
|
private |
Definition at line 754 of file rhi_vulkan_device.cpp.
Referenced by BeginRenderPass(), BindGroup(), BindIndexBuffer(), BindPipeline(), BindVertexBuffer(), CopyFramebufferDepth(), Draw(), DrawIndexedInstanced(), DrawInstanced(), EndRenderPass(), SetPushConstants(), SetScissor(), and SetViewport().
|
private |
Definition at line 601 of file rhi_vulkan_device.cpp.
Referenced by BeginRenderPass(), CreateRenderPass(), ExecuteDeferredRelease(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 600 of file rhi_vulkan_device.cpp.
Referenced by BeginRenderPass(), CreateRenderPass(), DestroyRenderPass(), and ExecuteDeferredRelease().
|
private |
Definition at line 531 of file rhi_vulkan_device.cpp.
Referenced by CreatePipeline(), CreateShader(), DestroyShader(), and ExecuteDeferredRelease().
|
private |
Definition at line 532 of file rhi_vulkan_device.cpp.
Referenced by CreateComputePipeline(), CreatePipeline(), CreateShader(), ExecuteDeferredRelease(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 507 of file rhi_vulkan_device.cpp.
Referenced by AcquireStaging(), DestroyStagingPool(), ReleaseStaging(), and stageData().
|
private |
Definition at line 482 of file rhi_vulkan_device.cpp.
Referenced by AcquireDescriptorPool(), and CreateBindGroupLayout().
|
private |
Definition at line 748 of file rhi_vulkan_device.cpp.
Referenced by CreateFramebuffer(), MarkBufferInUse(), OnQueueIdle(), submitPassCmd(), and SyncSubmittedPasses().
|
private |
Definition at line 746 of file rhi_vulkan_device.cpp.
Referenced by CreateFramebuffer(), OnQueueIdle(), and submitPassCmd().
|
private |
Definition at line 665 of file rhi_vulkan_device.cpp.
Referenced by CreateSurface(), CreateSwapchain(), DestroySurface(), and ResizeSwapchain().
|
private |
Definition at line 666 of file rhi_vulkan_device.cpp.
Referenced by CreateSurface(), CreateSwapchain(), DestroySurface(), PollSurfaceExtent(), ResizeSwapchain(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 701 of file rhi_vulkan_device.cpp.
Referenced by CreateSwapchain(), DestroySwapchain(), PollSurfaceExtent(), Present(), ResizeSwapchain(), and WaitForPresentSlot().
|
private |
Definition at line 702 of file rhi_vulkan_device.cpp.
Referenced by CreateSwapchain(), DestroySwapchain(), PollSurfaceExtent(), Present(), PresentReplacesQueued(), PresentWaitsForDisplay(), ResizeSwapchain(), WaitForPresentSlot(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 749 of file rhi_vulkan_device.cpp.
Referenced by OnQueueIdle(), SyncSubmittedPasses(), and UpdateBuffer().
|
private |
Definition at line 523 of file rhi_vulkan_device.cpp.
Referenced by CreateBindGroup(), CreateFramebuffer(), DestroyTexture(), ExecuteDeferredRelease(), RealizeTexture(), ReserveTextureHandle(), and UploadTexture().
|
private |
Definition at line 524 of file rhi_vulkan_device.cpp.
Referenced by CreateBindGroup(), CreateFramebuffer(), ExecuteDeferredRelease(), Present(), RealizeTexture(), UploadTexture(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 474 of file rhi_vulkan_device.cpp.
Referenced by CreatePipeline().
|
private |
Definition at line 490 of file rhi_vulkan_device.cpp.
Referenced by BeginUploadBatch(), CurrentThreadOwnsUploadBatch(), and EndUploadBatch().
|
private |
Definition at line 491 of file rhi_vulkan_device.cpp.
Referenced by BeginUploadBatch(), EndUploadBatch(), and EnsureUploadCmdBuf().
|
private |
Definition at line 484 of file rhi_vulkan_device.cpp.
Referenced by AcquireDescriptorPool(), allocateCommandBuffer(), beginOneTimeCommands(), BeginRenderPass(), BindGroup(), BindIndexBuffer(), BindPipeline(), BindVertexBuffer(), buildPipeline(), ChoosePresentMode(), CopyFramebufferDepth(), CreateBindGroup(), CreateBindGroupLayout(), CreateComputePipeline(), CreateFramebuffer(), CreateLogicalDevice(), CreatePipeline(), CreateRenderPass(), createSampler(), createSetLayout(), CreateShader(), CreateSurface(), CreateSwapchain(), CreateSwapchainResources(), createView(), CreateVkInstance(), createVkSwapchain(), destroyFramebufferObjects(), destroyPipeline(), DestroyPresentBlit(), DestroySurface(), destroySwapchainObjects(), DestroySwapchainResources(), destroyTexture(), Draw(), DrawIndexedInstanced(), DrawInstanced(), EndRenderPass(), EnsurePresentBlit(), ExecuteCompute(), ExecuteDeferredRelease(), FindPresentQueueFamily(), InitCommandPool(), InitLoader(), InitVMA(), LoadDeviceFunction(), LoadDeviceFunctions(), LoadInstanceFunction(), makeRenderPass(), PollSurfaceExtent(), Present(), ReadbackFramebufferPixels(), ReadDeviceProperties(), ReleaseDescriptorSet(), ResizeSwapchain(), RHI_VULKAN_DEVICE(), SelectPhysicalDevice(), SetPushConstants(), SetScissor(), SetViewport(), submitCommands(), SubmitOneShot(), SupportsCompute(), SyncSubmittedPasses(), TransitionTexture(), UpdateBuffer(), UploadTexture(), WaitForPresentSlot(), and ~RHI_VULKAN_DEVICE().
|
private |
Definition at line 459 of file rhi_vulkan_device.cpp.
Referenced by InitLoader(), LoadVulkanFunction(), and ~RHI_VULKAN_DEVICE().
|
staticconstexprprivate |
Definition at line 504 of file rhi_vulkan_device.cpp.
Referenced by AcquireStaging().
|
staticconstexprprivate |
Definition at line 505 of file rhi_vulkan_device.cpp.
Referenced by ReleaseStaging().