提交 62023506 编写于 作者: GamebabyRockSun_QQ's avatar GamebabyRockSun_QQ

Merge branch 'multithread'

添加8-UIRenderBase项目
......@@ -148,7 +148,10 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\WindowsCommons\DDSTextureLoader12.cpp" />
<None Include="MultiThread.cpp" />
<None Include="MultiThread.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<ClCompile Include="MultiThreadWithMsgWait.cpp" />
</ItemGroup>
<ItemGroup>
......
......@@ -229,7 +229,6 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR l
ComPtr<ID3D12CommandAllocator> pICmdAllocPost;
ComPtr<ID3D12GraphicsCommandList> pICmdListPost;
CAtlArray<HANDLE> arHWaited;
CAtlArray<HANDLE> arHSubThread;
......@@ -633,7 +632,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR l
}
}
UINT nStates = 0; //识状态为0
UINT nStates = 0; //始状态为0
DWORD dwRet = 0;
DWORD dwWaitCnt = 0;
CAtlArray<ID3D12CommandList*> arCmdList;
......
此差异已折叠。
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<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">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{FA277433-C829-41E4-93DB-7AAAA0A53643}</ProjectGuid>
<RootNamespace>My8UIRenderBase</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<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|Win32'">
<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)'=='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'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="8-UIRenderBase.cpp" />
</ItemGroup>
<ItemGroup>
<FxCompile Include="Shader\Lines.hlsl">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Shader\Quad.hlsl">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Shader">
<UniqueIdentifier>{1b99c5eb-ad19-442e-a8cf-56d11819a84c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="8-UIRenderBase.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Shader\Lines.hlsl">
<Filter>Shader</Filter>
</FxCompile>
<FxCompile Include="Shader\Quad.hlsl">
<Filter>Shader</Filter>
</FxCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
struct PSInput
{
float4 position : SV_POSITION;
float4 color :COLOR;
float2 uv : TEXCOORD;
};
cbuffer MVOBuffer : register(b0)
{
float4x4 m_MVO;
};
PSInput VSMain(float4 position : POSITION, float4 color : COLOR,float2 uv : TEXCOORD)
{
PSInput result;
result.position = mul(position, m_MVO);
result.color = color;
return result;
}
float4 PSMain(PSInput input) : SV_TARGET
{
return input.color;
}
struct PSInput
{
float4 position : SV_POSITION;
float4 color :COLOR;
float2 uv : TEXCOORD;
};
cbuffer MVOBuffer : register(b0)
{
float4x4 m_MVO;
};
Texture2D g_texture : register(t0);
SamplerState g_sampler : register(s0);
PSInput VSMain(float4 position : POSITION, float4 color : COLOR, float2 uv : TEXCOORD)
{
PSInput result;
result.position = mul(position,m_MVO);
result.uv = uv;
return result;
}
float4 PSMain(PSInput input) : SV_TARGET
{
////实现浮雕效果
//float2 f2TexSize = float2(512.0,512.0); //Texture 大小 最好从参数传入
//float2 upLeftUV = float2(input.uv.x - 1.0 / f2TexSize.x, input.uv.y - 1.0 / f2TexSize.y);
//float4 bkColor = float4(0.5, 0.5, 0.5, 1.0);
//float4 curColor = g_texture.Sample(g_sampler, input.uv);
//float4 upLeftColor = g_texture.Sample(g_sampler, upLeftUV);
//float4 delColor = curColor - upLeftColor;
//float h = 0.3 * delColor.x + 0.59 * delColor.y + 0.11 * delColor.z;
//float4 _outColor = float4(h, h, h, 0.0) + bkColor;
//return _outColor;
return g_texture.Sample(g_sampler, input.uv);
}
......@@ -17,6 +17,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7-D3D12MultiAdapter", "7-D3
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "4-D3D12TextureCube", "4-D3D12TextureCube\3-D3D12TextureCube.vcxproj", "{E28BD638-0BAD-48AE-8258-EA98FDEB01BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "8-UIRenderBase", "8-UIRenderBase\8-UIRenderBase.vcxproj", "{FA277433-C829-41E4-93DB-7AAAA0A53643}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
......@@ -111,6 +113,18 @@ Global
{E28BD638-0BAD-48AE-8258-EA98FDEB01BF}.Release|x64.Build.0 = Release|x64
{E28BD638-0BAD-48AE-8258-EA98FDEB01BF}.Release|x86.ActiveCfg = Release|Win32
{E28BD638-0BAD-48AE-8258-EA98FDEB01BF}.Release|x86.Build.0 = Release|Win32
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Debug|x64.ActiveCfg = Debug|x64
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Debug|x64.Build.0 = Debug|x64
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Debug|x86.ActiveCfg = Debug|Win32
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Debug|x86.Build.0 = Debug|Win32
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Profile|x64.ActiveCfg = Release|x64
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Profile|x64.Build.0 = Release|x64
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Profile|x86.ActiveCfg = Release|Win32
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Profile|x86.Build.0 = Release|Win32
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Release|x64.ActiveCfg = Release|x64
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Release|x64.Build.0 = Release|x64
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Release|x86.ActiveCfg = Release|Win32
{FA277433-C829-41E4-93DB-7AAAA0A53643}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册