Fix primitive topology. Crashfix.

This commit is contained in:
Henrik Rydgard committed 2016-03-20 19:30:11 +01:00
1 parent 9e34d7d625
commit 7eeba080c7
3 files changed
+17 -12

No files matched your search

+13
View File
@@ -88,6 +88,17 @@ static const VkStencilOp stencilOps[] = {
VK_STENCIL_OP_KEEP, // reserved
};
const VkPrimitiveTopology primToVulkan[8] = {
VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
VK_PRIMITIVE_TOPOLOGY_LINE_LIST,
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, // Vulkan doesn't do quads. We could do strips with restart-index though. We could also do RECT primitives in the geometry shader.
};
bool ApplyShaderBlending() {
return false;
}
@@ -249,6 +260,8 @@ void ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManager, int prim, Vulk
}
}
key.topology = primToVulkan[prim];
VkViewport &vp = dynState.viewport;
vp.x = vpAndScissor.viewportX;
vp.y = vpAndScissor.viewportY;