aboutsummaryrefslogtreecommitdiff
path: root/layers/device_limits.cpp
diff options
context:
space:
mode:
authorMichael Lentine <mlentine@google.com>2016-02-03 16:51:46 -0600
committerTobin Ehlis <tobine@google.com>2016-02-10 09:19:29 -0700
commiteba876d78708b086fc48abd38cd4e638e282b853 (patch)
tree018123c70b06e3a1b477fc0907a9360a44426bf9 /layers/device_limits.cpp
parent32bce170582e151c13df697f410a8ccda72454b3 (diff)
downloadusermoji-eba876d78708b086fc48abd38cd4e638e282b853.tar.xz
layers: Enable Wall and Werror.
Diffstat (limited to 'layers/device_limits.cpp')
-rw-r--r--layers/device_limits.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp
index 1b158191..b11f34cb 100644
--- a/layers/device_limits.cpp
+++ b/layers/device_limits.cpp
@@ -97,8 +97,6 @@ struct layer_data {
static unordered_map<void *, layer_data *> layer_data_map;
-static LOADER_PLATFORM_THREAD_ONCE_DECLARATION(g_initOnce);
-
// TODO : This can be much smarter, using separate locks for separate global data
static int globalLockInitialized = 0;
static loader_platform_thread_mutex globalLock;
@@ -558,9 +556,11 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuf
"Cannot enable in occlusion queries in vkBeginCommandBuffer() and set queryFlags to %d which is not a valid combination of VkQueryControlFlagBits.",
pInfo->queryFlags);
}
+ VkResult result = VK_ERROR_VALIDATION_FAILED_EXT;
if (!skipCall)
- return dev_data->device_dispatch_table->BeginCommandBuffer(commandBuffer, pBeginInfo);
- return VK_ERROR_VALIDATION_FAILED_EXT;
+ result = dev_data->device_dispatch_table->BeginCommandBuffer(
+ commandBuffer, pBeginInfo);
+ return result;
}
VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue)
@@ -613,7 +613,6 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(
const VkCopyDescriptorSet *pDescriptorCopies)
{
layer_data* dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
- VkResult result = VK_ERROR_VALIDATION_FAILED_EXT;
VkBool32 skipCall = VK_FALSE;
for (uint32_t i = 0; i < descriptorWriteCount; i++) {