2 * Copyright (c) 2015-2016 The Khronos Group Inc.
3 * Copyright (c) 2015-2016 Valve Corporation
4 * Copyright (c) 2015-2016 LunarG, Inc.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * Author: Chia-I Wu <olvaffe@gmail.com>
19 * Author: Chris Forbes <chrisf@ijw.co.nz>
20 * Author: Courtney Goeltzenleuchter <courtney@LunarG.com>
21 * Author: Mark Lobodzinski <mark@lunarg.com>
22 * Author: Mike Stroyan <mike@LunarG.com>
23 * Author: Tobin Ehlis <tobine@google.com>
24 * Author: Tony Barbour <tony@LunarG.com>
27 #ifndef TEST_ENVIRONMENT_H
28 #define TEST_ENVIRONMENT_H
30 #include "vktestbinding.h"
32 namespace vk_testing {
33 class Environment : public ::testing::Environment {
37 bool parse_args(int argc, char **argv);
40 virtual void TearDown();
42 const std::vector<Device *> &devices() { return devs_; }
43 Device &default_device() { return *(devs_[default_dev_]); }
44 VkInstance get_instance() { return inst; }
45 VkPhysicalDevice gpus[16];
48 VkApplicationInfo app_;
49 uint32_t default_dev_;
52 std::vector<Device *> devs_;
55 #endif // TEST_ENVIRONMENT_H