zink: Fallback to HOST_VISIBLE_COHERENT without DEVICE_LOCAL_VISIBLE
I've been getting Zink working on our own GPU driver that provides GPU access over the network. Our driver does not support DEVICE_LOCAL_VISIBLE
memory and so we trigger this problem where Zink falls back to DEVICE_LOCAL
memory that it then tries to map -- which fails.
The fix uses ZINK_HEAP_HOST_VISIBLE_COHERENT
in place of ZINK_HEAP_DEVICE_LOCAL_VISIBLE
when the latter is not available. I think this is a better fallback than ZINK_HEAP_DEVICE_LOCAL
because objects bound to host visible memory are mapped and this fails for device local allocations. This works for us, at least, although I don't know any other drivers that would have the same problem.
Tested on Windows 10 w/ Nvidia RTX 2070 SUPER, driver 496.49 and our own driver running Superposition and the Mesa test suite.
Thanks, Charles