Make gl_HitT proper aliases of gl_RayTmax
Changes the gl_HitT builtins properly alias their gl_RayTmax. Previously they ended up as duplicate variables, rather than aliased.
This commit is contained in:
parent
7c3c50ea94
commit
1cad045cc2
9 changed files with 303 additions and 327 deletions
|
|
@ -989,18 +989,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||
return spv::BuiltInHitTriangleVertexPositionsKHR;
|
||||
case glslang::EbvInstanceCustomIndex:
|
||||
return spv::BuiltInInstanceCustomIndexKHR;
|
||||
case glslang::EbvHitT:
|
||||
{
|
||||
// this is a GLSL alias of RayTmax
|
||||
// in SPV_NV_ray_tracing it has a dedicated builtin
|
||||
// but in SPV_KHR_ray_tracing it gets mapped to RayTmax
|
||||
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||
if (extensions.find("GL_NV_ray_tracing") != extensions.end()) {
|
||||
return spv::BuiltInHitTNV;
|
||||
} else {
|
||||
return spv::BuiltInRayTmaxKHR;
|
||||
}
|
||||
}
|
||||
case glslang::EbvHitKind:
|
||||
return spv::BuiltInHitKindKHR;
|
||||
case glslang::EbvObjectToWorld:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue