Vulkan stuff

This commit is contained in:
2025-09-20 12:39:42 +03:00
parent ab404bf672
commit 287102dcea
19 changed files with 137 additions and 152 deletions

View File

@@ -0,0 +1,33 @@
#include "tier1/utlvector.h"
#include "vulkan_state.h"
class CVkCommandBuffer: public IVkCommandBuffer
{
public:
virtual void Init() override;
virtual void Shutdown() override;
virtual void AddCommand( EVulkanCommandType eType, CVkCommand *pCommand ) override;
virtual void Submit() override;
private:
CUtlSelfReferencingVector<CVkCommand*> g_commands;
};
void CVkCommandBuffer::AddCommand( EVulkanCommandType eType, CVkCommand *pCommand )
{
g_commands.AppendTail(pCommand);
}
void CVkCommandBuffer::Submit()
{
for (auto &pCommand: g_commands)
{
pCommand->Execute();
delete pCommand;
};
};
static CVkCommandBuffer s_vkCommandBuffer;
IVkCommandBuffer *VulkanCommandBuffer()
{
return &s_vkCommandBuffer;
}