radv: disable vertex reuse when writing viewport index
authorDave Airlie <airlied@redhat.com>
Tue, 17 Jan 2017 20:26:31 +0000 (06:26 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 17 Jan 2017 22:04:11 +0000 (08:04 +1000)
This fixes some issues we'd hit later if using viewport
indexes.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c

index 27fa405640033a9a123acf734181cd19a9ec2d55..c6f238bfa2653e6a7a5c4f4faaf4b86292f04775 100644 (file)
@@ -511,6 +511,8 @@ radv_emit_vertex_shader(struct radv_cmd_buffer *cmd_buffer,
                               cull_dist_mask << 8 |
                               clip_dist_mask);
 
+       radeon_set_context_reg(cmd_buffer->cs, R_028AB4_VGT_REUSE_OFF,
+                              S_028AB4_REUSE_OFF(vs->info.vs.writes_viewport_index));
 }