radv: Implement alternate GFX9 scissor workaround.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 27 May 2018 16:49:57 +0000 (18:49 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 28 May 2018 10:04:25 +0000 (12:04 +0200)
commit6914d5a2c07f7ce89761500ffc07106ebd119c55
treeb61d4ce46b1a855bac8086ca58a8c4cd4bfb9d45
parent3b6dfcf7ae0abd65c0db8a71e55977a0e20ea94f
radv: Implement alternate GFX9 scissor workaround.

This improves dota2 performance for me by 11% when I force the
GPU DPM level to low (otherwise dota2 is CPU limited for 4k on my
threadripper), which should be a large part of the radv-amdvlk gap.
(For me with that was radv 60.3 -> 66.6, while AMDVLK does about 68
fps)

It looks like dota2 rendered the GUI with a bunch of draws with
a SetScissors before almost each draw, causing a lot of pipeline
stalls.

I'm not really happy with the duplication of code, but overriding
radeon_set_context_reg would also be messy since we have the
pre-recorded pipelines and a bunch of si_cmd_buffer code, as well
as some memory->context reg loads for which things would be more
complicated.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_cmd_buffer.c