AnsweredAssumed Answered

Matching Vulkan and OpenGL device UUID

Question asked by a.devaykin on Jul 23, 2019
Latest reply on Nov 19, 2019 by a.devaykin

Hello.

 

I'm having troubles with picking correct device for Vulkan-OpenGL interop. On our PCs with AMD cards, OpenGLreports slightly different device UUID than Vulkan does.

I use the following code to get OpenGL device UUIDs:

Snippet

Snippet
GLint numDevices = 0;
glGetIntegerv(GL_NUM_DEVICE_UUIDS_EXT, &numDevices);
for (auto i = 0; i < numDevicesi++) {
    OpenGlUuid currentUuid;
    glGetUnsignedBytei_vEXT(GL_DEVICE_UUID_EXTGLuint(i), &currentUuid[0]);
    resultVector.push_back(currentUuid);
}

for device number i. And in Vulkan I use

VkPhysicalDeviceIDProperties::deviceUUID

It looks like the ID given by Vulkan is missing first 4 bytes. For the GPU on my PC OpenGL reports

0x1 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0

while Vulkan gives

0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0

Is there some particular scheme how this IDs are build/how to interpret and match them? Are they supposed to be equal/matchable at all (as they do on the other vendors GPUs we test our software on)?

 

Thank you.

Outcomes