Skip to content

Commit 34c36bd

Browse files
committed
Added State usage in to submitCommandsToQueue convinience method implementtation.
1 parent 6bee434 commit 34c36bd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

include/vsg/vk/SubmitCommands.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1515
#include <vsg/core/Object.h>
1616
#include <vsg/vk/Fence.h>
1717
#include <vsg/vk/Queue.h>
18+
#include <vsg/vk/State.h>
1819

1920
#include <mutex>
2021
#include <vector>
2122

2223
namespace vsg
2324
{
24-
/// convenience template function for submitting Vulkan commands to a queue
25+
/// deprecated: use CommandGraph/Viewer instead
2526
template<typename F>
2627
VkResult submitCommandsToQueue(CommandPool* commandPool, Fence* fence, uint64_t timeout, Queue* queue, F function)
2728
{
2829
VkResult result = VK_SUCCESS;
2930

3031
auto commandBuffer = commandPool->allocate();
32+
auto state = State::create(Slots{4,4});
33+
state->connect(commandBuffer);
3134

3235
VkCommandBufferBeginInfo beginInfo = {};
3336
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
@@ -64,7 +67,7 @@ namespace vsg
6467
return result;
6568
}
6669

67-
/// convenience template function for submitting Vulkan commands to a queue and waiting for completion.
70+
/// deprecated: use CommandGraph/Viewer instead
6871
template<typename F>
6972
VkResult submitCommandsToQueue(CommandPool* commandPool, Queue* queue, F function)
7073
{

0 commit comments

Comments
 (0)