radv: Disable primitive restart for non-indexed draws
authorAlex Smith <asmith@feralinteractive.com>
Wed, 12 Apr 2017 08:20:42 +0000 (09:20 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 12 Apr 2017 18:58:41 +0000 (20:58 +0200)
commit4603bea1aa0879656f7efb1e19197488bfdb1f41
tree6c5cbd0db4b77b5bf9fc9ee93fe90ae6310f824d
parentab18578b0306adb437ceb6f7ea510f42a8effae4
radv: Disable primitive restart for non-indexed draws

According to the Vulkan spec, VkPipelineInputAssemblyStateCreateInfo's
primitiveRestartEnable flag should only apply to indexed draws, however
it was being enabled regardless of the type of draw. This could cause
problems for non-indexed draws with >=65535 vertices if the previous
indexed draw used 16-bit indices.

Fixes corruption of the credits text in Mad Max.

v2: Reset primitive restart state after executing a secondary command
    buffer.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_private.h