diff options
author | Alex Smith <[email protected]> | 2017-04-12 09:20:42 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-04-12 20:58:41 +0200 |
commit | 4603bea1aa0879656f7efb1e19197488bfdb1f41 (patch) | |
tree | 6c5cbd0db4b77b5bf9fc9ee93fe90ae6310f824d /src/amd/vulkan/radv_private.h | |
parent | ab18578b0306adb437ceb6f7ea510f42a8effae4 (diff) |
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r-- | src/amd/vulkan/radv_private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 719cc02f50d..00190e7eee0 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -744,6 +744,7 @@ struct radv_cmd_state { struct radv_buffer * index_buffer; uint32_t index_type; uint32_t index_offset; + int32_t last_primitive_reset_en; uint32_t last_primitive_reset_index; enum radv_cmd_flush_bits flush_bits; unsigned active_occlusion_queries; |