KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.33k stars 647 forks source link

Correct VkAccelerationStructureGeometryTrianglesDataKHR::maxVertex value #1097

Closed cmannett85-arm closed 4 months ago

cmannett85-arm commented 4 months ago

Description

VkAccelerationStructureGeometryTrianglesDataKHR::maxVertex is the maximum vertex index in the VkAccelerationStructureGeometryTrianglesDataKHR::vertexData buffer i.e. the spec states "maxVertex is the number of vertices in vertexData minus one".

Currently the maxVertex value in the ray_queries and ray_tracing_extended is being set to the number of vertices, so this patch fixes them. It's not caused any problems so far as both examples use an index buffer - but it's better to be technically correct!

Tested on:

General Checklist:

Please ensure the following points are checked:

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: