From 4d24f55226870055c8dcbb3409efc5355da134d7 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 20 Apr 2023 20:06:37 +0800 Subject: Changes for vkd3d proton (#2813) * Add some caches to .gitignore * Remove appendWideChars Use String::toWString instead * s/Sleep/sleepCurrentThread * formatting * Expand set of shared libraries which have buggy dlclose Work around https://github.com/microsoft/DirectXShaderCompiler/issues/5119 and https://github.com/doitsujin/dxvk/issues/3330 libdxcompiler.so invokes UB on dlclose, the dxvk libs break GDB when closed * Add assert for specialization failure on DX11 As a band aid for https://github.com/shader-slang/slang/issues/2805 * More fine grained selection of directx features --- tools/gfx/d3d11/d3d11-device.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/gfx/d3d11/d3d11-device.cpp') diff --git a/tools/gfx/d3d11/d3d11-device.cpp b/tools/gfx/d3d11/d3d11-device.cpp index e6a348dc1..4ab26725e 100644 --- a/tools/gfx/d3d11/d3d11-device.cpp +++ b/tools/gfx/d3d11/d3d11-device.cpp @@ -47,10 +47,10 @@ SlangResult DeviceImpl::initialize(const Desc& desc) // Rather than statically link against D3D, we load it dynamically. SharedLibrary::Handle d3dModule; -#if SLANG_WINDOWS_FAMILY - const char* libName = "d3d11"; -#else +#if SLANG_ENABLE_DXVK const char* libName = "dxvk_d3d11"; +#else + const char* libName = "d3d11"; #endif if (SLANG_FAILED(SharedLibrary::load(libName, d3dModule))) { @@ -1428,6 +1428,8 @@ void DeviceImpl::bindRootShaderObject(IShaderObject* shaderObject) { RootShaderObjectImpl* rootShaderObjectImpl = static_cast(shaderObject); RefPtr specializedPipeline; + // TODO: Do something less crappy than just asserting on failure here + SLANG_ASSERT_VOID_ON_FAIL(maybeSpecializePipeline(m_currentPipelineState, rootShaderObjectImpl, specializedPipeline)); maybeSpecializePipeline(m_currentPipelineState, rootShaderObjectImpl, specializedPipeline); PipelineStateImpl* specializedPipelineImpl = static_cast(specializedPipeline.Ptr()); setPipelineState(specializedPipelineImpl); -- cgit v1.2.3