Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ System requirements
* A graphics card with Direct3D 12 support.
* For instance, any GCN-based AMD Radeon™ GPU.
* Windows® 10 (64-bit recommended).
* Visual Studio® 2015 with Visual C++® and the Windows 10 SDK installed. The [free community edition](https://www.visualstudio.com/downloads/download-visual-studio-vs) is sufficient.
* Note: neither Visual C++ nor the Windows 10 SDK are installed with Visual Studio 2015 by default.
* For a fresh installation of Visual Studio 2015, choose 'Custom', not 'Typical', and select the required components.
* Visual Studio® 2019 with Visual C++® and the Windows 10 SDK installed. The [free community edition](https://www.visualstudio.com/downloads/download-visual-studio-vs) is sufficient.
* Note: neither Visual C++ nor the Windows 10 SDK are installed with Visual Studio 2019 by default.
* For a fresh installation of Visual Studio 2019, choose 'Custom', not 'Typical', and select the required components.
* For existing installations, you can re-run the installer or select Visual Studio from Programs and Features and click 'Change'.
* When selecting components to be installed, the option to install the Windows 10 SDK is tucked away under Windows and Web Development -> Universal Windows App Development Tools.

Expand All @@ -25,7 +25,7 @@ Building

Visual Studio files can be found in the `hellod3d12\build` directory.

If you need to regenerate the Visual Studio files, open a command prompt in the `hellod3d12\premake` directory and run `..\..\premake\premake5.exe vs2015` (or `..\..\premake\premake5.exe vs2013` for Visual Studio 2013.)
If you need to regenerate the Visual Studio files, open a command prompt in the `hellod3d12\premake` directory and run `..\..\premake\premake5.exe vs2019` (or `..\..\premake\premake5.exe vs2017` for Visual Studio 2017.)

Sample overview
---------------
Expand Down
20 changes: 20 additions & 0 deletions hellod3d12/build/HelloD3D12_2019.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloD3D12", "HelloD3D12_2019.vcxproj", "{3F3B938C-ABC6-0051-B4D7-834520E25C51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F3B938C-ABC6-0051-B4D7-834520E25C51}.Debug|x64.ActiveCfg = Debug|x64
{3F3B938C-ABC6-0051-B4D7-834520E25C51}.Debug|x64.Build.0 = Debug|x64
{3F3B938C-ABC6-0051-B4D7-834520E25C51}.Release|x64.ActiveCfg = Release|x64
{3F3B938C-ABC6-0051-B4D7-834520E25C51}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
126 changes: 126 additions & 0 deletions hellod3d12/build/HelloD3D12_2019.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3F3B938C-ABC6-0051-B4D7-834520E25C51}</ProjectGuid>
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
<Keyword>Win32Proj</Keyword>
<RootNamespace>HelloD3D12</RootNamespace>
<ProjectName>HelloD3D12</ProjectName>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<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>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\bin\</OutDir>
<IntDir>Desktop_2019\x64\Debug\</IntDir>
<TargetName>HelloD3D12_Debug_2019</TargetName>
<TargetExt>.exe</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin\</OutDir>
<IntDir>Desktop_2019\x64\Release\</IntDir>
<TargetName>HelloD3D12_Release_2019</TargetName>
<TargetExt>.exe</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>d3dcompiler.lib;dxguid.lib;d3d12.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;PROFILE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3dcompiler.lib;dxguid.lib;d3d12.lib;dxgi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\src\D3D12AnimatedQuad.h" />
<ClInclude Include="..\src\D3D12Quad.h" />
<ClInclude Include="..\src\D3D12Sample.h" />
<ClInclude Include="..\src\D3D12TexturedQuad.h" />
<ClInclude Include="..\src\ImageIO.h" />
<ClInclude Include="..\src\RubyTexture.h" />
<ClInclude Include="..\src\Shaders.h" />
<ClInclude Include="..\src\Utility.h" />
<ClInclude Include="..\src\Window.h" />
<ClInclude Include="..\src\d3dx12.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\D3D12AnimatedQuad.cpp" />
<ClCompile Include="..\src\D3D12Quad.cpp" />
<ClCompile Include="..\src\D3D12Sample.cpp" />
<ClCompile Include="..\src\D3D12TexturedQuad.cpp" />
<ClCompile Include="..\src\ImageIO.cpp" />
<ClCompile Include="..\src\Main.cpp" />
<ClCompile Include="..\src\Utility.cpp" />
<ClCompile Include="..\src\Window.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
12 changes: 9 additions & 3 deletions hellod3d12/premake/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ project (_AMD_SAMPLE_NAME)
floatingpoint "Fast"

-- Specify WindowsTargetPlatformVersion here for VS2015
windowstarget (_AMD_WIN_SDK_VERSION)
systemversion (_AMD_WIN_SDK_VERSION)

files { "../src/**.h", "../src/**.cpp" }
links { "d3dcompiler", "dxguid", "d3d12", "dxgi" }
Expand All @@ -34,11 +34,17 @@ project (_AMD_SAMPLE_NAME)

filter "configurations:Debug"
defines { "WIN32", "_DEBUG", "DEBUG", "_WINDOWS" }
flags { "Symbols", "FatalWarnings", "Unicode", "WinMain" }
symbols "On"
characterset ("Unicode")
entrypoint "WinMainCRTStartup"
flags { "FatalWarnings"}
targetsuffix ("_Debug" .. _AMD_VS_SUFFIX)

filter "configurations:Release"
defines { "WIN32", "NDEBUG", "PROFILE", "_WINDOWS" }
flags { "LinkTimeOptimization", "Symbols", "FatalWarnings", "Unicode", "WinMain" }
symbols "On"
characterset ("Unicode")
entrypoint "WinMainCRTStartup"
flags { "LinkTimeOptimization", "FatalWarnings" }
targetsuffix ("_Release" .. _AMD_VS_SUFFIX)
optimize "On"
4 changes: 2 additions & 2 deletions premake/amd_premake_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ _AMD_VS_SUFFIX = "_" .. string.gsub(_ACTION, "vs", "")
-- Specify build output directory structure here: e.g. Desktop_2012\x64\DLL_Debug
_AMD_SAMPLE_DIR_LAYOUT = "Desktop%{_AMD_VS_SUFFIX}/%{cfg.platform}/%{cfg.buildcfg}"

-- Specify WindowsTargetPlatformVersion here for VS2015
_AMD_WIN_SDK_VERSION = "10.0.10240.0"
-- Specify WindowsTargetPlatformVersion here for VS2019
_AMD_WIN_SDK_VERSION = "10.0"

Binary file modified premake/premake5.exe
Binary file not shown.