Gfx: Metal: vertex descriptor is built without using the location information

Created on 15 Aug 2018  路  2Comments  路  Source: gfx-rs/gfx

This is the code that creates Metal vertex descriptors:

https://github.com/gfx-rs/gfx/blob/a571ae5a15b2fd7bdd457c9d2d6189167ccfbf54/src/backend/metal/src/device.rs#L1011-L1014

The expected behavior is that the location in the vertex shader matches the location in the attributes array; instead this code fills the array from 0 to count-1, which doesn't work for vertex shaders that have 3 input attributes with locations 0, 2, 4. The array index should instead use VkVertexInputAttributeDescription::location.

Metal blocker easy OSX ready for work bug high

Most helpful comment

Thanks! FWIW based on cursory inspection CTS doesn鈥檛 seem to cover this, I filed https://github.com/KhronosGroup/VK-GL-CTS/issues/121 for this as well.

All 2 comments

@zeux this is an unbelievably precise definition of a bug, almost carrying a fix in it self :). Thank you for chasing this down! Fix is on the way.

Thanks! FWIW based on cursory inspection CTS doesn鈥檛 seem to cover this, I filed https://github.com/KhronosGroup/VK-GL-CTS/issues/121 for this as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seivan picture seivan  路  4Comments

norru picture norru  路  4Comments

kvark picture kvark  路  5Comments

kvark picture kvark  路  3Comments

torkleyy picture torkleyy  路  4Comments