diff options
| author | Tony Barbour <tony@LunarG.com> | 2016-06-21 10:47:18 -0600 |
|---|---|---|
| committer | Tony Barbour <tony@LunarG.com> | 2016-06-21 10:47:18 -0600 |
| commit | fbbf1db0e55410d80212c50abb8508c1dcd42365 (patch) | |
| tree | c89a9ba355cc2460a76fd52cb03f1d7f40d89ac2 | |
| parent | 0e84464e5f816aa4a6408136dfa292647c829d07 (diff) | |
| download | usermoji-fbbf1db0e55410d80212c50abb8508c1dcd42365.tar.xz | |
smoke: Remove references to device layers
Change-Id: I2399cdefb76a086525fea29e71a7c321b5cfecdd
| -rw-r--r-- | demos/smoke/Helpers.h | 9 | ||||
| -rw-r--r-- | demos/smoke/Shell.cpp | 25 | ||||
| -rw-r--r-- | demos/smoke/Shell.h | 1 | ||||
| -rwxr-xr-x | demos/smoke/generate-dispatch-table | 1 |
4 files changed, 1 insertions, 35 deletions
diff --git a/demos/smoke/Helpers.h b/demos/smoke/Helpers.h index e8cf2e8a..532da7a5 100644 --- a/demos/smoke/Helpers.h +++ b/demos/smoke/Helpers.h @@ -73,15 +73,6 @@ inline VkResult enumerate(std::vector<VkLayerProperties> &layer_props) return vk::EnumerateInstanceLayerProperties(&count, layer_props.data()); } -inline VkResult enumerate(VkPhysicalDevice phy, std::vector<VkLayerProperties> &layer_props) -{ - uint32_t count = 0; - vk::EnumerateDeviceLayerProperties(phy, &count, nullptr); - - layer_props.resize(count); - return vk::EnumerateDeviceLayerProperties(phy, &count, layer_props.data()); -} - inline VkResult get(VkPhysicalDevice phy, std::vector<VkQueueFamilyProperties> &queues) { uint32_t count = 0; diff --git a/demos/smoke/Shell.cpp b/demos/smoke/Shell.cpp index 084fa3f2..5a088523 100644 --- a/demos/smoke/Shell.cpp +++ b/demos/smoke/Shell.cpp @@ -34,9 +34,7 @@ Shell::Shell(Game &game) // require "standard" validation layers if (settings_.validate) { - device_layers_.push_back("VK_LAYER_LUNARG_standard_validation"); instance_layers_.push_back("VK_LAYER_LUNARG_standard_validation"); - instance_extensions_.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME); } } @@ -132,25 +130,6 @@ void Shell::assert_all_instance_extensions() const } } -bool Shell::has_all_device_layers(VkPhysicalDevice phy) const -{ - // enumerate device layers - std::vector<VkLayerProperties> layers; - vk::enumerate(phy, layers); - - std::set<std::string> layer_names; - for (const auto &layer : layers) - layer_names.insert(layer.layerName); - - // all listed device layers are required - for (const auto &name : device_layers_) { - if (layer_names.find(name) == layer_names.end()) - return false; - } - - return true; -} - bool Shell::has_all_device_extensions(VkPhysicalDevice phy) const { // enumerate device extensions @@ -223,7 +202,7 @@ void Shell::init_physical_dev() ctx_.physical_dev = VK_NULL_HANDLE; for (auto phy : phys) { - if (!has_all_device_layers(phy) || !has_all_device_extensions(phy)) + if (!has_all_device_extensions(phy)) continue; // get queue properties @@ -321,8 +300,6 @@ void Shell::create_dev() dev_info.pQueueCreateInfos = queue_info.data(); - dev_info.enabledLayerCount = static_cast<uint32_t>(device_layers_.size()); - dev_info.ppEnabledLayerNames = device_layers_.data(); dev_info.enabledExtensionCount = static_cast<uint32_t>(device_extensions_.size()); dev_info.ppEnabledExtensionNames = device_extensions_.data(); diff --git a/demos/smoke/Shell.h b/demos/smoke/Shell.h index adabd57c..31c4a2d8 100644 --- a/demos/smoke/Shell.h +++ b/demos/smoke/Shell.h @@ -99,7 +99,6 @@ protected: std::vector<const char *> instance_layers_; std::vector<const char *> instance_extensions_; - std::vector<const char *> device_layers_; std::vector<const char *> device_extensions_; private: diff --git a/demos/smoke/generate-dispatch-table b/demos/smoke/generate-dispatch-table index 07804b69..2158fa8c 100755 --- a/demos/smoke/generate-dispatch-table +++ b/demos/smoke/generate-dispatch-table @@ -108,7 +108,6 @@ vk_core = Extension(name='VK_core', version=0, guard=None, commands=[ Command(name='EnumerateInstanceExtensionProperties', dispatch=None), Command(name='EnumerateDeviceExtensionProperties', dispatch='VkPhysicalDevice'), Command(name='EnumerateInstanceLayerProperties', dispatch=None), - Command(name='EnumerateDeviceLayerProperties', dispatch='VkPhysicalDevice'), Command(name='GetDeviceQueue', dispatch='VkDevice'), Command(name='QueueSubmit', dispatch='VkQueue'), Command(name='QueueWaitIdle', dispatch='VkQueue'), |
