From 4c9c8a7a4d9b97fec6041a562638fbea521533ed Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 14 Apr 2023 17:08:18 +0800 Subject: Some small fixes with Windows/DX usage (#2797) * Correct case of windows.h includes * Use Slang::SharedLibrary to load directx dlls * s/max/std::max/ * Factor common OS code in calcHasApi * Add DXIL test for compute/simple * s/false/FALSE for calls to WinAPI functions * Factor common OS code in gfxGetAdapters * 2 missing headers d3d12sdklayers for ID3DDebug climits for UINT_MAX * Define out unused function on Linux * Only try to load Vulkan and CUDA on Windows or Linux * simplify D3DUtil::getDxgiModule * Remove WIN32_LEAN_AND_MEAN &co from source files Add a global define * Set WIN32_LEAN_AND_MEAN &friends in headers Restore previous state also * regenerate vs projects --- build/visual-studio/gfx/gfx.vcxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'build/visual-studio/gfx') diff --git a/build/visual-studio/gfx/gfx.vcxproj b/build/visual-studio/gfx/gfx.vcxproj index 19ee1b314..583d78e25 100644 --- a/build/visual-studio/gfx/gfx.vcxproj +++ b/build/visual-studio/gfx/gfx.vcxproj @@ -164,7 +164,7 @@ NotUsing Level3 - _DEBUG;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + _DEBUG;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;NOMINMAX;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) ..\..\..;..\..\..\external;..\..\..\source;%(AdditionalIncludeDirectories) ProgramDatabase Disabled @@ -188,7 +188,7 @@ IF EXIST "$(SolutionDir)tools\gfx\slang.slang"\ (xcopy /Q /E /Y /I "$(SolutionDi NotUsing Level3 - _DEBUG;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + _DEBUG;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;NOMINMAX;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) ..\..\..;..\..\..\external;..\..\..\source;%(AdditionalIncludeDirectories) ProgramDatabase Disabled @@ -212,7 +212,7 @@ IF EXIST "$(SolutionDir)tools\gfx\slang.slang"\ (xcopy /Q /E /Y /I "$(SolutionDi NotUsing Level3 - _DEBUG;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + _DEBUG;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;NOMINMAX;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) ..\..\..;..\..\..\external;..\..\..\source;%(AdditionalIncludeDirectories) ProgramDatabase Disabled @@ -236,7 +236,7 @@ IF EXIST "$(SolutionDir)tools\gfx\slang.slang"\ (xcopy /Q /E /Y /I "$(SolutionDi NotUsing Level3 - NDEBUG;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + NDEBUG;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;NOMINMAX;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) ..\..\..;..\..\..\external;..\..\..\source;%(AdditionalIncludeDirectories) Full true @@ -263,7 +263,7 @@ IF EXIST "$(SolutionDir)tools\gfx\slang.slang"\ (xcopy /Q /E /Y /I "$(SolutionDi NotUsing Level3 - NDEBUG;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + NDEBUG;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;NOMINMAX;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) ..\..\..;..\..\..\external;..\..\..\source;%(AdditionalIncludeDirectories) Full true @@ -290,7 +290,7 @@ IF EXIST "$(SolutionDir)tools\gfx\slang.slang"\ (xcopy /Q /E /Y /I "$(SolutionDi NotUsing Level3 - NDEBUG;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + NDEBUG;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;NOMINMAX;SLANG_GFX_DYNAMIC;SLANG_GFX_DYNAMIC_EXPORT;%(PreprocessorDefinitions) ..\..\..;..\..\..\external;..\..\..\source;%(AdditionalIncludeDirectories) Full true -- cgit v1.2.3