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

vk_graphics_pipeline: Fix narrowing conversion on MSVC
This commit is contained in:
bunnei 2021-01-24 16:58:38 -08:00 committed by GitHub
commit 45e117b043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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