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: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/Vulkan/vulkan.vcxproj b/src/Vulkan/vulkan.vcxproj
index 06be317..bb3fa49 100644
--- a/src/Vulkan/vulkan.vcxproj
+++ b/src/Vulkan/vulkan.vcxproj
@@ -74,7 +74,10 @@
</Link>
<PostBuildEvent>
<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>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -94,7 +97,10 @@
</Link>
<PostBuildEvent>
<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>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/src/Vulkan/vulkan.vcxproj.filters b/src/Vulkan/vulkan.vcxproj.filters
index 832872e..0e771e1 100644
--- a/src/Vulkan/vulkan.vcxproj.filters
+++ b/src/Vulkan/vulkan.vcxproj.filters
@@ -252,6 +252,9 @@
<ClCompile Include="..\Pipeline\SpirvShader_dbg.cpp">
<Filter>Source Files\Pipeline</Filter>
</ClCompile>
+ <ClCompile Include="..\WSI\VkSwapchainKHR.cpp">
+ <Filter>Source Files\WSI</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
@@ -516,6 +519,9 @@
<ClInclude Include="..\Pipeline\SpirvShader.hpp">
<Filter>Header Files\Pipeline</Filter>
</ClInclude>
+ <ClInclude Include="..\WSI\VkSwapchainKHR.hpp">
+ <Filter>Header Files\WSI</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="swiftshader_icd.def" />
diff --git a/tests/VulkanUnitTests/unittests.cpp b/tests/VulkanUnitTests/unittests.cpp
index eb19f35..fb1e0d1 100644
--- a/tests/VulkanUnitTests/unittests.cpp
+++ b/tests/VulkanUnitTests/unittests.cpp
@@ -385,8 +385,8 @@
"%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in
"%12 = OpConstant %9 0\n" // int32(0)
"%13 = OpConstant %10 0\n" // uint32(0)
- "%14 = OpTypeVector %10 3\n" // vec4<int32>
- "%15 = OpTypePointer Input %14\n" // vec4<int32>*
+ "%14 = OpTypeVector %10 3\n" // vec3<int32>
+ "%15 = OpTypePointer Input %14\n" // vec3<int32>*
"%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId
"%16 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
@@ -437,8 +437,8 @@
"%14 = OpConstant %10 0\n" // uint32(0)
"%15 = OpConstant %10 1\n" // uint32(1)
"%16 = OpConstant %10 2\n" // uint32(2)
- "%17 = OpTypeVector %10 3\n" // vec4<int32>
- "%18 = OpTypePointer Input %17\n" // vec4<int32>*
+ "%17 = OpTypeVector %10 3\n" // vec3<int32>
+ "%18 = OpTypePointer Input %17\n" // vec3<int32>*
"%2 = OpVariable %18 Input\n" // gl_GlobalInvocationId
"%19 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
@@ -493,8 +493,8 @@
"%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in
"%12 = OpConstant %9 0\n" // int32(0)
"%13 = OpConstant %10 0\n" // uint32(0)
- "%14 = OpTypeVector %10 3\n" // vec4<int32>
- "%15 = OpTypePointer Input %14\n" // vec4<int32>*
+ "%14 = OpTypeVector %10 3\n" // vec3<int32>
+ "%15 = OpTypePointer Input %14\n" // vec3<int32>*
"%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId
"%16 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
@@ -552,8 +552,8 @@
"%5 = OpVariable %11 Uniform\n" // struct{ int32[] }* in
"%12 = OpConstant %9 0\n" // int32(0)
"%13 = OpConstant %10 0\n" // uint32(0)
- "%14 = OpTypeVector %10 3\n" // vec4<int32>
- "%15 = OpTypePointer Input %14\n" // vec4<int32>*
+ "%14 = OpTypeVector %10 3\n" // vec3<int32>
+ "%15 = OpTypePointer Input %14\n" // vec3<int32>*
"%2 = OpVariable %15 Input\n" // gl_GlobalInvocationId
"%16 = OpTypePointer Input %10\n" // uint32*
"%6 = OpVariable %11 Uniform\n" // struct{ int32[] }* out
diff --git a/third_party/LLVM/include/llvm/intrinsics_gen.vcxproj b/third_party/LLVM/include/llvm/intrinsics_gen.vcxproj
index f53a817..93771ef 100644
--- a/third_party/LLVM/include/llvm/intrinsics_gen.vcxproj
+++ b/third_party/LLVM/include/llvm/intrinsics_gen.vcxproj
@@ -187,8 +187,8 @@
</CustomBuild>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\utils/TableGen/llvm-tblgen.vcxproj">
- <Project>1F8587CB-0779-44BB-AFA4-03DD8A036D75</Project>
+ <ProjectReference Include="..\..\utils\TableGen\llvm-tblgen.vcxproj">
+ <Project>{1f8587cb-0779-44bb-afa4-03dd8a036d75}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />