Make GL_KHR_ray_query provide EOpConstructAccStruct
Previously, GL_KHR_ray_tracing was a required extension to generate OpConvertUToAccelerationStructureKHR conversion instructions from uint64 and uvec2. However, both GL_KHR_ray_tracing and GL_KHR_ray_query should provide this construction. Change-Id: I6564c127fd28d9b527d334958a5adc168f5cdd9a
This commit is contained in:
parent
68c1880c09
commit
374c124025
5 changed files with 73 additions and 2 deletions
|
|
@ -8095,12 +8095,12 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||
case EOpConstructAccStruct:
|
||||
if ((node->getType().isScalar() && node->getType().getBasicType() == EbtUint64)) {
|
||||
// construct acceleration structure from uint64
|
||||
requireExtensions(loc, 1, &E_GL_EXT_ray_tracing, "uint64_t conversion to acclerationStructureEXT");
|
||||
requireExtensions(loc, Num_ray_tracing_EXTs, ray_tracing_EXTs, "uint64_t conversion to acclerationStructureEXT");
|
||||
return intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUint64ToAccStruct, true, node,
|
||||
type);
|
||||
} else if (node->getType().isVector() && node->getType().getBasicType() == EbtUint && node->getVectorSize() == 2) {
|
||||
// construct acceleration structure from uint64
|
||||
requireExtensions(loc, 1, &E_GL_EXT_ray_tracing, "uvec2 conversion to accelerationStructureEXT");
|
||||
requireExtensions(loc, Num_ray_tracing_EXTs, ray_tracing_EXTs, "uvec2 conversion to accelerationStructureEXT");
|
||||
return intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUvec2ToAccStruct, true, node,
|
||||
type);
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -217,6 +217,10 @@ const char* const E_GL_EXT_fragment_shader_barycentric = "GL_EXT_fragment_s
|
|||
const char* const post_depth_coverageEXTs[] = { E_GL_ARB_post_depth_coverage, E_GL_EXT_post_depth_coverage };
|
||||
const int Num_post_depth_coverageEXTs = sizeof(post_depth_coverageEXTs) / sizeof(post_depth_coverageEXTs[0]);
|
||||
|
||||
// Array of extensions to cover both extensions providing ray tracing capabilities.
|
||||
const char* const ray_tracing_EXTs[] = { E_GL_EXT_ray_query, E_GL_EXT_ray_tracing };
|
||||
const int Num_ray_tracing_EXTs = sizeof(ray_tracing_EXTs) / sizeof(ray_tracing_EXTs[0]);
|
||||
|
||||
// OVR extensions
|
||||
const char* const E_GL_OVR_multiview = "GL_OVR_multiview";
|
||||
const char* const E_GL_OVR_multiview2 = "GL_OVR_multiview2";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue