radv: add gfx9 scissor workaround
authorDavid Airlie <airlied@dhcp-40-204.bne.redhat.com>
Tue, 15 Aug 2017 04:02:43 +0000 (14:02 +1000)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 24 Sep 2017 03:50:02 +0000 (05:50 +0200)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: 17.2 <mesa-stable@lists.freedesktop.org>
src/amd/vulkan/radv_cmd_buffer.c

index fbbb1b1c68ec6b8d3ef423cd08f31edc812d676a..1e0e366820946d4e25f7612c014316eb170878a7 100644 (file)
@@ -1010,6 +1010,11 @@ static void
 radv_emit_scissor(struct radv_cmd_buffer *cmd_buffer)
 {
        uint32_t count = cmd_buffer->state.dynamic.scissor.count;
+
+       if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9) {
+               cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_PS_PARTIAL_FLUSH;
+               si_emit_cache_flush(cmd_buffer);
+       }
        si_write_scissors(cmd_buffer->cs, 0, count,
                          cmd_buffer->state.dynamic.scissor.scissors,
                          cmd_buffer->state.dynamic.viewport.viewports,