Why is LoadDevice called by LoadInstance?
jesta88 opened this issue · 4 comments
If we're going to call LoadDevice after creating the device anyway, why call it when loading the instance functions?
This is to support usecases when you don't call volkLoadDevice
. For example, you might be creating multiple devices (for explicit multi-GPU); in this case, you have to either explicitly dispatch functions for a specific device via a table (using volkLoadDeviceTable
), or use global instance-based functions.
I understand, but would it be possible to at least add a function to only load instance functions?
I’ve thought about this before, but I wasn’t sure what the use case would be (I think the only impact is performance and I thought I measured the overhead and it wasn’t very significant but I can double check)
It's not significant, but for people who know what they're doing, it's still awkward. The use case is that I don't want to load all the device functions with getInstanceProcAddr. Maybe I'm just obsessing over details but having no redundancy is important to me.