aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-03-02 17:21:08 +1300
committerChris Forbes <chrisforbes@google.com>2016-03-02 17:24:13 +1300
commite198c1c89d35a8fe6fbd1a08368227ea22dbd74b (patch)
tree475364d9cf5ec15ed00230592b19558871dd32b3
parent1efa35eaa2edadd6e6ceeb915625e3d9a2cf2012 (diff)
downloadusermoji-e198c1c89d35a8fe6fbd1a08368227ea22dbd74b.tar.xz
layers: DS: populate features correctly
- Remove the redundant first fetching of the device features. This was always clobbered. - Treat pEnabledFeatures==NULL as disabling all features, as per 30.1 of the spec. Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/draw_state.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 5c874f58..29fd3779 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -3609,7 +3609,6 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice g
createDeviceRegisterExtensions(pCreateInfo, *pDevice);
// Get physical device limits for this device
my_instance_data->instance_dispatch_table->GetPhysicalDeviceProperties(gpu, &(my_device_data->physDevProperties.properties));
- my_instance_data->instance_dispatch_table->GetPhysicalDeviceFeatures(gpu, &(my_device_data->physDevProperties.features));
uint32_t count;
my_instance_data->instance_dispatch_table->GetPhysicalDeviceQueueFamilyProperties(gpu, &count, nullptr);
my_device_data->physDevProperties.queue_family_properties.resize(count);
@@ -3619,8 +3618,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice g
my_device_data->physDevProperties.features =
*pCreateInfo->pEnabledFeatures;
} else {
- my_instance_data->instance_dispatch_table->GetPhysicalDeviceFeatures(
- gpu, &my_device_data->physDevProperties.features);
+ memset(&my_device_data->physDevProperties.features, 0, sizeof(VkPhysicalDeviceFeatures));
}
loader_platform_thread_unlock_mutex(&globalLock);
return result;