diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2023-01-01 21:08:32 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-03-03 11:30:54 +0000 |
commit | 234505f013574399062585fa3056eafe231216d9 (patch) | |
tree | aaa6cf3fbe6ce2ded3f49e62057c7bbb24bc8d31 /src/util | |
parent | eae5aa943a55a96e700e063617d7057d253e3c10 (diff) | |
download | mesa-234505f013574399062585fa3056eafe231216d9.tar.gz mesa-234505f013574399062585fa3056eafe231216d9.tar.bz2 mesa-234505f013574399062585fa3056eafe231216d9.zip |
util/glsl2spirv: add support for include directive
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/glsl2spirv.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/glsl2spirv.py b/src/util/glsl2spirv.py index 78d8dc94a1e..4df5abd4e27 100644 --- a/src/util/glsl2spirv.py +++ b/src/util/glsl2spirv.py @@ -72,6 +72,13 @@ def get_args() -> 'Arguments': default="vert", choices=['vert', 'tesc', 'tese', 'geom', 'frag', 'comp'], help="Uses specified stage rather than parsing the file extension") + + parser.add_argument("-I", + dest="includes", + default=[], + action='append', + help="Include directory") + args = parser.parse_args() return args @@ -157,6 +164,9 @@ def process_file(args: 'Arguments') -> None: if args.create_entry is not None: cmd_list.extend(["--entry-point", args.create_entry]) + for f in args.includes: + cmd_list.append('-I' + f) + cmd_list.extend([ '-V', '-o', args.output, |