summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-03 22:21:40 +0800
committerGitHub <[email protected]>2024-09-03 22:21:40 +0800
commit5cdc832913442cedc7625b25eba933b422d4289e (patch)
tree3f75993c2e45f85198458440271db3d2a1ee4b9b
parentf20c40bf589088ee7738740f73af3504fbfb3317 (diff)
parent8014c862178e6362af9ddfbab41dcb337c0bd969 (diff)
Merge pull request #5563 from milkiq/dev
add client parameter to rule `utils.glsl2spv`
-rw-r--r--xmake/rules/utils/glsl2spv/xmake.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/utils/glsl2spv/xmake.lua b/xmake/rules/utils/glsl2spv/xmake.lua
index d9846c6bc..5325b3d25 100644
--- a/xmake/rules/utils/glsl2spv/xmake.lua
+++ b/xmake/rules/utils/glsl2spv/xmake.lua
@@ -58,12 +58,13 @@ rule("utils.glsl2spv")
-- glsl to spv
local targetenv = target:extraconf("rules", "utils.glsl2spv", "targetenv") or "vulkan1.0"
+ local client = target:extraconf("rules", "utils.glsl2spv", "client") or "vulkan100"
local outputdir = target:extraconf("rules", "utils.glsl2spv", "outputdir") or path.join(target:autogendir(), "rules", "utils", "glsl2spv")
local spvfilepath = path.join(outputdir, path.filename(sourcefile_glsl) .. ".spv")
batchcmds:show_progress(opt.progress, "${color.build.object}generating.glsl2spv %s", sourcefile_glsl)
batchcmds:mkdir(outputdir)
if glslangValidator then
- batchcmds:vrunv(glslangValidator.program, {"--target-env", targetenv, "-o", path(spvfilepath), path(sourcefile_glsl)})
+ batchcmds:vrunv(glslangValidator.program, {"--target-env", targetenv, "--client", client, "-o", path(spvfilepath), path(sourcefile_glsl)})
else
batchcmds:vrunv(glslc.program, {"--target-env", targetenv, "-o", path(spvfilepath), path(sourcefile_glsl)})
end