Add-support-for-SPV_NVX_raytracing
This commit is contained in:
parent
3c3669904c
commit
b50c02ef53
50 changed files with 5970 additions and 4184 deletions
|
|
@ -62,6 +62,10 @@ enum TBasicType {
|
|||
EbtStruct,
|
||||
EbtBlock,
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
EbtAccStructNV,
|
||||
#endif
|
||||
|
||||
// HLSL types that live only temporarily.
|
||||
EbtString,
|
||||
|
||||
|
|
@ -88,6 +92,12 @@ enum TStorageQualifier {
|
|||
EvqBuffer, // read/write, shared with app
|
||||
EvqShared, // compute shader's read/write 'shared' qualifier
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
EvqPayloadNV,
|
||||
EvqPayloadInNV,
|
||||
EvqHitAttrNV,
|
||||
#endif
|
||||
|
||||
// parameters
|
||||
EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
|
||||
EvqOut, // also, for 'out' in the grammar before we know if it's a pipeline output or an 'out' parameter
|
||||
|
|
@ -227,6 +237,20 @@ enum TBuiltInVariable {
|
|||
EbvPositionPerViewNV,
|
||||
EbvViewportMaskPerViewNV,
|
||||
EbvFragFullyCoveredNV,
|
||||
// raytracing
|
||||
EbvLaunchIdNV,
|
||||
EbvLaunchSizeNV,
|
||||
EbvInstanceCustomIndexNV,
|
||||
EbvWorldRayOriginNV,
|
||||
EbvWorldRayDirectionNV,
|
||||
EbvObjectRayOriginNV,
|
||||
EbvObjectRayDirectionNV,
|
||||
EbvRayTminNV,
|
||||
EbvRayTmaxNV,
|
||||
EbvHitTNV,
|
||||
EbvHitKindNV,
|
||||
EbvObjectToWorldNV,
|
||||
EbvWorldToObjectNV,
|
||||
EbvBaryCoordNV,
|
||||
EbvBaryCoordNoPerspNV,
|
||||
EbvTaskCountNV,
|
||||
|
|
@ -283,6 +307,11 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
|
|||
case EvqPointCoord: return "gl_PointCoord"; break;
|
||||
case EvqFragColor: return "fragColor"; break;
|
||||
case EvqFragDepth: return "gl_FragDepth"; break;
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EvqPayloadNV: return "rayPayloadNVX"; break;
|
||||
case EvqPayloadInNV: return "rayPayloadInNVX"; break;
|
||||
case EvqHitAttrNV: return "hitAttributeNVX"; break;
|
||||
#endif
|
||||
default: return "unknown qualifier";
|
||||
}
|
||||
}
|
||||
|
|
@ -375,6 +404,19 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
|
|||
case EbvPositionPerViewNV: return "PositionPerViewNV";
|
||||
case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
|
||||
case EbvFragFullyCoveredNV: return "FragFullyCoveredNV";
|
||||
case EbvLaunchIdNV: return "LaunchIdNVX";
|
||||
case EbvLaunchSizeNV: return "LaunchSizeNVX";
|
||||
case EbvInstanceCustomIndexNV: return "InstanceCustomIndexNVX";
|
||||
case EbvWorldRayOriginNV: return "WorldRayOriginNVX";
|
||||
case EbvWorldRayDirectionNV: return "WorldRayDirectionNVX";
|
||||
case EbvObjectRayOriginNV: return "ObjectRayOriginNVX";
|
||||
case EbvObjectRayDirectionNV: return "ObjectRayDirectionNVX";
|
||||
case EbvRayTminNV: return "ObjectRayTminNVX";
|
||||
case EbvRayTmaxNV: return "ObjectRayTmaxNVX";
|
||||
case EbvHitTNV: return "HitTNVX";
|
||||
case EbvHitKindNV: return "HitKindNVX";
|
||||
case EbvObjectToWorldNV: return "ObjectToWorldNVX";
|
||||
case EbvWorldToObjectNV: return "WorldToObjectNVX";
|
||||
case EbvBaryCoordNV: return "BaryCoordNV";
|
||||
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
|
||||
case EbvTaskCountNV: return "TaskCountNV";
|
||||
|
|
|
|||
|
|
@ -725,6 +725,7 @@ public:
|
|||
layoutViewportRelative = false;
|
||||
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
|
||||
layoutSecondaryViewportRelativeOffset = -2048;
|
||||
layoutShaderRecordNV = false;
|
||||
#endif
|
||||
|
||||
clearInterstageLayout();
|
||||
|
|
@ -758,6 +759,9 @@ public:
|
|||
hasAnyLocation() ||
|
||||
hasStream() ||
|
||||
hasFormat() ||
|
||||
#ifdef NV_EXTENSIONS
|
||||
layoutShaderRecordNV ||
|
||||
#endif
|
||||
layoutPushConstant;
|
||||
}
|
||||
bool hasLayout() const
|
||||
|
|
@ -811,6 +815,7 @@ public:
|
|||
bool layoutPassthrough;
|
||||
bool layoutViewportRelative;
|
||||
int layoutSecondaryViewportRelativeOffset;
|
||||
bool layoutShaderRecordNV;
|
||||
#endif
|
||||
|
||||
bool hasUniformLayout() const
|
||||
|
|
@ -1481,7 +1486,11 @@ public:
|
|||
}
|
||||
return false;
|
||||
}
|
||||
virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; }
|
||||
virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint
|
||||
#ifdef NV_EXTENSIONS
|
||||
|| basicType == EbtAccStructNV
|
||||
#endif
|
||||
; }
|
||||
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
||||
|
||||
// "Image" is a superset of "Subpass"
|
||||
|
|
@ -1669,6 +1678,9 @@ public:
|
|||
case EbtSampler: return "sampler/image";
|
||||
case EbtStruct: return "structure";
|
||||
case EbtBlock: return "block";
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EbtAccStructNV: return "accelerationStructureNVX";
|
||||
#endif
|
||||
default: return "unknown type";
|
||||
}
|
||||
}
|
||||
|
|
@ -1764,6 +1776,8 @@ public:
|
|||
appendStr(" layoutSecondaryViewportRelativeOffset=");
|
||||
appendInt(qualifier.layoutSecondaryViewportRelativeOffset);
|
||||
}
|
||||
if (qualifier.layoutShaderRecordNV)
|
||||
appendStr(" shaderRecordNVX");
|
||||
#endif
|
||||
|
||||
appendStr(")");
|
||||
|
|
|
|||
|
|
@ -894,6 +894,10 @@ enum TOperator {
|
|||
EOpFindMSB,
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
EOpTraceNV,
|
||||
EOpReportIntersectionNV,
|
||||
EOpIgnoreIntersectionNV,
|
||||
EOpTerminateRayNV,
|
||||
EOpWritePackedPrimitiveIndices4x8NV,
|
||||
#endif
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue