Răsfoiți Sursa

Merge pull request #5819 from ReinUsesLisp/cull-mode-cast

vk_graphics_pipeline: Fix narrowing conversion on MSVC
bunnei 5 ani în urmă
părinte
comite
45e117b043
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp

+ 2 - 2
src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp

@@ -327,8 +327,8 @@ vk::Pipeline VKGraphicsPipeline::CreatePipeline(const SPIRVProgram& program,
         .rasterizerDiscardEnable =
             static_cast<VkBool32>(state.rasterize_enable == 0 ? VK_TRUE : VK_FALSE),
         .polygonMode = VK_POLYGON_MODE_FILL,
-        .cullMode =
-            dynamic.cull_enable ? MaxwellToVK::CullFace(dynamic.CullFace()) : VK_CULL_MODE_NONE,
+        .cullMode = static_cast<VkCullModeFlags>(
+            dynamic.cull_enable ? MaxwellToVK::CullFace(dynamic.CullFace()) : VK_CULL_MODE_NONE),
         .frontFace = MaxwellToVK::FrontFace(dynamic.FrontFace()),
         .depthBiasEnable = state.depth_bias_enable,
         .depthBiasConstantFactor = 0.0f,