google / amber

Amber is a multi-API shader test framework
Apache License 2.0
192 stars 65 forks source link

Support choosing host device #619

Open mvainola opened 5 years ago

mvainola commented 5 years ago

Currently Amber picks the first VkPhysicalDevice that meets its feature and extension requirements. Setting VK_ICD_FILENAMES is sufficient in most cases but not when trying to choose between two devices using the same ICD.

My idea was to add two new command line options:

dj2 commented 5 years ago

I'd skip the first one, if you can get the vulkan devices from the vulkan info command, yea? The second seems like it would be useful to add.

mvainola commented 5 years ago

I'm fine with using vulkaninfo to get the IDs and just adding an option similar to --deqp-vk-device-id in the CTS.

dj2 commented 5 years ago

Let's go with something like -d for device. That way, hopefully, it can be used for Dawn as well. @sarahM0 is there a way in Dawn to specify the device to use?

sarahM0 commented 5 years ago

@Kangz

Kangz commented 5 years ago

Yep that's something we do in the dawn_end2end_tests already. See mVendorIDFilter and friend here that use dawn_native::Adapter::GetPCIInfo to get information to do the filtering.

dj2 commented 4 years ago

Hm, didn't mean to close, #698 does the Vulkan side, still need Dawn support