]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/pipelinestate_backend.cpp
Change front face logic on Vulkan to match the OpenGL backend
[libs/gl.git] / source / backends / vulkan / pipelinestate_backend.cpp
index 4f50c77e11b62ed78b736a58fe35ad35dceeee98..e43215091300a25bf4c1f01d5ce8260c0b8df099 100644 (file)
@@ -173,16 +173,11 @@ void VulkanPipelineState::fill_creation_info(vector<char> &buffer) const
        raster_info->depthClampEnable = VK_FALSE;
        raster_info->rasterizerDiscardEnable = VK_FALSE;
        raster_info->polygonMode = VK_POLYGON_MODE_FILL;
+       raster_info->frontFace = (self.front_face==CLOCKWISE ? VK_FRONT_FACE_COUNTER_CLOCKWISE : VK_FRONT_FACE_CLOCKWISE);
        if(self.face_cull==NO_CULL || self.front_face==NON_MANIFOLD)
-       {
                raster_info->cullMode = VK_CULL_MODE_NONE;
-               raster_info->frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE;
-       }
        else
-       {
                raster_info->cullMode = (self.face_cull==CULL_FRONT ? VK_CULL_MODE_FRONT_BIT : VK_CULL_MODE_BACK_BIT);
-               raster_info->frontFace = (self.front_face==CLOCKWISE ? VK_FRONT_FACE_CLOCKWISE : VK_FRONT_FACE_COUNTER_CLOCKWISE);
-       }
        raster_info->depthBiasEnable = VK_FALSE;
        raster_info->depthBiasConstantFactor = 0.0f;
        raster_info->depthBiasClamp = 0.0f;