Merge pull request #2139 from neslimsah/master
GL_EXT_ray_query updates
This commit is contained in:
commit
8e26c5f50e
@ -1,5 +1,6 @@
|
||||
/*
|
||||
** Copyright (c) 2014-2016 The Khronos Group Inc.
|
||||
** Copyright (c) 2014-2020 The Khronos Group Inc.
|
||||
** Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
** of this software and/or associated documentation files (the "Materials"),
|
||||
@ -46,4 +47,5 @@ static const char* const E_SPV_EXT_fragment_shader_interlock = "SPV_EXT_fragm
|
||||
static const char* const E_SPV_KHR_shader_clock = "SPV_KHR_shader_clock";
|
||||
static const char* const E_SPV_KHR_non_semantic_info = "SPV_KHR_non_semantic_info";
|
||||
static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_tracing";
|
||||
static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query";
|
||||
#endif // #ifndef GLSLextKHR_H
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Copyright (C) 2014-2016 LunarG, Inc.
|
||||
// Copyright (C) 2015-2020 Google, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -1181,6 +1182,8 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
|
||||
// Translate glslang type to SPIR-V storage class.
|
||||
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
||||
{
|
||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||
return spv::StorageClassFunction;
|
||||
if (type.getQualifier().isPipeInput())
|
||||
return spv::StorageClassInput;
|
||||
if (type.getQualifier().isPipeOutput())
|
||||
@ -1474,6 +1477,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
|
||||
switch(glslangIntermediate->getDepth()) {
|
||||
case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break;
|
||||
case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break;
|
||||
@ -1511,7 +1515,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
|
||||
case EShLangCompute:
|
||||
builder.addCapability(spv::CapabilityShader);
|
||||
@ -2286,6 +2290,13 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
||||
case glslang::EOpEndStreamPrimitive:
|
||||
builder.createNoResultOp(spv::OpEndStreamPrimitive, operand);
|
||||
return false;
|
||||
case glslang::EOpRayQueryTerminate:
|
||||
builder.createNoResultOp(spv::OpRayQueryTerminateKHR, operand);
|
||||
return false;
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand);
|
||||
return false;
|
||||
|
||||
#endif
|
||||
|
||||
default:
|
||||
@ -2703,6 +2714,36 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||
noReturnValue = true;
|
||||
break;
|
||||
case glslang::EOpRayQueryInitialize:
|
||||
case glslang::EOpRayQueryTerminate:
|
||||
case glslang::EOpRayQueryGenerateIntersection:
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
builder.addExtension("SPV_KHR_ray_query");
|
||||
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
|
||||
noReturnValue = true;
|
||||
break;
|
||||
case glslang::EOpRayQueryProceed:
|
||||
case glslang::EOpRayQueryGetIntersectionType:
|
||||
case glslang::EOpRayQueryGetRayTMin:
|
||||
case glslang::EOpRayQueryGetRayFlags:
|
||||
case glslang::EOpRayQueryGetIntersectionT:
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex:
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceId:
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
|
||||
case glslang::EOpRayQueryGetIntersectionGeometryIndex:
|
||||
case glslang::EOpRayQueryGetIntersectionPrimitiveIndex:
|
||||
case glslang::EOpRayQueryGetIntersectionBarycentrics:
|
||||
case glslang::EOpRayQueryGetIntersectionFrontFace:
|
||||
case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque:
|
||||
case glslang::EOpRayQueryGetIntersectionObjectRayDirection:
|
||||
case glslang::EOpRayQueryGetIntersectionObjectRayOrigin:
|
||||
case glslang::EOpRayQueryGetWorldRayDirection:
|
||||
case glslang::EOpRayQueryGetWorldRayOrigin:
|
||||
case glslang::EOpRayQueryGetIntersectionObjectToWorld:
|
||||
case glslang::EOpRayQueryGetIntersectionWorldToObject:
|
||||
builder.addExtension("SPV_KHR_ray_query");
|
||||
builder.addCapability(spv::CapabilityRayQueryProvisionalKHR);
|
||||
break;
|
||||
case glslang::EOpCooperativeMatrixLoad:
|
||||
case glslang::EOpCooperativeMatrixStore:
|
||||
noReturnValue = true;
|
||||
@ -2769,6 +2810,28 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
lvalue = true;
|
||||
break;
|
||||
|
||||
case glslang::EOpRayQueryInitialize:
|
||||
case glslang::EOpRayQueryTerminate:
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
case glslang::EOpRayQueryProceed:
|
||||
case glslang::EOpRayQueryGenerateIntersection:
|
||||
case glslang::EOpRayQueryGetIntersectionType:
|
||||
case glslang::EOpRayQueryGetIntersectionT:
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex:
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceId:
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
|
||||
case glslang::EOpRayQueryGetIntersectionGeometryIndex:
|
||||
case glslang::EOpRayQueryGetIntersectionPrimitiveIndex:
|
||||
case glslang::EOpRayQueryGetIntersectionBarycentrics:
|
||||
case glslang::EOpRayQueryGetIntersectionFrontFace:
|
||||
case glslang::EOpRayQueryGetIntersectionObjectRayDirection:
|
||||
case glslang::EOpRayQueryGetIntersectionObjectRayOrigin:
|
||||
case glslang::EOpRayQueryGetIntersectionObjectToWorld:
|
||||
case glslang::EOpRayQueryGetIntersectionWorldToObject:
|
||||
if (arg == 0)
|
||||
lvalue = true;
|
||||
break;
|
||||
|
||||
case glslang::EOpAtomicAdd:
|
||||
case glslang::EOpAtomicMin:
|
||||
case glslang::EOpAtomicMax:
|
||||
@ -2913,7 +2976,29 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||
lvalueCoherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType());
|
||||
} else {
|
||||
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
||||
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
|
||||
glslang::TOperator glslangOp = node->getOp();
|
||||
if (arg == 1 &&
|
||||
(glslangOp == glslang::EOpRayQueryGetIntersectionType ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionT ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionInstanceCustomIndex ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionInstanceId ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionGeometryIndex ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionPrimitiveIndex ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionBarycentrics ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionFrontFace ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject
|
||||
)) {
|
||||
bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst();
|
||||
operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
|
||||
}
|
||||
else {
|
||||
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -3549,6 +3634,9 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
||||
case glslang::EbtAccStruct:
|
||||
spvType = builder.makeAccelerationStructureType();
|
||||
break;
|
||||
case glslang::EbtRayQuery:
|
||||
spvType = builder.makeRayQueryType();
|
||||
break;
|
||||
case glslang::EbtReference:
|
||||
{
|
||||
// Make the forward pointer, then recurse to convert the structure type, then
|
||||
@ -5893,6 +5981,24 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
|
||||
case glslang::EOpFwidthCoarse:
|
||||
unaryOp = spv::OpFwidthCoarse;
|
||||
break;
|
||||
case glslang::EOpRayQueryProceed:
|
||||
unaryOp = spv::OpRayQueryProceedKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetRayTMin:
|
||||
unaryOp = spv::OpRayQueryGetRayTMinKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetRayFlags:
|
||||
unaryOp = spv::OpRayQueryGetRayFlagsKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetWorldRayOrigin:
|
||||
unaryOp = spv::OpRayQueryGetWorldRayOriginKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetWorldRayDirection:
|
||||
unaryOp = spv::OpRayQueryGetWorldRayDirectionKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque:
|
||||
unaryOp = spv::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR;
|
||||
break;
|
||||
case glslang::EOpInterpolateAtCentroid:
|
||||
if (typeProxy == glslang::EbtFloat16)
|
||||
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
||||
@ -7598,23 +7704,104 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||
break;
|
||||
|
||||
case glslang::EOpReportIntersection:
|
||||
{
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpReportIntersectionKHR;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case glslang::EOpTrace:
|
||||
{
|
||||
builder.createNoResultOp(spv::OpTraceRayKHR, operands);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case glslang::EOpExecuteCallable:
|
||||
{
|
||||
builder.createNoResultOp(spv::OpExecuteCallableKHR, operands);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case glslang::EOpRayQueryInitialize:
|
||||
builder.createNoResultOp(spv::OpRayQueryInitializeKHR, operands);
|
||||
return 0;
|
||||
case glslang::EOpRayQueryTerminate:
|
||||
builder.createNoResultOp(spv::OpRayQueryTerminateKHR, operands);
|
||||
return 0;
|
||||
case glslang::EOpRayQueryGenerateIntersection:
|
||||
builder.createNoResultOp(spv::OpRayQueryGenerateIntersectionKHR, operands);
|
||||
return 0;
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operands);
|
||||
return 0;
|
||||
case glslang::EOpRayQueryProceed:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpRayQueryProceedKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionType:
|
||||
typeId = builder.makeUintType(32);
|
||||
opCode = spv::OpRayQueryGetIntersectionTypeKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetRayTMin:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpRayQueryGetRayTMinKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetRayFlags:
|
||||
typeId = builder.makeIntType(32);
|
||||
opCode = spv::OpRayQueryGetRayFlagsKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionT:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpRayQueryGetIntersectionTKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex:
|
||||
typeId = builder.makeIntType(32);
|
||||
opCode = spv::OpRayQueryGetIntersectionInstanceCustomIndexKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceId:
|
||||
typeId = builder.makeIntType(32);
|
||||
opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
|
||||
typeId = builder.makeIntType(32);
|
||||
opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionGeometryIndex:
|
||||
typeId = builder.makeIntType(32);
|
||||
opCode = spv::OpRayQueryGetIntersectionGeometryIndexKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionPrimitiveIndex:
|
||||
typeId = builder.makeIntType(32);
|
||||
opCode = spv::OpRayQueryGetIntersectionPrimitiveIndexKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionBarycentrics:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 2);
|
||||
opCode = spv::OpRayQueryGetIntersectionBarycentricsKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionFrontFace:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpRayQueryGetIntersectionFrontFaceKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionObjectRayDirection:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpRayQueryGetIntersectionObjectRayDirectionKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionObjectRayOrigin:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpRayQueryGetIntersectionObjectRayOriginKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetWorldRayDirection:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpRayQueryGetWorldRayDirectionKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetWorldRayOrigin:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpRayQueryGetWorldRayOriginKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionObjectToWorld:
|
||||
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
|
||||
opCode = spv::OpRayQueryGetIntersectionObjectToWorldKHR;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionWorldToObject:
|
||||
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
|
||||
opCode = spv::OpRayQueryGetIntersectionWorldToObjectKHR;
|
||||
break;
|
||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
|
||||
return 0;
|
||||
@ -7817,7 +8004,18 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
||||
case glslang::EOpTerminateRay:
|
||||
builder.createNoResultOp(spv::OpTerminateRayKHR);
|
||||
return 0;
|
||||
|
||||
case glslang::EOpRayQueryInitialize:
|
||||
builder.createNoResultOp(spv::OpRayQueryInitializeKHR);
|
||||
return 0;
|
||||
case glslang::EOpRayQueryTerminate:
|
||||
builder.createNoResultOp(spv::OpRayQueryTerminateKHR);
|
||||
return 0;
|
||||
case glslang::EOpRayQueryGenerateIntersection:
|
||||
builder.createNoResultOp(spv::OpRayQueryGenerateIntersectionKHR);
|
||||
return 0;
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR);
|
||||
return 0;
|
||||
case glslang::EOpBeginInvocationInterlock:
|
||||
builder.createNoResultOp(spv::OpBeginInvocationInterlockEXT);
|
||||
return 0;
|
||||
|
@ -1,6 +1,7 @@
|
||||
//
|
||||
// Copyright (C) 2014-2015 LunarG, Inc.
|
||||
// Copyright (C) 2015-2018 Google, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -616,6 +617,21 @@ Id Builder::makeAccelerationStructureType()
|
||||
|
||||
return type->getResultId();
|
||||
}
|
||||
|
||||
Id Builder::makeRayQueryType()
|
||||
{
|
||||
Instruction *type;
|
||||
if (groupedTypes[OpTypeRayQueryProvisionalKHR].size() == 0) {
|
||||
type = new Instruction(getUniqueId(), NoType, OpTypeRayQueryProvisionalKHR);
|
||||
groupedTypes[OpTypeRayQueryProvisionalKHR].push_back(type);
|
||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||
module.mapInstruction(type);
|
||||
} else {
|
||||
type = groupedTypes[OpTypeRayQueryProvisionalKHR].back();
|
||||
}
|
||||
|
||||
return type->getResultId();
|
||||
}
|
||||
#endif
|
||||
|
||||
Id Builder::getDerefTypeId(Id resultId) const
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Copyright (C) 2014-2015 LunarG, Inc.
|
||||
// Copyright (C) 2015-2020 Google, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -183,6 +184,8 @@ public:
|
||||
|
||||
// accelerationStructureNV type
|
||||
Id makeAccelerationStructureType();
|
||||
// rayQueryEXT type
|
||||
Id makeRayQueryType();
|
||||
|
||||
// For querying about types.
|
||||
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
|
||||
|
122
SPIRV/doc.cpp
122
SPIRV/doc.cpp
@ -1,5 +1,6 @@
|
||||
//
|
||||
// Copyright (C) 2014-2015 LunarG, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -892,6 +893,8 @@ const char* CapabilityString(int info)
|
||||
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
||||
case CapabilityRayTracingNV: return "RayTracingNV";
|
||||
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
|
||||
case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR";
|
||||
case CapabilityRayTraversalPrimitiveCullingProvisionalKHR: return "RayTraversalPrimitiveCullingProvisionalKHR";
|
||||
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
||||
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
||||
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
||||
@ -1337,6 +1340,31 @@ const char* OpcodeString(int op)
|
||||
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
||||
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
|
||||
|
||||
case OpTypeRayQueryProvisionalKHR: return "OpTypeRayQueryProvisionalKHR";
|
||||
case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
|
||||
case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
|
||||
case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR";
|
||||
case OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR";
|
||||
case OpRayQueryProceedKHR: return "OpRayQueryProceedKHR";
|
||||
case OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR";
|
||||
case OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR";
|
||||
case OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR";
|
||||
case OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR";
|
||||
case OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR";
|
||||
case OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR";
|
||||
case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR";
|
||||
case OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR";
|
||||
case OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR";
|
||||
case OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR";
|
||||
case OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR";
|
||||
case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR";
|
||||
case OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR";
|
||||
case OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR";
|
||||
case OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR";
|
||||
case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR";
|
||||
case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR";
|
||||
case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR";
|
||||
|
||||
case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
|
||||
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
|
||||
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
|
||||
@ -2722,6 +2750,100 @@ void Parameterize()
|
||||
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData ID");
|
||||
InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
|
||||
|
||||
// Ray Query
|
||||
InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
|
||||
InstructionDesc[OpTypeRayQueryProvisionalKHR].setResultAndType(true, false);
|
||||
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'");
|
||||
InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'");
|
||||
InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
|
||||
|
@ -2111,4 +2111,3 @@ inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsM
|
||||
} // end namespace spv
|
||||
|
||||
#endif // #ifndef spirv_HPP
|
||||
|
||||
|
26
Test/baseResults/rayQuery-allOps.Error.rgen.out
Normal file
26
Test/baseResults/rayQuery-allOps.Error.rgen.out
Normal file
@ -0,0 +1,26 @@
|
||||
rayQuery-allOps.Error.rgen
|
||||
ERROR: 0:47: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type ' global bool' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:49: '=' : cannot convert from ' global uint' to ' temp highp int'
|
||||
ERROR: 0:59: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type ' global bool' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:64: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type ' global 2-component vector of float' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:69: '' : boolean expression expected
|
||||
ERROR: 0:74: '' : boolean expression expected
|
||||
ERROR: 0:79: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type ' global 3-component vector of float' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:84: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type ' global 3-component vector of float' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:89: '' : boolean expression expected
|
||||
ERROR: 0:94: '' : boolean expression expected
|
||||
ERROR: 0:99: '' : boolean expression expected
|
||||
ERROR: 0:127: '=' : cannot convert from ' global uint' to ' temp highp int'
|
||||
ERROR: 0:145: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type ' global 2-component vector of float' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:158: '' : boolean expression expected
|
||||
ERROR: 0:163: '' : boolean expression expected
|
||||
ERROR: 0:168: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type ' global 3-component vector of float' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:173: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type ' global 3-component vector of float' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||
ERROR: 0:178: '' : boolean expression expected
|
||||
ERROR: 0:183: '' : boolean expression expected
|
||||
ERROR: 0:195: '' : boolean expression expected
|
||||
ERROR: 0:200: '' : boolean expression expected
|
||||
ERROR: 21 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
440
Test/baseResults/rayQuery-allOps.comp.out
Normal file
440
Test/baseResults/rayQuery-allOps.comp.out
Normal file
@ -0,0 +1,440 @@
|
||||
rayQuery-allOps.comp
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 266
|
||||
|
||||
Capability Shader
|
||||
Capability RayQueryProvisionalKHR
|
||||
Extension "SPV_KHR_ray_query"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main"
|
||||
ExecutionMode 4 LocalSize 1 1 1
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 6 "doSomething("
|
||||
Name 10 "Ray"
|
||||
MemberName 10(Ray) 0 "pos"
|
||||
MemberName 10(Ray) 1 "tmin"
|
||||
MemberName 10(Ray) 2 "dir"
|
||||
MemberName 10(Ray) 3 "tmax"
|
||||
Name 12 "makeRayDesc("
|
||||
Name 15 "Log"
|
||||
MemberName 15(Log) 0 "x"
|
||||
MemberName 15(Log) 1 "y"
|
||||
Name 17 ""
|
||||
Name 26 "ray"
|
||||
Name 43 "ray"
|
||||
Name 47 "rayQuery"
|
||||
Name 50 "rtas"
|
||||
Name 70 "candidateType"
|
||||
Name 80 "_mat4x3"
|
||||
Name 85 "_mat3x4"
|
||||
Name 147 "t"
|
||||
Name 161 "committedStatus"
|
||||
Name 247 "o"
|
||||
Name 250 "d"
|
||||
Name 261 "Ray"
|
||||
MemberName 261(Ray) 0 "pos"
|
||||
MemberName 261(Ray) 1 "tmin"
|
||||
MemberName 261(Ray) 2 "dir"
|
||||
MemberName 261(Ray) 3 "tmax"
|
||||
Name 263 "Rays"
|
||||
MemberName 263(Rays) 0 "rays"
|
||||
Name 265 ""
|
||||
MemberDecorate 15(Log) 0 Offset 0
|
||||
MemberDecorate 15(Log) 1 Offset 4
|
||||
Decorate 15(Log) BufferBlock
|
||||
Decorate 17 DescriptorSet 0
|
||||
Decorate 17 Binding 0
|
||||
Decorate 50(rtas) DescriptorSet 0
|
||||
Decorate 50(rtas) Binding 1
|
||||
MemberDecorate 261(Ray) 0 Offset 0
|
||||
MemberDecorate 261(Ray) 1 Offset 12
|
||||
MemberDecorate 261(Ray) 2 Offset 16
|
||||
MemberDecorate 261(Ray) 3 Offset 28
|
||||
Decorate 262 ArrayStride 32
|
||||
MemberDecorate 263(Rays) 0 Offset 0
|
||||
Decorate 263(Rays) BufferBlock
|
||||
Decorate 265 DescriptorSet 0
|
||||
Decorate 265 Binding 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
9: TypeVector 8(float) 3
|
||||
10(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
|
||||
11: TypeFunction 10(Ray)
|
||||
14: TypeInt 32 0
|
||||
15(Log): TypeStruct 14(int) 14(int)
|
||||
16: TypePointer Uniform 15(Log)
|
||||
17: 16(ptr) Variable Uniform
|
||||
18: TypeInt 32 1
|
||||
19: 18(int) Constant 0
|
||||
20: 14(int) Constant 0
|
||||
21: TypePointer Uniform 14(int)
|
||||
23: 18(int) Constant 1
|
||||
25: TypePointer Function 10(Ray)
|
||||
27: 8(float) Constant 0
|
||||
28: 9(fvec3) ConstantComposite 27 27 27
|
||||
29: TypePointer Function 9(fvec3)
|
||||
31: 18(int) Constant 2
|
||||
32: 8(float) Constant 1065353216
|
||||
33: 9(fvec3) ConstantComposite 32 27 27
|
||||
35: TypePointer Function 8(float)
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
46: TypePointer Function 45
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
52: 14(int) Constant 255
|
||||
67: TypeBool
|
||||
69: TypePointer Function 14(int)
|
||||
71: 67(bool) ConstantFalse
|
||||
78: TypeMatrix 9(fvec3) 4
|
||||
79: TypePointer Function 78
|
||||
82: TypeVector 8(float) 4
|
||||
83: TypeMatrix 82(fvec4) 3
|
||||
84: TypePointer Function 83
|
||||
89: 67(bool) ConstantTrue
|
||||
94: TypeVector 8(float) 2
|
||||
148: 8(float) Constant 1056964608
|
||||
180: 14(int) Constant 1
|
||||
203: 14(int) Constant 2
|
||||
261(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
|
||||
262: TypeRuntimeArray 261(Ray)
|
||||
263(Rays): TypeStruct 262
|
||||
264: TypePointer Uniform 263(Rays)
|
||||
265: 264(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
43(ray): 25(ptr) Variable Function
|
||||
47(rayQuery): 46(ptr) Variable Function
|
||||
70(candidateType): 69(ptr) Variable Function
|
||||
80(_mat4x3): 79(ptr) Variable Function
|
||||
85(_mat3x4): 84(ptr) Variable Function
|
||||
147(t): 35(ptr) Variable Function
|
||||
161(committedStatus): 69(ptr) Variable Function
|
||||
247(o): 29(ptr) Variable Function
|
||||
250(d): 29(ptr) Variable Function
|
||||
44: 10(Ray) FunctionCall 12(makeRayDesc()
|
||||
Store 43(ray) 44
|
||||
51: 48 Load 50(rtas)
|
||||
53: 29(ptr) AccessChain 43(ray) 19
|
||||
54: 9(fvec3) Load 53
|
||||
55: 35(ptr) AccessChain 43(ray) 23
|
||||
56: 8(float) Load 55
|
||||
57: 29(ptr) AccessChain 43(ray) 31
|
||||
58: 9(fvec3) Load 57
|
||||
59: 35(ptr) AccessChain 43(ray) 37
|
||||
60: 8(float) Load 59
|
||||
RayQueryInitializeKHR 47(rayQuery) 51 20 52 54 56 58 60
|
||||
Branch 61
|
||||
61: Label
|
||||
LoopMerge 63 64 None
|
||||
Branch 65
|
||||
65: Label
|
||||
66: 45 Load 47(rayQuery)
|
||||
68: 67(bool) RayQueryProceedKHR 66
|
||||
BranchConditional 68 62 63
|
||||
62: Label
|
||||
72: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
|
||||
Store 70(candidateType) 72
|
||||
73: 14(int) Load 70(candidateType)
|
||||
SelectionMerge 76 None
|
||||
Switch 73 76
|
||||
case 0: 74
|
||||
case 1: 75
|
||||
74: Label
|
||||
77: 45 Load 47(rayQuery)
|
||||
RayQueryTerminateKHR 77
|
||||
81: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 81
|
||||
86: 78 Load 80(_mat4x3)
|
||||
87: 83 Transpose 86
|
||||
Store 85(_mat3x4) 87
|
||||
88: 45 Load 47(rayQuery)
|
||||
RayQueryConfirmIntersectionKHR 88
|
||||
90: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
|
||||
SelectionMerge 92 None
|
||||
BranchConditional 90 91 92
|
||||
91: Label
|
||||
93: 2 FunctionCall 6(doSomething()
|
||||
Branch 92
|
||||
92: Label
|
||||
95: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
|
||||
96: 8(float) CompositeExtract 95 0
|
||||
97: 67(bool) FOrdEqual 96 27
|
||||
SelectionMerge 99 None
|
||||
BranchConditional 97 98 99
|
||||
98: Label
|
||||
100: 2 FunctionCall 6(doSomething()
|
||||
Branch 99
|
||||
99: Label
|
||||
101: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
|
||||
102: 67(bool) SGreaterThan 101 19
|
||||
SelectionMerge 104 None
|
||||
BranchConditional 102 103 104
|
||||
103: Label
|
||||
105: 2 FunctionCall 6(doSomething()
|
||||
Branch 104
|
||||
104: Label
|
||||
106: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
|
||||
107: 67(bool) SGreaterThan 106 19
|
||||
SelectionMerge 109 None
|
||||
BranchConditional 107 108 109
|
||||
108: Label
|
||||
110: 2 FunctionCall 6(doSomething()
|
||||
Branch 109
|
||||
109: Label
|
||||
111: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
|
||||
112: 8(float) CompositeExtract 111 0
|
||||
113: 67(bool) FOrdGreaterThan 112 27
|
||||
SelectionMerge 115 None
|
||||
BranchConditional 113 114 115
|
||||
114: Label
|
||||
116: 2 FunctionCall 6(doSomething()
|
||||
Branch 115
|
||||
115: Label
|
||||
117: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
|
||||
118: 8(float) CompositeExtract 117 0
|
||||
119: 67(bool) FOrdGreaterThan 118 27
|
||||
SelectionMerge 121 None
|
||||
BranchConditional 119 120 121
|
||||
120: Label
|
||||
122: 2 FunctionCall 6(doSomething()
|
||||
Branch 121
|
||||
121: Label
|
||||
123: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
|
||||
124: 67(bool) SGreaterThan 123 19
|
||||
SelectionMerge 126 None
|
||||
BranchConditional 124 125 126
|
||||
125: Label
|
||||
127: 2 FunctionCall 6(doSomething()
|
||||
Branch 126
|
||||
126: Label
|
||||
128: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
|
||||
129: 67(bool) FOrdGreaterThan 128 27
|
||||
SelectionMerge 131 None
|
||||
BranchConditional 129 130 131
|
||||
130: Label
|
||||
132: 2 FunctionCall 6(doSomething()
|
||||
Branch 131
|
||||
131: Label
|
||||
133: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
||||
134: 67(bool) UGreaterThan 133 20
|
||||
SelectionMerge 136 None
|
||||
BranchConditional 134 135 136
|
||||
135: Label
|
||||
137: 2 FunctionCall 6(doSomething()
|
||||
Branch 136
|
||||
136: Label
|
||||
Branch 76
|
||||
75: Label
|
||||
139: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 139
|
||||
140: 78 Load 80(_mat4x3)
|
||||
141: 83 Transpose 140
|
||||
Store 85(_mat3x4) 141
|
||||
142: 45 Load 47(rayQuery)
|
||||
143: 67(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 142
|
||||
SelectionMerge 145 None
|
||||
BranchConditional 143 144 145
|
||||
144: Label
|
||||
146: 2 FunctionCall 6(doSomething()
|
||||
Branch 145
|
||||
145: Label
|
||||
Store 147(t) 148
|
||||
149: 8(float) Load 147(t)
|
||||
RayQueryGenerateIntersectionKHR 47(rayQuery) 149
|
||||
150: 45 Load 47(rayQuery)
|
||||
RayQueryTerminateKHR 150
|
||||
Branch 76
|
||||
76: Label
|
||||
Branch 64
|
||||
64: Label
|
||||
Branch 61
|
||||
63: Label
|
||||
153: 35(ptr) AccessChain 85(_mat3x4) 19 20
|
||||
154: 8(float) Load 153
|
||||
155: 35(ptr) AccessChain 80(_mat4x3) 19 20
|
||||
156: 8(float) Load 155
|
||||
157: 67(bool) FOrdEqual 154 156
|
||||
SelectionMerge 159 None
|
||||
BranchConditional 157 158 159
|
||||
158: Label
|
||||
160: 2 FunctionCall 6(doSomething()
|
||||
Branch 159
|
||||
159: Label
|
||||
162: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
|
||||
Store 161(committedStatus) 162
|
||||
163: 14(int) Load 161(committedStatus)
|
||||
SelectionMerge 167 None
|
||||
Switch 163 167
|
||||
case 0: 164
|
||||
case 1: 165
|
||||
case 2: 166
|
||||
164: Label
|
||||
168: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 168
|
||||
169: 78 Load 80(_mat4x3)
|
||||
170: 83 Transpose 169
|
||||
Store 85(_mat3x4) 170
|
||||
Branch 167
|
||||
165: Label
|
||||
172: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
|
||||
Store 80(_mat4x3) 172
|
||||
173: 78 Load 80(_mat4x3)
|
||||
174: 83 Transpose 173
|
||||
Store 85(_mat3x4) 174
|
||||
175: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
|
||||
SelectionMerge 177 None
|
||||
BranchConditional 175 176 177
|
||||
176: Label
|
||||
178: 2 FunctionCall 6(doSomething()
|
||||
Branch 177
|
||||
177: Label
|
||||
179: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
|
||||
181: 8(float) CompositeExtract 179 1
|
||||
182: 67(bool) FOrdEqual 181 27
|
||||
SelectionMerge 184 None
|
||||
BranchConditional 182 183 184
|
||||
183: Label
|
||||
185: 2 FunctionCall 6(doSomething()
|
||||
Branch 184
|
||||
184: Label
|
||||
Branch 167
|
||||
166: Label
|
||||
187: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
|
||||
188: 67(bool) SGreaterThan 187 19
|
||||
SelectionMerge 190 None
|
||||
BranchConditional 188 189 190
|
||||
189: Label
|
||||
191: 2 FunctionCall 6(doSomething()
|
||||
Branch 190
|
||||
190: Label
|
||||
192: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
|
||||
193: 67(bool) SGreaterThan 192 19
|
||||
SelectionMerge 195 None
|
||||
BranchConditional 193 194 195
|
||||
194: Label
|
||||
196: 2 FunctionCall 6(doSomething()
|
||||
Branch 195
|
||||
195: Label
|
||||
197: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
|
||||
198: 67(bool) SGreaterThan 197 19
|
||||
SelectionMerge 200 None
|
||||
BranchConditional 198 199 200
|
||||
199: Label
|
||||
201: 2 FunctionCall 6(doSomething()
|
||||
Branch 200
|
||||
200: Label
|
||||
202: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
|
||||
204: 8(float) CompositeExtract 202 2
|
||||
205: 67(bool) FOrdGreaterThan 204 27
|
||||
SelectionMerge 207 None
|
||||
BranchConditional 205 206 207
|
||||
206: Label
|
||||
208: 2 FunctionCall 6(doSomething()
|
||||
Branch 207
|
||||
207: Label
|
||||
209: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
|
||||
210: 8(float) CompositeExtract 209 0
|
||||
211: 67(bool) FOrdGreaterThan 210 27
|
||||
SelectionMerge 213 None
|
||||
BranchConditional 211 212 213
|
||||
212: Label
|
||||
214: 2 FunctionCall 6(doSomething()
|
||||
Branch 213
|
||||
213: Label
|
||||
215: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
|
||||
216: 67(bool) SGreaterThan 215 19
|
||||
SelectionMerge 218 None
|
||||
BranchConditional 216 217 218
|
||||
217: Label
|
||||
219: 2 FunctionCall 6(doSomething()
|
||||
Branch 218
|
||||
218: Label
|
||||
220: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
|
||||
221: 67(bool) FOrdGreaterThan 220 27
|
||||
SelectionMerge 223 None
|
||||
BranchConditional 221 222 223
|
||||
222: Label
|
||||
224: 2 FunctionCall 6(doSomething()
|
||||
Branch 223
|
||||
223: Label
|
||||
Branch 167
|
||||
167: Label
|
||||
227: 35(ptr) AccessChain 85(_mat3x4) 19 20
|
||||
228: 8(float) Load 227
|
||||
229: 35(ptr) AccessChain 80(_mat4x3) 19 20
|
||||
230: 8(float) Load 229
|
||||
231: 67(bool) FOrdEqual 228 230
|
||||
SelectionMerge 233 None
|
||||
BranchConditional 231 232 233
|
||||
232: Label
|
||||
234: 2 FunctionCall 6(doSomething()
|
||||
Branch 233
|
||||
233: Label
|
||||
235: 45 Load 47(rayQuery)
|
||||
236: 14(int) RayQueryGetRayFlagsKHR 235
|
||||
237: 67(bool) UGreaterThan 236 20
|
||||
SelectionMerge 239 None
|
||||
BranchConditional 237 238 239
|
||||
238: Label
|
||||
240: 2 FunctionCall 6(doSomething()
|
||||
Branch 239
|
||||
239: Label
|
||||
241: 45 Load 47(rayQuery)
|
||||
242: 8(float) RayQueryGetRayTMinKHR 241
|
||||
243: 67(bool) FOrdGreaterThan 242 27
|
||||
SelectionMerge 245 None
|
||||
BranchConditional 243 244 245
|
||||
244: Label
|
||||
246: 2 FunctionCall 6(doSomething()
|
||||
Branch 245
|
||||
245: Label
|
||||
248: 45 Load 47(rayQuery)
|
||||
249: 9(fvec3) RayQueryGetWorldRayOriginKHR 248
|
||||
Store 247(o) 249
|
||||
251: 45 Load 47(rayQuery)
|
||||
252: 9(fvec3) RayQueryGetWorldRayDirectionKHR 251
|
||||
Store 250(d) 252
|
||||
253: 35(ptr) AccessChain 247(o) 20
|
||||
254: 8(float) Load 253
|
||||
255: 35(ptr) AccessChain 250(d) 203
|
||||
256: 8(float) Load 255
|
||||
257: 67(bool) FOrdEqual 254 256
|
||||
SelectionMerge 259 None
|
||||
BranchConditional 257 258 259
|
||||
258: Label
|
||||
260: 2 FunctionCall 6(doSomething()
|
||||
Branch 259
|
||||
259: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
6(doSomething(): 2 Function None 3
|
||||
7: Label
|
||||
22: 21(ptr) AccessChain 17 19
|
||||
Store 22 20
|
||||
24: 21(ptr) AccessChain 17 23
|
||||
Store 24 20
|
||||
Return
|
||||
FunctionEnd
|
||||
12(makeRayDesc(): 10(Ray) Function None 11
|
||||
13: Label
|
||||
26(ray): 25(ptr) Variable Function
|
||||
30: 29(ptr) AccessChain 26(ray) 19
|
||||
Store 30 28
|
||||
34: 29(ptr) AccessChain 26(ray) 31
|
||||
Store 34 33
|
||||
36: 35(ptr) AccessChain 26(ray) 23
|
||||
Store 36 27
|
||||
39: 35(ptr) AccessChain 26(ray) 37
|
||||
Store 39 38
|
||||
40: 10(Ray) Load 26(ray)
|
||||
ReturnValue 40
|
||||
FunctionEnd
|
440
Test/baseResults/rayQuery-allOps.frag.out
Normal file
440
Test/baseResults/rayQuery-allOps.frag.out
Normal file
@ -0,0 +1,440 @@
|
||||
rayQuery-allOps.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 266
|
||||
|
||||
Capability Shader
|
||||
Capability RayQueryProvisionalKHR
|
||||
Extension "SPV_KHR_ray_query"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 6 "doSomething("
|
||||
Name 10 "Ray"
|
||||
MemberName 10(Ray) 0 "pos"
|
||||
MemberName 10(Ray) 1 "tmin"
|
||||
MemberName 10(Ray) 2 "dir"
|
||||
MemberName 10(Ray) 3 "tmax"
|
||||
Name 12 "makeRayDesc("
|
||||
Name 15 "Log"
|
||||
MemberName 15(Log) 0 "x"
|
||||
MemberName 15(Log) 1 "y"
|
||||
Name 17 ""
|
||||
Name 26 "ray"
|
||||
Name 43 "ray"
|
||||
Name 47 "rayQuery"
|
||||
Name 50 "rtas"
|
||||
Name 70 "candidateType"
|
||||
Name 80 "_mat4x3"
|
||||
Name 85 "_mat3x4"
|
||||
Name 147 "t"
|
||||
Name 161 "committedStatus"
|
||||
Name 247 "o"
|
||||
Name 250 "d"
|
||||
Name 261 "Ray"
|
||||
MemberName 261(Ray) 0 "pos"
|
||||
MemberName 261(Ray) 1 "tmin"
|
||||
MemberName 261(Ray) 2 "dir"
|
||||
MemberName 261(Ray) 3 "tmax"
|
||||
Name 263 "Rays"
|
||||
MemberName 263(Rays) 0 "rays"
|
||||
Name 265 ""
|
||||
MemberDecorate 15(Log) 0 Offset 0
|
||||
MemberDecorate 15(Log) 1 Offset 4
|
||||
Decorate 15(Log) BufferBlock
|
||||
Decorate 17 DescriptorSet 0
|
||||
Decorate 17 Binding 0
|
||||
Decorate 50(rtas) DescriptorSet 0
|
||||
Decorate 50(rtas) Binding 1
|
||||
MemberDecorate 261(Ray) 0 Offset 0
|
||||
MemberDecorate 261(Ray) 1 Offset 12
|
||||
MemberDecorate 261(Ray) 2 Offset 16
|
||||
MemberDecorate 261(Ray) 3 Offset 28
|
||||
Decorate 262 ArrayStride 32
|
||||
MemberDecorate 263(Rays) 0 Offset 0
|
||||
Decorate 263(Rays) BufferBlock
|
||||
Decorate 265 DescriptorSet 0
|
||||
Decorate 265 Binding 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
9: TypeVector 8(float) 3
|
||||
10(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
|
||||
11: TypeFunction 10(Ray)
|
||||
14: TypeInt 32 0
|
||||
15(Log): TypeStruct 14(int) 14(int)
|
||||
16: TypePointer Uniform 15(Log)
|
||||
17: 16(ptr) Variable Uniform
|
||||
18: TypeInt 32 1
|
||||
19: 18(int) Constant 0
|
||||
20: 14(int) Constant 0
|
||||
21: TypePointer Uniform 14(int)
|
||||
23: 18(int) Constant 1
|
||||
25: TypePointer Function 10(Ray)
|
||||
27: 8(float) Constant 0
|
||||
28: 9(fvec3) ConstantComposite 27 27 27
|
||||
29: TypePointer Function 9(fvec3)
|
||||
31: 18(int) Constant 2
|
||||
32: 8(float) Constant 1065353216
|
||||
33: 9(fvec3) ConstantComposite 32 27 27
|
||||
35: TypePointer Function 8(float)
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
46: TypePointer Function 45
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
52: 14(int) Constant 255
|
||||
67: TypeBool
|
||||
69: TypePointer Function 14(int)
|
||||
71: 67(bool) ConstantFalse
|
||||
78: TypeMatrix 9(fvec3) 4
|
||||
79: TypePointer Function 78
|
||||
82: TypeVector 8(float) 4
|
||||
83: TypeMatrix 82(fvec4) 3
|
||||
84: TypePointer Function 83
|
||||
89: 67(bool) ConstantTrue
|
||||
94: TypeVector 8(float) 2
|
||||
148: 8(float) Constant 1056964608
|
||||
180: 14(int) Constant 1
|
||||
203: 14(int) Constant 2
|
||||
261(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
|
||||
262: TypeRuntimeArray 261(Ray)
|
||||
263(Rays): TypeStruct 262
|
||||
264: TypePointer Uniform 263(Rays)
|
||||
265: 264(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
43(ray): 25(ptr) Variable Function
|
||||
47(rayQuery): 46(ptr) Variable Function
|
||||
70(candidateType): 69(ptr) Variable Function
|
||||
80(_mat4x3): 79(ptr) Variable Function
|
||||
85(_mat3x4): 84(ptr) Variable Function
|
||||
147(t): 35(ptr) Variable Function
|
||||
161(committedStatus): 69(ptr) Variable Function
|
||||
247(o): 29(ptr) Variable Function
|
||||
250(d): 29(ptr) Variable Function
|
||||
44: 10(Ray) FunctionCall 12(makeRayDesc()
|
||||
Store 43(ray) 44
|
||||
51: 48 Load 50(rtas)
|
||||
53: 29(ptr) AccessChain 43(ray) 19
|
||||
54: 9(fvec3) Load 53
|
||||
55: 35(ptr) AccessChain 43(ray) 23
|
||||
56: 8(float) Load 55
|
||||
57: 29(ptr) AccessChain 43(ray) 31
|
||||
58: 9(fvec3) Load 57
|
||||
59: 35(ptr) AccessChain 43(ray) 37
|
||||
60: 8(float) Load 59
|
||||
RayQueryInitializeKHR 47(rayQuery) 51 20 52 54 56 58 60
|
||||
Branch 61
|
||||
61: Label
|
||||
LoopMerge 63 64 None
|
||||
Branch 65
|
||||
65: Label
|
||||
66: 45 Load 47(rayQuery)
|
||||
68: 67(bool) RayQueryProceedKHR 66
|
||||
BranchConditional 68 62 63
|
||||
62: Label
|
||||
72: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
|
||||
Store 70(candidateType) 72
|
||||
73: 14(int) Load 70(candidateType)
|
||||
SelectionMerge 76 None
|
||||
Switch 73 76
|
||||
case 0: 74
|
||||
case 1: 75
|
||||
74: Label
|
||||
77: 45 Load 47(rayQuery)
|
||||
RayQueryTerminateKHR 77
|
||||
81: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 81
|
||||
86: 78 Load 80(_mat4x3)
|
||||
87: 83 Transpose 86
|
||||
Store 85(_mat3x4) 87
|
||||
88: 45 Load 47(rayQuery)
|
||||
RayQueryConfirmIntersectionKHR 88
|
||||
90: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
|
||||
SelectionMerge 92 None
|
||||
BranchConditional 90 91 92
|
||||
91: Label
|
||||
93: 2 FunctionCall 6(doSomething()
|
||||
Branch 92
|
||||
92: Label
|
||||
95: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
|
||||
96: 8(float) CompositeExtract 95 0
|
||||
97: 67(bool) FOrdEqual 96 27
|
||||
SelectionMerge 99 None
|
||||
BranchConditional 97 98 99
|
||||
98: Label
|
||||
100: 2 FunctionCall 6(doSomething()
|
||||
Branch 99
|
||||
99: Label
|
||||
101: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
|
||||
102: 67(bool) SGreaterThan 101 19
|
||||
SelectionMerge 104 None
|
||||
BranchConditional 102 103 104
|
||||
103: Label
|
||||
105: 2 FunctionCall 6(doSomething()
|
||||
Branch 104
|
||||
104: Label
|
||||
106: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
|
||||
107: 67(bool) SGreaterThan 106 19
|
||||
SelectionMerge 109 None
|
||||
BranchConditional 107 108 109
|
||||
108: Label
|
||||
110: 2 FunctionCall 6(doSomething()
|
||||
Branch 109
|
||||
109: Label
|
||||
111: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
|
||||
112: 8(float) CompositeExtract 111 0
|
||||
113: 67(bool) FOrdGreaterThan 112 27
|
||||
SelectionMerge 115 None
|
||||
BranchConditional 113 114 115
|
||||
114: Label
|
||||
116: 2 FunctionCall 6(doSomething()
|
||||
Branch 115
|
||||
115: Label
|
||||
117: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
|
||||
118: 8(float) CompositeExtract 117 0
|
||||
119: 67(bool) FOrdGreaterThan 118 27
|
||||
SelectionMerge 121 None
|
||||
BranchConditional 119 120 121
|
||||
120: Label
|
||||
122: 2 FunctionCall 6(doSomething()
|
||||
Branch 121
|
||||
121: Label
|
||||
123: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
|
||||
124: 67(bool) SGreaterThan 123 19
|
||||
SelectionMerge 126 None
|
||||
BranchConditional 124 125 126
|
||||
125: Label
|
||||
127: 2 FunctionCall 6(doSomething()
|
||||
Branch 126
|
||||
126: Label
|
||||
128: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
|
||||
129: 67(bool) FOrdGreaterThan 128 27
|
||||
SelectionMerge 131 None
|
||||
BranchConditional 129 130 131
|
||||
130: Label
|
||||
132: 2 FunctionCall 6(doSomething()
|
||||
Branch 131
|
||||
131: Label
|
||||
133: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
||||
134: 67(bool) UGreaterThan 133 20
|
||||
SelectionMerge 136 None
|
||||
BranchConditional 134 135 136
|
||||
135: Label
|
||||
137: 2 FunctionCall 6(doSomething()
|
||||
Branch 136
|
||||
136: Label
|
||||
Branch 76
|
||||
75: Label
|
||||
139: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 139
|
||||
140: 78 Load 80(_mat4x3)
|
||||
141: 83 Transpose 140
|
||||
Store 85(_mat3x4) 141
|
||||
142: 45 Load 47(rayQuery)
|
||||
143: 67(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 142
|
||||
SelectionMerge 145 None
|
||||
BranchConditional 143 144 145
|
||||
144: Label
|
||||
146: 2 FunctionCall 6(doSomething()
|
||||
Branch 145
|
||||
145: Label
|
||||
Store 147(t) 148
|
||||
149: 8(float) Load 147(t)
|
||||
RayQueryGenerateIntersectionKHR 47(rayQuery) 149
|
||||
150: 45 Load 47(rayQuery)
|
||||
RayQueryTerminateKHR 150
|
||||
Branch 76
|
||||
76: Label
|
||||
Branch 64
|
||||
64: Label
|
||||
Branch 61
|
||||
63: Label
|
||||
153: 35(ptr) AccessChain 85(_mat3x4) 19 20
|
||||
154: 8(float) Load 153
|
||||
155: 35(ptr) AccessChain 80(_mat4x3) 19 20
|
||||
156: 8(float) Load 155
|
||||
157: 67(bool) FOrdEqual 154 156
|
||||
SelectionMerge 159 None
|
||||
BranchConditional 157 158 159
|
||||
158: Label
|
||||
160: 2 FunctionCall 6(doSomething()
|
||||
Branch 159
|
||||
159: Label
|
||||
162: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
|
||||
Store 161(committedStatus) 162
|
||||
163: 14(int) Load 161(committedStatus)
|
||||
SelectionMerge 167 None
|
||||
Switch 163 167
|
||||
case 0: 164
|
||||
case 1: 165
|
||||
case 2: 166
|
||||
164: Label
|
||||
168: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 168
|
||||
169: 78 Load 80(_mat4x3)
|
||||
170: 83 Transpose 169
|
||||
Store 85(_mat3x4) 170
|
||||
Branch 167
|
||||
165: Label
|
||||
172: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
|
||||
Store 80(_mat4x3) 172
|
||||
173: 78 Load 80(_mat4x3)
|
||||
174: 83 Transpose 173
|
||||
Store 85(_mat3x4) 174
|
||||
175: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
|
||||
SelectionMerge 177 None
|
||||
BranchConditional 175 176 177
|
||||
176: Label
|
||||
178: 2 FunctionCall 6(doSomething()
|
||||
Branch 177
|
||||
177: Label
|
||||
179: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
|
||||
181: 8(float) CompositeExtract 179 1
|
||||
182: 67(bool) FOrdEqual 181 27
|
||||
SelectionMerge 184 None
|
||||
BranchConditional 182 183 184
|
||||
183: Label
|
||||
185: 2 FunctionCall 6(doSomething()
|
||||
Branch 184
|
||||
184: Label
|
||||
Branch 167
|
||||
166: Label
|
||||
187: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
|
||||
188: 67(bool) SGreaterThan 187 19
|
||||
SelectionMerge 190 None
|
||||
BranchConditional 188 189 190
|
||||
189: Label
|
||||
191: 2 FunctionCall 6(doSomething()
|
||||
Branch 190
|
||||
190: Label
|
||||
192: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
|
||||
193: 67(bool) SGreaterThan 192 19
|
||||
SelectionMerge 195 None
|
||||
BranchConditional 193 194 195
|
||||
194: Label
|
||||
196: 2 FunctionCall 6(doSomething()
|
||||
Branch 195
|
||||
195: Label
|
||||
197: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
|
||||
198: 67(bool) SGreaterThan 197 19
|
||||
SelectionMerge 200 None
|
||||
BranchConditional 198 199 200
|
||||
199: Label
|
||||
201: 2 FunctionCall 6(doSomething()
|
||||
Branch 200
|
||||
200: Label
|
||||
202: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
|
||||
204: 8(float) CompositeExtract 202 2
|
||||
205: 67(bool) FOrdGreaterThan 204 27
|
||||
SelectionMerge 207 None
|
||||
BranchConditional 205 206 207
|
||||
206: Label
|
||||
208: 2 FunctionCall 6(doSomething()
|
||||
Branch 207
|
||||
207: Label
|
||||
209: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
|
||||
210: 8(float) CompositeExtract 209 0
|
||||
211: 67(bool) FOrdGreaterThan 210 27
|
||||
SelectionMerge 213 None
|
||||
BranchConditional 211 212 213
|
||||
212: Label
|
||||
214: 2 FunctionCall 6(doSomething()
|
||||
Branch 213
|
||||
213: Label
|
||||
215: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
|
||||
216: 67(bool) SGreaterThan 215 19
|
||||
SelectionMerge 218 None
|
||||
BranchConditional 216 217 218
|
||||
217: Label
|
||||
219: 2 FunctionCall 6(doSomething()
|
||||
Branch 218
|
||||
218: Label
|
||||
220: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
|
||||
221: 67(bool) FOrdGreaterThan 220 27
|
||||
SelectionMerge 223 None
|
||||
BranchConditional 221 222 223
|
||||
222: Label
|
||||
224: 2 FunctionCall 6(doSomething()
|
||||
Branch 223
|
||||
223: Label
|
||||
Branch 167
|
||||
167: Label
|
||||
227: 35(ptr) AccessChain 85(_mat3x4) 19 20
|
||||
228: 8(float) Load 227
|
||||
229: 35(ptr) AccessChain 80(_mat4x3) 19 20
|
||||
230: 8(float) Load 229
|
||||
231: 67(bool) FOrdEqual 228 230
|
||||
SelectionMerge 233 None
|
||||
BranchConditional 231 232 233
|
||||
232: Label
|
||||
234: 2 FunctionCall 6(doSomething()
|
||||
Branch 233
|
||||
233: Label
|
||||
235: 45 Load 47(rayQuery)
|
||||
236: 14(int) RayQueryGetRayFlagsKHR 235
|
||||
237: 67(bool) UGreaterThan 236 20
|
||||
SelectionMerge 239 None
|
||||
BranchConditional 237 238 239
|
||||
238: Label
|
||||
240: 2 FunctionCall 6(doSomething()
|
||||
Branch 239
|
||||
239: Label
|
||||
241: 45 Load 47(rayQuery)
|
||||
242: 8(float) RayQueryGetRayTMinKHR 241
|
||||
243: 67(bool) FOrdGreaterThan 242 27
|
||||
SelectionMerge 245 None
|
||||
BranchConditional 243 244 245
|
||||
244: Label
|
||||
246: 2 FunctionCall 6(doSomething()
|
||||
Branch 245
|
||||
245: Label
|
||||
248: 45 Load 47(rayQuery)
|
||||
249: 9(fvec3) RayQueryGetWorldRayOriginKHR 248
|
||||
Store 247(o) 249
|
||||
251: 45 Load 47(rayQuery)
|
||||
252: 9(fvec3) RayQueryGetWorldRayDirectionKHR 251
|
||||
Store 250(d) 252
|
||||
253: 35(ptr) AccessChain 247(o) 20
|
||||
254: 8(float) Load 253
|
||||
255: 35(ptr) AccessChain 250(d) 203
|
||||
256: 8(float) Load 255
|
||||
257: 67(bool) FOrdEqual 254 256
|
||||
SelectionMerge 259 None
|
||||
BranchConditional 257 258 259
|
||||
258: Label
|
||||
260: 2 FunctionCall 6(doSomething()
|
||||
Branch 259
|
||||
259: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
6(doSomething(): 2 Function None 3
|
||||
7: Label
|
||||
22: 21(ptr) AccessChain 17 19
|
||||
Store 22 20
|
||||
24: 21(ptr) AccessChain 17 23
|
||||
Store 24 20
|
||||
Return
|
||||
FunctionEnd
|
||||
12(makeRayDesc(): 10(Ray) Function None 11
|
||||
13: Label
|
||||
26(ray): 25(ptr) Variable Function
|
||||
30: 29(ptr) AccessChain 26(ray) 19
|
||||
Store 30 28
|
||||
34: 29(ptr) AccessChain 26(ray) 31
|
||||
Store 34 33
|
||||
36: 35(ptr) AccessChain 26(ray) 23
|
||||
Store 36 27
|
||||
39: 35(ptr) AccessChain 26(ray) 37
|
||||
Store 39 38
|
||||
40: 10(Ray) Load 26(ray)
|
||||
ReturnValue 40
|
||||
FunctionEnd
|
440
Test/baseResults/rayQuery-allOps.rgen.out
Normal file
440
Test/baseResults/rayQuery-allOps.rgen.out
Normal file
@ -0,0 +1,440 @@
|
||||
rayQuery-allOps.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 266
|
||||
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main"
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 6 "doSomething("
|
||||
Name 10 "Ray"
|
||||
MemberName 10(Ray) 0 "pos"
|
||||
MemberName 10(Ray) 1 "tmin"
|
||||
MemberName 10(Ray) 2 "dir"
|
||||
MemberName 10(Ray) 3 "tmax"
|
||||
Name 12 "makeRayDesc("
|
||||
Name 15 "Log"
|
||||
MemberName 15(Log) 0 "x"
|
||||
MemberName 15(Log) 1 "y"
|
||||
Name 17 ""
|
||||
Name 26 "ray"
|
||||
Name 43 "ray"
|
||||
Name 47 "rayQuery"
|
||||
Name 50 "rtas"
|
||||
Name 70 "candidateType"
|
||||
Name 80 "_mat4x3"
|
||||
Name 85 "_mat3x4"
|
||||
Name 147 "t"
|
||||
Name 161 "committedStatus"
|
||||
Name 247 "o"
|
||||
Name 250 "d"
|
||||
Name 261 "Ray"
|
||||
MemberName 261(Ray) 0 "pos"
|
||||
MemberName 261(Ray) 1 "tmin"
|
||||
MemberName 261(Ray) 2 "dir"
|
||||
MemberName 261(Ray) 3 "tmax"
|
||||
Name 263 "Rays"
|
||||
MemberName 263(Rays) 0 "rays"
|
||||
Name 265 ""
|
||||
MemberDecorate 15(Log) 0 Offset 0
|
||||
MemberDecorate 15(Log) 1 Offset 4
|
||||
Decorate 15(Log) BufferBlock
|
||||
Decorate 17 DescriptorSet 0
|
||||
Decorate 17 Binding 0
|
||||
Decorate 50(rtas) DescriptorSet 0
|
||||
Decorate 50(rtas) Binding 1
|
||||
MemberDecorate 261(Ray) 0 Offset 0
|
||||
MemberDecorate 261(Ray) 1 Offset 12
|
||||
MemberDecorate 261(Ray) 2 Offset 16
|
||||
MemberDecorate 261(Ray) 3 Offset 28
|
||||
Decorate 262 ArrayStride 32
|
||||
MemberDecorate 263(Rays) 0 Offset 0
|
||||
Decorate 263(Rays) BufferBlock
|
||||
Decorate 265 DescriptorSet 0
|
||||
Decorate 265 Binding 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
9: TypeVector 8(float) 3
|
||||
10(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
|
||||
11: TypeFunction 10(Ray)
|
||||
14: TypeInt 32 0
|
||||
15(Log): TypeStruct 14(int) 14(int)
|
||||
16: TypePointer Uniform 15(Log)
|
||||
17: 16(ptr) Variable Uniform
|
||||
18: TypeInt 32 1
|
||||
19: 18(int) Constant 0
|
||||
20: 14(int) Constant 0
|
||||
21: TypePointer Uniform 14(int)
|
||||
23: 18(int) Constant 1
|
||||
25: TypePointer Function 10(Ray)
|
||||
27: 8(float) Constant 0
|
||||
28: 9(fvec3) ConstantComposite 27 27 27
|
||||
29: TypePointer Function 9(fvec3)
|
||||
31: 18(int) Constant 2
|
||||
32: 8(float) Constant 1065353216
|
||||
33: 9(fvec3) ConstantComposite 32 27 27
|
||||
35: TypePointer Function 8(float)
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
46: TypePointer Function 45
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
52: 14(int) Constant 255
|
||||
67: TypeBool
|
||||
69: TypePointer Function 14(int)
|
||||
71: 67(bool) ConstantFalse
|
||||
78: TypeMatrix 9(fvec3) 4
|
||||
79: TypePointer Function 78
|
||||
82: TypeVector 8(float) 4
|
||||
83: TypeMatrix 82(fvec4) 3
|
||||
84: TypePointer Function 83
|
||||
89: 67(bool) ConstantTrue
|
||||
94: TypeVector 8(float) 2
|
||||
148: 8(float) Constant 1056964608
|
||||
180: 14(int) Constant 1
|
||||
203: 14(int) Constant 2
|
||||
261(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float)
|
||||
262: TypeRuntimeArray 261(Ray)
|
||||
263(Rays): TypeStruct 262
|
||||
264: TypePointer Uniform 263(Rays)
|
||||
265: 264(ptr) Variable Uniform
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
43(ray): 25(ptr) Variable Function
|
||||
47(rayQuery): 46(ptr) Variable Function
|
||||
70(candidateType): 69(ptr) Variable Function
|
||||
80(_mat4x3): 79(ptr) Variable Function
|
||||
85(_mat3x4): 84(ptr) Variable Function
|
||||
147(t): 35(ptr) Variable Function
|
||||
161(committedStatus): 69(ptr) Variable Function
|
||||
247(o): 29(ptr) Variable Function
|
||||
250(d): 29(ptr) Variable Function
|
||||
44: 10(Ray) FunctionCall 12(makeRayDesc()
|
||||
Store 43(ray) 44
|
||||
51: 48 Load 50(rtas)
|
||||
53: 29(ptr) AccessChain 43(ray) 19
|
||||
54: 9(fvec3) Load 53
|
||||
55: 35(ptr) AccessChain 43(ray) 23
|
||||
56: 8(float) Load 55
|
||||
57: 29(ptr) AccessChain 43(ray) 31
|
||||
58: 9(fvec3) Load 57
|
||||
59: 35(ptr) AccessChain 43(ray) 37
|
||||
60: 8(float) Load 59
|
||||
RayQueryInitializeKHR 47(rayQuery) 51 20 52 54 56 58 60
|
||||
Branch 61
|
||||
61: Label
|
||||
LoopMerge 63 64 None
|
||||
Branch 65
|
||||
65: Label
|
||||
66: 45 Load 47(rayQuery)
|
||||
68: 67(bool) RayQueryProceedKHR 66
|
||||
BranchConditional 68 62 63
|
||||
62: Label
|
||||
72: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 19
|
||||
Store 70(candidateType) 72
|
||||
73: 14(int) Load 70(candidateType)
|
||||
SelectionMerge 76 None
|
||||
Switch 73 76
|
||||
case 0: 74
|
||||
case 1: 75
|
||||
74: Label
|
||||
77: 45 Load 47(rayQuery)
|
||||
RayQueryTerminateKHR 77
|
||||
81: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 81
|
||||
86: 78 Load 80(_mat4x3)
|
||||
87: 83 Transpose 86
|
||||
Store 85(_mat3x4) 87
|
||||
88: 45 Load 47(rayQuery)
|
||||
RayQueryConfirmIntersectionKHR 88
|
||||
90: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
|
||||
SelectionMerge 92 None
|
||||
BranchConditional 90 91 92
|
||||
91: Label
|
||||
93: 2 FunctionCall 6(doSomething()
|
||||
Branch 92
|
||||
92: Label
|
||||
95: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
|
||||
96: 8(float) CompositeExtract 95 0
|
||||
97: 67(bool) FOrdEqual 96 27
|
||||
SelectionMerge 99 None
|
||||
BranchConditional 97 98 99
|
||||
98: Label
|
||||
100: 2 FunctionCall 6(doSomething()
|
||||
Branch 99
|
||||
99: Label
|
||||
101: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
|
||||
102: 67(bool) SGreaterThan 101 19
|
||||
SelectionMerge 104 None
|
||||
BranchConditional 102 103 104
|
||||
103: Label
|
||||
105: 2 FunctionCall 6(doSomething()
|
||||
Branch 104
|
||||
104: Label
|
||||
106: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
|
||||
107: 67(bool) SGreaterThan 106 19
|
||||
SelectionMerge 109 None
|
||||
BranchConditional 107 108 109
|
||||
108: Label
|
||||
110: 2 FunctionCall 6(doSomething()
|
||||
Branch 109
|
||||
109: Label
|
||||
111: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
|
||||
112: 8(float) CompositeExtract 111 0
|
||||
113: 67(bool) FOrdGreaterThan 112 27
|
||||
SelectionMerge 115 None
|
||||
BranchConditional 113 114 115
|
||||
114: Label
|
||||
116: 2 FunctionCall 6(doSomething()
|
||||
Branch 115
|
||||
115: Label
|
||||
117: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
|
||||
118: 8(float) CompositeExtract 117 0
|
||||
119: 67(bool) FOrdGreaterThan 118 27
|
||||
SelectionMerge 121 None
|
||||
BranchConditional 119 120 121
|
||||
120: Label
|
||||
122: 2 FunctionCall 6(doSomething()
|
||||
Branch 121
|
||||
121: Label
|
||||
123: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
|
||||
124: 67(bool) SGreaterThan 123 19
|
||||
SelectionMerge 126 None
|
||||
BranchConditional 124 125 126
|
||||
125: Label
|
||||
127: 2 FunctionCall 6(doSomething()
|
||||
Branch 126
|
||||
126: Label
|
||||
128: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
|
||||
129: 67(bool) FOrdGreaterThan 128 27
|
||||
SelectionMerge 131 None
|
||||
BranchConditional 129 130 131
|
||||
130: Label
|
||||
132: 2 FunctionCall 6(doSomething()
|
||||
Branch 131
|
||||
131: Label
|
||||
133: 18(int) RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 47(rayQuery) 23
|
||||
134: 67(bool) UGreaterThan 133 20
|
||||
SelectionMerge 136 None
|
||||
BranchConditional 134 135 136
|
||||
135: Label
|
||||
137: 2 FunctionCall 6(doSomething()
|
||||
Branch 136
|
||||
136: Label
|
||||
Branch 76
|
||||
75: Label
|
||||
139: 78 RayQueryGetIntersectionObjectToWorldKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 139
|
||||
140: 78 Load 80(_mat4x3)
|
||||
141: 83 Transpose 140
|
||||
Store 85(_mat3x4) 141
|
||||
142: 45 Load 47(rayQuery)
|
||||
143: 67(bool) RayQueryGetIntersectionCandidateAABBOpaqueKHR 142
|
||||
SelectionMerge 145 None
|
||||
BranchConditional 143 144 145
|
||||
144: Label
|
||||
146: 2 FunctionCall 6(doSomething()
|
||||
Branch 145
|
||||
145: Label
|
||||
Store 147(t) 148
|
||||
149: 8(float) Load 147(t)
|
||||
RayQueryGenerateIntersectionKHR 47(rayQuery) 149
|
||||
150: 45 Load 47(rayQuery)
|
||||
RayQueryTerminateKHR 150
|
||||
Branch 76
|
||||
76: Label
|
||||
Branch 64
|
||||
64: Label
|
||||
Branch 61
|
||||
63: Label
|
||||
153: 35(ptr) AccessChain 85(_mat3x4) 19 20
|
||||
154: 8(float) Load 153
|
||||
155: 35(ptr) AccessChain 80(_mat4x3) 19 20
|
||||
156: 8(float) Load 155
|
||||
157: 67(bool) FOrdEqual 154 156
|
||||
SelectionMerge 159 None
|
||||
BranchConditional 157 158 159
|
||||
158: Label
|
||||
160: 2 FunctionCall 6(doSomething()
|
||||
Branch 159
|
||||
159: Label
|
||||
162: 14(int) RayQueryGetIntersectionTypeKHR 47(rayQuery) 23
|
||||
Store 161(committedStatus) 162
|
||||
163: 14(int) Load 161(committedStatus)
|
||||
SelectionMerge 167 None
|
||||
Switch 163 167
|
||||
case 0: 164
|
||||
case 1: 165
|
||||
case 2: 166
|
||||
164: Label
|
||||
168: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 19
|
||||
Store 80(_mat4x3) 168
|
||||
169: 78 Load 80(_mat4x3)
|
||||
170: 83 Transpose 169
|
||||
Store 85(_mat3x4) 170
|
||||
Branch 167
|
||||
165: Label
|
||||
172: 78 RayQueryGetIntersectionWorldToObjectKHR 47(rayQuery) 23
|
||||
Store 80(_mat4x3) 172
|
||||
173: 78 Load 80(_mat4x3)
|
||||
174: 83 Transpose 173
|
||||
Store 85(_mat3x4) 174
|
||||
175: 67(bool) RayQueryGetIntersectionFrontFaceKHR 47(rayQuery) 23
|
||||
SelectionMerge 177 None
|
||||
BranchConditional 175 176 177
|
||||
176: Label
|
||||
178: 2 FunctionCall 6(doSomething()
|
||||
Branch 177
|
||||
177: Label
|
||||
179: 94(fvec2) RayQueryGetIntersectionBarycentricsKHR 47(rayQuery) 23
|
||||
181: 8(float) CompositeExtract 179 1
|
||||
182: 67(bool) FOrdEqual 181 27
|
||||
SelectionMerge 184 None
|
||||
BranchConditional 182 183 184
|
||||
183: Label
|
||||
185: 2 FunctionCall 6(doSomething()
|
||||
Branch 184
|
||||
184: Label
|
||||
Branch 167
|
||||
166: Label
|
||||
187: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23
|
||||
188: 67(bool) SGreaterThan 187 19
|
||||
SelectionMerge 190 None
|
||||
BranchConditional 188 189 190
|
||||
189: Label
|
||||
191: 2 FunctionCall 6(doSomething()
|
||||
Branch 190
|
||||
190: Label
|
||||
192: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23
|
||||
193: 67(bool) SGreaterThan 192 19
|
||||
SelectionMerge 195 None
|
||||
BranchConditional 193 194 195
|
||||
194: Label
|
||||
196: 2 FunctionCall 6(doSomething()
|
||||
Branch 195
|
||||
195: Label
|
||||
197: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23
|
||||
198: 67(bool) SGreaterThan 197 19
|
||||
SelectionMerge 200 None
|
||||
BranchConditional 198 199 200
|
||||
199: Label
|
||||
201: 2 FunctionCall 6(doSomething()
|
||||
Branch 200
|
||||
200: Label
|
||||
202: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23
|
||||
204: 8(float) CompositeExtract 202 2
|
||||
205: 67(bool) FOrdGreaterThan 204 27
|
||||
SelectionMerge 207 None
|
||||
BranchConditional 205 206 207
|
||||
206: Label
|
||||
208: 2 FunctionCall 6(doSomething()
|
||||
Branch 207
|
||||
207: Label
|
||||
209: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23
|
||||
210: 8(float) CompositeExtract 209 0
|
||||
211: 67(bool) FOrdGreaterThan 210 27
|
||||
SelectionMerge 213 None
|
||||
BranchConditional 211 212 213
|
||||
212: Label
|
||||
214: 2 FunctionCall 6(doSomething()
|
||||
Branch 213
|
||||
213: Label
|
||||
215: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23
|
||||
216: 67(bool) SGreaterThan 215 19
|
||||
SelectionMerge 218 None
|
||||
BranchConditional 216 217 218
|
||||
217: Label
|
||||
219: 2 FunctionCall 6(doSomething()
|
||||
Branch 218
|
||||
218: Label
|
||||
220: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23
|
||||
221: 67(bool) FOrdGreaterThan 220 27
|
||||
SelectionMerge 223 None
|
||||
BranchConditional 221 222 223
|
||||
222: Label
|
||||
224: 2 FunctionCall 6(doSomething()
|
||||
Branch 223
|
||||
223: Label
|
||||
Branch 167
|
||||
167: Label
|
||||
227: 35(ptr) AccessChain 85(_mat3x4) 19 20
|
||||
228: 8(float) Load 227
|
||||
229: 35(ptr) AccessChain 80(_mat4x3) 19 20
|
||||
230: 8(float) Load 229
|
||||
231: 67(bool) FOrdEqual 228 230
|
||||
SelectionMerge 233 None
|
||||
BranchConditional 231 232 233
|
||||
232: Label
|
||||
234: 2 FunctionCall 6(doSomething()
|
||||
Branch 233
|
||||
233: Label
|
||||
235: 45 Load 47(rayQuery)
|
||||
236: 14(int) RayQueryGetRayFlagsKHR 235
|
||||
237: 67(bool) UGreaterThan 236 20
|
||||
SelectionMerge 239 None
|
||||
BranchConditional 237 238 239
|
||||
238: Label
|
||||
240: 2 FunctionCall 6(doSomething()
|
||||
Branch 239
|
||||
239: Label
|
||||
241: 45 Load 47(rayQuery)
|
||||
242: 8(float) RayQueryGetRayTMinKHR 241
|
||||
243: 67(bool) FOrdGreaterThan 242 27
|
||||
SelectionMerge 245 None
|
||||
BranchConditional 243 244 245
|
||||
244: Label
|
||||
246: 2 FunctionCall 6(doSomething()
|
||||
Branch 245
|
||||
245: Label
|
||||
248: 45 Load 47(rayQuery)
|
||||
249: 9(fvec3) RayQueryGetWorldRayOriginKHR 248
|
||||
Store 247(o) 249
|
||||
251: 45 Load 47(rayQuery)
|
||||
252: 9(fvec3) RayQueryGetWorldRayDirectionKHR 251
|
||||
Store 250(d) 252
|
||||
253: 35(ptr) AccessChain 247(o) 20
|
||||
254: 8(float) Load 253
|
||||
255: 35(ptr) AccessChain 250(d) 203
|
||||
256: 8(float) Load 255
|
||||
257: 67(bool) FOrdEqual 254 256
|
||||
SelectionMerge 259 None
|
||||
BranchConditional 257 258 259
|
||||
258: Label
|
||||
260: 2 FunctionCall 6(doSomething()
|
||||
Branch 259
|
||||
259: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
6(doSomething(): 2 Function None 3
|
||||
7: Label
|
||||
22: 21(ptr) AccessChain 17 19
|
||||
Store 22 20
|
||||
24: 21(ptr) AccessChain 17 23
|
||||
Store 24 20
|
||||
Return
|
||||
FunctionEnd
|
||||
12(makeRayDesc(): 10(Ray) Function None 11
|
||||
13: Label
|
||||
26(ray): 25(ptr) Variable Function
|
||||
30: 29(ptr) AccessChain 26(ray) 19
|
||||
Store 30 28
|
||||
34: 29(ptr) AccessChain 26(ray) 31
|
||||
Store 34 33
|
||||
36: 35(ptr) AccessChain 26(ray) 23
|
||||
Store 36 27
|
||||
39: 35(ptr) AccessChain 26(ray) 37
|
||||
Store 39 38
|
||||
40: 10(Ray) Load 26(ray)
|
||||
ReturnValue 40
|
||||
FunctionEnd
|
201
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
Normal file
201
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
Normal file
@ -0,0 +1,201 @@
|
||||
rayQuery-array-2d-dynamic.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 128
|
||||
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 23 28
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "launchIndex("
|
||||
Name 14 "Ray"
|
||||
MemberName 14(Ray) 0 "pos"
|
||||
MemberName 14(Ray) 1 "tmin"
|
||||
MemberName 14(Ray) 2 "dir"
|
||||
MemberName 14(Ray) 3 "tmax"
|
||||
Name 19 "doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;"
|
||||
Name 17 "rayQuery"
|
||||
Name 18 "ray"
|
||||
Name 23 "gl_LaunchIDNV"
|
||||
Name 28 "gl_LaunchSizeNV"
|
||||
Name 50 "rtas"
|
||||
Name 69 "index"
|
||||
Name 71 "ray"
|
||||
Name 72 "Ray"
|
||||
MemberName 72(Ray) 0 "pos"
|
||||
MemberName 72(Ray) 1 "tmin"
|
||||
MemberName 72(Ray) 2 "dir"
|
||||
MemberName 72(Ray) 3 "tmax"
|
||||
Name 74 "Rays"
|
||||
MemberName 74(Rays) 0 "rays"
|
||||
Name 76 ""
|
||||
Name 91 "rayQuery"
|
||||
Name 93 "param"
|
||||
Name 96 "param"
|
||||
Name 120 "C"
|
||||
Name 122 "param"
|
||||
Name 125 "param"
|
||||
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 50(rtas) DescriptorSet 0
|
||||
Decorate 50(rtas) Binding 0
|
||||
MemberDecorate 72(Ray) 0 Offset 0
|
||||
MemberDecorate 72(Ray) 1 Offset 12
|
||||
MemberDecorate 72(Ray) 2 Offset 16
|
||||
MemberDecorate 72(Ray) 3 Offset 28
|
||||
Decorate 73 ArrayStride 32
|
||||
MemberDecorate 74(Rays) 0 Offset 0
|
||||
Decorate 74(Rays) BufferBlock
|
||||
Decorate 76 DescriptorSet 0
|
||||
Decorate 76 Binding 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
11: TypePointer Function 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
15: TypePointer Function 14(Ray)
|
||||
16: TypeFunction 2 11(ptr) 15(ptr)
|
||||
21: TypeVector 6(int) 3
|
||||
22: TypePointer Input 21(ivec3)
|
||||
23(gl_LaunchIDNV): 22(ptr) Variable Input
|
||||
24: 6(int) Constant 2
|
||||
25: TypePointer Input 6(int)
|
||||
28(gl_LaunchSizeNV): 22(ptr) Variable Input
|
||||
29: 6(int) Constant 0
|
||||
33: 6(int) Constant 1
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
52: 6(int) Constant 16
|
||||
53: TypeInt 32 1
|
||||
54: 53(int) Constant 0
|
||||
55: TypePointer Function 13(fvec3)
|
||||
58: 53(int) Constant 1
|
||||
59: TypePointer Function 12(float)
|
||||
62: 53(int) Constant 2
|
||||
65: 53(int) Constant 3
|
||||
68: TypePointer Function 6(int)
|
||||
72(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
73: TypeRuntimeArray 72(Ray)
|
||||
74(Rays): TypeStruct 73
|
||||
75: TypePointer Uniform 74(Rays)
|
||||
76: 75(ptr) Variable Uniform
|
||||
78: TypePointer Uniform 72(Ray)
|
||||
89: TypeArray 10 24
|
||||
90: TypePointer Function 89
|
||||
110: 6(int) Constant 32
|
||||
119: TypePointer Private 53(int)
|
||||
120(C): 119(ptr) Variable Private
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
69(index): 68(ptr) Variable Function
|
||||
71(ray): 15(ptr) Variable Function
|
||||
91(rayQuery): 90(ptr) Variable Function
|
||||
93(param): 11(ptr) Variable Function
|
||||
96(param): 15(ptr) Variable Function
|
||||
122(param): 11(ptr) Variable Function
|
||||
125(param): 15(ptr) Variable Function
|
||||
70: 6(int) FunctionCall 8(launchIndex()
|
||||
Store 69(index) 70
|
||||
77: 6(int) Load 69(index)
|
||||
79: 78(ptr) AccessChain 76 54 77
|
||||
80: 72(Ray) Load 79
|
||||
81: 13(fvec3) CompositeExtract 80 0
|
||||
82: 55(ptr) AccessChain 71(ray) 54
|
||||
Store 82 81
|
||||
83: 12(float) CompositeExtract 80 1
|
||||
84: 59(ptr) AccessChain 71(ray) 58
|
||||
Store 84 83
|
||||
85: 13(fvec3) CompositeExtract 80 2
|
||||
86: 55(ptr) AccessChain 71(ray) 62
|
||||
Store 86 85
|
||||
87: 12(float) CompositeExtract 80 3
|
||||
88: 59(ptr) AccessChain 71(ray) 65
|
||||
Store 88 87
|
||||
92: 6(int) Load 69(index)
|
||||
94: 11(ptr) AccessChain 91(rayQuery) 54
|
||||
95: 10 Load 94
|
||||
Store 93(param) 95
|
||||
97: 78(ptr) AccessChain 76 54 92
|
||||
98: 72(Ray) Load 97
|
||||
99: 13(fvec3) CompositeExtract 98 0
|
||||
100: 55(ptr) AccessChain 96(param) 54
|
||||
Store 100 99
|
||||
101: 12(float) CompositeExtract 98 1
|
||||
102: 59(ptr) AccessChain 96(param) 58
|
||||
Store 102 101
|
||||
103: 13(fvec3) CompositeExtract 98 2
|
||||
104: 55(ptr) AccessChain 96(param) 62
|
||||
Store 104 103
|
||||
105: 12(float) CompositeExtract 98 3
|
||||
106: 59(ptr) AccessChain 96(param) 65
|
||||
Store 106 105
|
||||
107: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 93(param) 96(param)
|
||||
108: 11(ptr) AccessChain 91(rayQuery) 58
|
||||
109: 48 Load 50(rtas)
|
||||
111: 55(ptr) AccessChain 71(ray) 54
|
||||
112: 13(fvec3) Load 111
|
||||
113: 59(ptr) AccessChain 71(ray) 58
|
||||
114: 12(float) Load 113
|
||||
115: 55(ptr) AccessChain 71(ray) 62
|
||||
116: 13(fvec3) Load 115
|
||||
117: 59(ptr) AccessChain 71(ray) 65
|
||||
118: 12(float) Load 117
|
||||
RayQueryInitializeKHR 108 109 33 110 112 114 116 118
|
||||
121: 53(int) Load 120(C)
|
||||
123: 11(ptr) AccessChain 91(rayQuery) 121
|
||||
124: 10 Load 123
|
||||
Store 122(param) 124
|
||||
126: 14(Ray) Load 71(ray)
|
||||
Store 125(param) 126
|
||||
127: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 122(param) 125(param)
|
||||
Return
|
||||
FunctionEnd
|
||||
8(launchIndex(): 6(int) Function None 7
|
||||
9: Label
|
||||
26: 25(ptr) AccessChain 23(gl_LaunchIDNV) 24
|
||||
27: 6(int) Load 26
|
||||
30: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
31: 6(int) Load 30
|
||||
32: 6(int) IMul 27 31
|
||||
34: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 33
|
||||
35: 6(int) Load 34
|
||||
36: 6(int) IMul 32 35
|
||||
37: 25(ptr) AccessChain 23(gl_LaunchIDNV) 33
|
||||
38: 6(int) Load 37
|
||||
39: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
40: 6(int) Load 39
|
||||
41: 6(int) IMul 38 40
|
||||
42: 6(int) IAdd 36 41
|
||||
43: 25(ptr) AccessChain 23(gl_LaunchIDNV) 29
|
||||
44: 6(int) Load 43
|
||||
45: 6(int) IAdd 42 44
|
||||
ReturnValue 45
|
||||
FunctionEnd
|
||||
19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;): 2 Function None 16
|
||||
17(rayQuery): 11(ptr) FunctionParameter
|
||||
18(ray): 15(ptr) FunctionParameter
|
||||
20: Label
|
||||
51: 48 Load 50(rtas)
|
||||
56: 55(ptr) AccessChain 18(ray) 54
|
||||
57: 13(fvec3) Load 56
|
||||
60: 59(ptr) AccessChain 18(ray) 58
|
||||
61: 12(float) Load 60
|
||||
63: 55(ptr) AccessChain 18(ray) 62
|
||||
64: 13(fvec3) Load 63
|
||||
66: 59(ptr) AccessChain 18(ray) 65
|
||||
67: 12(float) Load 66
|
||||
RayQueryInitializeKHR 17(rayQuery) 51 29 52 57 61 64 67
|
||||
Return
|
||||
FunctionEnd
|
19
Test/baseResults/rayQuery-committed.Error.rgen.out
Normal file
19
Test/baseResults/rayQuery-committed.Error.rgen.out
Normal file
@ -0,0 +1,19 @@
|
||||
rayQuery-committed.Error.rgen
|
||||
ERROR: 0:48: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:53: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:54: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:58: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:62: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:66: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:70: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:74: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:78: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:82: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:86: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:90: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:97: 'committed' : argument must be compile-time constant
|
||||
ERROR: 0:100: 'committed' : argument must be compile-time constant
|
||||
ERROR: 14 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
200
Test/baseResults/rayQuery-decls.rgen.out
Normal file
200
Test/baseResults/rayQuery-decls.rgen.out
Normal file
@ -0,0 +1,200 @@
|
||||
rayQuery-decls.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 130
|
||||
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 12 17
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "launchIndex("
|
||||
Name 12 "gl_LaunchIDNV"
|
||||
Name 17 "gl_LaunchSizeNV"
|
||||
Name 38 "index"
|
||||
Name 42 "Ray"
|
||||
MemberName 42(Ray) 0 "pos"
|
||||
MemberName 42(Ray) 1 "tmin"
|
||||
MemberName 42(Ray) 2 "dir"
|
||||
MemberName 42(Ray) 3 "tmax"
|
||||
Name 44 "ray"
|
||||
Name 45 "Ray"
|
||||
MemberName 45(Ray) 0 "pos"
|
||||
MemberName 45(Ray) 1 "tmin"
|
||||
MemberName 45(Ray) 2 "dir"
|
||||
MemberName 45(Ray) 3 "tmax"
|
||||
Name 47 "Rays"
|
||||
MemberName 47(Rays) 0 "rays"
|
||||
Name 49 ""
|
||||
Name 73 "g_rayQueryArray"
|
||||
Name 74 "block"
|
||||
MemberName 74(block) 0 "idx"
|
||||
Name 76 ""
|
||||
Name 81 "rayQuery0b"
|
||||
Name 86 "rayQuery0a"
|
||||
Name 89 "rayQuery0c"
|
||||
Name 96 "rtas"
|
||||
Name 107 "rayQuery1c"
|
||||
Name 129 "g_rayQueryUnused"
|
||||
Decorate 12(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 17(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
MemberDecorate 45(Ray) 0 Offset 0
|
||||
MemberDecorate 45(Ray) 1 Offset 12
|
||||
MemberDecorate 45(Ray) 2 Offset 16
|
||||
MemberDecorate 45(Ray) 3 Offset 28
|
||||
Decorate 46 ArrayStride 32
|
||||
MemberDecorate 47(Rays) 0 Offset 0
|
||||
Decorate 47(Rays) BufferBlock
|
||||
Decorate 49 DescriptorSet 0
|
||||
Decorate 49 Binding 2
|
||||
MemberDecorate 74(block) 0 Offset 0
|
||||
Decorate 74(block) BufferBlock
|
||||
Decorate 96(rtas) DescriptorSet 0
|
||||
Decorate 96(rtas) Binding 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeVector 6(int) 3
|
||||
11: TypePointer Input 10(ivec3)
|
||||
12(gl_LaunchIDNV): 11(ptr) Variable Input
|
||||
13: 6(int) Constant 2
|
||||
14: TypePointer Input 6(int)
|
||||
17(gl_LaunchSizeNV): 11(ptr) Variable Input
|
||||
18: 6(int) Constant 0
|
||||
22: 6(int) Constant 1
|
||||
37: TypePointer Function 6(int)
|
||||
40: TypeFloat 32
|
||||
41: TypeVector 40(float) 3
|
||||
42(Ray): TypeStruct 41(fvec3) 40(float) 41(fvec3) 40(float)
|
||||
43: TypePointer Function 42(Ray)
|
||||
45(Ray): TypeStruct 41(fvec3) 40(float) 41(fvec3) 40(float)
|
||||
46: TypeRuntimeArray 45(Ray)
|
||||
47(Rays): TypeStruct 46
|
||||
48: TypePointer Uniform 47(Rays)
|
||||
49: 48(ptr) Variable Uniform
|
||||
50: TypeInt 32 1
|
||||
51: 50(int) Constant 0
|
||||
53: TypePointer Uniform 45(Ray)
|
||||
57: TypePointer Function 41(fvec3)
|
||||
60: 50(int) Constant 1
|
||||
61: TypePointer Function 40(float)
|
||||
64: 50(int) Constant 2
|
||||
67: 50(int) Constant 3
|
||||
69: TypeRayQueryProvisionalKHR
|
||||
70: 6(int) Constant 4
|
||||
71: TypeArray 69 70
|
||||
72: TypePointer Function 71
|
||||
74(block): TypeStruct 6(int)
|
||||
75: TypePointer ShaderRecordBufferKHR 74(block)
|
||||
76: 75(ptr) Variable ShaderRecordBufferKHR
|
||||
77: TypePointer ShaderRecordBufferKHR 6(int)
|
||||
80: TypePointer Function 69
|
||||
94: TypeAccelerationStructureKHR
|
||||
95: TypePointer UniformConstant 94
|
||||
96(rtas): 95(ptr) Variable UniformConstant
|
||||
98: 6(int) Constant 16
|
||||
109: 6(int) Constant 32
|
||||
119: 6(int) Constant 3
|
||||
120: 6(int) Constant 64
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
38(index): 37(ptr) Variable Function
|
||||
44(ray): 43(ptr) Variable Function
|
||||
73(g_rayQueryArray): 72(ptr) Variable Function
|
||||
81(rayQuery0b): 80(ptr) Variable Function
|
||||
86(rayQuery0a): 80(ptr) Variable Function
|
||||
89(rayQuery0c): 80(ptr) Variable Function
|
||||
107(rayQuery1c): 80(ptr) Variable Function
|
||||
129(g_rayQueryUnused): 80(ptr) Variable Function
|
||||
39: 6(int) FunctionCall 8(launchIndex()
|
||||
Store 38(index) 39
|
||||
52: 6(int) Load 38(index)
|
||||
54: 53(ptr) AccessChain 49 51 52
|
||||
55: 45(Ray) Load 54
|
||||
56: 41(fvec3) CompositeExtract 55 0
|
||||
58: 57(ptr) AccessChain 44(ray) 51
|
||||
Store 58 56
|
||||
59: 40(float) CompositeExtract 55 1
|
||||
62: 61(ptr) AccessChain 44(ray) 60
|
||||
Store 62 59
|
||||
63: 41(fvec3) CompositeExtract 55 2
|
||||
65: 57(ptr) AccessChain 44(ray) 64
|
||||
Store 65 63
|
||||
66: 40(float) CompositeExtract 55 3
|
||||
68: 61(ptr) AccessChain 44(ray) 67
|
||||
Store 68 66
|
||||
78: 77(ptr) AccessChain 76 51
|
||||
79: 6(int) Load 78
|
||||
82: 69 Load 81(rayQuery0b)
|
||||
83: 80(ptr) AccessChain 73(g_rayQueryArray) 79
|
||||
Store 83 82
|
||||
84: 77(ptr) AccessChain 76 51
|
||||
85: 6(int) Load 84
|
||||
87: 69 Load 86(rayQuery0a)
|
||||
88: 80(ptr) AccessChain 73(g_rayQueryArray) 85
|
||||
Store 88 87
|
||||
90: 77(ptr) AccessChain 76 51
|
||||
91: 6(int) Load 90
|
||||
92: 80(ptr) AccessChain 73(g_rayQueryArray) 91
|
||||
93: 69 Load 92
|
||||
Store 89(rayQuery0c) 93
|
||||
97: 94 Load 96(rtas)
|
||||
99: 57(ptr) AccessChain 44(ray) 51
|
||||
100: 41(fvec3) Load 99
|
||||
101: 61(ptr) AccessChain 44(ray) 60
|
||||
102: 40(float) Load 101
|
||||
103: 57(ptr) AccessChain 44(ray) 64
|
||||
104: 41(fvec3) Load 103
|
||||
105: 61(ptr) AccessChain 44(ray) 67
|
||||
106: 40(float) Load 105
|
||||
RayQueryInitializeKHR 89(rayQuery0c) 97 22 98 100 102 104 106
|
||||
108: 94 Load 96(rtas)
|
||||
110: 57(ptr) AccessChain 44(ray) 51
|
||||
111: 41(fvec3) Load 110
|
||||
112: 61(ptr) AccessChain 44(ray) 60
|
||||
113: 40(float) Load 112
|
||||
114: 57(ptr) AccessChain 44(ray) 64
|
||||
115: 41(fvec3) Load 114
|
||||
116: 61(ptr) AccessChain 44(ray) 67
|
||||
117: 40(float) Load 116
|
||||
RayQueryInitializeKHR 107(rayQuery1c) 108 22 109 111 113 115 117
|
||||
118: 94 Load 96(rtas)
|
||||
121: 57(ptr) AccessChain 44(ray) 51
|
||||
122: 41(fvec3) Load 121
|
||||
123: 61(ptr) AccessChain 44(ray) 60
|
||||
124: 40(float) Load 123
|
||||
125: 57(ptr) AccessChain 44(ray) 64
|
||||
126: 41(fvec3) Load 125
|
||||
127: 61(ptr) AccessChain 44(ray) 67
|
||||
128: 40(float) Load 127
|
||||
RayQueryInitializeKHR 107(rayQuery1c) 118 119 120 122 124 126 128
|
||||
Return
|
||||
FunctionEnd
|
||||
8(launchIndex(): 6(int) Function None 7
|
||||
9: Label
|
||||
15: 14(ptr) AccessChain 12(gl_LaunchIDNV) 13
|
||||
16: 6(int) Load 15
|
||||
19: 14(ptr) AccessChain 17(gl_LaunchSizeNV) 18
|
||||
20: 6(int) Load 19
|
||||
21: 6(int) IMul 16 20
|
||||
23: 14(ptr) AccessChain 17(gl_LaunchSizeNV) 22
|
||||
24: 6(int) Load 23
|
||||
25: 6(int) IMul 21 24
|
||||
26: 14(ptr) AccessChain 12(gl_LaunchIDNV) 22
|
||||
27: 6(int) Load 26
|
||||
28: 14(ptr) AccessChain 17(gl_LaunchSizeNV) 18
|
||||
29: 6(int) Load 28
|
||||
30: 6(int) IMul 27 29
|
||||
31: 6(int) IAdd 25 30
|
||||
32: 14(ptr) AccessChain 12(gl_LaunchIDNV) 18
|
||||
33: 6(int) Load 32
|
||||
34: 6(int) IAdd 31 33
|
||||
ReturnValue 34
|
||||
FunctionEnd
|
170
Test/baseResults/rayQuery-initialize.rgen.out
Normal file
170
Test/baseResults/rayQuery-initialize.rgen.out
Normal file
@ -0,0 +1,170 @@
|
||||
rayQuery-initialize.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 105
|
||||
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 23 28
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "launchIndex("
|
||||
Name 14 "Ray"
|
||||
MemberName 14(Ray) 0 "pos"
|
||||
MemberName 14(Ray) 1 "tmin"
|
||||
MemberName 14(Ray) 2 "dir"
|
||||
MemberName 14(Ray) 3 "tmax"
|
||||
Name 19 "doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;"
|
||||
Name 17 "rayQuery"
|
||||
Name 18 "ray"
|
||||
Name 23 "gl_LaunchIDNV"
|
||||
Name 28 "gl_LaunchSizeNV"
|
||||
Name 50 "rtas"
|
||||
Name 69 "index"
|
||||
Name 71 "ray"
|
||||
Name 72 "Ray"
|
||||
MemberName 72(Ray) 0 "pos"
|
||||
MemberName 72(Ray) 1 "tmin"
|
||||
MemberName 72(Ray) 2 "dir"
|
||||
MemberName 72(Ray) 3 "tmax"
|
||||
Name 74 "Rays"
|
||||
MemberName 74(Rays) 0 "rays"
|
||||
Name 76 ""
|
||||
Name 89 "rayQuery"
|
||||
Name 90 "param"
|
||||
Name 92 "param"
|
||||
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 50(rtas) DescriptorSet 0
|
||||
Decorate 50(rtas) Binding 0
|
||||
MemberDecorate 72(Ray) 0 Offset 0
|
||||
MemberDecorate 72(Ray) 1 Offset 12
|
||||
MemberDecorate 72(Ray) 2 Offset 16
|
||||
MemberDecorate 72(Ray) 3 Offset 28
|
||||
Decorate 73 ArrayStride 32
|
||||
MemberDecorate 74(Rays) 0 Offset 0
|
||||
Decorate 74(Rays) BufferBlock
|
||||
Decorate 76 DescriptorSet 0
|
||||
Decorate 76 Binding 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
11: TypePointer Function 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
15: TypePointer Function 14(Ray)
|
||||
16: TypeFunction 2 11(ptr) 15(ptr)
|
||||
21: TypeVector 6(int) 3
|
||||
22: TypePointer Input 21(ivec3)
|
||||
23(gl_LaunchIDNV): 22(ptr) Variable Input
|
||||
24: 6(int) Constant 2
|
||||
25: TypePointer Input 6(int)
|
||||
28(gl_LaunchSizeNV): 22(ptr) Variable Input
|
||||
29: 6(int) Constant 0
|
||||
33: 6(int) Constant 1
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
52: 6(int) Constant 16
|
||||
53: TypeInt 32 1
|
||||
54: 53(int) Constant 0
|
||||
55: TypePointer Function 13(fvec3)
|
||||
58: 53(int) Constant 1
|
||||
59: TypePointer Function 12(float)
|
||||
62: 53(int) Constant 2
|
||||
65: 53(int) Constant 3
|
||||
68: TypePointer Function 6(int)
|
||||
72(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
73: TypeRuntimeArray 72(Ray)
|
||||
74(Rays): TypeStruct 73
|
||||
75: TypePointer Uniform 74(Rays)
|
||||
76: 75(ptr) Variable Uniform
|
||||
78: TypePointer Uniform 72(Ray)
|
||||
96: 6(int) Constant 32
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
69(index): 68(ptr) Variable Function
|
||||
71(ray): 15(ptr) Variable Function
|
||||
89(rayQuery): 11(ptr) Variable Function
|
||||
90(param): 11(ptr) Variable Function
|
||||
92(param): 15(ptr) Variable Function
|
||||
70: 6(int) FunctionCall 8(launchIndex()
|
||||
Store 69(index) 70
|
||||
77: 6(int) Load 69(index)
|
||||
79: 78(ptr) AccessChain 76 54 77
|
||||
80: 72(Ray) Load 79
|
||||
81: 13(fvec3) CompositeExtract 80 0
|
||||
82: 55(ptr) AccessChain 71(ray) 54
|
||||
Store 82 81
|
||||
83: 12(float) CompositeExtract 80 1
|
||||
84: 59(ptr) AccessChain 71(ray) 58
|
||||
Store 84 83
|
||||
85: 13(fvec3) CompositeExtract 80 2
|
||||
86: 55(ptr) AccessChain 71(ray) 62
|
||||
Store 86 85
|
||||
87: 12(float) CompositeExtract 80 3
|
||||
88: 59(ptr) AccessChain 71(ray) 65
|
||||
Store 88 87
|
||||
91: 10 Load 89(rayQuery)
|
||||
Store 90(param) 91
|
||||
93: 14(Ray) Load 71(ray)
|
||||
Store 92(param) 93
|
||||
94: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 90(param) 92(param)
|
||||
95: 48 Load 50(rtas)
|
||||
97: 55(ptr) AccessChain 71(ray) 54
|
||||
98: 13(fvec3) Load 97
|
||||
99: 59(ptr) AccessChain 71(ray) 58
|
||||
100: 12(float) Load 99
|
||||
101: 55(ptr) AccessChain 71(ray) 62
|
||||
102: 13(fvec3) Load 101
|
||||
103: 59(ptr) AccessChain 71(ray) 65
|
||||
104: 12(float) Load 103
|
||||
RayQueryInitializeKHR 89(rayQuery) 95 33 96 98 100 102 104
|
||||
Return
|
||||
FunctionEnd
|
||||
8(launchIndex(): 6(int) Function None 7
|
||||
9: Label
|
||||
26: 25(ptr) AccessChain 23(gl_LaunchIDNV) 24
|
||||
27: 6(int) Load 26
|
||||
30: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
31: 6(int) Load 30
|
||||
32: 6(int) IMul 27 31
|
||||
34: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 33
|
||||
35: 6(int) Load 34
|
||||
36: 6(int) IMul 32 35
|
||||
37: 25(ptr) AccessChain 23(gl_LaunchIDNV) 33
|
||||
38: 6(int) Load 37
|
||||
39: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
40: 6(int) Load 39
|
||||
41: 6(int) IMul 38 40
|
||||
42: 6(int) IAdd 36 41
|
||||
43: 25(ptr) AccessChain 23(gl_LaunchIDNV) 29
|
||||
44: 6(int) Load 43
|
||||
45: 6(int) IAdd 42 44
|
||||
ReturnValue 45
|
||||
FunctionEnd
|
||||
19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;): 2 Function None 16
|
||||
17(rayQuery): 11(ptr) FunctionParameter
|
||||
18(ray): 15(ptr) FunctionParameter
|
||||
20: Label
|
||||
51: 48 Load 50(rtas)
|
||||
56: 55(ptr) AccessChain 18(ray) 54
|
||||
57: 13(fvec3) Load 56
|
||||
60: 59(ptr) AccessChain 18(ray) 58
|
||||
61: 12(float) Load 60
|
||||
63: 55(ptr) AccessChain 18(ray) 62
|
||||
64: 13(fvec3) Load 63
|
||||
66: 59(ptr) AccessChain 18(ray) 65
|
||||
67: 12(float) Load 66
|
||||
RayQueryInitializeKHR 17(rayQuery) 51 29 52 57 61 64 67
|
||||
Return
|
||||
FunctionEnd
|
181
Test/baseResults/rayQuery-no-cse.rgen.out
Normal file
181
Test/baseResults/rayQuery-no-cse.rgen.out
Normal file
@ -0,0 +1,181 @@
|
||||
rayQuery-no-cse.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 111
|
||||
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 23 28
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "launchIndex("
|
||||
Name 14 "Ray"
|
||||
MemberName 14(Ray) 0 "pos"
|
||||
MemberName 14(Ray) 1 "tmin"
|
||||
MemberName 14(Ray) 2 "dir"
|
||||
MemberName 14(Ray) 3 "tmax"
|
||||
Name 19 "doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;"
|
||||
Name 17 "rayQuery"
|
||||
Name 18 "ray"
|
||||
Name 23 "gl_LaunchIDNV"
|
||||
Name 28 "gl_LaunchSizeNV"
|
||||
Name 50 "rtas"
|
||||
Name 69 "index"
|
||||
Name 71 "ray"
|
||||
Name 72 "Ray"
|
||||
MemberName 72(Ray) 0 "pos"
|
||||
MemberName 72(Ray) 1 "tmin"
|
||||
MemberName 72(Ray) 2 "dir"
|
||||
MemberName 72(Ray) 3 "tmax"
|
||||
Name 74 "Rays"
|
||||
MemberName 74(Rays) 0 "rays"
|
||||
Name 76 ""
|
||||
Name 89 "rayQuery1"
|
||||
Name 90 "param"
|
||||
Name 92 "param"
|
||||
Name 105 "rayQuery2"
|
||||
Name 106 "param"
|
||||
Name 108 "param"
|
||||
Decorate 23(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 28(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 50(rtas) DescriptorSet 0
|
||||
Decorate 50(rtas) Binding 0
|
||||
MemberDecorate 72(Ray) 0 Offset 0
|
||||
MemberDecorate 72(Ray) 1 Offset 12
|
||||
MemberDecorate 72(Ray) 2 Offset 16
|
||||
MemberDecorate 72(Ray) 3 Offset 28
|
||||
Decorate 73 ArrayStride 32
|
||||
MemberDecorate 74(Rays) 0 Offset 0
|
||||
Decorate 74(Rays) BufferBlock
|
||||
Decorate 76 DescriptorSet 0
|
||||
Decorate 76 Binding 2
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
11: TypePointer Function 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
15: TypePointer Function 14(Ray)
|
||||
16: TypeFunction 2 11(ptr) 15(ptr)
|
||||
21: TypeVector 6(int) 3
|
||||
22: TypePointer Input 21(ivec3)
|
||||
23(gl_LaunchIDNV): 22(ptr) Variable Input
|
||||
24: 6(int) Constant 2
|
||||
25: TypePointer Input 6(int)
|
||||
28(gl_LaunchSizeNV): 22(ptr) Variable Input
|
||||
29: 6(int) Constant 0
|
||||
33: 6(int) Constant 1
|
||||
48: TypeAccelerationStructureKHR
|
||||
49: TypePointer UniformConstant 48
|
||||
50(rtas): 49(ptr) Variable UniformConstant
|
||||
52: 6(int) Constant 16
|
||||
53: TypeInt 32 1
|
||||
54: 53(int) Constant 0
|
||||
55: TypePointer Function 13(fvec3)
|
||||
58: 53(int) Constant 1
|
||||
59: TypePointer Function 12(float)
|
||||
62: 53(int) Constant 2
|
||||
65: 53(int) Constant 3
|
||||
68: TypePointer Function 6(int)
|
||||
72(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
|
||||
73: TypeRuntimeArray 72(Ray)
|
||||
74(Rays): TypeStruct 73
|
||||
75: TypePointer Uniform 74(Rays)
|
||||
76: 75(ptr) Variable Uniform
|
||||
78: TypePointer Uniform 72(Ray)
|
||||
96: 6(int) Constant 32
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
69(index): 68(ptr) Variable Function
|
||||
71(ray): 15(ptr) Variable Function
|
||||
89(rayQuery1): 11(ptr) Variable Function
|
||||
90(param): 11(ptr) Variable Function
|
||||
92(param): 15(ptr) Variable Function
|
||||
105(rayQuery2): 11(ptr) Variable Function
|
||||
106(param): 11(ptr) Variable Function
|
||||
108(param): 15(ptr) Variable Function
|
||||
70: 6(int) FunctionCall 8(launchIndex()
|
||||
Store 69(index) 70
|
||||
77: 6(int) Load 69(index)
|
||||
79: 78(ptr) AccessChain 76 54 77
|
||||
80: 72(Ray) Load 79
|
||||
81: 13(fvec3) CompositeExtract 80 0
|
||||
82: 55(ptr) AccessChain 71(ray) 54
|
||||
Store 82 81
|
||||
83: 12(float) CompositeExtract 80 1
|
||||
84: 59(ptr) AccessChain 71(ray) 58
|
||||
Store 84 83
|
||||
85: 13(fvec3) CompositeExtract 80 2
|
||||
86: 55(ptr) AccessChain 71(ray) 62
|
||||
Store 86 85
|
||||
87: 12(float) CompositeExtract 80 3
|
||||
88: 59(ptr) AccessChain 71(ray) 65
|
||||
Store 88 87
|
||||
91: 10 Load 89(rayQuery1)
|
||||
Store 90(param) 91
|
||||
93: 14(Ray) Load 71(ray)
|
||||
Store 92(param) 93
|
||||
94: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 90(param) 92(param)
|
||||
95: 48 Load 50(rtas)
|
||||
97: 55(ptr) AccessChain 71(ray) 54
|
||||
98: 13(fvec3) Load 97
|
||||
99: 59(ptr) AccessChain 71(ray) 58
|
||||
100: 12(float) Load 99
|
||||
101: 55(ptr) AccessChain 71(ray) 62
|
||||
102: 13(fvec3) Load 101
|
||||
103: 59(ptr) AccessChain 71(ray) 65
|
||||
104: 12(float) Load 103
|
||||
RayQueryInitializeKHR 89(rayQuery1) 95 33 96 98 100 102 104
|
||||
107: 10 Load 105(rayQuery2)
|
||||
Store 106(param) 107
|
||||
109: 14(Ray) Load 71(ray)
|
||||
Store 108(param) 109
|
||||
110: 2 FunctionCall 19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;) 106(param) 108(param)
|
||||
Return
|
||||
FunctionEnd
|
||||
8(launchIndex(): 6(int) Function None 7
|
||||
9: Label
|
||||
26: 25(ptr) AccessChain 23(gl_LaunchIDNV) 24
|
||||
27: 6(int) Load 26
|
||||
30: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
31: 6(int) Load 30
|
||||
32: 6(int) IMul 27 31
|
||||
34: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 33
|
||||
35: 6(int) Load 34
|
||||
36: 6(int) IMul 32 35
|
||||
37: 25(ptr) AccessChain 23(gl_LaunchIDNV) 33
|
||||
38: 6(int) Load 37
|
||||
39: 25(ptr) AccessChain 28(gl_LaunchSizeNV) 29
|
||||
40: 6(int) Load 39
|
||||
41: 6(int) IMul 38 40
|
||||
42: 6(int) IAdd 36 41
|
||||
43: 25(ptr) AccessChain 23(gl_LaunchIDNV) 29
|
||||
44: 6(int) Load 43
|
||||
45: 6(int) IAdd 42 44
|
||||
ReturnValue 45
|
||||
FunctionEnd
|
||||
19(doInitialize(rq1;struct-Ray-vf3-f1-vf3-f11;): 2 Function None 16
|
||||
17(rayQuery): 11(ptr) FunctionParameter
|
||||
18(ray): 15(ptr) FunctionParameter
|
||||
20: Label
|
||||
51: 48 Load 50(rtas)
|
||||
56: 55(ptr) AccessChain 18(ray) 54
|
||||
57: 13(fvec3) Load 56
|
||||
60: 59(ptr) AccessChain 18(ray) 58
|
||||
61: 12(float) Load 60
|
||||
63: 55(ptr) AccessChain 18(ray) 62
|
||||
64: 13(fvec3) Load 63
|
||||
66: 59(ptr) AccessChain 18(ray) 65
|
||||
67: 12(float) Load 66
|
||||
RayQueryInitializeKHR 17(rayQuery) 51 29 52 57 61 64 67
|
||||
Return
|
||||
FunctionEnd
|
84
Test/baseResults/rayQuery.rgen.out
Normal file
84
Test/baseResults/rayQuery.rgen.out
Normal file
@ -0,0 +1,84 @@
|
||||
rayQuery.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 46
|
||||
|
||||
Capability RayQueryProvisionalKHR
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main"
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
Name 8 "rayFlags"
|
||||
Name 12 "tMin"
|
||||
Name 14 "tMax"
|
||||
Name 18 "localRayQuery"
|
||||
Name 21 "accNV0"
|
||||
Name 26 "block"
|
||||
MemberName 26(block) 0 "dir"
|
||||
MemberName 26(block) 1 "origin"
|
||||
Name 28 ""
|
||||
Decorate 21(accNV0) DescriptorSet 0
|
||||
Decorate 21(accNV0) Binding 0
|
||||
MemberDecorate 26(block) 0 Offset 0
|
||||
MemberDecorate 26(block) 1 Offset 16
|
||||
Decorate 26(block) BufferBlock
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypePointer Function 6(int)
|
||||
9: 6(int) Constant 9
|
||||
10: TypeFloat 32
|
||||
11: TypePointer Function 10(float)
|
||||
13: 10(float) Constant 0
|
||||
15: 10(float) Constant 1148846080
|
||||
16: TypeRayQueryProvisionalKHR
|
||||
17: TypePointer Function 16
|
||||
19: TypeAccelerationStructureKHR
|
||||
20: TypePointer UniformConstant 19
|
||||
21(accNV0): 20(ptr) Variable UniformConstant
|
||||
24: 6(int) Constant 255
|
||||
25: TypeVector 10(float) 3
|
||||
26(block): TypeStruct 25(fvec3) 25(fvec3)
|
||||
27: TypePointer ShaderRecordBufferKHR 26(block)
|
||||
28: 27(ptr) Variable ShaderRecordBufferKHR
|
||||
29: TypeInt 32 1
|
||||
30: 29(int) Constant 1
|
||||
31: TypePointer ShaderRecordBufferKHR 25(fvec3)
|
||||
35: 29(int) Constant 0
|
||||
40: TypeBool
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(rayFlags): 7(ptr) Variable Function
|
||||
12(tMin): 11(ptr) Variable Function
|
||||
14(tMax): 11(ptr) Variable Function
|
||||
18(localRayQuery): 17(ptr) Variable Function
|
||||
Store 8(rayFlags) 9
|
||||
Store 12(tMin) 13
|
||||
Store 14(tMax) 15
|
||||
22: 19 Load 21(accNV0)
|
||||
23: 6(int) Load 8(rayFlags)
|
||||
32: 31(ptr) AccessChain 28 30
|
||||
33: 25(fvec3) Load 32
|
||||
34: 10(float) Load 12(tMin)
|
||||
36: 31(ptr) AccessChain 28 35
|
||||
37: 25(fvec3) Load 36
|
||||
38: 10(float) Load 14(tMax)
|
||||
RayQueryInitializeKHR 18(localRayQuery) 22 23 24 33 34 37 38
|
||||
39: 16 Load 18(localRayQuery)
|
||||
41: 40(bool) RayQueryProceedKHR 39
|
||||
42: 40(bool) LogicalNot 41
|
||||
SelectionMerge 44 None
|
||||
BranchConditional 42 43 44
|
||||
43: Label
|
||||
45: 16 Load 18(localRayQuery)
|
||||
RayQueryTerminateKHR 45
|
||||
Branch 44
|
||||
44: Label
|
||||
Return
|
||||
FunctionEnd
|
212
Test/rayQuery-allOps.Error.rgen
Normal file
212
Test/rayQuery-allOps.Error.rgen
Normal file
@ -0,0 +1,212 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(std430, set = 0, binding = 0) buffer Log
|
||||
{
|
||||
uint x;
|
||||
uint y;
|
||||
};
|
||||
|
||||
layout(binding = 1, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
void doSomething()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
Ray makeRayDesc()
|
||||
{
|
||||
Ray ray;
|
||||
ray.pos= vec3(0,0,0);
|
||||
ray.dir = vec3(1,0,0);
|
||||
ray.tmin = 0.0f;
|
||||
ray.tmax = 9999.0;
|
||||
return ray;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
Ray ray = makeRayDesc();
|
||||
rayQueryEXT rayQuery;
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, 0xFF, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
|
||||
mat4x3 _mat4x3;
|
||||
mat3x4 _mat3x4;
|
||||
|
||||
while (rayQueryProceedEXT(rayQuery) == 1)
|
||||
{
|
||||
int candidateType = rayQueryGetIntersectionTypeEXT(rayQuery, false);
|
||||
switch(candidateType)
|
||||
{
|
||||
case gl_RayQueryCandidateIntersectionTriangleEXT:
|
||||
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
rayQueryConfirmIntersectionEXT(rayQuery);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true) == 1)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true) == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceIdEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionTEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCandidateIntersectionAABBEXT:
|
||||
{
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
if (rayQueryGetIntersectionCandidateAABBOpaqueEXT(rayQuery))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
int t = 1;
|
||||
rayQueryGenerateIntersectionEXT(rayQuery, t);
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
int committedStatus = rayQueryGetIntersectionTypeEXT(rayQuery, true);
|
||||
|
||||
switch(committedStatus)
|
||||
{
|
||||
case gl_RayQueryCommittedIntersectionNoneEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionTriangleEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, true);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true) == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionGeneratedEXT :
|
||||
|
||||
if(rayQueryGetIntersectionGeometryIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceIdEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionTEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayFlagsEXT(rayQuery))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayTMinEXT(rayQuery))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
vec3 o = rayQueryGetWorldRayOriginEXT(rayQuery);
|
||||
vec3 d = rayQueryGetWorldRayDirectionEXT(rayQuery);
|
||||
|
||||
if (o.x == d.z)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
}
|
212
Test/rayQuery-allOps.comp
Normal file
212
Test/rayQuery-allOps.comp
Normal file
@ -0,0 +1,212 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(std430, set = 0, binding = 0) buffer Log
|
||||
{
|
||||
uint x;
|
||||
uint y;
|
||||
};
|
||||
|
||||
layout(binding = 1, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
void doSomething()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
Ray makeRayDesc()
|
||||
{
|
||||
Ray ray;
|
||||
ray.pos= vec3(0,0,0);
|
||||
ray.dir = vec3(1,0,0);
|
||||
ray.tmin = 0.0f;
|
||||
ray.tmax = 9999.0;
|
||||
return ray;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
Ray ray = makeRayDesc();
|
||||
rayQueryEXT rayQuery;
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, 0xFF, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
|
||||
mat4x3 _mat4x3;
|
||||
mat3x4 _mat3x4;
|
||||
|
||||
while (rayQueryProceedEXT(rayQuery))
|
||||
{
|
||||
uint candidateType = rayQueryGetIntersectionTypeEXT(rayQuery, false);
|
||||
switch(candidateType)
|
||||
{
|
||||
case gl_RayQueryCandidateIntersectionTriangleEXT:
|
||||
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
rayQueryConfirmIntersectionEXT(rayQuery);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true).x == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceIdEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionTEXT(rayQuery, true) > 0.f)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCandidateIntersectionAABBEXT:
|
||||
{
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
if (rayQueryGetIntersectionCandidateAABBOpaqueEXT(rayQuery))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
float t = 0.5;
|
||||
rayQueryGenerateIntersectionEXT(rayQuery, t);
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
uint committedStatus = rayQueryGetIntersectionTypeEXT(rayQuery, true);
|
||||
|
||||
switch(committedStatus)
|
||||
{
|
||||
case gl_RayQueryCommittedIntersectionNoneEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionTriangleEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, true);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true).y == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionGeneratedEXT :
|
||||
|
||||
if(rayQueryGetIntersectionGeometryIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceIdEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true).z > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionTEXT(rayQuery, true) > 0.f)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayFlagsEXT(rayQuery) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayTMinEXT(rayQuery) > 0.0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
vec3 o = rayQueryGetWorldRayOriginEXT(rayQuery);
|
||||
vec3 d = rayQueryGetWorldRayDirectionEXT(rayQuery);
|
||||
|
||||
if (o.x == d.z)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
}
|
212
Test/rayQuery-allOps.frag
Normal file
212
Test/rayQuery-allOps.frag
Normal file
@ -0,0 +1,212 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(std430, set = 0, binding = 0) buffer Log
|
||||
{
|
||||
uint x;
|
||||
uint y;
|
||||
};
|
||||
|
||||
layout(binding = 1, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
void doSomething()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
Ray makeRayDesc()
|
||||
{
|
||||
Ray ray;
|
||||
ray.pos= vec3(0,0,0);
|
||||
ray.dir = vec3(1,0,0);
|
||||
ray.tmin = 0.0f;
|
||||
ray.tmax = 9999.0;
|
||||
return ray;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
Ray ray = makeRayDesc();
|
||||
rayQueryEXT rayQuery;
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, 0xFF, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
|
||||
mat4x3 _mat4x3;
|
||||
mat3x4 _mat3x4;
|
||||
|
||||
while (rayQueryProceedEXT(rayQuery))
|
||||
{
|
||||
uint candidateType = rayQueryGetIntersectionTypeEXT(rayQuery, false);
|
||||
switch(candidateType)
|
||||
{
|
||||
case gl_RayQueryCandidateIntersectionTriangleEXT:
|
||||
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
rayQueryConfirmIntersectionEXT(rayQuery);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true).x == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceIdEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionTEXT(rayQuery, true) > 0.f)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCandidateIntersectionAABBEXT:
|
||||
{
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
if (rayQueryGetIntersectionCandidateAABBOpaqueEXT(rayQuery))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
float t = 0.5;
|
||||
rayQueryGenerateIntersectionEXT(rayQuery, t);
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
uint committedStatus = rayQueryGetIntersectionTypeEXT(rayQuery, true);
|
||||
|
||||
switch(committedStatus)
|
||||
{
|
||||
case gl_RayQueryCommittedIntersectionNoneEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionTriangleEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, true);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true).y == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionGeneratedEXT :
|
||||
|
||||
if(rayQueryGetIntersectionGeometryIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceIdEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true).z > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionTEXT(rayQuery, true) > 0.f)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayFlagsEXT(rayQuery) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayTMinEXT(rayQuery) > 0.0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
vec3 o = rayQueryGetWorldRayOriginEXT(rayQuery);
|
||||
vec3 d = rayQueryGetWorldRayDirectionEXT(rayQuery);
|
||||
|
||||
if (o.x == d.z)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
}
|
212
Test/rayQuery-allOps.rgen
Normal file
212
Test/rayQuery-allOps.rgen
Normal file
@ -0,0 +1,212 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(std430, set = 0, binding = 0) buffer Log
|
||||
{
|
||||
uint x;
|
||||
uint y;
|
||||
};
|
||||
|
||||
layout(binding = 1, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
void doSomething()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
Ray makeRayDesc()
|
||||
{
|
||||
Ray ray;
|
||||
ray.pos= vec3(0,0,0);
|
||||
ray.dir = vec3(1,0,0);
|
||||
ray.tmin = 0.0f;
|
||||
ray.tmax = 9999.0;
|
||||
return ray;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
Ray ray = makeRayDesc();
|
||||
rayQueryEXT rayQuery;
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, 0xFF, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
|
||||
mat4x3 _mat4x3;
|
||||
mat3x4 _mat3x4;
|
||||
|
||||
while (rayQueryProceedEXT(rayQuery))
|
||||
{
|
||||
uint candidateType = rayQueryGetIntersectionTypeEXT(rayQuery, false);
|
||||
switch(candidateType)
|
||||
{
|
||||
case gl_RayQueryCandidateIntersectionTriangleEXT:
|
||||
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
rayQueryConfirmIntersectionEXT(rayQuery);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true).x == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceIdEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionTEXT(rayQuery, true) > 0.f)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCandidateIntersectionAABBEXT:
|
||||
{
|
||||
_mat4x3 = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
if (rayQueryGetIntersectionCandidateAABBOpaqueEXT(rayQuery))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
float t = 0.5;
|
||||
rayQueryGenerateIntersectionEXT(rayQuery, t);
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
uint committedStatus = rayQueryGetIntersectionTypeEXT(rayQuery, true);
|
||||
|
||||
switch(committedStatus)
|
||||
{
|
||||
case gl_RayQueryCommittedIntersectionNoneEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, false);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionTriangleEXT :
|
||||
_mat4x3 = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, true);
|
||||
_mat3x4 = transpose(_mat4x3);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, true).y == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
|
||||
case gl_RayQueryCommittedIntersectionGeneratedEXT :
|
||||
|
||||
if(rayQueryGetIntersectionGeometryIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceIdEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, true).z > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if(rayQueryGetIntersectionTEXT(rayQuery, true) > 0.f)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (_mat3x4[0][0] == _mat4x3[0][0])
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayFlagsEXT(rayQuery) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
if (rayQueryGetRayTMinEXT(rayQuery) > 0.0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
|
||||
vec3 o = rayQueryGetWorldRayOriginEXT(rayQuery);
|
||||
vec3 d = rayQueryGetWorldRayDirectionEXT(rayQuery);
|
||||
|
||||
if (o.x == d.z)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
}
|
36
Test/rayQuery-array-2d-dynamic.rgen
Normal file
36
Test/rayQuery-array-2d-dynamic.rgen
Normal file
@ -0,0 +1,36 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
uint launchIndex()
|
||||
{
|
||||
return gl_LaunchIDNV.z*gl_LaunchSizeNV.x*gl_LaunchSizeNV.y + gl_LaunchIDNV.y*gl_LaunchSizeNV.x + gl_LaunchIDNV.x;
|
||||
}
|
||||
|
||||
void doInitialize(rayQueryEXT rayQuery, Ray ray)
|
||||
{
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, gl_RayFlagsCullBackFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
}
|
||||
|
||||
int C;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = launchIndex();
|
||||
Ray ray = rays[index];
|
||||
rayQueryEXT rayQuery[2];
|
||||
doInitialize(rayQuery[0], rays[index]);
|
||||
rayQueryInitializeEXT(rayQuery[1], rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullFrontFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
doInitialize(rayQuery[C], ray);
|
||||
}
|
105
Test/rayQuery-committed.Error.rgen
Normal file
105
Test/rayQuery-committed.Error.rgen
Normal file
@ -0,0 +1,105 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(std430, set = 0, binding = 0) buffer Log
|
||||
{
|
||||
uint x;
|
||||
uint y;
|
||||
};
|
||||
|
||||
layout(binding = 1, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
void doSomething()
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
uint launchIndex()
|
||||
{
|
||||
return gl_LaunchIDNV.z*gl_LaunchSizeNV.x*gl_LaunchSizeNV.y + gl_LaunchIDNV.y*gl_LaunchSizeNV.x + gl_LaunchIDNV.x;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = launchIndex();
|
||||
Ray ray = rays[index];
|
||||
rayQueryEXT rayQuery;
|
||||
|
||||
bool committed_true = true;
|
||||
bool committed_false = false;
|
||||
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullBackFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
while (rayQueryProceedEXT(rayQuery))
|
||||
{
|
||||
mat4x3 mat_o2w;
|
||||
mat4x3 mat_w2o;
|
||||
|
||||
uint candidateType = rayQueryGetIntersectionTypeEXT(rayQuery, committed_false);
|
||||
if (candidateType == gl_RayQueryCandidateIntersectionTriangleEXT)
|
||||
{
|
||||
rayQueryTerminateEXT(rayQuery);
|
||||
|
||||
mat_o2w = rayQueryGetIntersectionObjectToWorldEXT(rayQuery, committed_false);
|
||||
mat_w2o = rayQueryGetIntersectionWorldToObjectEXT(rayQuery, committed_false);
|
||||
|
||||
rayQueryConfirmIntersectionEXT(rayQuery);
|
||||
|
||||
if (rayQueryGetIntersectionFrontFaceEXT(rayQuery, committed_true))
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionBarycentricsEXT(rayQuery, committed_true).x == 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionInstanceCustomIndexEXT(rayQuery, committed_true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionInstanceIdEXT(rayQuery, committed_true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionObjectRayDirectionEXT(rayQuery, committed_true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionObjectRayOriginEXT(rayQuery, committed_true).x > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionPrimitiveIndexEXT(rayQuery, committed_true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionTEXT(rayQuery, committed_true) > 0.f)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
if (rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQuery, committed_true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint committedStatus = rayQueryGetIntersectionTypeEXT(rayQuery, committed_true);
|
||||
if (committedStatus == gl_RayQueryCommittedIntersectionGeneratedEXT)
|
||||
{
|
||||
if (rayQueryGetIntersectionGeometryIndexEXT(rayQuery, committed_true) > 0)
|
||||
{
|
||||
doSomething();
|
||||
}
|
||||
}
|
||||
}
|
53
Test/rayQuery-decls.rgen
Normal file
53
Test/rayQuery-decls.rgen
Normal file
@ -0,0 +1,53 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
layout(shaderRecordNV) buffer block
|
||||
{
|
||||
uint idx;
|
||||
};
|
||||
|
||||
uint launchIndex()
|
||||
{
|
||||
return gl_LaunchIDNV.z*gl_LaunchSizeNV.x*gl_LaunchSizeNV.y + gl_LaunchIDNV.y*gl_LaunchSizeNV.x + gl_LaunchIDNV.x;
|
||||
}
|
||||
|
||||
rayQueryEXT g_rayQueryArray[4];
|
||||
rayQueryEXT g_rayQueryUnused;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = launchIndex();
|
||||
Ray ray = rays[index];
|
||||
|
||||
rayQueryEXT rayQuery0a;
|
||||
rayQueryEXT rayQuery0b;
|
||||
|
||||
g_rayQueryArray[idx] = rayQuery0b; // Stored here, then overwritten with rayQuery0a
|
||||
g_rayQueryArray[idx] = rayQuery0a;
|
||||
|
||||
// No separate allocation, just a handle copy
|
||||
// optimizations should have eliminated load from global array
|
||||
rayQueryEXT rayQuery0c = g_rayQueryArray[idx];
|
||||
|
||||
// rayQuery0a is the one actually used here
|
||||
rayQueryInitializeEXT(rayQuery0c, rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullBackFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
|
||||
// AllocateRayQuery occurs here, rather than next to allocas
|
||||
// Should not be extray allocate, since above should allocate and copy
|
||||
rayQueryEXT rayQuery1c;
|
||||
// update the rayFlags as RAY_FLAG_FORCE_OPAQUE
|
||||
rayQueryInitializeEXT(rayQuery1c, rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullFrontFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
|
||||
rayQueryInitializeEXT(rayQuery1c, rtas, gl_RayFlagsOpaqueEXT|gl_RayFlagsNoOpaqueEXT, gl_RayFlagsCullOpaqueEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
}
|
33
Test/rayQuery-initialize.rgen
Normal file
33
Test/rayQuery-initialize.rgen
Normal file
@ -0,0 +1,33 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
uint launchIndex()
|
||||
{
|
||||
return gl_LaunchIDNV.z*gl_LaunchSizeNV.x*gl_LaunchSizeNV.y + gl_LaunchIDNV.y*gl_LaunchSizeNV.x + gl_LaunchIDNV.x;
|
||||
}
|
||||
|
||||
void doInitialize(rayQueryEXT rayQuery, Ray ray)
|
||||
{
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, gl_RayFlagsCullBackFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = launchIndex();
|
||||
Ray ray = rays[index];
|
||||
rayQueryEXT rayQuery;
|
||||
doInitialize(rayQuery, ray);
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullFrontFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
}
|
35
Test/rayQuery-no-cse.rgen
Normal file
35
Test/rayQuery-no-cse.rgen
Normal file
@ -0,0 +1,35 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
|
||||
struct Ray
|
||||
{
|
||||
vec3 pos;
|
||||
float tmin;
|
||||
vec3 dir;
|
||||
float tmax;
|
||||
};
|
||||
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNV rtas;
|
||||
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
|
||||
|
||||
uint launchIndex()
|
||||
{
|
||||
return gl_LaunchIDNV.z*gl_LaunchSizeNV.x*gl_LaunchSizeNV.y + gl_LaunchIDNV.y*gl_LaunchSizeNV.x + gl_LaunchIDNV.x;
|
||||
}
|
||||
|
||||
void doInitialize(rayQueryEXT rayQuery, Ray ray)
|
||||
{
|
||||
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, gl_RayFlagsCullBackFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = launchIndex();
|
||||
Ray ray = rays[index];
|
||||
rayQueryEXT rayQuery1;
|
||||
rayQueryEXT rayQuery2;
|
||||
doInitialize(rayQuery1, ray);
|
||||
rayQueryInitializeEXT(rayQuery1, rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullFrontFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
|
||||
doInitialize(rayQuery2, ray);
|
||||
}
|
23
Test/rayQuery.rgen
Normal file
23
Test/rayQuery.rgen
Normal file
@ -0,0 +1,23 @@
|
||||
#version 460
|
||||
#extension GL_NV_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
layout(binding = 0, set = 0) uniform accelerationStructureNV accNV0;
|
||||
|
||||
layout(shaderRecordNV) buffer block
|
||||
{
|
||||
vec3 dir;
|
||||
vec3 origin;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
rayQueryEXT localRayQuery;
|
||||
uint rayFlags = gl_RayFlagsOpaqueEXT | gl_RayFlagsSkipClosestHitShaderEXT;
|
||||
float tMin = 0.f;
|
||||
float tMax = 1000.f;
|
||||
rayQueryInitializeEXT(localRayQuery, accNV0, rayFlags, 0xFF , origin, tMin, dir, tMax);
|
||||
if (!rayQueryProceedEXT(localRayQuery))
|
||||
{
|
||||
rayQueryTerminateEXT(localRayQuery);
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -63,6 +64,7 @@ enum TBasicType {
|
||||
EbtBlock,
|
||||
EbtAccStruct,
|
||||
EbtReference,
|
||||
EbtRayQuery,
|
||||
|
||||
// HLSL types that live only temporarily.
|
||||
EbtString,
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||
// Copyright (C) 2015-2016 Google, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -1950,6 +1951,7 @@ public:
|
||||
case EbtStruct: return "structure";
|
||||
case EbtBlock: return "block";
|
||||
case EbtAccStruct: return "accelerationStructureNV";
|
||||
case EbtRayQuery: return "rayQueryEXT";
|
||||
case EbtReference: return "reference";
|
||||
#endif
|
||||
default: return "unknown type";
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -916,6 +917,35 @@ enum TOperator {
|
||||
EOpTerminateRay,
|
||||
EOpExecuteCallable,
|
||||
EOpWritePackedPrimitiveIndices4x8NV,
|
||||
|
||||
//
|
||||
// GL_EXT_ray_query operations
|
||||
//
|
||||
|
||||
EOpRayQueryInitialize,
|
||||
EOpRayQueryTerminate,
|
||||
EOpRayQueryGenerateIntersection,
|
||||
EOpRayQueryConfirmIntersection,
|
||||
EOpRayQueryProceed,
|
||||
EOpRayQueryGetIntersectionType,
|
||||
EOpRayQueryGetRayTMin,
|
||||
EOpRayQueryGetRayFlags,
|
||||
EOpRayQueryGetIntersectionT,
|
||||
EOpRayQueryGetIntersectionInstanceCustomIndex,
|
||||
EOpRayQueryGetIntersectionInstanceId,
|
||||
EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset,
|
||||
EOpRayQueryGetIntersectionGeometryIndex,
|
||||
EOpRayQueryGetIntersectionPrimitiveIndex,
|
||||
EOpRayQueryGetIntersectionBarycentrics,
|
||||
EOpRayQueryGetIntersectionFrontFace,
|
||||
EOpRayQueryGetIntersectionCandidateAABBOpaque,
|
||||
EOpRayQueryGetIntersectionObjectRayDirection,
|
||||
EOpRayQueryGetIntersectionObjectRayOrigin,
|
||||
EOpRayQueryGetWorldRayDirection,
|
||||
EOpRayQueryGetWorldRayOrigin,
|
||||
EOpRayQueryGetIntersectionObjectToWorld,
|
||||
EOpRayQueryGetIntersectionWorldToObject,
|
||||
|
||||
//
|
||||
// HLSL operations
|
||||
//
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||
// Copyright (C) 2015-2020 Google, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -4322,8 +4323,33 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"\n");
|
||||
}
|
||||
|
||||
// Builtins for GL_NV_ray_tracing/GL_EXT_ray_tracing
|
||||
// Builtins for GL_NV_ray_tracing/GL_EXT_ray_tracing/GL_EXT_ray_query
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
|
||||
"void rayQueryTerminateEXT(rayQueryEXT);"
|
||||
"void rayQueryGenerateIntersectionEXT(rayQueryEXT, float);"
|
||||
"void rayQueryConfirmIntersectionEXT(rayQueryEXT);"
|
||||
"bool rayQueryProceedEXT(rayQueryEXT);"
|
||||
"uint rayQueryGetIntersectionTypeEXT(rayQueryEXT, bool);"
|
||||
"float rayQueryGetRayTMinEXT(rayQueryEXT);"
|
||||
"uint rayQueryGetRayFlagsEXT(rayQueryEXT);"
|
||||
"vec3 rayQueryGetWorldRayOriginEXT(rayQueryEXT);"
|
||||
"vec3 rayQueryGetWorldRayDirectionEXT(rayQueryEXT);"
|
||||
"float rayQueryGetIntersectionTEXT(rayQueryEXT, bool);"
|
||||
"int rayQueryGetIntersectionInstanceCustomIndexEXT(rayQueryEXT, bool);"
|
||||
"int rayQueryGetIntersectionInstanceIdEXT(rayQueryEXT, bool);"
|
||||
"uint rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQueryEXT, bool);"
|
||||
"int rayQueryGetIntersectionGeometryIndexEXT(rayQueryEXT, bool);"
|
||||
"int rayQueryGetIntersectionPrimitiveIndexEXT(rayQueryEXT, bool);"
|
||||
"vec2 rayQueryGetIntersectionBarycentricsEXT(rayQueryEXT, bool);"
|
||||
"bool rayQueryGetIntersectionFrontFaceEXT(rayQueryEXT, bool);"
|
||||
"bool rayQueryGetIntersectionCandidateAABBOpaqueEXT(rayQueryEXT);"
|
||||
"vec3 rayQueryGetIntersectionObjectRayDirectionEXT(rayQueryEXT, bool);"
|
||||
"vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);"
|
||||
"mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);"
|
||||
"mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);"
|
||||
"\n");
|
||||
|
||||
stageBuiltins[EShLangRayGen].append(
|
||||
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
@ -5436,6 +5462,17 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"const uint gl_HitKindFrontFacingTriangleEXT = 254U;"
|
||||
"const uint gl_HitKindBackFacingTriangleEXT = 255U;"
|
||||
"\n";
|
||||
|
||||
const char *constRayQueryIntersection =
|
||||
"const uint gl_RayQueryCandidateIntersectionEXT = 0U;"
|
||||
"const uint gl_RayQueryCommittedIntersectionEXT = 1U;"
|
||||
"const uint gl_RayQueryCommittedIntersectionNoneEXT = 0U;"
|
||||
"const uint gl_RayQueryCommittedIntersectionTriangleEXT = 1U;"
|
||||
"const uint gl_RayQueryCommittedIntersectionGeneratedEXT = 2U;"
|
||||
"const uint gl_RayQueryCandidateIntersectionTriangleEXT = 0U;"
|
||||
"const uint gl_RayQueryCandidateIntersectionAABBEXT = 1U;"
|
||||
"\n";
|
||||
|
||||
const char *rayGenDecls =
|
||||
"in uvec3 gl_LaunchIDNV;"
|
||||
"in uvec3 gl_LaunchIDEXT;"
|
||||
@ -5535,24 +5572,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"\n";
|
||||
|
||||
|
||||
commonBuiltins.append(constRayQueryIntersection);
|
||||
commonBuiltins.append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangRayGen].append(rayGenDecls);
|
||||
stageBuiltins[EShLangRayGen].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangIntersect].append(intersectDecls);
|
||||
stageBuiltins[EShLangIntersect].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangAnyHit].append(hitDecls);
|
||||
stageBuiltins[EShLangAnyHit].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangClosestHit].append(hitDecls);
|
||||
stageBuiltins[EShLangClosestHit].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangMiss].append(missDecls);
|
||||
stageBuiltins[EShLangMiss].append(constRayFlags);
|
||||
|
||||
stageBuiltins[EShLangCallable].append(callableDecls);
|
||||
stageBuiltins[EShLangCallable].append(constRayFlags);
|
||||
|
||||
}
|
||||
if ((profile != EEsProfile && version >= 140)) {
|
||||
@ -7522,6 +7550,32 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable);
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.setFunctionExtensions("rayQueryInitializeEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryTerminateEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGenerateIntersectionEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryConfirmIntersectionEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryProceedEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionTypeEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionTEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetRayFlagsEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetRayTMinEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceCustomIndexEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceIdEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionGeometryIndexEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionPrimitiveIndexEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionBarycentricsEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionFrontFaceEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionCandidateAABBOpaqueEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectRayDirectionEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectRayOriginEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectToWorldEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query);
|
||||
}
|
||||
|
||||
if ((profile != EEsProfile && version >= 130) ||
|
||||
(profile == EEsProfile && version >= 310)) {
|
||||
BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
|
||||
@ -8860,6 +8914,33 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
|
||||
symbolTable.relateToOperator("fwidthCoarse", EOpFwidthCoarse);
|
||||
}
|
||||
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
symbolTable.relateToOperator("rayQueryInitializeEXT", EOpRayQueryInitialize);
|
||||
symbolTable.relateToOperator("rayQueryTerminateEXT", EOpRayQueryTerminate);
|
||||
symbolTable.relateToOperator("rayQueryGenerateIntersectionEXT", EOpRayQueryGenerateIntersection);
|
||||
symbolTable.relateToOperator("rayQueryConfirmIntersectionEXT", EOpRayQueryConfirmIntersection);
|
||||
symbolTable.relateToOperator("rayQueryProceedEXT", EOpRayQueryProceed);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionTypeEXT", EOpRayQueryGetIntersectionType);
|
||||
symbolTable.relateToOperator("rayQueryGetRayTMinEXT", EOpRayQueryGetRayTMin);
|
||||
symbolTable.relateToOperator("rayQueryGetRayFlagsEXT", EOpRayQueryGetRayFlags);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionTEXT", EOpRayQueryGetIntersectionT);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionInstanceCustomIndexEXT", EOpRayQueryGetIntersectionInstanceCustomIndex);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionInstanceIdEXT", EOpRayQueryGetIntersectionInstanceId);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT", EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionGeometryIndexEXT", EOpRayQueryGetIntersectionGeometryIndex);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionPrimitiveIndexEXT", EOpRayQueryGetIntersectionPrimitiveIndex);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionBarycentricsEXT", EOpRayQueryGetIntersectionBarycentrics);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionFrontFaceEXT", EOpRayQueryGetIntersectionFrontFace);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionCandidateAABBOpaqueEXT", EOpRayQueryGetIntersectionCandidateAABBOpaque);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionObjectRayDirectionEXT", EOpRayQueryGetIntersectionObjectRayDirection);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionObjectRayOriginEXT", EOpRayQueryGetIntersectionObjectRayOrigin);
|
||||
symbolTable.relateToOperator("rayQueryGetWorldRayDirectionEXT", EOpRayQueryGetWorldRayDirection);
|
||||
symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject);
|
||||
}
|
||||
|
||||
symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid);
|
||||
symbolTable.relateToOperator("interpolateAtSample", EOpInterpolateAtSample);
|
||||
symbolTable.relateToOperator("interpolateAtOffset", EOpInterpolateAtOffset);
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2015 LunarG, Inc.
|
||||
// Copyright (C) 2015-2018 Google, Inc.
|
||||
// Copyright (C) 2017, 2019 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -2041,6 +2042,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||
error(loc, "argument must be compile-time constant", "callable data number", "");
|
||||
break;
|
||||
|
||||
case EOpRayQueryGetIntersectionType:
|
||||
case EOpRayQueryGetIntersectionT:
|
||||
case EOpRayQueryGetIntersectionInstanceCustomIndex:
|
||||
case EOpRayQueryGetIntersectionInstanceId:
|
||||
case EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
|
||||
case EOpRayQueryGetIntersectionGeometryIndex:
|
||||
case EOpRayQueryGetIntersectionPrimitiveIndex:
|
||||
case EOpRayQueryGetIntersectionBarycentrics:
|
||||
case EOpRayQueryGetIntersectionFrontFace:
|
||||
case EOpRayQueryGetIntersectionObjectRayDirection:
|
||||
case EOpRayQueryGetIntersectionObjectRayOrigin:
|
||||
case EOpRayQueryGetIntersectionObjectToWorld:
|
||||
case EOpRayQueryGetIntersectionWorldToObject:
|
||||
if (!(*argp)[1]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "committed", "");
|
||||
break;
|
||||
|
||||
case EOpTextureQuerySamples:
|
||||
case EOpImageQuerySamples:
|
||||
// GL_ARB_shader_texture_image_samples
|
||||
@ -3992,7 +4010,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
|
||||
}
|
||||
|
||||
// check for additional things allowed by GL_EXT_nonuniform_qualifier
|
||||
if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct ||
|
||||
if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery ||
|
||||
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
|
||||
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
|
||||
else
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Copyright (C) 2020 Google, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -715,6 +716,7 @@ void TScanContext::fillInKeywordMap()
|
||||
(*KeywordMap)["callableDataInEXT"] = CALLDATAINEXT;
|
||||
(*KeywordMap)["accelerationStructureNV"] = ACCSTRUCTNV;
|
||||
(*KeywordMap)["accelerationStructureEXT"] = ACCSTRUCTEXT;
|
||||
(*KeywordMap)["rayQueryEXT"] = RAYQUERYEXT;
|
||||
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
|
||||
(*KeywordMap)["perviewNV"] = PERVIEWNV;
|
||||
(*KeywordMap)["taskNV"] = PERTASKNV;
|
||||
@ -1031,6 +1033,12 @@ int TScanContext::tokenizeIdentifier()
|
||||
parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
case RAYQUERYEXT:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
(!parseContext.isEsProfile() && parseContext.version >= 460
|
||||
&& parseContext.extensionTurnedOn(E_GL_EXT_ray_query)))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
case ATOMIC_UINT:
|
||||
if ((parseContext.isEsProfile() && parseContext.version >= 310) ||
|
||||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Copyright (C) 2015-2018 Google, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -75,6 +76,7 @@ void TType::buildMangledName(TString& mangledName) const
|
||||
case EbtUint64: mangledName += "u64"; break;
|
||||
case EbtAtomicUint: mangledName += "au"; break;
|
||||
case EbtAccStruct: mangledName += "as"; break;
|
||||
case EbtRayQuery: mangledName += "rq"; break;
|
||||
#endif
|
||||
case EbtSampler:
|
||||
switch (sampler.type) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Copyright (C) 2015-2020 Google, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -296,6 +297,7 @@ void TParseVersions::initializeExtensionBehavior()
|
||||
extensionBehavior[E_GL_EXT_multiview] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_ray_tracing] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_ray_query] = EBhDisable;
|
||||
|
||||
// OVR extensions
|
||||
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
||||
@ -435,6 +437,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||
"#define E_GL_EXT_shader_atomic_int64 1\n"
|
||||
"#define E_GL_EXT_shader_realtime_clock 1\n"
|
||||
"#define E_GL_EXT_ray_tracing 1\n"
|
||||
"#define E_GL_EXT_ray_query 1\n"
|
||||
|
||||
"#define GL_AMD_shader_ballot 1\n"
|
||||
"#define GL_AMD_shader_trinary_minmax 1\n"
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Copyright (C) 2015-2018 Google, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -187,6 +188,7 @@ const char* const E_GL_EXT_demote_to_helper_invocation = "GL_EXT_demote_to_
|
||||
const char* const E_GL_EXT_shader_realtime_clock = "GL_EXT_shader_realtime_clock";
|
||||
const char* const E_GL_EXT_debug_printf = "GL_EXT_debug_printf";
|
||||
const char* const E_GL_EXT_ray_tracing = "GL_EXT_ray_tracing";
|
||||
const char* const E_GL_EXT_ray_query = "GL_EXT_ray_query";
|
||||
|
||||
// Arrays of extensions for the above viewportEXTs duplications
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Copyright (C) 2015-2019 Google, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -205,6 +206,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
%token <lex> ATOMIC_UINT
|
||||
%token <lex> ACCSTRUCTNV
|
||||
%token <lex> ACCSTRUCTEXT
|
||||
%token <lex> RAYQUERYEXT
|
||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||
|
||||
// combined image/sampler
|
||||
@ -2406,6 +2408,10 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtAccStruct;
|
||||
}
|
||||
| RAYQUERYEXT {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtRayQuery;
|
||||
}
|
||||
| ATOMIC_UINT {
|
||||
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
|
@ -3,6 +3,7 @@
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Copyright (C) 2015-2019 Google, Inc.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -205,6 +206,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
||||
%token <lex> ATOMIC_UINT
|
||||
%token <lex> ACCSTRUCTNV
|
||||
%token <lex> ACCSTRUCTEXT
|
||||
%token <lex> RAYQUERYEXT
|
||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||
|
||||
// combined image/sampler
|
||||
@ -2406,6 +2408,10 @@ type_specifier_nonarray
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtAccStruct;
|
||||
}
|
||||
| RAYQUERYEXT {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtRayQuery;
|
||||
}
|
||||
| ATOMIC_UINT {
|
||||
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
@ -3879,3 +3885,4 @@ single_attribute
|
||||
|
||||
|
||||
%%
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,8 +30,8 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
|
||||
# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
|
||||
#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED
|
||||
# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 1
|
||||
@ -204,263 +204,264 @@ extern int yydebug;
|
||||
ATOMIC_UINT = 414,
|
||||
ACCSTRUCTNV = 415,
|
||||
ACCSTRUCTEXT = 416,
|
||||
FCOOPMATNV = 417,
|
||||
ICOOPMATNV = 418,
|
||||
UCOOPMATNV = 419,
|
||||
SAMPLERCUBEARRAY = 420,
|
||||
SAMPLERCUBEARRAYSHADOW = 421,
|
||||
ISAMPLERCUBEARRAY = 422,
|
||||
USAMPLERCUBEARRAY = 423,
|
||||
SAMPLER1D = 424,
|
||||
SAMPLER1DARRAY = 425,
|
||||
SAMPLER1DARRAYSHADOW = 426,
|
||||
ISAMPLER1D = 427,
|
||||
SAMPLER1DSHADOW = 428,
|
||||
SAMPLER2DRECT = 429,
|
||||
SAMPLER2DRECTSHADOW = 430,
|
||||
ISAMPLER2DRECT = 431,
|
||||
USAMPLER2DRECT = 432,
|
||||
SAMPLERBUFFER = 433,
|
||||
ISAMPLERBUFFER = 434,
|
||||
USAMPLERBUFFER = 435,
|
||||
SAMPLER2DMS = 436,
|
||||
ISAMPLER2DMS = 437,
|
||||
USAMPLER2DMS = 438,
|
||||
SAMPLER2DMSARRAY = 439,
|
||||
ISAMPLER2DMSARRAY = 440,
|
||||
USAMPLER2DMSARRAY = 441,
|
||||
SAMPLEREXTERNALOES = 442,
|
||||
SAMPLEREXTERNAL2DY2YEXT = 443,
|
||||
ISAMPLER1DARRAY = 444,
|
||||
USAMPLER1D = 445,
|
||||
USAMPLER1DARRAY = 446,
|
||||
F16SAMPLER1D = 447,
|
||||
F16SAMPLER2D = 448,
|
||||
F16SAMPLER3D = 449,
|
||||
F16SAMPLER2DRECT = 450,
|
||||
F16SAMPLERCUBE = 451,
|
||||
F16SAMPLER1DARRAY = 452,
|
||||
F16SAMPLER2DARRAY = 453,
|
||||
F16SAMPLERCUBEARRAY = 454,
|
||||
F16SAMPLERBUFFER = 455,
|
||||
F16SAMPLER2DMS = 456,
|
||||
F16SAMPLER2DMSARRAY = 457,
|
||||
F16SAMPLER1DSHADOW = 458,
|
||||
F16SAMPLER2DSHADOW = 459,
|
||||
F16SAMPLER1DARRAYSHADOW = 460,
|
||||
F16SAMPLER2DARRAYSHADOW = 461,
|
||||
F16SAMPLER2DRECTSHADOW = 462,
|
||||
F16SAMPLERCUBESHADOW = 463,
|
||||
F16SAMPLERCUBEARRAYSHADOW = 464,
|
||||
IMAGE1D = 465,
|
||||
IIMAGE1D = 466,
|
||||
UIMAGE1D = 467,
|
||||
IMAGE2D = 468,
|
||||
IIMAGE2D = 469,
|
||||
UIMAGE2D = 470,
|
||||
IMAGE3D = 471,
|
||||
IIMAGE3D = 472,
|
||||
UIMAGE3D = 473,
|
||||
IMAGE2DRECT = 474,
|
||||
IIMAGE2DRECT = 475,
|
||||
UIMAGE2DRECT = 476,
|
||||
IMAGECUBE = 477,
|
||||
IIMAGECUBE = 478,
|
||||
UIMAGECUBE = 479,
|
||||
IMAGEBUFFER = 480,
|
||||
IIMAGEBUFFER = 481,
|
||||
UIMAGEBUFFER = 482,
|
||||
IMAGE1DARRAY = 483,
|
||||
IIMAGE1DARRAY = 484,
|
||||
UIMAGE1DARRAY = 485,
|
||||
IMAGE2DARRAY = 486,
|
||||
IIMAGE2DARRAY = 487,
|
||||
UIMAGE2DARRAY = 488,
|
||||
IMAGECUBEARRAY = 489,
|
||||
IIMAGECUBEARRAY = 490,
|
||||
UIMAGECUBEARRAY = 491,
|
||||
IMAGE2DMS = 492,
|
||||
IIMAGE2DMS = 493,
|
||||
UIMAGE2DMS = 494,
|
||||
IMAGE2DMSARRAY = 495,
|
||||
IIMAGE2DMSARRAY = 496,
|
||||
UIMAGE2DMSARRAY = 497,
|
||||
F16IMAGE1D = 498,
|
||||
F16IMAGE2D = 499,
|
||||
F16IMAGE3D = 500,
|
||||
F16IMAGE2DRECT = 501,
|
||||
F16IMAGECUBE = 502,
|
||||
F16IMAGE1DARRAY = 503,
|
||||
F16IMAGE2DARRAY = 504,
|
||||
F16IMAGECUBEARRAY = 505,
|
||||
F16IMAGEBUFFER = 506,
|
||||
F16IMAGE2DMS = 507,
|
||||
F16IMAGE2DMSARRAY = 508,
|
||||
TEXTURECUBEARRAY = 509,
|
||||
ITEXTURECUBEARRAY = 510,
|
||||
UTEXTURECUBEARRAY = 511,
|
||||
TEXTURE1D = 512,
|
||||
ITEXTURE1D = 513,
|
||||
UTEXTURE1D = 514,
|
||||
TEXTURE1DARRAY = 515,
|
||||
ITEXTURE1DARRAY = 516,
|
||||
UTEXTURE1DARRAY = 517,
|
||||
TEXTURE2DRECT = 518,
|
||||
ITEXTURE2DRECT = 519,
|
||||
UTEXTURE2DRECT = 520,
|
||||
TEXTUREBUFFER = 521,
|
||||
ITEXTUREBUFFER = 522,
|
||||
UTEXTUREBUFFER = 523,
|
||||
TEXTURE2DMS = 524,
|
||||
ITEXTURE2DMS = 525,
|
||||
UTEXTURE2DMS = 526,
|
||||
TEXTURE2DMSARRAY = 527,
|
||||
ITEXTURE2DMSARRAY = 528,
|
||||
UTEXTURE2DMSARRAY = 529,
|
||||
F16TEXTURE1D = 530,
|
||||
F16TEXTURE2D = 531,
|
||||
F16TEXTURE3D = 532,
|
||||
F16TEXTURE2DRECT = 533,
|
||||
F16TEXTURECUBE = 534,
|
||||
F16TEXTURE1DARRAY = 535,
|
||||
F16TEXTURE2DARRAY = 536,
|
||||
F16TEXTURECUBEARRAY = 537,
|
||||
F16TEXTUREBUFFER = 538,
|
||||
F16TEXTURE2DMS = 539,
|
||||
F16TEXTURE2DMSARRAY = 540,
|
||||
SUBPASSINPUT = 541,
|
||||
SUBPASSINPUTMS = 542,
|
||||
ISUBPASSINPUT = 543,
|
||||
ISUBPASSINPUTMS = 544,
|
||||
USUBPASSINPUT = 545,
|
||||
USUBPASSINPUTMS = 546,
|
||||
F16SUBPASSINPUT = 547,
|
||||
F16SUBPASSINPUTMS = 548,
|
||||
LEFT_OP = 549,
|
||||
RIGHT_OP = 550,
|
||||
INC_OP = 551,
|
||||
DEC_OP = 552,
|
||||
LE_OP = 553,
|
||||
GE_OP = 554,
|
||||
EQ_OP = 555,
|
||||
NE_OP = 556,
|
||||
AND_OP = 557,
|
||||
OR_OP = 558,
|
||||
XOR_OP = 559,
|
||||
MUL_ASSIGN = 560,
|
||||
DIV_ASSIGN = 561,
|
||||
ADD_ASSIGN = 562,
|
||||
MOD_ASSIGN = 563,
|
||||
LEFT_ASSIGN = 564,
|
||||
RIGHT_ASSIGN = 565,
|
||||
AND_ASSIGN = 566,
|
||||
XOR_ASSIGN = 567,
|
||||
OR_ASSIGN = 568,
|
||||
SUB_ASSIGN = 569,
|
||||
STRING_LITERAL = 570,
|
||||
LEFT_PAREN = 571,
|
||||
RIGHT_PAREN = 572,
|
||||
LEFT_BRACKET = 573,
|
||||
RIGHT_BRACKET = 574,
|
||||
LEFT_BRACE = 575,
|
||||
RIGHT_BRACE = 576,
|
||||
DOT = 577,
|
||||
COMMA = 578,
|
||||
COLON = 579,
|
||||
EQUAL = 580,
|
||||
SEMICOLON = 581,
|
||||
BANG = 582,
|
||||
DASH = 583,
|
||||
TILDE = 584,
|
||||
PLUS = 585,
|
||||
STAR = 586,
|
||||
SLASH = 587,
|
||||
PERCENT = 588,
|
||||
LEFT_ANGLE = 589,
|
||||
RIGHT_ANGLE = 590,
|
||||
VERTICAL_BAR = 591,
|
||||
CARET = 592,
|
||||
AMPERSAND = 593,
|
||||
QUESTION = 594,
|
||||
INVARIANT = 595,
|
||||
HIGH_PRECISION = 596,
|
||||
MEDIUM_PRECISION = 597,
|
||||
LOW_PRECISION = 598,
|
||||
PRECISION = 599,
|
||||
PACKED = 600,
|
||||
RESOURCE = 601,
|
||||
SUPERP = 602,
|
||||
FLOATCONSTANT = 603,
|
||||
INTCONSTANT = 604,
|
||||
UINTCONSTANT = 605,
|
||||
BOOLCONSTANT = 606,
|
||||
IDENTIFIER = 607,
|
||||
TYPE_NAME = 608,
|
||||
CENTROID = 609,
|
||||
IN = 610,
|
||||
OUT = 611,
|
||||
INOUT = 612,
|
||||
STRUCT = 613,
|
||||
VOID = 614,
|
||||
WHILE = 615,
|
||||
BREAK = 616,
|
||||
CONTINUE = 617,
|
||||
DO = 618,
|
||||
ELSE = 619,
|
||||
FOR = 620,
|
||||
IF = 621,
|
||||
DISCARD = 622,
|
||||
RETURN = 623,
|
||||
SWITCH = 624,
|
||||
CASE = 625,
|
||||
DEFAULT = 626,
|
||||
UNIFORM = 627,
|
||||
SHARED = 628,
|
||||
BUFFER = 629,
|
||||
FLAT = 630,
|
||||
SMOOTH = 631,
|
||||
LAYOUT = 632,
|
||||
DOUBLECONSTANT = 633,
|
||||
INT16CONSTANT = 634,
|
||||
UINT16CONSTANT = 635,
|
||||
FLOAT16CONSTANT = 636,
|
||||
INT32CONSTANT = 637,
|
||||
UINT32CONSTANT = 638,
|
||||
INT64CONSTANT = 639,
|
||||
UINT64CONSTANT = 640,
|
||||
SUBROUTINE = 641,
|
||||
DEMOTE = 642,
|
||||
PAYLOADNV = 643,
|
||||
PAYLOADINNV = 644,
|
||||
HITATTRNV = 645,
|
||||
CALLDATANV = 646,
|
||||
CALLDATAINNV = 647,
|
||||
PAYLOADEXT = 648,
|
||||
PAYLOADINEXT = 649,
|
||||
HITATTREXT = 650,
|
||||
CALLDATAEXT = 651,
|
||||
CALLDATAINEXT = 652,
|
||||
PATCH = 653,
|
||||
SAMPLE = 654,
|
||||
NONUNIFORM = 655,
|
||||
COHERENT = 656,
|
||||
VOLATILE = 657,
|
||||
RESTRICT = 658,
|
||||
READONLY = 659,
|
||||
WRITEONLY = 660,
|
||||
DEVICECOHERENT = 661,
|
||||
QUEUEFAMILYCOHERENT = 662,
|
||||
WORKGROUPCOHERENT = 663,
|
||||
SUBGROUPCOHERENT = 664,
|
||||
NONPRIVATE = 665,
|
||||
SHADERCALLCOHERENT = 666,
|
||||
NOPERSPECTIVE = 667,
|
||||
EXPLICITINTERPAMD = 668,
|
||||
PERVERTEXNV = 669,
|
||||
PERPRIMITIVENV = 670,
|
||||
PERVIEWNV = 671,
|
||||
PERTASKNV = 672,
|
||||
PRECISE = 673
|
||||
RAYQUERYEXT = 417,
|
||||
FCOOPMATNV = 418,
|
||||
ICOOPMATNV = 419,
|
||||
UCOOPMATNV = 420,
|
||||
SAMPLERCUBEARRAY = 421,
|
||||
SAMPLERCUBEARRAYSHADOW = 422,
|
||||
ISAMPLERCUBEARRAY = 423,
|
||||
USAMPLERCUBEARRAY = 424,
|
||||
SAMPLER1D = 425,
|
||||
SAMPLER1DARRAY = 426,
|
||||
SAMPLER1DARRAYSHADOW = 427,
|
||||
ISAMPLER1D = 428,
|
||||
SAMPLER1DSHADOW = 429,
|
||||
SAMPLER2DRECT = 430,
|
||||
SAMPLER2DRECTSHADOW = 431,
|
||||
ISAMPLER2DRECT = 432,
|
||||
USAMPLER2DRECT = 433,
|
||||
SAMPLERBUFFER = 434,
|
||||
ISAMPLERBUFFER = 435,
|
||||
USAMPLERBUFFER = 436,
|
||||
SAMPLER2DMS = 437,
|
||||
ISAMPLER2DMS = 438,
|
||||
USAMPLER2DMS = 439,
|
||||
SAMPLER2DMSARRAY = 440,
|
||||
ISAMPLER2DMSARRAY = 441,
|
||||
USAMPLER2DMSARRAY = 442,
|
||||
SAMPLEREXTERNALOES = 443,
|
||||
SAMPLEREXTERNAL2DY2YEXT = 444,
|
||||
ISAMPLER1DARRAY = 445,
|
||||
USAMPLER1D = 446,
|
||||
USAMPLER1DARRAY = 447,
|
||||
F16SAMPLER1D = 448,
|
||||
F16SAMPLER2D = 449,
|
||||
F16SAMPLER3D = 450,
|
||||
F16SAMPLER2DRECT = 451,
|
||||
F16SAMPLERCUBE = 452,
|
||||
F16SAMPLER1DARRAY = 453,
|
||||
F16SAMPLER2DARRAY = 454,
|
||||
F16SAMPLERCUBEARRAY = 455,
|
||||
F16SAMPLERBUFFER = 456,
|
||||
F16SAMPLER2DMS = 457,
|
||||
F16SAMPLER2DMSARRAY = 458,
|
||||
F16SAMPLER1DSHADOW = 459,
|
||||
F16SAMPLER2DSHADOW = 460,
|
||||
F16SAMPLER1DARRAYSHADOW = 461,
|
||||
F16SAMPLER2DARRAYSHADOW = 462,
|
||||
F16SAMPLER2DRECTSHADOW = 463,
|
||||
F16SAMPLERCUBESHADOW = 464,
|
||||
F16SAMPLERCUBEARRAYSHADOW = 465,
|
||||
IMAGE1D = 466,
|
||||
IIMAGE1D = 467,
|
||||
UIMAGE1D = 468,
|
||||
IMAGE2D = 469,
|
||||
IIMAGE2D = 470,
|
||||
UIMAGE2D = 471,
|
||||
IMAGE3D = 472,
|
||||
IIMAGE3D = 473,
|
||||
UIMAGE3D = 474,
|
||||
IMAGE2DRECT = 475,
|
||||
IIMAGE2DRECT = 476,
|
||||
UIMAGE2DRECT = 477,
|
||||
IMAGECUBE = 478,
|
||||
IIMAGECUBE = 479,
|
||||
UIMAGECUBE = 480,
|
||||
IMAGEBUFFER = 481,
|
||||
IIMAGEBUFFER = 482,
|
||||
UIMAGEBUFFER = 483,
|
||||
IMAGE1DARRAY = 484,
|
||||
IIMAGE1DARRAY = 485,
|
||||
UIMAGE1DARRAY = 486,
|
||||
IMAGE2DARRAY = 487,
|
||||
IIMAGE2DARRAY = 488,
|
||||
UIMAGE2DARRAY = 489,
|
||||
IMAGECUBEARRAY = 490,
|
||||
IIMAGECUBEARRAY = 491,
|
||||
UIMAGECUBEARRAY = 492,
|
||||
IMAGE2DMS = 493,
|
||||
IIMAGE2DMS = 494,
|
||||
UIMAGE2DMS = 495,
|
||||
IMAGE2DMSARRAY = 496,
|
||||
IIMAGE2DMSARRAY = 497,
|
||||
UIMAGE2DMSARRAY = 498,
|
||||
F16IMAGE1D = 499,
|
||||
F16IMAGE2D = 500,
|
||||
F16IMAGE3D = 501,
|
||||
F16IMAGE2DRECT = 502,
|
||||
F16IMAGECUBE = 503,
|
||||
F16IMAGE1DARRAY = 504,
|
||||
F16IMAGE2DARRAY = 505,
|
||||
F16IMAGECUBEARRAY = 506,
|
||||
F16IMAGEBUFFER = 507,
|
||||
F16IMAGE2DMS = 508,
|
||||
F16IMAGE2DMSARRAY = 509,
|
||||
TEXTURECUBEARRAY = 510,
|
||||
ITEXTURECUBEARRAY = 511,
|
||||
UTEXTURECUBEARRAY = 512,
|
||||
TEXTURE1D = 513,
|
||||
ITEXTURE1D = 514,
|
||||
UTEXTURE1D = 515,
|
||||
TEXTURE1DARRAY = 516,
|
||||
ITEXTURE1DARRAY = 517,
|
||||
UTEXTURE1DARRAY = 518,
|
||||
TEXTURE2DRECT = 519,
|
||||
ITEXTURE2DRECT = 520,
|
||||
UTEXTURE2DRECT = 521,
|
||||
TEXTUREBUFFER = 522,
|
||||
ITEXTUREBUFFER = 523,
|
||||
UTEXTUREBUFFER = 524,
|
||||
TEXTURE2DMS = 525,
|
||||
ITEXTURE2DMS = 526,
|
||||
UTEXTURE2DMS = 527,
|
||||
TEXTURE2DMSARRAY = 528,
|
||||
ITEXTURE2DMSARRAY = 529,
|
||||
UTEXTURE2DMSARRAY = 530,
|
||||
F16TEXTURE1D = 531,
|
||||
F16TEXTURE2D = 532,
|
||||
F16TEXTURE3D = 533,
|
||||
F16TEXTURE2DRECT = 534,
|
||||
F16TEXTURECUBE = 535,
|
||||
F16TEXTURE1DARRAY = 536,
|
||||
F16TEXTURE2DARRAY = 537,
|
||||
F16TEXTURECUBEARRAY = 538,
|
||||
F16TEXTUREBUFFER = 539,
|
||||
F16TEXTURE2DMS = 540,
|
||||
F16TEXTURE2DMSARRAY = 541,
|
||||
SUBPASSINPUT = 542,
|
||||
SUBPASSINPUTMS = 543,
|
||||
ISUBPASSINPUT = 544,
|
||||
ISUBPASSINPUTMS = 545,
|
||||
USUBPASSINPUT = 546,
|
||||
USUBPASSINPUTMS = 547,
|
||||
F16SUBPASSINPUT = 548,
|
||||
F16SUBPASSINPUTMS = 549,
|
||||
LEFT_OP = 550,
|
||||
RIGHT_OP = 551,
|
||||
INC_OP = 552,
|
||||
DEC_OP = 553,
|
||||
LE_OP = 554,
|
||||
GE_OP = 555,
|
||||
EQ_OP = 556,
|
||||
NE_OP = 557,
|
||||
AND_OP = 558,
|
||||
OR_OP = 559,
|
||||
XOR_OP = 560,
|
||||
MUL_ASSIGN = 561,
|
||||
DIV_ASSIGN = 562,
|
||||
ADD_ASSIGN = 563,
|
||||
MOD_ASSIGN = 564,
|
||||
LEFT_ASSIGN = 565,
|
||||
RIGHT_ASSIGN = 566,
|
||||
AND_ASSIGN = 567,
|
||||
XOR_ASSIGN = 568,
|
||||
OR_ASSIGN = 569,
|
||||
SUB_ASSIGN = 570,
|
||||
STRING_LITERAL = 571,
|
||||
LEFT_PAREN = 572,
|
||||
RIGHT_PAREN = 573,
|
||||
LEFT_BRACKET = 574,
|
||||
RIGHT_BRACKET = 575,
|
||||
LEFT_BRACE = 576,
|
||||
RIGHT_BRACE = 577,
|
||||
DOT = 578,
|
||||
COMMA = 579,
|
||||
COLON = 580,
|
||||
EQUAL = 581,
|
||||
SEMICOLON = 582,
|
||||
BANG = 583,
|
||||
DASH = 584,
|
||||
TILDE = 585,
|
||||
PLUS = 586,
|
||||
STAR = 587,
|
||||
SLASH = 588,
|
||||
PERCENT = 589,
|
||||
LEFT_ANGLE = 590,
|
||||
RIGHT_ANGLE = 591,
|
||||
VERTICAL_BAR = 592,
|
||||
CARET = 593,
|
||||
AMPERSAND = 594,
|
||||
QUESTION = 595,
|
||||
INVARIANT = 596,
|
||||
HIGH_PRECISION = 597,
|
||||
MEDIUM_PRECISION = 598,
|
||||
LOW_PRECISION = 599,
|
||||
PRECISION = 600,
|
||||
PACKED = 601,
|
||||
RESOURCE = 602,
|
||||
SUPERP = 603,
|
||||
FLOATCONSTANT = 604,
|
||||
INTCONSTANT = 605,
|
||||
UINTCONSTANT = 606,
|
||||
BOOLCONSTANT = 607,
|
||||
IDENTIFIER = 608,
|
||||
TYPE_NAME = 609,
|
||||
CENTROID = 610,
|
||||
IN = 611,
|
||||
OUT = 612,
|
||||
INOUT = 613,
|
||||
STRUCT = 614,
|
||||
VOID = 615,
|
||||
WHILE = 616,
|
||||
BREAK = 617,
|
||||
CONTINUE = 618,
|
||||
DO = 619,
|
||||
ELSE = 620,
|
||||
FOR = 621,
|
||||
IF = 622,
|
||||
DISCARD = 623,
|
||||
RETURN = 624,
|
||||
SWITCH = 625,
|
||||
CASE = 626,
|
||||
DEFAULT = 627,
|
||||
UNIFORM = 628,
|
||||
SHARED = 629,
|
||||
BUFFER = 630,
|
||||
FLAT = 631,
|
||||
SMOOTH = 632,
|
||||
LAYOUT = 633,
|
||||
DOUBLECONSTANT = 634,
|
||||
INT16CONSTANT = 635,
|
||||
UINT16CONSTANT = 636,
|
||||
FLOAT16CONSTANT = 637,
|
||||
INT32CONSTANT = 638,
|
||||
UINT32CONSTANT = 639,
|
||||
INT64CONSTANT = 640,
|
||||
UINT64CONSTANT = 641,
|
||||
SUBROUTINE = 642,
|
||||
DEMOTE = 643,
|
||||
PAYLOADNV = 644,
|
||||
PAYLOADINNV = 645,
|
||||
HITATTRNV = 646,
|
||||
CALLDATANV = 647,
|
||||
CALLDATAINNV = 648,
|
||||
PAYLOADEXT = 649,
|
||||
PAYLOADINEXT = 650,
|
||||
HITATTREXT = 651,
|
||||
CALLDATAEXT = 652,
|
||||
CALLDATAINEXT = 653,
|
||||
PATCH = 654,
|
||||
SAMPLE = 655,
|
||||
NONUNIFORM = 656,
|
||||
COHERENT = 657,
|
||||
VOLATILE = 658,
|
||||
RESTRICT = 659,
|
||||
READONLY = 660,
|
||||
WRITEONLY = 661,
|
||||
DEVICECOHERENT = 662,
|
||||
QUEUEFAMILYCOHERENT = 663,
|
||||
WORKGROUPCOHERENT = 664,
|
||||
SUBGROUPCOHERENT = 665,
|
||||
NONPRIVATE = 666,
|
||||
SHADERCALLCOHERENT = 667,
|
||||
NOPERSPECTIVE = 668,
|
||||
EXPLICITINTERPAMD = 669,
|
||||
PERVERTEXNV = 670,
|
||||
PERPRIMITIVENV = 671,
|
||||
PERVIEWNV = 672,
|
||||
PERTASKNV = 673,
|
||||
PRECISE = 674
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -469,7 +470,7 @@ extern int yydebug;
|
||||
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 96 "MachineIndependent/glslang.y" /* yacc.c:1909 */
|
||||
#line 97 "glslang.y" /* yacc.c:1909 */
|
||||
|
||||
struct {
|
||||
glslang::TSourceLoc loc;
|
||||
@ -505,7 +506,7 @@ union YYSTYPE
|
||||
glslang::TArraySizes* typeParameters;
|
||||
} interm;
|
||||
|
||||
#line 509 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||
#line 510 "glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||
};
|
||||
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
@ -517,4 +518,4 @@ typedef union YYSTYPE YYSTYPE;
|
||||
|
||||
int yyparse (glslang::TParseContext* pParseContext);
|
||||
|
||||
#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
|
||||
#endif /* !YY_YY_GLSLANG_TAB_CPP_H_INCLUDED */
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@ -1085,6 +1086,30 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
||||
case EOpExecuteCallable: out.debug << "executeCallableNV"; break;
|
||||
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break;
|
||||
|
||||
case EOpRayQueryInitialize: out.debug << "rayQueryInitializeEXT"; break;
|
||||
case EOpRayQueryTerminate: out.debug << "rayQueryTerminateEXT"; break;
|
||||
case EOpRayQueryGenerateIntersection: out.debug << "rayQueryGenerateIntersectionEXT"; break;
|
||||
case EOpRayQueryConfirmIntersection: out.debug << "rayQueryConfirmIntersectionEXT"; break;
|
||||
case EOpRayQueryProceed: out.debug << "rayQueryProceedEXT"; break;
|
||||
case EOpRayQueryGetIntersectionType: out.debug << "rayQueryGetIntersectionTypeEXT"; break;
|
||||
case EOpRayQueryGetRayTMin: out.debug << "rayQueryGetRayTMinEXT"; break;
|
||||
case EOpRayQueryGetRayFlags: out.debug << "rayQueryGetRayFlagsEXT"; break;
|
||||
case EOpRayQueryGetIntersectionT: out.debug << "rayQueryGetIntersectionTEXT"; break;
|
||||
case EOpRayQueryGetIntersectionInstanceCustomIndex: out.debug << "rayQueryGetIntersectionInstanceCustomIndexEXT"; break;
|
||||
case EOpRayQueryGetIntersectionInstanceId: out.debug << "rayQueryGetIntersectionInstanceIdEXT"; break;
|
||||
case EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: out.debug << "rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT"; break;
|
||||
case EOpRayQueryGetIntersectionGeometryIndex: out.debug << "rayQueryGetIntersectionGeometryIndexEXT"; break;
|
||||
case EOpRayQueryGetIntersectionPrimitiveIndex: out.debug << "rayQueryGetIntersectionPrimitiveIndexEXT"; break;
|
||||
case EOpRayQueryGetIntersectionBarycentrics: out.debug << "rayQueryGetIntersectionBarycentricsEXT"; break;
|
||||
case EOpRayQueryGetIntersectionFrontFace: out.debug << "rayQueryGetIntersectionFrontFaceEXT"; break;
|
||||
case EOpRayQueryGetIntersectionCandidateAABBOpaque: out.debug << "rayQueryGetIntersectionCandidateAABBOpaqueEXT"; break;
|
||||
case EOpRayQueryGetIntersectionObjectRayDirection: out.debug << "rayQueryGetIntersectionObjectRayDirectionEXT"; break;
|
||||
case EOpRayQueryGetIntersectionObjectRayOrigin: out.debug << "rayQueryGetIntersectionObjectRayOriginEXT"; break;
|
||||
case EOpRayQueryGetWorldRayDirection: out.debug << "rayQueryGetWorldRayDirectionEXT"; break;
|
||||
case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break;
|
||||
case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break;
|
||||
case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
|
||||
|
||||
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
|
||||
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;
|
||||
case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break;
|
||||
|
@ -105,6 +105,7 @@ TEST_P(CompileVulkanToDebugSpirvTest, FromFile)
|
||||
"/baseResults/", false, true);
|
||||
}
|
||||
|
||||
|
||||
TEST_P(CompileVulkan1_1ToSpirvTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
@ -229,6 +230,16 @@ INSTANTIATE_TEST_CASE_P(
|
||||
"spv.while-continue-break.vert",
|
||||
"spv.while-simple.vert",
|
||||
// vulkan-specific tests
|
||||
"rayQuery.rgen",
|
||||
"rayQuery-array-2d-dynamic.rgen",
|
||||
"rayQuery-decls.rgen",
|
||||
"rayQuery-no-cse.rgen",
|
||||
"rayQuery-initialize.rgen",
|
||||
"rayQuery-allOps.rgen",
|
||||
"rayQuery-allOps.Error.rgen",
|
||||
"rayQuery-committed.Error.rgen",
|
||||
"rayQuery-allOps.comp",
|
||||
"rayQuery-allOps.frag",
|
||||
"spv.set.vert",
|
||||
"spv.double.comp",
|
||||
"spv.100ops.frag",
|
||||
|
Loading…
x
Reference in New Issue
Block a user