Skip to content

Commit

Permalink
make default build SSE2 only, and expand installer to include AVX builds
Browse files Browse the repository at this point in the history
It's a mistake to assume that AVX is widely available,  while many processors sold recently do include it the majority of players are using early Core processors and even Phenoms.
  • Loading branch information
Squall-Leonhart committed Feb 2, 2020
1 parent dc41785 commit b7f2f0d
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
9 changes: 9 additions & 0 deletions d912pxy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release_avx|x64 = Release_avx|x64
Release_avx2|x64 = Release_avx2|x64
Release_d|x64 = Release_d|x64
Release_pp|x64 = Release_pp|x64
Expand All @@ -25,6 +26,8 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Debug|x64.ActiveCfg = Debug|x64
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Debug|x64.Build.0 = Debug|x64
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Release_avx|x64.ActiveCfg = Release_avx|x64
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Release_avx|x64.Build.0 = Release_avx|x64
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Release_avx2|x64.ActiveCfg = Release_avx2|x64
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Release_avx2|x64.Build.0 = Release_avx2|x64
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Release_d|x64.ActiveCfg = Release_d|x64
Expand All @@ -35,6 +38,8 @@ Global
{C5692CFC-8085-429F-AB8F-53E282189AB6}.Release|x64.Build.0 = Release|x64
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Debug|x64.ActiveCfg = Debug|x64
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Debug|x64.Build.0 = Debug|x64
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Release_avx|x64.ActiveCfg = Release|x64
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Release_avx|x64.Build.0 = Release|x64
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Release_avx2|x64.ActiveCfg = Release|x64
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Release_avx2|x64.Build.0 = Release|x64
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Release_d|x64.ActiveCfg = Release|x64
Expand All @@ -45,6 +50,8 @@ Global
{25B1AEC5-FF79-475B-AFA2-1936B7797005}.Release|x64.Build.0 = Release|x64
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Debug|x64.ActiveCfg = Debug|x64
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Debug|x64.Build.0 = Debug|x64
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Release_avx|x64.ActiveCfg = Release|x64
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Release_avx|x64.Build.0 = Release|x64
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Release_avx2|x64.ActiveCfg = Release|x64
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Release_avx2|x64.Build.0 = Release|x64
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Release_d|x64.ActiveCfg = Release|x64
Expand All @@ -55,6 +62,8 @@ Global
{F1D2D374-6C3B-401F-9043-3297F7C3510A}.Release|x64.Build.0 = Release|x64
{BDCB35C3-8ED9-4A6E-A346-D16F17D4600C}.Debug|x64.ActiveCfg = Debug|x64
{BDCB35C3-8ED9-4A6E-A346-D16F17D4600C}.Debug|x64.Build.0 = Debug|x64
{BDCB35C3-8ED9-4A6E-A346-D16F17D4600C}.Release_avx|x64.ActiveCfg = Release|x64
{BDCB35C3-8ED9-4A6E-A346-D16F17D4600C}.Release_avx|x64.Build.0 = Release|x64
{BDCB35C3-8ED9-4A6E-A346-D16F17D4600C}.Release_avx2|x64.ActiveCfg = Release|x64
{BDCB35C3-8ED9-4A6E-A346-D16F17D4600C}.Release_avx2|x64.Build.0 = Release|x64
{BDCB35C3-8ED9-4A6E-A346-D16F17D4600C}.Release_d|x64.ActiveCfg = Release|x64
Expand Down
57 changes: 57 additions & 0 deletions d912pxy/d912pxy.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<Configuration>Release_avx2</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_avx|x64">
<Configuration>Release_avx</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_d|x64">
<Configuration>Release_d</Configuration>
<Platform>x64</Platform>
Expand Down Expand Up @@ -52,6 +56,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_avx|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_avx2|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
Expand Down Expand Up @@ -98,6 +109,9 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_avx|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_avx2|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
Expand Down Expand Up @@ -126,6 +140,12 @@
<TargetName>d3d9</TargetName>
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_avx|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\bin\d912pxy\dll\release\</OutDir>
<TargetName>d3d9</TargetName>
<PostBuildEventUseInBuild>false</PostBuildEventUseInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_avx2|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\bin\d912pxy\dll\release_avx2\</OutDir>
Expand Down Expand Up @@ -190,6 +210,42 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;FRAMEANALYZER_EXPORTS;_WINDOWS;_USRDLL;DISABLE_P7LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<WholeProgramOptimization>true</WholeProgramOptimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<ControlFlowGuard>false</ControlFlowGuard>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>deffile</ModuleDefinitionFile>
<AdditionalDependencies>d3d12.lib;dxgi.lib;d3dcompiler.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\thirdparty\p7logger\Binaries\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalOptions>/PDBALTPATH:"d912pxy\dll\release\d3d9.pdb" %(AdditionalOptions)</AdditionalOptions>
</Link>
<PostBuildEvent>
<Command>copy $(SolutionDir)\bin\d912pxy\dll\release\d3d9.dll $(SolutionDir)\bin\bin64\d3d9.dll</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>copy release dll</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_avx|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
Expand Down Expand Up @@ -582,6 +638,7 @@
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_avx|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_avx2|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_ps|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_d|x64'">Create</PrecompiledHeader>
Expand Down
6 changes: 5 additions & 1 deletion installer/installer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ int action_install()
std::cout << "1. Release_pp - performance data collection \n";
std::cout << "2. Release_d - in-depth debug logging \n";
std::cout << "3. Debug - debug build\n";
std::cout << "4. Release_avx2- avx2 enabled build\n";
std::cout << "4. Release_avx- avx enabled build\n";
std::cout << "5. Release_avx2- avx2 enabled build\n";

std::cout << "\n[default: Release_pp]: ";

Expand All @@ -144,6 +145,9 @@ int action_install()
installSource = "debug\\";
break;
case 4:
installSource = "release_avx\\";
break;
case 5:
installSource = "release_avx2\\";
break;
default:
Expand Down

0 comments on commit b7f2f0d

Please sign in to comment.