aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2017-04-24 18:42:14 -0700
committerChris Forbes <chrisf@ijw.co.nz>2017-04-26 07:55:08 +1200
commitb8d8dcd79f7e3200ea434a6fe511700cd1bba2de (patch)
tree058e2664e42fe193365070c310d58b7e83d607a2 /layers/core_validation.cpp
parentfde28d892d7d07b94e4f376a309fa2acfaaf502a (diff)
downloadusermoji-b8d8dcd79f7e3200ea434a6fe511700cd1bba2de.tar.xz
layers: Simplify slightly
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 4c4c6afa..1784b93b 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -6762,7 +6762,6 @@ VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer,
VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) {
bool skip = false;
- VkResult result = VK_SUCCESS;
layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(commandBuffer), layer_data_map);
std::unique_lock<std::mutex> lock(global_lock);
GLOBAL_CB_NODE *pCB = GetCBNode(dev_data, commandBuffer);
@@ -6784,18 +6783,15 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) {
}
if (!skip) {
lock.unlock();
- result = dev_data->dispatch_table.EndCommandBuffer(commandBuffer);
+ auto result = dev_data->dispatch_table.EndCommandBuffer(commandBuffer);
lock.lock();
if (VK_SUCCESS == result) {
pCB->state = CB_RECORDED;
- // Reset CB status flags
- pCB->status = 0;
}
+ return result;
} else {
- result = VK_ERROR_VALIDATION_FAILED_EXT;
+ return VK_ERROR_VALIDATION_FAILED_EXT;
}
- lock.unlock();
- return result;
}
VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) {
@@ -9212,8 +9208,8 @@ static bool FormatSpecificLoadAndStoreOpSettings(VkFormat format, T color_depth_
bool check_color_depth_load_op = !FormatIsStencilOnly(format);
bool check_stencil_load_op = FormatIsDepthAndStencil(format) || !check_color_depth_load_op;
- return (((check_color_depth_load_op == true) && (color_depth_op == op)) ||
- ((check_stencil_load_op == true) && (stencil_op == op)));
+ return ((check_color_depth_load_op && (color_depth_op == op)) ||
+ (check_stencil_load_op && (stencil_op == op)));
}
VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin,