radv: don't emit unneeded vertex state.
authorDave Airlie <airlied@redhat.com>
Wed, 10 Jan 2018 22:02:52 +0000 (08:02 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 12 Jan 2018 00:43:07 +0000 (00:43 +0000)
commitad11fc3571e025b22d9feed80a7f499665f7a255
treed3f3d782fdb16ce151fb1ff4beaef7291b434e76
parente37db93246d8251e2c0b366c08f23c9de756208e
radv: don't emit unneeded vertex state.

If the number of instances hasn't changed and we've already
emitted it, don't emit it again.

If the vertex shader is the same and the first_instance, vertex_offset
haven't changed don't emit them again.

This increases the fps in GL_vs_VK -t 1 -m -api vk from around 40
to around 60 here, it may not impact anything else.

Dieter also reported smoketest going from 1060->1200 fps.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_private.h