mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 14:30:26 +01:00
util/glsl2spirv: only copy the input file if we're going to change it
Should make the build slightly faster by only copying when we actually need to, and otherwise pointing at the original source Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30132>
This commit is contained in:
parent
36160c967c
commit
55158bed7f
1 changed files with 3 additions and 0 deletions
|
|
@ -146,6 +146,9 @@ def postprocess_file(args: 'Arguments') -> None:
|
|||
|
||||
|
||||
def preprocess_file(args: 'Arguments', origin_file: T.TextIO, directory: os.PathLike, filemap: T.Dict[str, str]) -> str:
|
||||
if args.create_entry is None and args.glsl_ver is None:
|
||||
return origin_file.name
|
||||
|
||||
with open(os.path.join(directory, os.path.basename(origin_file.name)), "w") as copy_file:
|
||||
lines = origin_file.readlines()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue