MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / TEST_F

Function TEST_F

tests/unit/ray_tracing_spheres.cpp:19–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17class NegativeRayTracingSpheres : public RayTracingTest {};
18
19TEST_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
42TEST_F(NegativeRayTracingSpheres, SpheresInvalidStride) {
43 TEST_DESCRIPTION("Validate vertexStride and radiusStride must be less than or equal to 2^32-1");

Callers

nothing calls this directly

Calls 9

SetDesiredErrorMethod · 0.80
BuildCmdBufferMethod · 0.80
BuildHostMethod · 0.80
BeginMethod · 0.45
VerifyFoundMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected