Enable shader optimization
This commit is contained in:
parent
cefa620b20
commit
622b89b0f5
|
|
@ -30,13 +30,14 @@ task("compile-shaders")
|
|||
print("Compiling shaders...")
|
||||
for _, filepath in pairs(os.files("src/Nazara/*/Resources/**.nzsl")) do
|
||||
print(" - Compiling " .. filepath)
|
||||
local argv = {"--compile=nzslb-header", "--partial", filepath }
|
||||
local argv = {"--compile=nzslb-header", "--partial", "--optimize" }
|
||||
if option.get("measure") then
|
||||
table.insert(argv, "--measure")
|
||||
end
|
||||
if option.get("benchmark-iteration") then
|
||||
table.insert(argv, "--benchmark-iteration=" .. option.get("benchmark-iteration"))
|
||||
end
|
||||
table.insert(argv, filepath)
|
||||
os.vrunv(nzsl, argv, { envs = envs })
|
||||
end
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ rule("nzsl.compile.shaders")
|
|||
|
||||
-- add commands
|
||||
batchcmds:show_progress(opt.progress, "${color.build.object}compiling shader %s", shaderfile)
|
||||
local argv = {"--compile=nzslb-header", "--partial"}
|
||||
local argv = { "--compile=nzslb-header", "--partial", "--optimize" }
|
||||
|
||||
-- handle --log-format
|
||||
local kind = target:data("plugin.project.kind") or ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue