Commit 2dc03039 by Nicolas Capens Committed by Nicolas Capens

Fix VulkanUnitTests on Visual Studio

Also copy the DLLs to build/ This makes it consistent with the CMake build. Bug b/116336664 Bug b/29024574 Change-Id: I747a52383492c3ec5493f1a232cbbf5c98aec219 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27608 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 0e712410
...@@ -74,7 +74,10 @@ ...@@ -74,7 +74,10 @@
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>mkdir "$(SolutionDir)out\$(Configuration)_$(Platform)\" <Command>mkdir "$(SolutionDir)out\$(Configuration)_$(Platform)\"
copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"</Command> mkdir "$(SolutionDir)build\$(Configuration)_$(Platform)\"
copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"
copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)build\$(Configuration)_$(Platform)\"
IF EXIST "$(SolutionDir)..\deqp" (copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)..\deqp\build\external\vulkancts\modules\vulkan\vulkan-1.dll")</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
...@@ -94,7 +97,10 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor ...@@ -94,7 +97,10 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>mkdir "$(SolutionDir)out\$(Configuration)_$(Platform)\" <Command>mkdir "$(SolutionDir)out\$(Configuration)_$(Platform)\"
copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"</Command> mkdir "$(SolutionDir)build\$(Configuration)_$(Platform)\"
copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"
copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)build\$(Configuration)_$(Platform)\"
IF EXIST "$(SolutionDir)..\deqp" (copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)..\deqp\build\external\vulkancts\modules\vulkan\vulkan-1.dll")</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
......
...@@ -252,6 +252,9 @@ ...@@ -252,6 +252,9 @@
<ClCompile Include="..\Pipeline\SpirvShader_dbg.cpp"> <ClCompile Include="..\Pipeline\SpirvShader_dbg.cpp">
<Filter>Source Files\Pipeline</Filter> <Filter>Source Files\Pipeline</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\WSI\VkSwapchainKHR.cpp">
<Filter>Source Files\WSI</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="resource.h"> <ClInclude Include="resource.h">
...@@ -516,6 +519,9 @@ ...@@ -516,6 +519,9 @@
<ClInclude Include="..\Pipeline\SpirvShader.hpp"> <ClInclude Include="..\Pipeline\SpirvShader.hpp">
<Filter>Header Files\Pipeline</Filter> <Filter>Header Files\Pipeline</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\WSI\VkSwapchainKHR.hpp">
<Filter>Header Files\WSI</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="swiftshader_icd.def" /> <None Include="swiftshader_icd.def" />
......
...@@ -385,8 +385,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, Memcpy) ...@@ -385,8 +385,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, Memcpy)
"%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in "%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in
"%12 = OpConstant %9 0\n" // int32(0) "%12 = OpConstant %9 0\n" // int32(0)
"%13 = OpConstant %10 0\n" // uint32(0) "%13 = OpConstant %10 0\n" // uint32(0)
"%14 = OpTypeVector %10 3\n" // vec4<int32> "%14 = OpTypeVector %10 3\n" // vec3<int32>
"%15 = OpTypePointer Input %14\n" // vec4<int32>* "%15 = OpTypePointer Input %14\n" // vec3<int32>*
"%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId "%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId
"%16 = OpTypePointer Input %10\n" // uint32* "%16 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out "%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
...@@ -437,8 +437,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, GlobalInvocationId) ...@@ -437,8 +437,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, GlobalInvocationId)
"%14 = OpConstant %10 0\n" // uint32(0) "%14 = OpConstant %10 0\n" // uint32(0)
"%15 = OpConstant %10 1\n" // uint32(1) "%15 = OpConstant %10 1\n" // uint32(1)
"%16 = OpConstant %10 2\n" // uint32(2) "%16 = OpConstant %10 2\n" // uint32(2)
"%17 = OpTypeVector %10 3\n" // vec4<int32> "%17 = OpTypeVector %10 3\n" // vec3<int32>
"%18 = OpTypePointer Input %17\n" // vec4<int32>* "%18 = OpTypePointer Input %17\n" // vec3<int32>*
"%2 = OpVariable %18 Input\n" // gl_GlobalInvocationId "%2 = OpVariable %18 Input\n" // gl_GlobalInvocationId
"%19 = OpTypePointer Input %10\n" // uint32* "%19 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out "%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
...@@ -493,8 +493,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, BranchSimple) ...@@ -493,8 +493,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, BranchSimple)
"%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in "%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in
"%12 = OpConstant %9 0\n" // int32(0) "%12 = OpConstant %9 0\n" // int32(0)
"%13 = OpConstant %10 0\n" // uint32(0) "%13 = OpConstant %10 0\n" // uint32(0)
"%14 = OpTypeVector %10 3\n" // vec4<int32> "%14 = OpTypeVector %10 3\n" // vec3<int32>
"%15 = OpTypePointer Input %14\n" // vec4<int32>* "%15 = OpTypePointer Input %14\n" // vec3<int32>*
"%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId "%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId
"%16 = OpTypePointer Input %10\n" // uint32* "%16 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out "%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
...@@ -552,8 +552,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, BranchDeclareSSA) ...@@ -552,8 +552,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, BranchDeclareSSA)
"%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in "%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in
"%12 = OpConstant %9 0\n" // int32(0) "%12 = OpConstant %9 0\n" // int32(0)
"%13 = OpConstant %10 0\n" // uint32(0) "%13 = OpConstant %10 0\n" // uint32(0)
"%14 = OpTypeVector %10 3\n" // vec4<int32> "%14 = OpTypeVector %10 3\n" // vec3<int32>
"%15 = OpTypePointer Input %14\n" // vec4<int32>* "%15 = OpTypePointer Input %14\n" // vec3<int32>*
"%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId "%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId
"%16 = OpTypePointer Input %10\n" // uint32* "%16 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out "%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
......
...@@ -187,8 +187,8 @@ ...@@ -187,8 +187,8 @@
</CustomBuild> </CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\utils/TableGen/llvm-tblgen.vcxproj"> <ProjectReference Include="..\..\utils\TableGen\llvm-tblgen.vcxproj">
<Project>1F8587CB-0779-44BB-AFA4-03DD8A036D75</Project> <Project>{1f8587cb-0779-44bb-afa4-03dd8a036d75}</Project>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment