OSDN Git Service

Fix VulkanUnitTests on Visual Studio
authorNicolas Capens <capn@google.com>
Tue, 19 Mar 2019 17:55:25 +0000 (13:55 -0400)
committerNicolas Capens <nicolascapens@google.com>
Tue, 19 Mar 2019 20:16:53 +0000 (20:16 +0000)
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>
src/Vulkan/vulkan.vcxproj
src/Vulkan/vulkan.vcxproj.filters
tests/VulkanUnitTests/unittests.cpp
third_party/LLVM/include/llvm/intrinsics_gen.vcxproj

index 06be317..bb3fa49 100644 (file)
     </Link>\r
     <PostBuildEvent>\r
       <Command>mkdir "$(SolutionDir)out\$(Configuration)_$(Platform)\"\r
-copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"</Command>\r
+mkdir "$(SolutionDir)build\$(Configuration)_$(Platform)\"\r
+copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"\r
+copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)build\$(Configuration)_$(Platform)\"\r
+IF EXIST "$(SolutionDir)..\deqp" (copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)..\deqp\build\external\vulkancts\modules\vulkan\vulkan-1.dll")</Command>\r
     </PostBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
@@ -94,7 +97,10 @@ copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platfor
     </Link>\r
     <PostBuildEvent>\r
       <Command>mkdir "$(SolutionDir)out\$(Configuration)_$(Platform)\"\r
-copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"</Command>\r
+mkdir "$(SolutionDir)build\$(Configuration)_$(Platform)\"\r
+copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)out\$(Configuration)_$(Platform)\"\r
+copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)build\$(Configuration)_$(Platform)\"\r
+IF EXIST "$(SolutionDir)..\deqp" (copy "$(OutDir)vk_swiftshader.dll" "$(SolutionDir)..\deqp\build\external\vulkancts\modules\vulkan\vulkan-1.dll")</Command>\r
     </PostBuildEvent>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
index 832872e..0e771e1 100644 (file)
     <ClCompile Include="..\Pipeline\SpirvShader_dbg.cpp">\r
       <Filter>Source Files\Pipeline</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\WSI\VkSwapchainKHR.cpp">\r
+      <Filter>Source Files\WSI</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="resource.h">\r
     <ClInclude Include="..\Pipeline\SpirvShader.hpp">\r
       <Filter>Header Files\Pipeline</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\WSI\VkSwapchainKHR.hpp">\r
+      <Filter>Header Files\WSI</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <None Include="swiftshader_icd.def" />\r
index eb19f35..fb1e0d1 100644 (file)
@@ -385,8 +385,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, Memcpy)
          "%5 = OpVariable %11 Uniform\n"        // struct{ int32[] }* in\r
         "%12 = OpConstant %9 0\n"               // int32(0)\r
         "%13 = OpConstant %10 0\n"              // uint32(0)\r
-        "%14 = OpTypeVector %10 3\n"            // vec4<int32>\r
-        "%15 = OpTypePointer Input %14\n"       // vec4<int32>*\r
+        "%14 = OpTypeVector %10 3\n"            // vec3<int32>\r
+        "%15 = OpTypePointer Input %14\n"       // vec3<int32>*\r
          "%2 = OpVariable %15 Input\n"          // gl_GlobalInvocationId\r
         "%16 = OpTypePointer Input %10\n"       // uint32*\r
          "%6 = OpVariable %11 Uniform\n"        // struct{ int32[] }* out\r
@@ -437,8 +437,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, GlobalInvocationId)
         "%14 = OpConstant %10 0\n"              // uint32(0)\r
         "%15 = OpConstant %10 1\n"              // uint32(1)\r
         "%16 = OpConstant %10 2\n"              // uint32(2)\r
-        "%17 = OpTypeVector %10 3\n"            // vec4<int32>\r
-        "%18 = OpTypePointer Input %17\n"       // vec4<int32>*\r
+        "%17 = OpTypeVector %10 3\n"            // vec3<int32>\r
+        "%18 = OpTypePointer Input %17\n"       // vec3<int32>*\r
          "%2 = OpVariable %18 Input\n"          // gl_GlobalInvocationId\r
         "%19 = OpTypePointer Input %10\n"       // uint32*\r
          "%6 = OpVariable %11 Uniform\n"        // struct{ int32[] }* out\r
@@ -493,8 +493,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, BranchSimple)
          "%5 = OpVariable %11 Uniform\n"        // struct{ int32[] }* in\r
         "%12 = OpConstant %9 0\n"               // int32(0)\r
         "%13 = OpConstant %10 0\n"              // uint32(0)\r
-        "%14 = OpTypeVector %10 3\n"            // vec4<int32>\r
-        "%15 = OpTypePointer Input %14\n"       // vec4<int32>*\r
+        "%14 = OpTypeVector %10 3\n"            // vec3<int32>\r
+        "%15 = OpTypePointer Input %14\n"       // vec3<int32>*\r
          "%2 = OpVariable %15 Input\n"          // gl_GlobalInvocationId\r
         "%16 = OpTypePointer Input %10\n"       // uint32*\r
          "%6 = OpVariable %11 Uniform\n"        // struct{ int32[] }* out\r
@@ -552,8 +552,8 @@ TEST_P(SwiftShaderVulkanBufferToBufferComputeTest, BranchDeclareSSA)
          "%5 = OpVariable %11 Uniform\n"        // struct{ int32[] }* in\r
         "%12 = OpConstant %9 0\n"               // int32(0)\r
         "%13 = OpConstant %10 0\n"              // uint32(0)\r
-        "%14 = OpTypeVector %10 3\n"            // vec4<int32>\r
-        "%15 = OpTypePointer Input %14\n"       // vec4<int32>*\r
+        "%14 = OpTypeVector %10 3\n"            // vec3<int32>\r
+        "%15 = OpTypePointer Input %14\n"       // vec3<int32>*\r
          "%2 = OpVariable %15 Input\n"          // gl_GlobalInvocationId\r
         "%16 = OpTypePointer Input %10\n"       // uint32*\r
          "%6 = OpVariable %11 Uniform\n"        // struct{ int32[] }* out\r
index f53a817..93771ef 100644 (file)
     </CustomBuild>\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <ProjectReference Include="..\..\utils/TableGen/llvm-tblgen.vcxproj">\r
-      <Project>1F8587CB-0779-44BB-AFA4-03DD8A036D75</Project>\r
+    <ProjectReference Include="..\..\utils\TableGen\llvm-tblgen.vcxproj">\r
+      <Project>{1f8587cb-0779-44bb-afa4-03dd8a036d75}</Project>\r
     </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r