summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/driver.cpp
diff options
context:
space:
mode:
author Yiwei Zhang <zzyiwei@google.com> 2020-07-11 16:32:09 -0700
committer Yiwei Zhang <zzyiwei@google.com> 2020-07-13 10:32:28 -0700
commit93b521c1908c89a2ce4654cc5e17a3ef661356fc (patch)
tree819e4728188c5a15e2248a2c8da8ea9be92f450e /vulkan/libvulkan/driver.cpp
parent2cefa738de67985a14b401510678222cd0cde853 (diff)
libvulkan: cleanup some redundant codes
This change also removes some unnecessary clang-format operations. Test: build Change-Id: I6dae3a72448b931e07e5f94087e7a477582b4ca4
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
-rw-r--r--vulkan/libvulkan/driver.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index e90cb11c7d..e3fc67e35f 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -935,14 +935,14 @@ VkResult EnumerateInstanceExtensionProperties(
return result;
}
-bool QueryPresentationProperties(
+void QueryPresentationProperties(
VkPhysicalDevice physicalDevice,
- VkPhysicalDevicePresentationPropertiesANDROID *presentation_properties) {
+ VkPhysicalDevicePresentationPropertiesANDROID* presentation_properties) {
// Request the android-specific presentation properties via GPDP2
- VkPhysicalDeviceProperties2KHR properties = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR,
+ VkPhysicalDeviceProperties2 properties = {
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2,
presentation_properties,
- {}
+ {},
};
#pragma clang diagnostic push
@@ -954,8 +954,6 @@ bool QueryPresentationProperties(
presentation_properties->sharedImage = VK_FALSE;
GetPhysicalDeviceProperties2(physicalDevice, &properties);
-
- return true;
}
VkResult EnumerateDeviceExtensionProperties(
@@ -977,8 +975,8 @@ VkResult EnumerateDeviceExtensionProperties(
}
VkPhysicalDevicePresentationPropertiesANDROID presentation_properties;
- if (QueryPresentationProperties(physicalDevice, &presentation_properties) &&
- presentation_properties.sharedImage) {
+ QueryPresentationProperties(physicalDevice, &presentation_properties);
+ if (presentation_properties.sharedImage) {
loader_extensions.push_back({
VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME,
VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION});
@@ -1337,10 +1335,10 @@ void GetDeviceQueue2(VkDevice device,
if (*pQueue != VK_NULL_HANDLE) SetData(*pQueue, data);
}
-VKAPI_ATTR VkResult
-AllocateCommandBuffers(VkDevice device,
- const VkCommandBufferAllocateInfo* pAllocateInfo,
- VkCommandBuffer* pCommandBuffers) {
+VkResult AllocateCommandBuffers(
+ VkDevice device,
+ const VkCommandBufferAllocateInfo* pAllocateInfo,
+ VkCommandBuffer* pCommandBuffers) {
ATRACE_CALL();
const auto& data = GetData(device);
@@ -1355,10 +1353,10 @@ AllocateCommandBuffers(VkDevice device,
return result;
}
-VKAPI_ATTR VkResult QueueSubmit(VkQueue queue,
- uint32_t submitCount,
- const VkSubmitInfo* pSubmits,
- VkFence fence) {
+VkResult QueueSubmit(VkQueue queue,
+ uint32_t submitCount,
+ const VkSubmitInfo* pSubmits,
+ VkFence fence) {
ATRACE_CALL();
const auto& data = GetData(queue);