Skip to content

Commit 009b967

Browse files
authored
D3D12: Add DXC availability detection and automatic FXC fallback (#2955)
* D3D12: add DXC availability detection and automatic FXC fallback - Added DetectDXCAvailability() to validate DXC compiler and driver DXIL support - DXC is now tested via minimal shader compilation + dummy PSO creation - If DXC or DXIL validation fails, _dxcAvailable is disabled - FXC fallback path is used automatically when DXC is unavailable - Prevents PSO creation failures on OEM NVIDIA drivers (e.g. RTX 3050 series) - Improves shader compilation robustness across Windows versions and GPU vendors * Fix lint * Improve code style * Use compute shader to detect dxc availability
1 parent 5a6f9c4 commit 009b967

4 files changed

Lines changed: 187 additions & 98 deletions

File tree

axmol/rhi/DXUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ DXGI_FORMAT getUAVCompatibleFormat(DXGI_FORMAT format)
178178

179179
void fatalError(std::string_view op, HRESULT hr)
180180
{
181-
auto msg = fmt::format("{}: 0x{:08X}", op, static_cast<unsigned>(hr));
181+
auto msg = fmt::format("{}: 0x{:08x}", op, static_cast<unsigned>(hr));
182182
#if AX_RENDER_API == AX_RENDER_API_D3D12
183183
showAlert(msg, "axmol: D3D12: Fatal Error", AlertStyle::IconError | AlertStyle::RequireSync);
184184
#else

0 commit comments

Comments
 (0)