• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2019-2021 The Khronos Group Inc.
3  * Copyright (c) 2019-2021 Valve Corporation
4  * Copyright (c) 2019-2021 LunarG, Inc.
5  *
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
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  * Author: Lenny Komow <lenny@lunarg.com>
19  * Author: Charles Giessen <charles@lunarg.com>
20  */
21 
22 #pragma once
23 
24 typedef struct LoaderEnumAdapters2 {
25     ULONG adapter_count;
26     struct {
27         UINT handle;
28         LUID luid;
29         ULONG source_count;
30         BOOL present_move_regions_preferred;
31     } * adapters;
32 } LoaderEnumAdapters2;
33 
34 typedef _Check_return_ NTSTATUS(APIENTRY *PFN_LoaderEnumAdapters2)(const LoaderEnumAdapters2 *);
35 
36 typedef enum AdapterInfoType {
37     LOADER_QUERY_TYPE_REGISTRY = 48,
38 } AdapterInfoType;
39 
40 typedef struct LoaderQueryAdapterInfo {
41     UINT handle;
42     AdapterInfoType type;
43     VOID *private_data;
44     UINT private_data_size;
45 } LoaderQueryAdapterInfo;
46 
47 typedef _Check_return_ NTSTATUS(APIENTRY *PFN_LoaderQueryAdapterInfo)(const LoaderQueryAdapterInfo *);
48 
49 typedef enum LoaderQueryRegistryType {
50     LOADER_QUERY_REGISTRY_ADAPTER_KEY = 1,
51 } LoaderQueryRegistryType;
52 
53 typedef enum LoaderQueryRegistryStatus {
54     LOADER_QUERY_REGISTRY_STATUS_SUCCESS = 0,
55     LOADER_QUERY_REGISTRY_STATUS_BUFFER_OVERFLOW = 1,
56 } LoaderQueryRegistryStatus;
57 
58 typedef struct LoaderQueryRegistryFlags {
59     union {
60         struct {
61             UINT translate_path : 1;
62             UINT mutable_value : 1;
63             UINT reserved : 30;
64         };
65         UINT value;
66     };
67 } LoaderQueryRegistryFlags;
68 
69 typedef struct LoaderQueryRegistryInfo {
70     LoaderQueryRegistryType query_type;
71     LoaderQueryRegistryFlags query_flags;
72     WCHAR value_name[MAX_PATH];
73     ULONG value_type;
74     ULONG physical_adapter_index;
75     ULONG output_value_size;
76     LoaderQueryRegistryStatus status;
77     union {
78         DWORD output_dword;
79         UINT64 output_qword;
80         WCHAR output_string[1];
81         BYTE output_binary[1];
82     };
83 } LoaderQueryRegistryInfo;
84