summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-04-29 11:32:53 +0800
committerGitHub <noreply@github.com>2023-04-29 11:32:53 +0800
commit5adecbe837d27cf4e0a554ae13a0338743a8cb4b (patch)
treec1e791427a2b57165f950f5df264bbaca551ccaf /premake5.lua
parent5df7ada451a993efff2b80bb1af2d8c7579ba00b (diff)
vkd3d and dxvk integration (#2823)
* Add d3d sources for linux builds * Return NOT_IMPLEMENTED for shared handle support on Linux * Enable DirectX api on Linux * Do not report DX11 support without FXC * Initial version of SynchAPI emulation * Neaten dx library name handling * Neaten and use posix-synchapi * Add premake option for DirectX on Vulkan * s/SLANG_ENABLE_VKD3D_PROTON/SLANG_ENABLE_VKD3D * Skip failing tests on vkd3d * Regenerate vs projects * Silence unused var warning
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/premake5.lua b/premake5.lua
index 7226d18ad..06da86754 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -212,6 +212,14 @@ newoption {
allowed = { { "true", "True"}, { "false", "False" } }
}
+newoption {
+ trigger = "dx-on-vk",
+ description = "(Optional) If true will use dxvk and vkd3d-proton for DirectX support",
+ value = "bool",
+ default = "false",
+ allowed = { { "true", "True"}, { "false", "False" } }
+}
+
buildLocation = _OPTIONS["build-location"]
executeBinary = (_OPTIONS["execute-binary"] == "true")
buildGlslang = (_OPTIONS["build-glslang"] == "true")
@@ -227,6 +235,7 @@ deployLLVM = (_OPTIONS["deploy-slang-llvm"] == "true")
deployGLSLang = (_OPTIONS["deploy-slang-glslang"] == "true")
fullDebugValidation = (_OPTIONS["full-debug-validation"] == "true")
enableAsan = (_OPTIONS["enable-asan"] == "true")
+dxOnVk = (_OPTIONS["dx-on-vk"] == "true")
-- If stdlib embedding is enabled, disable stdlib source embedding by default
disableStdlibSource = enableEmbedStdLib
@@ -396,6 +405,10 @@ workspace "slang"
-- files which may be included by another project
defines { "WIN32_LEAN_AND_MEAN", "VC_EXTRALEAN", "NOMINMAX" }
+ if dxOnVk then
+ defines { "SLANG_CONFIG_DX_ON_VK" }
+ end
+
function dump(o)
if type(o) == 'table' then
local s = '{ '
@@ -1028,6 +1041,11 @@ tool "gfx"
else
-- Linux like
addSourceDir "tools/gfx/vulkan"
+ if dxOnVk then
+ addSourceDir "tools/gfx/d3d"
+ addSourceDir "tools/gfx/d3d11"
+ addSourceDir "tools/gfx/d3d12"
+ end
--addSourceDir "tools/gfx/open-gl"
end