Vulkan stuff
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user