jmorton06 / Lumos

Cross-Platform C++ 2D/3D game engine
MIT License
1.28k stars 140 forks source link

When loading an OBJ with a large index range, I encounter the following error. Could you suggest a solution? #134

Open JinukJeong92 opened 9 months ago

JinukJeong92 commented 9 months ago

When loading an OBJ with a large index range, I encounter the following error. Could you suggest a solution?

Validation Error: [ VUID-vkCmdDrawIndexed-robustBufferAccess2-07825 ] Object 0: handle = 0xa4324a00000001c5, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0x41363e42 | vkCmdDrawIndexed(): index size (4) * (firstIndex (0) + indexCount (10000)) + binding offset (0) = an ending offset of 40000 bytes, which is greater than the index buffer size (24000). The Vulkan spec states: If robustBufferAccess2 is not enabled, (indexSize {times} (firstIndex + indexCount) + offset) must be less than or equal to the size of the bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer

jmorton06 commented 9 months ago

I’ll have a look into this

jmorton06 commented 9 months ago

Not been able to reproduce this. Is it for one specific obj?