mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-12 13:54:14 +01:00
[dxvk] Skip over adapters not supporting Vulkan 1.1
Even with a 1.1 instance it appears to be possible to retrieve 1.0 adapters, so we'll just ignore them.
This commit is contained in:
parent
976d3b5ee4
commit
ce51431860
@ -15,12 +15,9 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DxvkDeviceFilter::testAdapter(
|
bool DxvkDeviceFilter::testAdapter(const VkPhysicalDeviceProperties& properties) const {
|
||||||
const Rc<DxvkAdapter>& adapter) const {
|
|
||||||
const auto& deviceProps = adapter->deviceProperties();
|
|
||||||
|
|
||||||
if (m_flags.test(DxvkDeviceFilterFlag::MatchDeviceName)) {
|
if (m_flags.test(DxvkDeviceFilterFlag::MatchDeviceName)) {
|
||||||
if (std::string (deviceProps.deviceName).find(m_matchDeviceName) == std::string::npos)
|
if (std::string(properties.deviceName).find(m_matchDeviceName) == std::string::npos)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,11 +36,11 @@ namespace dxvk {
|
|||||||
/**
|
/**
|
||||||
* \brief Tests an adapter
|
* \brief Tests an adapter
|
||||||
*
|
*
|
||||||
* \param [in] adapter Adapter handle
|
* \param [in] properties Adapter properties
|
||||||
* \returns \c true if the test passes
|
* \returns \c true if the test passes
|
||||||
*/
|
*/
|
||||||
bool testAdapter(
|
bool testAdapter(
|
||||||
const Rc<DxvkAdapter>& adapter) const;
|
const VkPhysicalDeviceProperties& properties) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -154,10 +154,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
std::vector<Rc<DxvkAdapter>> result;
|
std::vector<Rc<DxvkAdapter>> result;
|
||||||
for (uint32_t i = 0; i < numAdapters; i++) {
|
for (uint32_t i = 0; i < numAdapters; i++) {
|
||||||
Rc<DxvkAdapter> adapter = new DxvkAdapter(m_vki, adapters[i]);
|
VkPhysicalDeviceProperties deviceProperties;
|
||||||
|
m_vki->vkGetPhysicalDeviceProperties(adapters[i], &deviceProperties);
|
||||||
|
|
||||||
if (filter.testAdapter(adapter))
|
if (deviceProperties.apiVersion < VK_MAKE_VERSION(1, 1, 0))
|
||||||
result.push_back(adapter);
|
Logger::warn(str::format("Skipping Vulkan 1.0 adapter: ", deviceProperties.deviceName));
|
||||||
|
else if (filter.testAdapter(deviceProperties))
|
||||||
|
result.push_back(new DxvkAdapter(m_vki, adapters[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(result.begin(), result.end(),
|
std::sort(result.begin(), result.end(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user