| 17 | class NegativeRayTracingSpheres : public RayTracingTest {}; |
| 18 | |
| 19 | TEST_F(NegativeRayTracingSpheres, SpheresMisalignedVertexStride) { |
| 20 | TEST_DESCRIPTION("Validate vertexStride must be a multiple of the size in bytes of the smallest component of vertexFormat"); |
| 21 | SetTargetApiVersion(VK_API_VERSION_1_3); |
| 22 | AddRequiredFeature(vkt::Feature::bufferDeviceAddress); |
| 23 | AddRequiredFeature(vkt::Feature::bufferDeviceAddress); |
| 24 | AddRequiredFeature(vkt::Feature::accelerationStructure); |
| 25 | AddRequiredFeature(vkt::Feature::rayQuery); |
| 26 | AddRequiredFeature(vkt::Feature::spheres); |
| 27 | AddRequiredFeature(vkt::Feature::linearSweptSpheres); |
| 28 | AddRequiredExtensions(VK_NV_RAY_TRACING_LINEAR_SWEPT_SPHERES_EXTENSION_NAME); |
| 29 | RETURN_IF_SKIP(InitFrameworkForRayTracingTest()); |
| 30 | RETURN_IF_SKIP(InitState()); |
| 31 | |
| 32 | m_command_buffer.Begin(); |
| 33 | auto blas = vkt::as::blueprint::BuildGeometryInfoSimpleOnDeviceBottomLevel(*m_device, vkt::as::GeometryKHR::Type::Spheres); |
| 34 | blas.GetGeometries()[0].SetSpheresVertexStride(1); |
| 35 | // vertexStride must be a multiple of the size in bytes of the smallest component of vertexFormat |
| 36 | m_errorMonitor->SetDesiredError("VUID-VkAccelerationStructureGeometrySpheresDataNV-vertexStride-10431"); |
| 37 | blas.BuildCmdBuffer(m_command_buffer); |
| 38 | m_errorMonitor->VerifyFound(); |
| 39 | m_command_buffer.End(); |
| 40 | } |
| 41 | |
| 42 | TEST_F(NegativeRayTracingSpheres, SpheresInvalidStride) { |
| 43 | TEST_DESCRIPTION("Validate vertexStride and radiusStride must be less than or equal to 2^32-1"); |
nothing calls this directly
no test coverage detected