GL_EXT_ray_query updates
This commit is contained in:
parent
3bf1dab23d
commit
74d6d6a208
23 changed files with 4626 additions and 4066 deletions
|
|
@ -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
|
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
** of this software and/or associated documentation files (the "Materials"),
|
** 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_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_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_tracing = "SPV_KHR_ray_tracing";
|
||||||
|
static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query";
|
||||||
#endif // #ifndef GLSLextKHR_H
|
#endif // #ifndef GLSLextKHR_H
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (C) 2014-2016 LunarG, Inc.
|
// Copyright (C) 2014-2016 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2020 Google, Inc.
|
// Copyright (C) 2015-2020 Google, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -1181,6 +1182,8 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
|
||||||
// Translate glslang type to SPIR-V storage class.
|
// Translate glslang type to SPIR-V storage class.
|
||||||
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
||||||
{
|
{
|
||||||
|
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||||
|
return spv::StorageClassFunction;
|
||||||
if (type.getQualifier().isPipeInput())
|
if (type.getQualifier().isPipeInput())
|
||||||
return spv::StorageClassInput;
|
return spv::StorageClassInput;
|
||||||
if (type.getQualifier().isPipeOutput())
|
if (type.getQualifier().isPipeOutput())
|
||||||
|
|
@ -2703,6 +2706,13 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||||
noReturnValue = true;
|
noReturnValue = true;
|
||||||
break;
|
break;
|
||||||
|
case glslang::EOpRayQueryInitialize:
|
||||||
|
case glslang::EOpRayQueryTerminate:
|
||||||
|
case glslang::EOpRayQueryGenerateIntersection:
|
||||||
|
case glslang::EOpRayQueryConfirmIntersection:
|
||||||
|
noReturnValue = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case glslang::EOpCooperativeMatrixLoad:
|
case glslang::EOpCooperativeMatrixLoad:
|
||||||
case glslang::EOpCooperativeMatrixStore:
|
case glslang::EOpCooperativeMatrixStore:
|
||||||
noReturnValue = true;
|
noReturnValue = true;
|
||||||
|
|
@ -2769,6 +2779,25 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
lvalue = true;
|
lvalue = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpRayQueryInitialize:
|
||||||
|
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::EOpAtomicAdd:
|
||||||
case glslang::EOpAtomicMin:
|
case glslang::EOpAtomicMin:
|
||||||
case glslang::EOpAtomicMax:
|
case glslang::EOpAtomicMax:
|
||||||
|
|
@ -2913,7 +2942,29 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
||||||
lvalueCoherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType());
|
lvalueCoherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType());
|
||||||
} else {
|
} else {
|
||||||
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
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 +3600,9 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
||||||
case glslang::EbtAccStruct:
|
case glslang::EbtAccStruct:
|
||||||
spvType = builder.makeAccelerationStructureType();
|
spvType = builder.makeAccelerationStructureType();
|
||||||
break;
|
break;
|
||||||
|
case glslang::EbtRayQuery:
|
||||||
|
spvType = builder.makeRayQueryType();
|
||||||
|
break;
|
||||||
case glslang::EbtReference:
|
case glslang::EbtReference:
|
||||||
{
|
{
|
||||||
// Make the forward pointer, then recurse to convert the structure type, then
|
// Make the forward pointer, then recurse to convert the structure type, then
|
||||||
|
|
@ -7615,6 +7669,103 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case glslang::EOpRayQueryInitialize: {
|
||||||
|
builder.createNoResultOp(spv::OpRayQueryInitializeKHR, operands);
|
||||||
|
return 0;
|
||||||
|
} break;
|
||||||
|
case glslang::EOpRayQueryTerminate: {
|
||||||
|
builder.createNoResultOp(spv::OpRayQueryTerminateKHR, operands);
|
||||||
|
return 0;
|
||||||
|
} break;
|
||||||
|
case glslang::EOpRayQueryGenerateIntersection: {
|
||||||
|
builder.createNoResultOp(spv::OpRayQueryGenerateIntersectionKHR, operands);
|
||||||
|
return 0;
|
||||||
|
} break;
|
||||||
|
case glslang::EOpRayQueryConfirmIntersection: {
|
||||||
|
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operands);
|
||||||
|
return 0;
|
||||||
|
} break;
|
||||||
|
case glslang::EOpRayQueryProceed: {
|
||||||
|
typeId = builder.makeBoolType();
|
||||||
|
opCode = spv::OpRayQueryProceedKHR;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case glslang::EOpRayQueryGetIntersectionType: {
|
||||||
|
typeId = builder.makeIntType(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.makeIntType(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);
|
||||||
|
// https://gitlab.khronos.org/spirv/spirv-extensions/blob/cdf44fd4b854a5297bf2191d4f57f9bccbc49098/SPV_KHR_ray_query.asciidoc#ray_query_candidate_intersection_type
|
||||||
|
// or per description is it typeId = builder.makeVectorType(builder.makeVectorType(builder.makeFloatType(32), 3), 4);
|
||||||
|
opCode = spv::OpRayQueryGetIntersectionObjectToWorldKHR;
|
||||||
|
} break;
|
||||||
|
case glslang::EOpRayQueryGetIntersectionWorldToObject: {
|
||||||
|
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
|
||||||
|
// https://gitlab.khronos.org/spirv/spirv-extensions/blob/cdf44fd4b854a5297bf2191d4f57f9bccbc49098/SPV_KHR_ray_query.asciidoc#ray_query_candidate_intersection_type
|
||||||
|
// or per description is it typeId = builder.makeVectorType(builder.makeVectorType(builder.makeFloatType(32), 3), 4);
|
||||||
|
opCode = spv::OpRayQueryGetIntersectionWorldToObjectKHR;
|
||||||
|
} break;
|
||||||
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
case glslang::EOpWritePackedPrimitiveIndices4x8NV:
|
||||||
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
|
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -7817,7 +7968,18 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
||||||
case glslang::EOpTerminateRay:
|
case glslang::EOpTerminateRay:
|
||||||
builder.createNoResultOp(spv::OpTerminateRayKHR);
|
builder.createNoResultOp(spv::OpTerminateRayKHR);
|
||||||
return 0;
|
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:
|
case glslang::EOpBeginInvocationInterlock:
|
||||||
builder.createNoResultOp(spv::OpBeginInvocationInterlockEXT);
|
builder.createNoResultOp(spv::OpBeginInvocationInterlockEXT);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
//
|
//
|
||||||
// Copyright (C) 2014-2015 LunarG, Inc.
|
// Copyright (C) 2014-2015 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2018 Google, Inc.
|
// Copyright (C) 2015-2018 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -616,6 +617,21 @@ Id Builder::makeAccelerationStructureType()
|
||||||
|
|
||||||
return type->getResultId();
|
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
|
#endif
|
||||||
|
|
||||||
Id Builder::getDerefTypeId(Id resultId) const
|
Id Builder::getDerefTypeId(Id resultId) const
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (C) 2014-2015 LunarG, Inc.
|
// Copyright (C) 2014-2015 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2020 Google, Inc.
|
// Copyright (C) 2015-2020 Google, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -183,6 +184,8 @@ public:
|
||||||
|
|
||||||
// accelerationStructureNV type
|
// accelerationStructureNV type
|
||||||
Id makeAccelerationStructureType();
|
Id makeAccelerationStructureType();
|
||||||
|
// rayQueryEXT type
|
||||||
|
Id makeRayQueryType();
|
||||||
|
|
||||||
// For querying about types.
|
// For querying about types.
|
||||||
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
|
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.
|
// Copyright (C) 2014-2015 LunarG, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -892,6 +893,8 @@ const char* CapabilityString(int info)
|
||||||
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
|
||||||
case CapabilityRayTracingNV: return "RayTracingNV";
|
case CapabilityRayTracingNV: return "RayTracingNV";
|
||||||
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
|
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
|
||||||
|
case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR";
|
||||||
|
case CapabilityRayTraversalPrimitiveCullingProvisionalKHR: return "RayTraversalPrimitiveCullingProvisionalKHR";
|
||||||
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
||||||
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
||||||
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
|
||||||
|
|
@ -1337,6 +1340,31 @@ const char* OpcodeString(int op)
|
||||||
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
|
||||||
case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
|
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 OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
|
||||||
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
|
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
|
||||||
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
|
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
|
||||||
|
|
@ -2722,6 +2750,100 @@ void Parameterize()
|
||||||
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData ID");
|
InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData ID");
|
||||||
InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
|
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, "'Sampled Image'");
|
||||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
|
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
|
||||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
|
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// Copyright (c) 2014-2020 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
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// of this software and/or associated documentation files (the "Materials"),
|
// of this software and/or associated documentation files (the "Materials"),
|
||||||
|
|
@ -1939,6 +1940,31 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||||
case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
|
case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
|
case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
|
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break;
|
||||||
|
case OpTypeRayQueryProvisionalKHR: *hasResult = true; *hasResultType = false; break;
|
||||||
|
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
|
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
|
||||||
case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
|
case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
|
case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -63,6 +64,7 @@ enum TBasicType {
|
||||||
EbtBlock,
|
EbtBlock,
|
||||||
EbtAccStruct,
|
EbtAccStruct,
|
||||||
EbtReference,
|
EbtReference,
|
||||||
|
EbtRayQuery,
|
||||||
|
|
||||||
// HLSL types that live only temporarily.
|
// HLSL types that live only temporarily.
|
||||||
EbtString,
|
EbtString,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2016 Google, Inc.
|
// Copyright (C) 2015-2016 Google, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -1673,7 +1674,7 @@ public:
|
||||||
}
|
}
|
||||||
virtual bool isOpaque() const { return basicType == EbtSampler
|
virtual bool isOpaque() const { return basicType == EbtSampler
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
|| basicType == EbtAtomicUint || basicType == EbtAccStruct
|
|| basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
|
||||||
#endif
|
#endif
|
||||||
; }
|
; }
|
||||||
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
||||||
|
|
@ -1950,6 +1951,7 @@ public:
|
||||||
case EbtStruct: return "structure";
|
case EbtStruct: return "structure";
|
||||||
case EbtBlock: return "block";
|
case EbtBlock: return "block";
|
||||||
case EbtAccStruct: return "accelerationStructureNV";
|
case EbtAccStruct: return "accelerationStructureNV";
|
||||||
|
case EbtRayQuery: return "rayQueryEXT";
|
||||||
case EbtReference: return "reference";
|
case EbtReference: return "reference";
|
||||||
#endif
|
#endif
|
||||||
default: return "unknown type";
|
default: return "unknown type";
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -916,6 +917,35 @@ enum TOperator {
|
||||||
EOpTerminateRay,
|
EOpTerminateRay,
|
||||||
EOpExecuteCallable,
|
EOpExecuteCallable,
|
||||||
EOpWritePackedPrimitiveIndices4x8NV,
|
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
|
// HLSL operations
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2020 Google, Inc.
|
// Copyright (C) 2015-2020 Google, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -4322,8 +4323,33 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
"\n");
|
"\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) {
|
if (profile != EEsProfile && version >= 460) {
|
||||||
|
commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
|
||||||
|
"bool rayQueryProceedEXT(rayQueryEXT);"
|
||||||
|
"void rayQueryTerminateEXT(rayQueryEXT);"
|
||||||
|
"void rayQueryGenerateIntersectionEXT(rayQueryEXT, float);"
|
||||||
|
"void rayQueryConfirmIntersectionEXT(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(
|
stageBuiltins[EShLangRayGen].append(
|
||||||
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
"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);"
|
"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_HitKindFrontFacingTriangleEXT = 254U;"
|
||||||
"const uint gl_HitKindBackFacingTriangleEXT = 255U;"
|
"const uint gl_HitKindBackFacingTriangleEXT = 255U;"
|
||||||
"\n";
|
"\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 =
|
const char *rayGenDecls =
|
||||||
"in uvec3 gl_LaunchIDNV;"
|
"in uvec3 gl_LaunchIDNV;"
|
||||||
"in uvec3 gl_LaunchIDEXT;"
|
"in uvec3 gl_LaunchIDEXT;"
|
||||||
|
|
@ -5535,6 +5572,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
|
||||||
|
commonBuiltins.append(constRayQueryIntersection);
|
||||||
|
|
||||||
stageBuiltins[EShLangRayGen].append(rayGenDecls);
|
stageBuiltins[EShLangRayGen].append(rayGenDecls);
|
||||||
stageBuiltins[EShLangRayGen].append(constRayFlags);
|
stageBuiltins[EShLangRayGen].append(constRayFlags);
|
||||||
|
|
@ -7522,6 +7560,32 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||||
BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable);
|
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) ||
|
if ((profile != EEsProfile && version >= 130) ||
|
||||||
(profile == EEsProfile && version >= 310)) {
|
(profile == EEsProfile && version >= 310)) {
|
||||||
BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
|
BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
|
||||||
|
|
@ -8860,6 +8924,33 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||||
symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
|
symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
|
||||||
symbolTable.relateToOperator("fwidthCoarse", EOpFwidthCoarse);
|
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("interpolateAtCentroid", EOpInterpolateAtCentroid);
|
||||||
symbolTable.relateToOperator("interpolateAtSample", EOpInterpolateAtSample);
|
symbolTable.relateToOperator("interpolateAtSample", EOpInterpolateAtSample);
|
||||||
symbolTable.relateToOperator("interpolateAtOffset", EOpInterpolateAtOffset);
|
symbolTable.relateToOperator("interpolateAtOffset", EOpInterpolateAtOffset);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2015 LunarG, Inc.
|
// Copyright (C) 2012-2015 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2020 Google, Inc.
|
// Copyright (C) 2015-2020 Google, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -539,6 +540,7 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const
|
||||||
case EbtAtomicUint:
|
case EbtAtomicUint:
|
||||||
case EbtSampler:
|
case EbtSampler:
|
||||||
case EbtAccStruct:
|
case EbtAccStruct:
|
||||||
|
case EbtRayQuery:
|
||||||
// opaque types can be passed to functions
|
// opaque types can be passed to functions
|
||||||
if (op == EOpFunction)
|
if (op == EOpFunction)
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
//
|
//
|
||||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||||
// Copyright (C) 2016 Google, Inc.
|
// Copyright (C) 2016 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -184,6 +185,9 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
||||||
case EbtAccStruct:
|
case EbtAccStruct:
|
||||||
message = "can't modify accelerationStructureNV";
|
message = "can't modify accelerationStructureNV";
|
||||||
break;
|
break;
|
||||||
|
case EbtRayQuery:
|
||||||
|
message = "can't modify rayQueryEXT";
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2015 LunarG, Inc.
|
// Copyright (C) 2012-2015 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2018 Google, Inc.
|
// Copyright (C) 2015-2018 Google, Inc.
|
||||||
// Copyright (C) 2017, 2019 ARM Limited.
|
// Copyright (C) 2017, 2019 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// 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", "");
|
error(loc, "argument must be compile-time constant", "callable data number", "");
|
||||||
break;
|
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 EOpTextureQuerySamples:
|
||||||
case EOpImageQuerySamples:
|
case EOpImageQuerySamples:
|
||||||
// GL_ARB_shader_texture_image_samples
|
// GL_ARB_shader_texture_image_samples
|
||||||
|
|
@ -3241,6 +3259,11 @@ void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, con
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TParseContext::rayQueryCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // GLSLANG_WEB
|
#endif // GLSLANG_WEB
|
||||||
|
|
||||||
void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
|
void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
|
||||||
|
|
@ -3992,7 +4015,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for additional things allowed by GL_EXT_nonuniform_qualifier
|
// 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()))
|
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
|
||||||
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
|
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
|
||||||
else
|
else
|
||||||
|
|
@ -6488,6 +6511,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
atomicUintCheck(loc, type, identifier);
|
atomicUintCheck(loc, type, identifier);
|
||||||
accStructCheck(loc, type, identifier);
|
accStructCheck(loc, type, identifier);
|
||||||
|
rayQueryCheck(loc, type, identifier);
|
||||||
checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false);
|
checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false);
|
||||||
#endif
|
#endif
|
||||||
if (type.getQualifier().storage == EvqConst && type.containsReference()) {
|
if (type.getQualifier().storage == EvqConst && type.containsReference()) {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||||
// Copyright (C) 2015-2018 Google, Inc.
|
// Copyright (C) 2015-2018 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -359,6 +360,7 @@ public:
|
||||||
void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer);
|
void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer);
|
||||||
void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||||
void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
|
void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
|
||||||
|
void rayQueryCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
|
||||||
void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||||
void memberQualifierCheck(glslang::TPublicType&);
|
void memberQualifierCheck(glslang::TPublicType&);
|
||||||
void globalQualifierFixCheck(const TSourceLoc&, TQualifier&);
|
void globalQualifierFixCheck(const TSourceLoc&, TQualifier&);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2013 LunarG, Inc.
|
// Copyright (C) 2013 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
// Copyright (C) 2020 Google, Inc.
|
// Copyright (C) 2020 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -715,6 +716,7 @@ void TScanContext::fillInKeywordMap()
|
||||||
(*KeywordMap)["callableDataInEXT"] = CALLDATAINEXT;
|
(*KeywordMap)["callableDataInEXT"] = CALLDATAINEXT;
|
||||||
(*KeywordMap)["accelerationStructureNV"] = ACCSTRUCTNV;
|
(*KeywordMap)["accelerationStructureNV"] = ACCSTRUCTNV;
|
||||||
(*KeywordMap)["accelerationStructureEXT"] = ACCSTRUCTEXT;
|
(*KeywordMap)["accelerationStructureEXT"] = ACCSTRUCTEXT;
|
||||||
|
(*KeywordMap)["rayQueryEXT"] = RAYQUERYEXT;
|
||||||
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
|
(*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV;
|
||||||
(*KeywordMap)["perviewNV"] = PERVIEWNV;
|
(*KeywordMap)["perviewNV"] = PERVIEWNV;
|
||||||
(*KeywordMap)["taskNV"] = PERTASKNV;
|
(*KeywordMap)["taskNV"] = PERTASKNV;
|
||||||
|
|
@ -1031,6 +1033,12 @@ int TScanContext::tokenizeIdentifier()
|
||||||
parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing))
|
parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing))
|
||||||
return keyword;
|
return keyword;
|
||||||
return identifierOrType();
|
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:
|
case ATOMIC_UINT:
|
||||||
if ((parseContext.isEsProfile() && parseContext.version >= 310) ||
|
if ((parseContext.isEsProfile() && parseContext.version >= 310) ||
|
||||||
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
|
parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters))
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
// Copyright (C) 2015-2018 Google, Inc.
|
// Copyright (C) 2015-2018 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -75,6 +76,7 @@ void TType::buildMangledName(TString& mangledName) const
|
||||||
case EbtUint64: mangledName += "u64"; break;
|
case EbtUint64: mangledName += "u64"; break;
|
||||||
case EbtAtomicUint: mangledName += "au"; break;
|
case EbtAtomicUint: mangledName += "au"; break;
|
||||||
case EbtAccStruct: mangledName += "as"; break;
|
case EbtAccStruct: mangledName += "as"; break;
|
||||||
|
case EbtRayQuery: mangledName += "rq"; break;
|
||||||
#endif
|
#endif
|
||||||
case EbtSampler:
|
case EbtSampler:
|
||||||
switch (sampler.type) {
|
switch (sampler.type) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
// Copyright (C) 2015-2020 Google, Inc.
|
// Copyright (C) 2015-2020 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -296,6 +297,7 @@ void TParseVersions::initializeExtensionBehavior()
|
||||||
extensionBehavior[E_GL_EXT_multiview] = EBhDisable;
|
extensionBehavior[E_GL_EXT_multiview] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_ray_tracing] = EBhDisable;
|
extensionBehavior[E_GL_EXT_ray_tracing] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_EXT_ray_query] = EBhDisable;
|
||||||
|
|
||||||
// OVR extensions
|
// OVR extensions
|
||||||
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
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_atomic_int64 1\n"
|
||||||
"#define E_GL_EXT_shader_realtime_clock 1\n"
|
"#define E_GL_EXT_shader_realtime_clock 1\n"
|
||||||
"#define E_GL_EXT_ray_tracing 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_ballot 1\n"
|
||||||
"#define GL_AMD_shader_trinary_minmax 1\n"
|
"#define GL_AMD_shader_trinary_minmax 1\n"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
// Copyright (C) 2015-2018 Google, Inc.
|
// Copyright (C) 2015-2018 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// 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_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_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_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
|
// Arrays of extensions for the above viewportEXTs duplications
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
// Copyright (C) 2015-2019 Google, Inc.
|
// Copyright (C) 2015-2019 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -205,6 +206,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||||
%token <lex> ATOMIC_UINT
|
%token <lex> ATOMIC_UINT
|
||||||
%token <lex> ACCSTRUCTNV
|
%token <lex> ACCSTRUCTNV
|
||||||
%token <lex> ACCSTRUCTEXT
|
%token <lex> ACCSTRUCTEXT
|
||||||
|
%token <lex> RAYQUERYEXT
|
||||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||||
|
|
||||||
// combined image/sampler
|
// combined image/sampler
|
||||||
|
|
@ -2406,6 +2408,10 @@ GLSLANG_WEB_EXCLUDE_ON
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtAccStruct;
|
$$.basicType = EbtAccStruct;
|
||||||
}
|
}
|
||||||
|
| RAYQUERYEXT {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtRayQuery;
|
||||||
|
}
|
||||||
| ATOMIC_UINT {
|
| ATOMIC_UINT {
|
||||||
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
// Copyright (C) 2015-2019 Google, Inc.
|
// Copyright (C) 2015-2019 Google, Inc.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -205,6 +206,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
||||||
%token <lex> ATOMIC_UINT
|
%token <lex> ATOMIC_UINT
|
||||||
%token <lex> ACCSTRUCTNV
|
%token <lex> ACCSTRUCTNV
|
||||||
%token <lex> ACCSTRUCTEXT
|
%token <lex> ACCSTRUCTEXT
|
||||||
|
%token <lex> RAYQUERYEXT
|
||||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||||
|
|
||||||
// combined image/sampler
|
// combined image/sampler
|
||||||
|
|
@ -2406,6 +2408,10 @@ type_specifier_nonarray
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtAccStruct;
|
$$.basicType = EbtAccStruct;
|
||||||
}
|
}
|
||||||
|
| RAYQUERYEXT {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtRayQuery;
|
||||||
|
}
|
||||||
| ATOMIC_UINT {
|
| ATOMIC_UINT {
|
||||||
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
parseContext.vulkanRemoved($1.loc, "atomic counter types");
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.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
|
This special exception was added by the Free Software Foundation in
|
||||||
version 2.2 of Bison. */
|
version 2.2 of Bison. */
|
||||||
|
|
||||||
#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
|
#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED
|
||||||
# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
|
# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED
|
||||||
/* Debug traces. */
|
/* Debug traces. */
|
||||||
#ifndef YYDEBUG
|
#ifndef YYDEBUG
|
||||||
# define YYDEBUG 1
|
# define YYDEBUG 1
|
||||||
|
|
@ -204,263 +204,264 @@ extern int yydebug;
|
||||||
ATOMIC_UINT = 414,
|
ATOMIC_UINT = 414,
|
||||||
ACCSTRUCTNV = 415,
|
ACCSTRUCTNV = 415,
|
||||||
ACCSTRUCTEXT = 416,
|
ACCSTRUCTEXT = 416,
|
||||||
FCOOPMATNV = 417,
|
RAYQUERYEXT = 417,
|
||||||
ICOOPMATNV = 418,
|
FCOOPMATNV = 418,
|
||||||
UCOOPMATNV = 419,
|
ICOOPMATNV = 419,
|
||||||
SAMPLERCUBEARRAY = 420,
|
UCOOPMATNV = 420,
|
||||||
SAMPLERCUBEARRAYSHADOW = 421,
|
SAMPLERCUBEARRAY = 421,
|
||||||
ISAMPLERCUBEARRAY = 422,
|
SAMPLERCUBEARRAYSHADOW = 422,
|
||||||
USAMPLERCUBEARRAY = 423,
|
ISAMPLERCUBEARRAY = 423,
|
||||||
SAMPLER1D = 424,
|
USAMPLERCUBEARRAY = 424,
|
||||||
SAMPLER1DARRAY = 425,
|
SAMPLER1D = 425,
|
||||||
SAMPLER1DARRAYSHADOW = 426,
|
SAMPLER1DARRAY = 426,
|
||||||
ISAMPLER1D = 427,
|
SAMPLER1DARRAYSHADOW = 427,
|
||||||
SAMPLER1DSHADOW = 428,
|
ISAMPLER1D = 428,
|
||||||
SAMPLER2DRECT = 429,
|
SAMPLER1DSHADOW = 429,
|
||||||
SAMPLER2DRECTSHADOW = 430,
|
SAMPLER2DRECT = 430,
|
||||||
ISAMPLER2DRECT = 431,
|
SAMPLER2DRECTSHADOW = 431,
|
||||||
USAMPLER2DRECT = 432,
|
ISAMPLER2DRECT = 432,
|
||||||
SAMPLERBUFFER = 433,
|
USAMPLER2DRECT = 433,
|
||||||
ISAMPLERBUFFER = 434,
|
SAMPLERBUFFER = 434,
|
||||||
USAMPLERBUFFER = 435,
|
ISAMPLERBUFFER = 435,
|
||||||
SAMPLER2DMS = 436,
|
USAMPLERBUFFER = 436,
|
||||||
ISAMPLER2DMS = 437,
|
SAMPLER2DMS = 437,
|
||||||
USAMPLER2DMS = 438,
|
ISAMPLER2DMS = 438,
|
||||||
SAMPLER2DMSARRAY = 439,
|
USAMPLER2DMS = 439,
|
||||||
ISAMPLER2DMSARRAY = 440,
|
SAMPLER2DMSARRAY = 440,
|
||||||
USAMPLER2DMSARRAY = 441,
|
ISAMPLER2DMSARRAY = 441,
|
||||||
SAMPLEREXTERNALOES = 442,
|
USAMPLER2DMSARRAY = 442,
|
||||||
SAMPLEREXTERNAL2DY2YEXT = 443,
|
SAMPLEREXTERNALOES = 443,
|
||||||
ISAMPLER1DARRAY = 444,
|
SAMPLEREXTERNAL2DY2YEXT = 444,
|
||||||
USAMPLER1D = 445,
|
ISAMPLER1DARRAY = 445,
|
||||||
USAMPLER1DARRAY = 446,
|
USAMPLER1D = 446,
|
||||||
F16SAMPLER1D = 447,
|
USAMPLER1DARRAY = 447,
|
||||||
F16SAMPLER2D = 448,
|
F16SAMPLER1D = 448,
|
||||||
F16SAMPLER3D = 449,
|
F16SAMPLER2D = 449,
|
||||||
F16SAMPLER2DRECT = 450,
|
F16SAMPLER3D = 450,
|
||||||
F16SAMPLERCUBE = 451,
|
F16SAMPLER2DRECT = 451,
|
||||||
F16SAMPLER1DARRAY = 452,
|
F16SAMPLERCUBE = 452,
|
||||||
F16SAMPLER2DARRAY = 453,
|
F16SAMPLER1DARRAY = 453,
|
||||||
F16SAMPLERCUBEARRAY = 454,
|
F16SAMPLER2DARRAY = 454,
|
||||||
F16SAMPLERBUFFER = 455,
|
F16SAMPLERCUBEARRAY = 455,
|
||||||
F16SAMPLER2DMS = 456,
|
F16SAMPLERBUFFER = 456,
|
||||||
F16SAMPLER2DMSARRAY = 457,
|
F16SAMPLER2DMS = 457,
|
||||||
F16SAMPLER1DSHADOW = 458,
|
F16SAMPLER2DMSARRAY = 458,
|
||||||
F16SAMPLER2DSHADOW = 459,
|
F16SAMPLER1DSHADOW = 459,
|
||||||
F16SAMPLER1DARRAYSHADOW = 460,
|
F16SAMPLER2DSHADOW = 460,
|
||||||
F16SAMPLER2DARRAYSHADOW = 461,
|
F16SAMPLER1DARRAYSHADOW = 461,
|
||||||
F16SAMPLER2DRECTSHADOW = 462,
|
F16SAMPLER2DARRAYSHADOW = 462,
|
||||||
F16SAMPLERCUBESHADOW = 463,
|
F16SAMPLER2DRECTSHADOW = 463,
|
||||||
F16SAMPLERCUBEARRAYSHADOW = 464,
|
F16SAMPLERCUBESHADOW = 464,
|
||||||
IMAGE1D = 465,
|
F16SAMPLERCUBEARRAYSHADOW = 465,
|
||||||
IIMAGE1D = 466,
|
IMAGE1D = 466,
|
||||||
UIMAGE1D = 467,
|
IIMAGE1D = 467,
|
||||||
IMAGE2D = 468,
|
UIMAGE1D = 468,
|
||||||
IIMAGE2D = 469,
|
IMAGE2D = 469,
|
||||||
UIMAGE2D = 470,
|
IIMAGE2D = 470,
|
||||||
IMAGE3D = 471,
|
UIMAGE2D = 471,
|
||||||
IIMAGE3D = 472,
|
IMAGE3D = 472,
|
||||||
UIMAGE3D = 473,
|
IIMAGE3D = 473,
|
||||||
IMAGE2DRECT = 474,
|
UIMAGE3D = 474,
|
||||||
IIMAGE2DRECT = 475,
|
IMAGE2DRECT = 475,
|
||||||
UIMAGE2DRECT = 476,
|
IIMAGE2DRECT = 476,
|
||||||
IMAGECUBE = 477,
|
UIMAGE2DRECT = 477,
|
||||||
IIMAGECUBE = 478,
|
IMAGECUBE = 478,
|
||||||
UIMAGECUBE = 479,
|
IIMAGECUBE = 479,
|
||||||
IMAGEBUFFER = 480,
|
UIMAGECUBE = 480,
|
||||||
IIMAGEBUFFER = 481,
|
IMAGEBUFFER = 481,
|
||||||
UIMAGEBUFFER = 482,
|
IIMAGEBUFFER = 482,
|
||||||
IMAGE1DARRAY = 483,
|
UIMAGEBUFFER = 483,
|
||||||
IIMAGE1DARRAY = 484,
|
IMAGE1DARRAY = 484,
|
||||||
UIMAGE1DARRAY = 485,
|
IIMAGE1DARRAY = 485,
|
||||||
IMAGE2DARRAY = 486,
|
UIMAGE1DARRAY = 486,
|
||||||
IIMAGE2DARRAY = 487,
|
IMAGE2DARRAY = 487,
|
||||||
UIMAGE2DARRAY = 488,
|
IIMAGE2DARRAY = 488,
|
||||||
IMAGECUBEARRAY = 489,
|
UIMAGE2DARRAY = 489,
|
||||||
IIMAGECUBEARRAY = 490,
|
IMAGECUBEARRAY = 490,
|
||||||
UIMAGECUBEARRAY = 491,
|
IIMAGECUBEARRAY = 491,
|
||||||
IMAGE2DMS = 492,
|
UIMAGECUBEARRAY = 492,
|
||||||
IIMAGE2DMS = 493,
|
IMAGE2DMS = 493,
|
||||||
UIMAGE2DMS = 494,
|
IIMAGE2DMS = 494,
|
||||||
IMAGE2DMSARRAY = 495,
|
UIMAGE2DMS = 495,
|
||||||
IIMAGE2DMSARRAY = 496,
|
IMAGE2DMSARRAY = 496,
|
||||||
UIMAGE2DMSARRAY = 497,
|
IIMAGE2DMSARRAY = 497,
|
||||||
F16IMAGE1D = 498,
|
UIMAGE2DMSARRAY = 498,
|
||||||
F16IMAGE2D = 499,
|
F16IMAGE1D = 499,
|
||||||
F16IMAGE3D = 500,
|
F16IMAGE2D = 500,
|
||||||
F16IMAGE2DRECT = 501,
|
F16IMAGE3D = 501,
|
||||||
F16IMAGECUBE = 502,
|
F16IMAGE2DRECT = 502,
|
||||||
F16IMAGE1DARRAY = 503,
|
F16IMAGECUBE = 503,
|
||||||
F16IMAGE2DARRAY = 504,
|
F16IMAGE1DARRAY = 504,
|
||||||
F16IMAGECUBEARRAY = 505,
|
F16IMAGE2DARRAY = 505,
|
||||||
F16IMAGEBUFFER = 506,
|
F16IMAGECUBEARRAY = 506,
|
||||||
F16IMAGE2DMS = 507,
|
F16IMAGEBUFFER = 507,
|
||||||
F16IMAGE2DMSARRAY = 508,
|
F16IMAGE2DMS = 508,
|
||||||
TEXTURECUBEARRAY = 509,
|
F16IMAGE2DMSARRAY = 509,
|
||||||
ITEXTURECUBEARRAY = 510,
|
TEXTURECUBEARRAY = 510,
|
||||||
UTEXTURECUBEARRAY = 511,
|
ITEXTURECUBEARRAY = 511,
|
||||||
TEXTURE1D = 512,
|
UTEXTURECUBEARRAY = 512,
|
||||||
ITEXTURE1D = 513,
|
TEXTURE1D = 513,
|
||||||
UTEXTURE1D = 514,
|
ITEXTURE1D = 514,
|
||||||
TEXTURE1DARRAY = 515,
|
UTEXTURE1D = 515,
|
||||||
ITEXTURE1DARRAY = 516,
|
TEXTURE1DARRAY = 516,
|
||||||
UTEXTURE1DARRAY = 517,
|
ITEXTURE1DARRAY = 517,
|
||||||
TEXTURE2DRECT = 518,
|
UTEXTURE1DARRAY = 518,
|
||||||
ITEXTURE2DRECT = 519,
|
TEXTURE2DRECT = 519,
|
||||||
UTEXTURE2DRECT = 520,
|
ITEXTURE2DRECT = 520,
|
||||||
TEXTUREBUFFER = 521,
|
UTEXTURE2DRECT = 521,
|
||||||
ITEXTUREBUFFER = 522,
|
TEXTUREBUFFER = 522,
|
||||||
UTEXTUREBUFFER = 523,
|
ITEXTUREBUFFER = 523,
|
||||||
TEXTURE2DMS = 524,
|
UTEXTUREBUFFER = 524,
|
||||||
ITEXTURE2DMS = 525,
|
TEXTURE2DMS = 525,
|
||||||
UTEXTURE2DMS = 526,
|
ITEXTURE2DMS = 526,
|
||||||
TEXTURE2DMSARRAY = 527,
|
UTEXTURE2DMS = 527,
|
||||||
ITEXTURE2DMSARRAY = 528,
|
TEXTURE2DMSARRAY = 528,
|
||||||
UTEXTURE2DMSARRAY = 529,
|
ITEXTURE2DMSARRAY = 529,
|
||||||
F16TEXTURE1D = 530,
|
UTEXTURE2DMSARRAY = 530,
|
||||||
F16TEXTURE2D = 531,
|
F16TEXTURE1D = 531,
|
||||||
F16TEXTURE3D = 532,
|
F16TEXTURE2D = 532,
|
||||||
F16TEXTURE2DRECT = 533,
|
F16TEXTURE3D = 533,
|
||||||
F16TEXTURECUBE = 534,
|
F16TEXTURE2DRECT = 534,
|
||||||
F16TEXTURE1DARRAY = 535,
|
F16TEXTURECUBE = 535,
|
||||||
F16TEXTURE2DARRAY = 536,
|
F16TEXTURE1DARRAY = 536,
|
||||||
F16TEXTURECUBEARRAY = 537,
|
F16TEXTURE2DARRAY = 537,
|
||||||
F16TEXTUREBUFFER = 538,
|
F16TEXTURECUBEARRAY = 538,
|
||||||
F16TEXTURE2DMS = 539,
|
F16TEXTUREBUFFER = 539,
|
||||||
F16TEXTURE2DMSARRAY = 540,
|
F16TEXTURE2DMS = 540,
|
||||||
SUBPASSINPUT = 541,
|
F16TEXTURE2DMSARRAY = 541,
|
||||||
SUBPASSINPUTMS = 542,
|
SUBPASSINPUT = 542,
|
||||||
ISUBPASSINPUT = 543,
|
SUBPASSINPUTMS = 543,
|
||||||
ISUBPASSINPUTMS = 544,
|
ISUBPASSINPUT = 544,
|
||||||
USUBPASSINPUT = 545,
|
ISUBPASSINPUTMS = 545,
|
||||||
USUBPASSINPUTMS = 546,
|
USUBPASSINPUT = 546,
|
||||||
F16SUBPASSINPUT = 547,
|
USUBPASSINPUTMS = 547,
|
||||||
F16SUBPASSINPUTMS = 548,
|
F16SUBPASSINPUT = 548,
|
||||||
LEFT_OP = 549,
|
F16SUBPASSINPUTMS = 549,
|
||||||
RIGHT_OP = 550,
|
LEFT_OP = 550,
|
||||||
INC_OP = 551,
|
RIGHT_OP = 551,
|
||||||
DEC_OP = 552,
|
INC_OP = 552,
|
||||||
LE_OP = 553,
|
DEC_OP = 553,
|
||||||
GE_OP = 554,
|
LE_OP = 554,
|
||||||
EQ_OP = 555,
|
GE_OP = 555,
|
||||||
NE_OP = 556,
|
EQ_OP = 556,
|
||||||
AND_OP = 557,
|
NE_OP = 557,
|
||||||
OR_OP = 558,
|
AND_OP = 558,
|
||||||
XOR_OP = 559,
|
OR_OP = 559,
|
||||||
MUL_ASSIGN = 560,
|
XOR_OP = 560,
|
||||||
DIV_ASSIGN = 561,
|
MUL_ASSIGN = 561,
|
||||||
ADD_ASSIGN = 562,
|
DIV_ASSIGN = 562,
|
||||||
MOD_ASSIGN = 563,
|
ADD_ASSIGN = 563,
|
||||||
LEFT_ASSIGN = 564,
|
MOD_ASSIGN = 564,
|
||||||
RIGHT_ASSIGN = 565,
|
LEFT_ASSIGN = 565,
|
||||||
AND_ASSIGN = 566,
|
RIGHT_ASSIGN = 566,
|
||||||
XOR_ASSIGN = 567,
|
AND_ASSIGN = 567,
|
||||||
OR_ASSIGN = 568,
|
XOR_ASSIGN = 568,
|
||||||
SUB_ASSIGN = 569,
|
OR_ASSIGN = 569,
|
||||||
STRING_LITERAL = 570,
|
SUB_ASSIGN = 570,
|
||||||
LEFT_PAREN = 571,
|
STRING_LITERAL = 571,
|
||||||
RIGHT_PAREN = 572,
|
LEFT_PAREN = 572,
|
||||||
LEFT_BRACKET = 573,
|
RIGHT_PAREN = 573,
|
||||||
RIGHT_BRACKET = 574,
|
LEFT_BRACKET = 574,
|
||||||
LEFT_BRACE = 575,
|
RIGHT_BRACKET = 575,
|
||||||
RIGHT_BRACE = 576,
|
LEFT_BRACE = 576,
|
||||||
DOT = 577,
|
RIGHT_BRACE = 577,
|
||||||
COMMA = 578,
|
DOT = 578,
|
||||||
COLON = 579,
|
COMMA = 579,
|
||||||
EQUAL = 580,
|
COLON = 580,
|
||||||
SEMICOLON = 581,
|
EQUAL = 581,
|
||||||
BANG = 582,
|
SEMICOLON = 582,
|
||||||
DASH = 583,
|
BANG = 583,
|
||||||
TILDE = 584,
|
DASH = 584,
|
||||||
PLUS = 585,
|
TILDE = 585,
|
||||||
STAR = 586,
|
PLUS = 586,
|
||||||
SLASH = 587,
|
STAR = 587,
|
||||||
PERCENT = 588,
|
SLASH = 588,
|
||||||
LEFT_ANGLE = 589,
|
PERCENT = 589,
|
||||||
RIGHT_ANGLE = 590,
|
LEFT_ANGLE = 590,
|
||||||
VERTICAL_BAR = 591,
|
RIGHT_ANGLE = 591,
|
||||||
CARET = 592,
|
VERTICAL_BAR = 592,
|
||||||
AMPERSAND = 593,
|
CARET = 593,
|
||||||
QUESTION = 594,
|
AMPERSAND = 594,
|
||||||
INVARIANT = 595,
|
QUESTION = 595,
|
||||||
HIGH_PRECISION = 596,
|
INVARIANT = 596,
|
||||||
MEDIUM_PRECISION = 597,
|
HIGH_PRECISION = 597,
|
||||||
LOW_PRECISION = 598,
|
MEDIUM_PRECISION = 598,
|
||||||
PRECISION = 599,
|
LOW_PRECISION = 599,
|
||||||
PACKED = 600,
|
PRECISION = 600,
|
||||||
RESOURCE = 601,
|
PACKED = 601,
|
||||||
SUPERP = 602,
|
RESOURCE = 602,
|
||||||
FLOATCONSTANT = 603,
|
SUPERP = 603,
|
||||||
INTCONSTANT = 604,
|
FLOATCONSTANT = 604,
|
||||||
UINTCONSTANT = 605,
|
INTCONSTANT = 605,
|
||||||
BOOLCONSTANT = 606,
|
UINTCONSTANT = 606,
|
||||||
IDENTIFIER = 607,
|
BOOLCONSTANT = 607,
|
||||||
TYPE_NAME = 608,
|
IDENTIFIER = 608,
|
||||||
CENTROID = 609,
|
TYPE_NAME = 609,
|
||||||
IN = 610,
|
CENTROID = 610,
|
||||||
OUT = 611,
|
IN = 611,
|
||||||
INOUT = 612,
|
OUT = 612,
|
||||||
STRUCT = 613,
|
INOUT = 613,
|
||||||
VOID = 614,
|
STRUCT = 614,
|
||||||
WHILE = 615,
|
VOID = 615,
|
||||||
BREAK = 616,
|
WHILE = 616,
|
||||||
CONTINUE = 617,
|
BREAK = 617,
|
||||||
DO = 618,
|
CONTINUE = 618,
|
||||||
ELSE = 619,
|
DO = 619,
|
||||||
FOR = 620,
|
ELSE = 620,
|
||||||
IF = 621,
|
FOR = 621,
|
||||||
DISCARD = 622,
|
IF = 622,
|
||||||
RETURN = 623,
|
DISCARD = 623,
|
||||||
SWITCH = 624,
|
RETURN = 624,
|
||||||
CASE = 625,
|
SWITCH = 625,
|
||||||
DEFAULT = 626,
|
CASE = 626,
|
||||||
UNIFORM = 627,
|
DEFAULT = 627,
|
||||||
SHARED = 628,
|
UNIFORM = 628,
|
||||||
BUFFER = 629,
|
SHARED = 629,
|
||||||
FLAT = 630,
|
BUFFER = 630,
|
||||||
SMOOTH = 631,
|
FLAT = 631,
|
||||||
LAYOUT = 632,
|
SMOOTH = 632,
|
||||||
DOUBLECONSTANT = 633,
|
LAYOUT = 633,
|
||||||
INT16CONSTANT = 634,
|
DOUBLECONSTANT = 634,
|
||||||
UINT16CONSTANT = 635,
|
INT16CONSTANT = 635,
|
||||||
FLOAT16CONSTANT = 636,
|
UINT16CONSTANT = 636,
|
||||||
INT32CONSTANT = 637,
|
FLOAT16CONSTANT = 637,
|
||||||
UINT32CONSTANT = 638,
|
INT32CONSTANT = 638,
|
||||||
INT64CONSTANT = 639,
|
UINT32CONSTANT = 639,
|
||||||
UINT64CONSTANT = 640,
|
INT64CONSTANT = 640,
|
||||||
SUBROUTINE = 641,
|
UINT64CONSTANT = 641,
|
||||||
DEMOTE = 642,
|
SUBROUTINE = 642,
|
||||||
PAYLOADNV = 643,
|
DEMOTE = 643,
|
||||||
PAYLOADINNV = 644,
|
PAYLOADNV = 644,
|
||||||
HITATTRNV = 645,
|
PAYLOADINNV = 645,
|
||||||
CALLDATANV = 646,
|
HITATTRNV = 646,
|
||||||
CALLDATAINNV = 647,
|
CALLDATANV = 647,
|
||||||
PAYLOADEXT = 648,
|
CALLDATAINNV = 648,
|
||||||
PAYLOADINEXT = 649,
|
PAYLOADEXT = 649,
|
||||||
HITATTREXT = 650,
|
PAYLOADINEXT = 650,
|
||||||
CALLDATAEXT = 651,
|
HITATTREXT = 651,
|
||||||
CALLDATAINEXT = 652,
|
CALLDATAEXT = 652,
|
||||||
PATCH = 653,
|
CALLDATAINEXT = 653,
|
||||||
SAMPLE = 654,
|
PATCH = 654,
|
||||||
NONUNIFORM = 655,
|
SAMPLE = 655,
|
||||||
COHERENT = 656,
|
NONUNIFORM = 656,
|
||||||
VOLATILE = 657,
|
COHERENT = 657,
|
||||||
RESTRICT = 658,
|
VOLATILE = 658,
|
||||||
READONLY = 659,
|
RESTRICT = 659,
|
||||||
WRITEONLY = 660,
|
READONLY = 660,
|
||||||
DEVICECOHERENT = 661,
|
WRITEONLY = 661,
|
||||||
QUEUEFAMILYCOHERENT = 662,
|
DEVICECOHERENT = 662,
|
||||||
WORKGROUPCOHERENT = 663,
|
QUEUEFAMILYCOHERENT = 663,
|
||||||
SUBGROUPCOHERENT = 664,
|
WORKGROUPCOHERENT = 664,
|
||||||
NONPRIVATE = 665,
|
SUBGROUPCOHERENT = 665,
|
||||||
SHADERCALLCOHERENT = 666,
|
NONPRIVATE = 666,
|
||||||
NOPERSPECTIVE = 667,
|
SHADERCALLCOHERENT = 667,
|
||||||
EXPLICITINTERPAMD = 668,
|
NOPERSPECTIVE = 668,
|
||||||
PERVERTEXNV = 669,
|
EXPLICITINTERPAMD = 669,
|
||||||
PERPRIMITIVENV = 670,
|
PERVERTEXNV = 670,
|
||||||
PERVIEWNV = 671,
|
PERPRIMITIVENV = 671,
|
||||||
PERTASKNV = 672,
|
PERVIEWNV = 672,
|
||||||
PRECISE = 673
|
PERTASKNV = 673,
|
||||||
|
PRECISE = 674
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -469,7 +470,7 @@ extern int yydebug;
|
||||||
|
|
||||||
union YYSTYPE
|
union YYSTYPE
|
||||||
{
|
{
|
||||||
#line 96 "MachineIndependent/glslang.y" /* yacc.c:1909 */
|
#line 97 "glslang.y" /* yacc.c:1909 */
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
glslang::TSourceLoc loc;
|
glslang::TSourceLoc loc;
|
||||||
|
|
@ -505,7 +506,7 @@ union YYSTYPE
|
||||||
glslang::TArraySizes* typeParameters;
|
glslang::TArraySizes* typeParameters;
|
||||||
} interm;
|
} interm;
|
||||||
|
|
||||||
#line 509 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
#line 510 "glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union YYSTYPE YYSTYPE;
|
typedef union YYSTYPE YYSTYPE;
|
||||||
|
|
@ -517,4 +518,4 @@ typedef union YYSTYPE YYSTYPE;
|
||||||
|
|
||||||
int yyparse (glslang::TParseContext* pParseContext);
|
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) 2002-2005 3Dlabs Inc. Ltd.
|
||||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||||
// Copyright (C) 2017 ARM Limited.
|
// Copyright (C) 2017 ARM Limited.
|
||||||
|
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
@ -1085,6 +1086,30 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
||||||
case EOpExecuteCallable: out.debug << "executeCallableNV"; break;
|
case EOpExecuteCallable: out.debug << "executeCallableNV"; break;
|
||||||
case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; 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 EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
|
||||||
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;
|
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;
|
||||||
case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break;
|
case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue