radv: add a write-combining host-local memory type
authorFredrik Höglund <fredrik@kde.org>
Wed, 26 Oct 2016 00:57:19 +0000 (02:57 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Oct 2016 02:27:46 +0000 (12:27 +1000)
commitc9675b4e17e10abef9886b0aacb84e196655e510
treef6d99c6a15f87a8d8762550324d7248b70773a43
parent44760c100c3793718cc8d6cfb66852c4f72d7057
radv: add a write-combining host-local memory type

Add the new memory type between the two device-local types. This makes
the list of supported memory types look like this:

1) DEVICE_LOCAL |              |               |
2)              | HOST_VISIBLE | HOST_COHERENT |
3) DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT |
4)              | HOST_VISIBLE | HOST_COHERENT | HOST_CACHED

With this order a client that searches for a HOST_VISIBLE and
HOST_COHERENT memory type using the algorithm described in section
10.2 of the Vulkan specification (revision 32) will find the host-
local memory type first.

A client that requires the memory type to be HOST_VISIBLE and
HOST_COHERENT, but not DEVICE_LOCAL is most likely searching for
a memory type suitable for staging buffers / images.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c