Go to the documentation of this file.
33 #include <unordered_map>
120 Uint32 RTHeight) override final;
126 Uint32 RTHeight) override final;
197 PVoid& pMappedData) override final;
220 const
Box* pMapRegion,
284 bool UpdateTextureState,
285 VkImageSubresourceRange* pSubresRange =
nullptr);
288 VkImageLayout OldLayout,
289 VkImageLayout NewLayout,
290 const VkImageSubresourceRange& SubresRange);
302 bool UpdateBufferState);
313 bool UpdateInternalState);
320 bool UpdateInternalState);
325 m_WaitSemaphores.emplace_back(pWaitSemaphore);
326 m_VkWaitSemaphores.push_back(pWaitSemaphore->Get());
327 m_WaitDstStageMasks.push_back(WaitDstStageMask);
332 m_SignalSemaphores.emplace_back(pSignalSemaphore);
333 m_VkSignalSemaphores.push_back(pSignalSemaphore->
Get());
339 VkBuffer vkSrcBuffer,
347 const VkImageCopy& CopyRegion);
368 return m_CommandBuffer;
383 return m_DynamicDescrSetAllocator.
Allocate(SetLayout, DebugName);
395 __forceinline
void CommitRenderPassAndFramebuffer(
bool VerifyStates);
396 void CommitVkVertexBuffers();
397 void CommitViewports();
398 void CommitScissorRects();
403 __forceinline
void TransitionOrVerifyBufferState(
BufferVkImpl& Buffer,
406 VkAccessFlagBits ExpectedAccessFlags,
407 const char* OperationName);
409 __forceinline
void TransitionOrVerifyTextureState(
TextureVkImpl& Texture,
412 VkImageLayout ExpectedLayout,
413 const char* OperationName);
418 const char* OperationName);
423 const char* OperationName);
425 __forceinline
void EnsureVkCmdBuffer()
429 m_State.NumCommands = m_State.NumCommands != 0 ? m_State.NumCommands : 1;
432 auto vkCmdBuff = m_CmdPool->GetCommandBuffer();
437 inline void DisposeVkCmdBuffer(
Uint32 CmdQueue, VkCommandBuffer vkCmdBuff,
Uint64 FenceValue);
438 inline void DisposeCurrentCmdBuffer(
Uint32 CmdQueue,
Uint64 FenceValue);
440 void CopyBufferToTexture(VkBuffer vkSrcBuffer,
442 Uint32 SrcBufferRowStrideInTexels,
443 TextureVkImpl& DstTextureVk,
444 const Box& DstRegion,
449 void CopyTextureToBuffer(TextureVkImpl& SrcTextureVk,
450 const Box& SrcRegion,
454 VkBuffer vkDstBuffer,
456 Uint32 DstBufferRowStrideInTexels);
460 __forceinline BufferVkImpl* PrepareIndirectAttribsBuffer(IBuffer* pAttribsBuffer,
RESOURCE_STATE_TRANSITION_MODE TransitonMode,
const char* OpName);
461 __forceinline
void PrepareForDispatchCompute();
462 __forceinline
void PrepareForRayTracing();
464 void DvpLogRenderPass_PSOMismatch();
466 void CreateASCompactedSizeQueryPool();
473 bool CommittedVBsUpToDate =
false;
476 bool CommittedIBUpToDate =
false;
480 VkPipelineBindPoint vkPipelineBindPoint = VK_PIPELINE_BIND_POINT_MAX_ENUM;
484 static constexpr
Uint32 NUM_PIPELINE_BIND_POINTS = 3;
488 struct ResourceBindInfo : CommittedShaderResources
493 std::array<VkDescriptorSet, MAX_DESCR_SET_PER_SIGNATURE>
vkSets = {};
502 #ifdef DILIGENT_DEVELOPMENT
504 Uint32 LastBoundBaseInd = ~0u;
507 std::array<DescriptorSetInfo, MAX_RESOURCE_SIGNATURES> SetInfo;
509 SRBMaskType DynamicBuffersMask = 0;
512 VkPipelineLayout vkPipelineLayout = VK_NULL_HANDLE;
517 __forceinline
bool RequireUpdate(
bool DynamicBuffersIntact =
false)
const
519 return (StaleSRBMask & ActiveSRBMask) != 0 || ((DynamicBuffersMask & ActiveSRBMask) != 0 && !DynamicBuffersIntact);
522 void SetDynamicBufferBit(
Uint32 Index) { DynamicBuffersMask |=
static_cast<SRBMaskType
>(1u << Index); }
523 void ClearDynamicBufferBit(
Uint32 Index) { DynamicBuffersMask &=
static_cast<SRBMaskType
>(~(1u << Index)); }
528 __forceinline
void CommitDescriptorSets(ResourceBindInfo&
BindInfo,
bool DynamicBuffersIntact =
false);
529 #ifdef DILIGENT_DEVELOPMENT
530 void DvpValidateCommittedShaderResources(ResourceBindInfo&
BindInfo);
534 std::array<ResourceBindInfo, NUM_PIPELINE_BIND_POINTS> m_BindInfo;
537 std::vector<Uint32> m_DynamicBufferOffsets;
541 VkRenderPass m_vkRenderPass = VK_NULL_HANDLE;
545 VkFramebuffer m_vkFramebuffer = VK_NULL_HANDLE;
547 FixedBlockMemoryAllocator m_CmdListAllocator;
550 std::vector<RefCntAutoPtr<ManagedSemaphore>> m_WaitSemaphores;
551 std::vector<VkPipelineStageFlags> m_WaitDstStageMasks;
552 std::vector<RefCntAutoPtr<ManagedSemaphore>> m_SignalSemaphores;
554 std::vector<VkSemaphore> m_VkWaitSemaphores;
555 std::vector<VkSemaphore> m_VkSignalSemaphores;
558 std::vector<std::pair<Uint64, RefCntAutoPtr<IFence>>> m_PendingFences;
560 std::unordered_map<BufferVkImpl*, VulkanUploadAllocation> m_UploadAllocations;
562 struct MappedTextureKey
564 TextureVkImpl*
const Texture;
568 bool operator==(
const MappedTextureKey& rhs)
const
570 return Texture == rhs.Texture &&
571 MipLevel == rhs.MipLevel &&
572 ArraySlice == rhs.ArraySlice;
578 return ComputeHash(Key.Texture, Key.MipLevel, Key.ArraySlice);
587 std::unordered_map<MappedTextureKey, MappedTexture, MappedTextureKey::Hasher> m_MappedTextures;
589 std::unique_ptr<VulkanUtilities::VulkanCommandBufferPool> m_CmdPool;
591 VulkanUploadHeap m_UploadHeap;
592 VulkanDynamicHeap m_DynamicHeap;
593 DynamicDescriptorSetAllocator m_DynamicDescrSetAllocator;
595 std::shared_ptr<GenerateMipsVkHelper> m_GenerateMipsHelper;
596 RefCntAutoPtr<IShaderResourceBinding> m_GenerateMipsSRB;
599 RefCntAutoPtr<BufferVkImpl> m_DummyVB;
601 std::unique_ptr<QueryManagerVk> m_QueryMgr;
602 Int32 m_ActiveQueriesCounter = 0;
604 std::vector<VkClearValue> m_vkClearValues;
MAP_FLAGS
Special map flags.
Definition: GraphicsTypes.h:227
Definition: VulkanDynamicHeap.hpp:50
virtual void DrawIndirect(const DrawIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DrawIndirect() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:772
void TransitionBLASState(BottomLevelASVkImpl &BLAS, RESOURCE_STATE OldState, RESOURCE_STATE NewState, bool UpdateInternalState)
Definition: DeviceContextVkImpl.cpp:2675
Base interface for a reference counter object that stores the number of strong and weak references an...
Definition: ReferenceCounters.h:44
VulkanDynamicAllocation AllocateDynamicSpace(Uint32 SizeInBytes, Uint32 Alignment)
Definition: DeviceContextVkImpl.cpp:2814
const Uint32 m_ContextId
Definition: DeviceContextNextGenBase.hpp:110
void * PVoid
Definition: BasicTypes.h:56
Render device implementation in Vulkan backend.
Definition: RenderDeviceVkImpl.hpp:58
virtual void ResetRenderTargets() override final
Definition: DeviceContextVkImpl.cpp:1537
virtual void UpdateSBT(IShaderBindingTable *pSBT, const UpdateIndirectRTBufferAttribs *pUpdateIndirectBufferAttribs) override final
Implementation of IDeviceContext::UpdateSBT() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3337
Definition: VulkanCommandBuffer.hpp:36
This structure is used by IDeviceContext::UpdateSBT().
Definition: DeviceContext.h:1303
This structure is used by IDeviceContext::TraceRaysIndirect().
Definition: DeviceContext.h:1284
Shader resource binding interface.
Definition: ShaderResourceBinding.h:58
virtual void EndQuery(IQuery *pQuery) override final
Implementation of IDeviceContext::EndQuery() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2397
This structure is used by IDeviceContext::TraceRays().
Definition: DeviceContext.h:1267
size_t GetNumCommandsInCtx() const
Definition: DeviceContextVkImpl.hpp:362
BeginRenderPass command attributes.
Definition: DeviceContext.h:731
Shader binding table interface.
Definition: ShaderBindingTable.h:93
Defines the mesh indirect draw count command attributes.
Definition: DeviceContext.h:440
Pipeline state interface.
Definition: PipelineState.h:505
RESOURCE_STATE_TRANSITION_MODE
Defines resource state transition mode performed by various commands.
Definition: DeviceContext.h:136
Uint32 GetContextId() const
Definition: DeviceContextVkImpl.hpp:360
virtual void SetViewports(Uint32 NumViewports, const Viewport *pViewports, Uint32 RTWidth, Uint32 RTHeight) override final
Implementation of IDeviceContext::SetViewports() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1381
Uint32 Flags
Definition: DXBCUtils.cpp:71
CLEAR_DEPTH_STENCIL_FLAGS
Defines which parts of the depth-stencil buffer to clear.
Definition: DeviceContext.h:483
virtual void DrawMeshIndirect(const DrawMeshIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DrawMeshIndirect() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:810
uint64_t Uint64
64-bit unsigned integer
Definition: BasicTypes.h:50
virtual void UpdateBuffer(IBuffer *pBuffer, Uint32 Offset, Uint32 Size, const void *pData, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::UpdateBuffer() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1629
void AddSignalSemaphore(ManagedSemaphore *pSignalSemaphore)
Definition: DeviceContextVkImpl.hpp:329
PIPELINE_TYPE
Pipeline type.
Definition: PipelineState.h:295
Definition: ManagedVulkanObject.hpp:38
This structure is used by IDeviceContext::WriteBLASCompactedSize().
Definition: DeviceContext.h:1217
virtual void TraceRaysIndirect(const TraceRaysIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::TraceRaysIndirect() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3321
This structure is used by IDeviceContext::WriteTLASCompactedSize().
Definition: DeviceContext.h:1242
GenerateMipsVkHelper & GetGenerateMipsHelper()
Definition: DeviceContextVkImpl.hpp:390
virtual void CopyTLAS(const CopyTLASAttribs &Attribs) override final
Implementation of IDeviceContext::CopyTLAS() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3225
bool operator==(const Plane3D &p1, const Plane3D &p2)
Definition: AdvancedMath.hpp:442
virtual void CopyBuffer(IBuffer *pSrcBuffer, Uint32 SrcOffset, RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode, IBuffer *pDstBuffer, Uint32 DstOffset, Uint32 Size, RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final
Implementation of IDeviceContext::CopyBuffer() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1652
virtual void DispatchCompute(const DispatchComputeAttribs &Attribs) override final
Implementation of IDeviceContext::DispatchCompute() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:879
virtual void WaitForIdle() override final
Implementation of IDeviceContext::WaitForIdle() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2347
Texture view interface.
Definition: TextureView.h:202
virtual void SignalFence(IFence *pFence, Uint64 Value) override final
Implementation of IDeviceContext::SignalFence() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2332
Definition: DeviceContextVkImpl.hpp:574
ResourceBinding::BindInfo BindInfo
Definition: DXBCUtils.hpp:40
Defines the mesh draw command attributes.
Definition: DeviceContext.h:376
Box.
Definition: GraphicsTypes.h:2407
virtual void WriteTLASCompactedSize(const WriteTLASCompactedSizeAttribs &Attribs) override final
Implementation of IDeviceContext::WriteTLASCompactedSize() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3273
Definition: Texture.h:245
virtual void WriteBLASCompactedSize(const WriteBLASCompactedSizeAttribs &Attribs) override final
Implementation of IDeviceContext::WriteBLASCompactedSize() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3253
Definition: BottomLevelASVkImpl.hpp:41
virtual void UnmapTextureSubresource(ITexture *pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final
Implementation of IDeviceContext::UnmapTextureSubresource() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2246
virtual void ClearRenderTarget(ITextureView *pView, const float *RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::ClearRenderTarget() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1015
virtual void CopyTexture(const CopyTextureAttribs &CopyAttribs) override final
Implementation of IDeviceContext::CopyTexture() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1811
virtual void NextSubpass() override final
Implementation of IDeviceContext::NextSubpass() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1593
VkDescriptorSet AllocateDynamicDescriptorSet(VkDescriptorSetLayout SetLayout, const char *DebugName="")
Definition: DeviceContextVkImpl.hpp:379
VkDescriptorSet Allocate(VkDescriptorSetLayout SetLayout, const char *DebugName)
Definition: DescriptorPoolManager.cpp:290
void FlushBarriers()
Definition: VulkanCommandBuffer.cpp:437
Buffer interface.
Definition: Buffer.h:187
virtual void SetScissorRects(Uint32 NumRects, const Rect *pRects, Uint32 RTWidth, Uint32 RTHeight) override final
Implementation of IDeviceContext::SetScissorRects() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1410
Definition: GenerateMips.hpp:55
Definition: GenerateMipsVkHelper.hpp:46
int32_t Int32
32-bit signed integer
Definition: BasicTypes.h:46
virtual void BeginQuery(IQuery *pQuery) override final
Implementation of IDeviceContext::BeginQuery() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2354
virtual void CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::CommitShaderResources() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:471
Resource state transition barrier description.
Definition: DeviceContext.h:1333
void CopyTextureRegion(TextureVkImpl *pSrcTexture, RESOURCE_STATE_TRANSITION_MODE SrcTextureTransitionMode, TextureVkImpl *pDstTexture, RESOURCE_STATE_TRANSITION_MODE DstTextureTransitionMode, const VkImageCopy &CopyRegion)
Definition: DeviceContextVkImpl.cpp:1942
void UpdateTextureRegion(const void *pSrcData, Uint32 SrcStride, Uint32 SrcDepthStride, TextureVkImpl &TextureVk, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, RESOURCE_STATE_TRANSITION_MODE TextureTransitionMode)
Definition: DeviceContextVkImpl.cpp:1960
virtual void EndRenderPass() override final
Implementation of IDeviceContext::EndRenderPass() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1600
Command list interface.
Definition: CommandList.h:48
virtual void SetIndexBuffer(IBuffer *pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::SetIndexBuffer() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1323
Uint32 BaseInd
Definition: DeviceContextVkImpl.hpp:496
SET_VERTEX_BUFFERS_FLAGS
Defines allowed flags for IDeviceContext::SetVertexBuffers() function.
Definition: DeviceContext.h:578
virtual void UpdateTexture(ITexture *pTexture, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, const TextureSubResData &SubresData, RESOURCE_STATE_TRANSITION_MODE SrcBufferStateTransitionMode, RESOURCE_STATE_TRANSITION_MODE TextureStateTransitionModee) override final
Implementation of IDeviceContext::UpdateTexture() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1786
virtual void InvalidateState() override final
Implementation of IDeviceContext::InvalidateState() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1308
Describes multi-sampled texture resolve command arguments.
Definition: DeviceContext.h:549
struct Box Box
Definition: GraphicsTypes.h:2440
Describes dispatch command arguments.
Definition: DeviceContext.h:523
Definition: DeviceContextVkImpl.hpp:490
__forceinline void SetVkCmdBuffer(VkCommandBuffer VkCmdBuffer)
Definition: VulkanCommandBuffer.hpp:704
VALUE_TYPE
Value type.
Definition: GraphicsTypes.h:49
virtual void TraceRays(const TraceRaysAttribs &Attribs) override final
Implementation of IDeviceContext::TraceRays() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3308
Defines the indexed indirect draw command attributes.
Definition: DeviceContext.h:330
#define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName)
Definition: ObjectBase.hpp:59
virtual void WaitForFence(IFence *pFence, Uint64 Value, bool FlushContext) override final
Implementation of IDeviceContext::WaitForFence() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2338
virtual void MapBuffer(IBuffer *pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid &pMappedData) override final
Implementation of IDeviceContext::MapBuffer() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1681
virtual void MapTextureSubresource(ITexture *pTexture, Uint32 MipLevel, Uint32 ArraySlice, MAP_TYPE MapType, MAP_FLAGS MapFlags, const Box *pMapRegion, MappedTextureSubresource &MappedData) override final
Implementation of IDeviceContext::MapTextureSubresource() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2141
virtual void GenerateMips(ITextureView *pTexView) override final
Definition: DeviceContextVkImpl.cpp:2026
VulkanObjectWrapperType::VkObjectType Get() const
Definition: ManagedVulkanObject.hpp:69
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
const D3D12_PIPELINE_STATE_SUBOBJECT_TYPE Type
Definition: PipelineStateD3D12Impl.cpp:69
virtual void CopyBLAS(const CopyBLASAttribs &Attribs) override final
Implementation of IDeviceContext::CopyBLAS() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3192
DEFINE_VULKAN_OBJECT_WRAPPER(QueryPool) QueryPoolWrapper
Definition: VulkanLogicalDevice.hpp:84
This structure is used by IDeviceContext::BuildTLAS().
Definition: DeviceContext.h:1082
virtual void SetStencilRef(Uint32 StencilRef) override final
Implementation of IDeviceContext::SetStencilRef() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:554
void TransitionImageLayout(TextureVkImpl &TextureVk, VkImageLayout OldLayout, VkImageLayout NewLayout, const VkImageSubresourceRange &SubresRange)
Definition: DeviceContextVkImpl.cpp:2577
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
Defines the mesh indirect draw command attributes.
Definition: DeviceContext.h:402
virtual void DrawIndexedIndirect(const DrawIndexedIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DrawIndexedIndirect() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:786
std::size_t ComputeHash(const ArgsType &... Args)
Definition: HashUtils.hpp:57
Describes the viewport.
Definition: DeviceContext.h:593
virtual void BuildBLAS(const BuildBLASAttribs &Attribs) override final
Implementation of IDeviceContext::BuildBLAS() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2930
Describes dispatch command arguments.
Definition: DeviceContext.h:500
Information required to perform a copy operation between a buffer and a texture.
Definition: GraphicsAccessories.hpp:572
virtual void ExecuteCommandLists(Uint32 NumCommandLists, ICommandList *const *ppCommandLists) override final
Implementation of IDeviceContext::ExecuteCommandLists() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2318
Device context implementation in Vulkan backend.
Definition: DeviceContextVkImpl.hpp:67
virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc *pResourceBarriers) override final
Definition: DeviceContextVkImpl.cpp:2823
virtual void DrawMesh(const DrawMeshAttribs &Attribs) override final
Implementation of IDeviceContext::DrawMesh() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:800
void TransitionTextureState(TextureVkImpl &TextureVk, RESOURCE_STATE OldState, RESOURCE_STATE NewState, bool UpdateTextureState, VkImageSubresourceRange *pSubresRange=nullptr)
Definition: DeviceContextVkImpl.cpp:2473
This structure is used by IDeviceContext::BuildBLAS().
Definition: DeviceContext.h:925
This structure is used by IDeviceContext::CopyBLAS().
Definition: DeviceContext.h:1159
Uint32 DynamicOffsetCount
Definition: DeviceContextVkImpl.hpp:500
virtual void DrawIndexed(const DrawIndexedAttribs &Attribs) override final
Implementation of IDeviceContext::DrawIndexed() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:762
virtual void SetPipelineState(IPipelineState *pPipelineState) override final
Implementation of IDeviceContext::SetPipelineState() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:239
Texture object implementation in Vulkan backend.
Definition: TextureVkImpl.hpp:42
std::array< VkDescriptorSet, MAX_DESCR_SET_PER_SIGNATURE > vkSets
Definition: DeviceContextVkImpl.hpp:493
Defines the indirect draw command attributes.
Definition: DeviceContext.h:291
DRAW_FLAGS
Draw command flags.
Definition: DeviceContext.h:68
void UpdateBufferRegion(BufferVkImpl *pBuffVk, Uint64 DstOffset, Uint64 NumBytes, VkBuffer vkSrcBuffer, Uint64 SrcOffset, RESOURCE_STATE_TRANSITION_MODE TransitionMode)
Definition: DeviceContextVkImpl.cpp:1607
This structure is used by IDeviceContext::CopyTLAS().
Definition: DeviceContext.h:1188
Buffer object implementation in Vulkan backend.
Definition: BufferVkImpl.hpp:46
Fence interface.
Definition: Fence.h:62
virtual void SetBlendFactors(const float *pBlendFactors=nullptr) override final
Implementation of IDeviceContext::SetBlendFactors() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:563
Defines the indexed draw command attributes.
Definition: DeviceContext.h:224
virtual void SetRenderTargets(Uint32 NumRenderTargets, ITextureView *ppRenderTargets[], ITextureView *pDepthStencil, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::SetRenderTargets() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1472
virtual void Flush() override final
Implementation of IDeviceContext::Flush() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1176
virtual void BuildTLAS(const BuildTLASAttribs &Attribs) override final
Implementation of IDeviceContext::BuildTLAS() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:3091
Query interface.
Definition: Query.h:177
virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs &Attribs, IBuffer *pAttribsBuffer) override final
Implementation of IDeviceContext::DispatchComputeIndirect() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:888
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
virtual void DrawMeshIndirectCount(const DrawMeshIndirectCountAttribs &Attribs, IBuffer *pAttribsBuffer, IBuffer *pCountBuffer) override final
Implementation of IDeviceContext::DrawMeshIndirectCount() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:824
size_t operator()(const MappedTextureKey &Key) const
Definition: DeviceContextVkImpl.hpp:576
#define VERIFY_EXPR(...)
Definition: DebugUtilities.hpp:79
static constexpr Uint32 MAX_DESCRIPTOR_SETS
Definition: PipelineResourceSignatureVkImpl.hpp:74
Definition: QueryManagerVk.hpp:46
virtual void TransitionShaderResources(IPipelineState *pPipelineState, IShaderResourceBinding *pShaderResourceBinding) override final
Implementation of IDeviceContext::TransitionShaderResources() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:460
Describes the rectangle.
Definition: DeviceContext.h:642
void AddWaitSemaphore(ManagedSemaphore *pWaitSemaphore, VkPipelineStageFlags WaitDstStageMask)
Definition: DeviceContextVkImpl.hpp:322
Defines the draw command attributes.
Definition: DeviceContext.h:169
virtual void FinishCommandList(class ICommandList **ppCommandList) override final
Implementation of IDeviceContext::FinishCommandList() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:2294
VkCommandBuffer GetVkCmdBuffer() const
Definition: VulkanCommandBuffer.hpp:708
__forceinline VulkanUtilities::VulkanCommandBuffer & GetCommandBuffer()
Definition: DeviceContextVkImpl.hpp:364
Base implementation of the device context for next-generation backends.
Definition: DeviceContextNextGenBase.hpp:44
RESOURCE_STATE
Resource usage state.
Definition: GraphicsTypes.h:2814
QueryManagerVk * GetQueryManager()
Definition: DeviceContextVkImpl.hpp:391
virtual void BeginRenderPass(const BeginRenderPassAttribs &Attribs) override final
Implementation of IDeviceContext::BeginRenderPass() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1546
void TransitionTLASState(TopLevelASVkImpl &TLAS, RESOURCE_STATE OldState, RESOURCE_STATE NewState, bool UpdateInternalState)
Definition: DeviceContextVkImpl.cpp:2721
virtual void ResolveTextureSubresource(ITexture *pSrcTexture, ITexture *pDstTexture, const ResolveTextureSubresourceAttribs &ResolveAttribs) override final
Definition: DeviceContextVkImpl.cpp:2875
MAP_TYPE
Resource mapping type.
Definition: GraphicsTypes.h:206
Defines copy texture command attributes.
Definition: DeviceContext.h:672
virtual void FinishFrame() override final
Definition: DeviceContextVkImpl.cpp:1110
DeviceContextVkImpl(IReferenceCounters *pRefCounters, RenderDeviceVkImpl *pDevice, bool bIsDeferred, const EngineVkCreateInfo &EngineCI, Uint32 ContextId, Uint32 CommandQueueId, std::shared_ptr< GenerateMipsVkHelper > GenerateMipsHelper)
Definition: DeviceContextVkImpl.cpp:60
Attributes specific to Vulkan engine.
Definition: GraphicsTypes.h:2282
Definition: TopLevelASVkImpl.hpp:41
virtual void BufferMemoryBarrier(IBuffer *pBuffer, VkAccessFlags NewAccessFlags) override final
Implementation of IDeviceContextVk::BufferMemoryBarrier().
Definition: DeviceContextVkImpl.cpp:2589
virtual void ClearDepthStencil(ITextureView *pView, CLEAR_DEPTH_STENCIL_FLAGS ClearFlags, float fDepth, Uint8 Stencil, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final
Implementation of IDeviceContext::ClearDepthStencil() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:910
Texture inteface.
Definition: Texture.h:273
~DeviceContextVkImpl()
Definition: DeviceContextVkImpl.cpp:134
virtual void UnmapBuffer(IBuffer *pBuffer, MAP_TYPE MapType) override final
Implementation of IDeviceContext::UnmapBuffer() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1758
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
void TransitionBufferState(BufferVkImpl &BufferVk, RESOURCE_STATE OldState, RESOURCE_STATE NewState, bool UpdateBufferState)
Definition: DeviceContextVkImpl.cpp:2605
Describes data for one subresource.
Definition: Texture.h:165
virtual void Draw(const DrawAttribs &Attribs) override final
Implementation of IDeviceContext::Draw() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:752
virtual void SetVertexBuffers(Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pOffsets, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode, SET_VERTEX_BUFFERS_FLAGS Flags) override final
Implementation of IDeviceContext::SetVertexBuffers() in Vulkan backend.
Definition: DeviceContextVkImpl.cpp:1288