bug-14786: CmdBufferOptimizeFlags -> CmdBufferUsageFlags
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index b9e24ea..c1395b3 100755
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -1554,9 +1554,9 @@
pCB = getCBNode(dev_data, submit->pCommandBuffers[i]);
loader_platform_thread_lock_mutex(&globalLock);
pCB->submitCount++; // increment submit count
- if ((pCB->beginInfo.flags & VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT) && (pCB->submitCount > 1)) {
+ if ((pCB->beginInfo.flags & VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT) && (pCB->submitCount > 1)) {
skipCall |= log_msg(dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_CMD_BUFFER_SINGLE_SUBMIT_VIOLATION, "DS",
- "CB %#" PRIxLEAST64 " was begun w/ VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT set, but has been submitted %#" PRIxLEAST64 " times.", reinterpret_cast<uint64_t>(pCB->cmdBuffer), pCB->submitCount);
+ "CB %#" PRIxLEAST64 " was begun w/ VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT set, but has been submitted %#" PRIxLEAST64 " times.", reinterpret_cast<uint64_t>(pCB->cmdBuffer), pCB->submitCount);
}
if (CB_UPDATE_COMPLETE != pCB->state) {
// Flag error for using CB w/o vkEndCommandBuffer() called
diff --git a/layers/draw_state.h b/layers/draw_state.h
index 7f5a7e8..c8a6883 100755
--- a/layers/draw_state.h
+++ b/layers/draw_state.h
@@ -53,7 +53,7 @@
DRAWSTATE_NUM_SAMPLES_MISMATCH, // Number of samples in bound PSO does not match number in FB of current RenderPass
DRAWSTATE_NO_END_CMD_BUFFER, // Must call vkEndCommandBuffer() before QueueSubmit on that cmdBuffer
DRAWSTATE_NO_BEGIN_CMD_BUFFER, // Binding cmds or calling End on CB that never had vkBeginCommandBuffer() called on it
- DRAWSTATE_CMD_BUFFER_SINGLE_SUBMIT_VIOLATION, // Cmd Buffer created with VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT flag is submitted multiple times
+ DRAWSTATE_CMD_BUFFER_SINGLE_SUBMIT_VIOLATION, // Cmd Buffer created with VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag is submitted multiple times
DRAWSTATE_INVALID_SECONDARY_CMD_BUFFER, // vkCmdExecuteCommands() called with a primary cmdBuffer in pCmdBuffers array
DRAWSTATE_VIEWPORT_NOT_BOUND, // Draw submitted with no viewport state bound
DRAWSTATE_SCISSOR_NOT_BOUND, // Draw submitted with no scissor state bound
diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp
index b217886..989a6bd 100644
--- a/layers/param_checker.cpp
+++ b/layers/param_checker.cpp
@@ -1640,13 +1640,11 @@
}
static
-bool ValidateEnumerator(VkCmdBufferOptimizeFlagBits const& enumerator)
+bool ValidateEnumerator(VkCmdBufferUsageFlags const& enumerator)
{
- VkCmdBufferOptimizeFlagBits allFlags = (VkCmdBufferOptimizeFlagBits)(VK_CMD_BUFFER_OPTIMIZE_NO_SIMULTANEOUS_USE_BIT |
- VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT |
- VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT |
- VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT |
- VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT);
+ VkCmdBufferUsageFlags allFlags = (VkCmdBufferUsageFlags)(VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT |
+ VK_CMD_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT |
+ VK_CMD_BUFFER_USAGE_SIMULTANEOUS_USE_BIT);
if(enumerator & (~allFlags))
{
return false;
@@ -1656,7 +1654,7 @@
}
static
-std::string EnumeratorString(VkCmdBufferOptimizeFlagBits const& enumerator)
+std::string EnumeratorString(VkCmdBufferUsageFlags const& enumerator)
{
if(!ValidateEnumerator(enumerator))
{
@@ -1664,25 +1662,17 @@
}
std::vector<std::string> strings;
- if(enumerator & VK_CMD_BUFFER_OPTIMIZE_NO_SIMULTANEOUS_USE_BIT)
+ if(enumerator & VK_CMD_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)
{
- strings.push_back("VK_CMD_BUFFER_OPTIMIZE_NO_SIMULTANEOUS_USE_BIT");
+ strings.push_back("VK_CMD_BUFFER_USAGE_SIMULTANEOUS_USE_BIT");
}
- if(enumerator & VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT)
+ if(enumerator & VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT)
{
- strings.push_back("VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT");
+ strings.push_back("VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT");
}
- if(enumerator & VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT)
+ if(enumerator & VK_CMD_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)
{
- strings.push_back("VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT");
- }
- if(enumerator & VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT)
- {
- strings.push_back("VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT");
- }
- if(enumerator & VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT)
- {
- strings.push_back("VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT");
+ strings.push_back("VK_CMD_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT");
}
std::string enumeratorString;
diff --git a/layers/screenshot.cpp b/layers/screenshot.cpp
index e9ec3eb..c7eb4ca 100644
--- a/layers/screenshot.cpp
+++ b/layers/screenshot.cpp
@@ -178,8 +178,7 @@
const VkCmdBufferBeginInfo cmdBufferBeginInfo = {
VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO,
NULL,
- VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT |
- VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT,
+ VK_CMD_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
};
const VkImageCopy imageCopyRegion = {
{VK_IMAGE_ASPECT_COLOR_BIT, 0, 0},