Ensure there is a committed ray intersection before calling rayQueryGetIntersectionIn...
authorSlawomir Cygan <slawomir.cygan@intel.com>
Thu, 28 Jan 2021 14:17:58 +0000 (15:17 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 12 Feb 2021 12:12:09 +0000 (12:12 +0000)
commitade9691f5856189209045bea88cd9f6ecb2cbbc5
tree8cdc5dfa98d751ff224c73d162eb2b188bb9e505
parentb9efe3b729ae6cf28b6916f7b19d7108cd373259
Ensure there is a committed ray intersection before calling rayQueryGetIntersectionInstanceIdEXT(..., true)

The test uses rayQueryGetIntersectionInstanceIdEXT(, true) (what corresponds
to OpRayQueryGetIntersectionInstanceIdKHR with Intersection ==OpRayQueryCommittedTypeKHR)
without actually checking if there is any committed intersection.

The  SPV_KHR_ray_query spec requires that there should be a current committed intersection:

"""
Intersection is RayQueryCommittedIntersectionKHR, there must be a current committed intersection
(see OpRayQueryCommittedTypeKHR).
"""

This change fixes that by sorrounding the rayQueryGetIntersectionInstanceIdEXT call with
the check if the curent intersection is not 'None'

Components: Vulkan

VK-GL-CTS Issue: 2762

Affects: dEQP-VK.ray_query.procedural_geometry.*

Change-Id: Ic77e2e67995775b90042ada54cdfd6b627283066
external/vulkancts/modules/vulkan/ray_query/vktRayQueryProceduralGeometryTests.cpp