From 562ece68a75286fb1bd79c95a192e2766b43c72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 7 Feb 2026 17:21:16 -0800 Subject: [PATCH] shaderc: Fixed DXIL compiler path. (#3585) --- scripts/shader.mk | 2 +- tools/shaderc/shaderc_dxil.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/shader.mk b/scripts/shader.mk index 8798f118c..cbffacca6 100644 --- a/scripts/shader.mk +++ b/scripts/shader.mk @@ -16,7 +16,7 @@ ifndef TARGET all: @echo Usage: make TARGET=# [clean, all, rebuild] @echo " TARGET=0 (dxil - d3d12)" - @echo " TARGET=1 (hlsl - d3d11 / Windows only!)" + @echo " TARGET=1 (dxbc - d3d11)" @echo " TARGET=3 (essl - android)" @echo " TARGET=4 (glsl)" @echo " TARGET=5 (metal)" diff --git a/tools/shaderc/shaderc_dxil.cpp b/tools/shaderc/shaderc_dxil.cpp index 97f9b0fa9..0c47f6eef 100644 --- a/tools/shaderc/shaderc_dxil.cpp +++ b/tools/shaderc/shaderc_dxil.cpp @@ -177,12 +177,15 @@ namespace bgfx { namespace dxil HRESULT hr = E_FAIL; + bx::FilePath dxcCompilerDll = bx::FilePath(bx::Dir::Executable).getPath(); + dxcCompilerDll.join(dxcCompilerDllName); + Dxc dxc; - dxc.dll = bx::dlopen(dxcCompilerDllName); + dxc.dll = bx::dlopen(dxcCompilerDll.getCPtr() ); if (NULL == dxc.dll) { - BX_TRACE("Error: Unable to open %s shader compiler.\n", dxcCompilerDllName); + BX_TRACE("Error: Unable to open %s shader compiler.\n", dxcCompilerDll.getCPtr() ); return Dxc{}; }