• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © Microsoft Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21  * IN THE SOFTWARE.
22  */
23 
24 #ifndef DXIL_VALIDATOR_H
25 #define DXIL_VALIDATOR_H
26 
27 #include <stddef.h>
28 
29 struct dxil_validator;
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 enum dxil_validator_version {
36    NO_DXIL_VALIDATION,
37    DXIL_VALIDATOR_1_0 = 0x10000,
38    DXIL_VALIDATOR_1_1,
39    DXIL_VALIDATOR_1_2,
40    DXIL_VALIDATOR_1_3,
41    DXIL_VALIDATOR_1_4,
42    DXIL_VALIDATOR_1_5,
43    DXIL_VALIDATOR_1_6,
44    DXIL_VALIDATOR_1_7,
45 };
46 
47 struct dxil_validator *
48 dxil_create_validator(const void *ctx);
49 
50 void
51 dxil_destroy_validator(struct dxil_validator *val);
52 
53 bool
54 dxil_validate_module(struct dxil_validator *val, void *data,
55                      size_t size, char **error);
56 
57 char *
58 dxil_disasm_module(struct dxil_validator *val, void *data, size_t size);
59 
60 enum dxil_validator_version
61 dxil_get_validator_version(struct dxil_validator *val);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif
68