vsg-dev / VulkanSceneGraph

Vulkan & C++17 based Scene Graph Project
http://www.vulkanscenegraph.org
MIT License
1.32k stars 212 forks source link

If primitiveRestartEnable is set to true, computeBounds will fail #1229

Open jacky-wang7 opened 4 months ago

jacky-wang7 commented 4 months ago

Describe the bug vsg::ComputeBounds does not seem to determine the clearing of index 0xFFFFFFF.

To Reproduce Steps to reproduce the behavior:

  1. set vsg::InputAssemblyState->primitiveRestartEnable = true;
  2. Set the vertex index to 0xFFFFFFFF.
  3. node->accept(computeBounds)
  4. t_vec3 error

Expected behavior Can ComputeBounds skip special values?

jacky-wang7 commented 4 months ago

In computerBounds: bounds.add(matrix * dec3(vertices->at(uint_indices-at(i)))); if indices is a special value of 0xFFFFFFFF, It will error. I don't know if there will be similar problems elsewhere. I have only encountered it in computerBounds.