mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
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>
This commit is contained in:
parent
eae5aa943a
commit
234505f013
1 changed files with 10 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue