aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Elliott <ianelliott@google.com>2016-04-07 09:05:45 -0600
committerIan Elliott <ianelliott@google.com>2016-04-07 09:09:07 -0600
commit7b101d69ff49b2a424c2ec0c3bf8f4d58d90bba3 (patch)
treefa8dcfb5d1c96558c7d8bc36eff45cc03d6652b9
parent0e3003dd1723975fd733088281f533ee2f7f5ff6 (diff)
downloadusermoji-7b101d69ff49b2a424c2ec0c3bf8f4d58d90bba3.tar.xz
MR 289: layers: Changed other text/variables from "owned" to "acquired".
-rw-r--r--layers/swapchain.cpp20
-rw-r--r--layers/swapchain.h8
2 files changed, 14 insertions, 14 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index 34f8ccbd..c01a731e 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -1614,8 +1614,8 @@ vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocat
// TODOs:
//
// - Implement a check for validity language that reads: All uses of
- // presentable images acquired from pname:swapchain and owned by the
- // application must: have completed execution
+ // presentable images acquired from pname:swapchain must: have completed
+ // execution
bool skipCall = false;
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
loader_platform_thread_lock_mutex(&globalLock);
@@ -1705,7 +1705,7 @@ vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSw
for (uint32_t i = 0; i < *pSwapchainImageCount; i++) {
pSwapchain->images[i].image = pSwapchainImages[i];
pSwapchain->images[i].pSwapchain = pSwapchain;
- pSwapchain->images[i].ownedByApp = false;
+ pSwapchain->images[i].acquiredByApp = false;
}
}
}
@@ -1756,7 +1756,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice de
uint32_t minImageCount = pPhysicalDevice->surfaceCapabilities.minImageCount;
uint32_t imagesAcquiredByApp = 0;
for (uint32_t i = 0; i < pSwapchain->imageCount; i++) {
- if (pSwapchain->images[i].ownedByApp) {
+ if (pSwapchain->images[i].acquiredByApp) {
imagesAcquiredByApp++;
}
}
@@ -1790,8 +1790,8 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice de
// Obtain this pointer again after locking:
pSwapchain = &my_data->swapchainMap[swapchain];
if (((result == VK_SUCCESS) || (result == VK_SUBOPTIMAL_KHR)) && pSwapchain) {
- // Change the state of the image (now owned by the application):
- pSwapchain->images[*pImageIndex].ownedByApp = true;
+ // Change the state of the image (now acquired by the application):
+ pSwapchain->images[*pImageIndex].acquiredByApp = true;
}
loader_platform_thread_unlock_mutex(&globalLock);
return result;
@@ -1853,10 +1853,10 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue,
"images in this VkSwapchainKHR.\n",
__FUNCTION__, index, pSwapchain->imageCount);
} else {
- if (!pSwapchain->images[index].ownedByApp) {
+ if (!pSwapchain->images[index].acquiredByApp) {
skipCall |= LOG_ERROR(VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, pPresentInfo->pSwapchains[i],
"VkSwapchainKHR", SWAPCHAIN_INDEX_NOT_IN_USE, "%s() returned an index (i.e. %d) "
- "for an image that is not owned by "
+ "for an image that is not acquired by "
"the application.",
__FUNCTION__, index);
}
@@ -1893,9 +1893,9 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue,
int index = pPresentInfo->pImageIndices[i];
SwpSwapchain *pSwapchain = &my_data->swapchainMap[pPresentInfo->pSwapchains[i]];
if (pSwapchain) {
- // Change the state of the image (no longer owned by the
+ // Change the state of the image (no longer acquired by the
// application):
- pSwapchain->images[index].ownedByApp = false;
+ pSwapchain->images[index].acquiredByApp = false;
}
}
}
diff --git a/layers/swapchain.h b/layers/swapchain.h
index 56458f62..1de9b306 100644
--- a/layers/swapchain.h
+++ b/layers/swapchain.h
@@ -66,7 +66,7 @@ typedef enum _SWAPCHAIN_ERROR {
SWAPCHAIN_DESTROY_SWAP_DIFF_DEVICE, // Called vkDestroySwapchainKHR() with a different VkDevice than vkCreateSwapchainKHR()
SWAPCHAIN_APP_ACQUIRES_TOO_MANY_IMAGES, // vkAcquireNextImageKHR() asked for more images than are available
SWAPCHAIN_INDEX_TOO_LARGE, // Index is too large for swapchain
- SWAPCHAIN_INDEX_NOT_IN_USE, // vkQueuePresentKHR() given index that is not owned by app
+ SWAPCHAIN_INDEX_NOT_IN_USE, // vkQueuePresentKHR() given index that is not acquired by app
SWAPCHAIN_BAD_BOOL, // VkBool32 that doesn't have value of VK_TRUE or VK_FALSE (e.g. is a non-zero form of true)
SWAPCHAIN_INVALID_COUNT, // Second time a query called, the pCount value didn't match first time
SWAPCHAIN_WRONG_STYPE, // The sType for a struct has the wrong value
@@ -289,9 +289,9 @@ struct _SwpImage {
// Corresponding VkSwapchainKHR (and info) to this VkImage:
SwpSwapchain *pSwapchain;
- // true if application got this image from vkAcquireNextImageKHR(), and
- // hasn't yet called vkQueuePresentKHR() for it; otherwise false:
- bool ownedByApp;
+ // true if application acquired this image from vkAcquireNextImageKHR(),
+ // and hasn't yet called vkQueuePresentKHR() for it; otherwise false:
+ bool acquiredByApp;
};
// Create one of these for each VkSwapchainKHR within a VkDevice: