blob: 57bfc81e46aec81db7db123fdbb3d79a2b69b225 [file] [log] [blame]
Jesse Halld02edcb2015-09-08 07:44:48 -07001/*
2 * Copyright 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Jesse Hall04f4f472015-08-16 19:51:04 -070017#include "loader.h"
Jesse Hall1f91d392015-12-11 16:28:44 -080018
19namespace vulkan {
Michael Lentinecd6cabf2015-09-14 17:32:59 -050020
Jesse Hall1f91d392015-12-11 16:28:44 -080021const VkAllocationCallbacks* GetAllocator(VkInstance vkinstance) {
Chia-I Wuff4a6c72016-03-24 16:05:56 +080022 return &driver::GetData(vkinstance).allocator;
Jesse Hall1356b0d2015-11-23 17:24:58 -080023}
24
Jesse Hall1f91d392015-12-11 16:28:44 -080025const VkAllocationCallbacks* GetAllocator(VkDevice vkdevice) {
Chia-I Wu4901db72016-03-24 16:38:58 +080026 return &driver::GetData(vkdevice).allocator;
Jesse Hall1356b0d2015-11-23 17:24:58 -080027}
28
Jesse Hall715b86a2016-01-16 16:34:29 -080029VkInstance GetDriverInstance(VkInstance instance) {
Chia-I Wu0c203242016-03-15 13:44:51 +080030 return instance;
Jesse Hall715b86a2016-01-16 16:34:29 -080031}
32
Chia-I Wucc5e2762016-03-24 13:01:16 +080033const driver::InstanceDriverTable& GetDriverDispatch(VkInstance instance) {
34 return driver::GetData(instance).driver;
Jesse Hall715b86a2016-01-16 16:34:29 -080035}
36
Chia-I Wucc5e2762016-03-24 13:01:16 +080037const driver::DeviceDriverTable& GetDriverDispatch(VkDevice device) {
38 return driver::GetData(device).driver;
Jesse Halld7b994a2015-09-07 14:17:37 -070039}
40
Chia-I Wucc5e2762016-03-24 13:01:16 +080041const driver::DeviceDriverTable& GetDriverDispatch(VkQueue queue) {
42 return driver::GetData(queue).driver;
Jesse Halld7b994a2015-09-07 14:17:37 -070043}
44
Jesse Hall715b86a2016-01-16 16:34:29 -080045DebugReportCallbackList& GetDebugReportCallbacks(VkInstance instance) {
Chia-I Wuff4a6c72016-03-24 16:05:56 +080046 return driver::GetData(instance).debug_report_callbacks;
Jesse Hall715b86a2016-01-16 16:34:29 -080047}
48
Jesse Hall04f4f472015-08-16 19:51:04 -070049} // namespace vulkan