mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 15:50:37 +02:00
util/glsl2spirv: add ability to pass defines
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Tested-by: Felix DeGrood <felix.j.degrood@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
This commit is contained in:
parent
c700d47c56
commit
da1e39faa4
1 changed files with 9 additions and 0 deletions
|
|
@ -79,6 +79,12 @@ def get_args() -> 'Arguments':
|
|||
action='append',
|
||||
help="Include directory")
|
||||
|
||||
parser.add_argument("-D",
|
||||
dest="defines",
|
||||
default=[],
|
||||
action='append',
|
||||
help="Defines")
|
||||
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
|
|
@ -167,6 +173,9 @@ def process_file(args: 'Arguments') -> None:
|
|||
for f in args.includes:
|
||||
cmd_list.append('-I' + f)
|
||||
|
||||
for d in args.defines:
|
||||
cmd_list.append('-D' + d)
|
||||
|
||||
cmd_list.extend([
|
||||
'-V',
|
||||
'-o', args.output,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue