Skip to content

Commit

Permalink
- re-instate dependency checks in -v2 and add -f to force build for b…
Browse files Browse the repository at this point in the history
…oth -v1 and -v2
  • Loading branch information
polymonster committed Mar 17, 2023
1 parent de086ea commit 5fc5f6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pmfx.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class BuildInfo:
num_threads = 4 # number of threadsto distribute work over
v_flip = False # glsl only (flip-y coord in vertex shader for consistency with other platforms)
args = "" # anything passed after -args is concatonated into a string and forwarded to other executables (fxc, glsl validator etc)
force = False # force compilation even if dependecies are up-to-date


# info and contents of a .pmfx file
Expand Down Expand Up @@ -152,6 +153,8 @@ def parse_args():
_info.struct_dir = sys.argv[i + 1]
elif sys.argv[i] == "-t":
_info.temp_dir = sys.argv[i + 1]
elif sys.argv[i] == "-f":
_info.force = True
elif sys.argv[i] == "-source":
_info.compiled = False
elif sys.argv[i] == "-cbuffer_offset":
Expand Down Expand Up @@ -232,6 +235,7 @@ def display_help():
print(" -t <output dir for temp files>")
print(" -h (optional) <output dir header file with shader structs>")
print(" -d (optional) generate debuggable shader")
print(" -f (optional) force build / compile even if dependencies are up-to-date")
print(" -root_dir (optional) <directory> sets working directory here")
print(" -source (optional) (generates platform source into -o no compilation)")
print(" -stage_in <0, 1> (optional) [metal only] (default 1) ")
Expand Down
3 changes: 1 addition & 2 deletions pmfx_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,7 @@ def generate_pmfx(file, root):
pmfx["compiled_shaders"] = existing["compiled_shaders"]

# return if file not out of date
check_deps = False
if check_deps:
if not build_info.force:
if not out_of_date:
print("{}: up-to-date".format(file))
return
Expand Down

0 comments on commit 5fc5f6b

Please sign in to comment.