48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* Copyright:
|
|
* 2017-2018, Danny Robson <danny@nerdcruft.net>
|
|
*/
|
|
|
|
#include <cruft/util/iterator.hpp>
|
|
|
|
#include <cruft/vk/load/ostream.hpp>
|
|
#include <cruft/vk/load/vtable.hpp>
|
|
|
|
#include <cruft/vk/instance.hpp>
|
|
#include <cruft/vk/physical_device.hpp>
|
|
#include <cruft/vk/ostream.hpp>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
#include "../load/vendor.hpp"
|
|
#include "load/vtable.hpp"
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
int
|
|
main (int, char**)
|
|
{
|
|
std::cout << "[ ";
|
|
for (auto const &i: cruft::vk::load::enumerate ()) {
|
|
cruft::vk::load::vendor v (i);
|
|
cruft::vk::load::i_table = &v.itable;
|
|
cruft::vk::load::v_table = &v.vtable;
|
|
|
|
cruft::vk::instance instance;
|
|
|
|
std::cout
|
|
<< "{ vendor: " << i
|
|
<< ", available_layers: [ "
|
|
<< cruft::make_infix (cruft::vk::instance::available_layers ())
|
|
<< " ] }"
|
|
<< ", instance: " << instance
|
|
<< ", devices: [ " << cruft::make_infix (cruft::vk::physical_device::find (instance)) << " ], "
|
|
<< " }, ";
|
|
}
|
|
std::cout << " ]\n";
|
|
} |