Add RayQueryProvisionalKHR to opt types (#3239)

Add missing RayQueryProvisionalKHR types
This commit is contained in:
JiaoluAMD 2020-03-20 00:41:30 +08:00 committed by GitHub
parent 18d3896a15
commit da52d0875c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -862,6 +862,9 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) {
inst.GetSingleWordInOperand(2),
inst.GetSingleWordInOperand(3));
break;
case SpvOpTypeRayQueryProvisionalKHR:
type = new RayQueryProvisionalKHR();
break;
default:
SPIRV_UNIMPLEMENTED(consumer_, "unhandled type");
break;

View File

@ -128,6 +128,7 @@ std::unique_ptr<Type> Type::Clone() const {
DeclareKindCase(NamedBarrier);
DeclareKindCase(AccelerationStructureNV);
DeclareKindCase(CooperativeMatrixNV);
DeclareKindCase(RayQueryProvisionalKHR);
#undef DeclareKindCase
default:
assert(false && "Unhandled type");
@ -173,6 +174,7 @@ bool Type::operator==(const Type& other) const {
DeclareKindCase(NamedBarrier);
DeclareKindCase(AccelerationStructureNV);
DeclareKindCase(CooperativeMatrixNV);
DeclareKindCase(RayQueryProvisionalKHR);
#undef DeclareKindCase
default:
assert(false && "Unhandled type");
@ -223,6 +225,7 @@ void Type::GetHashWords(std::vector<uint32_t>* words,
DeclareKindCase(NamedBarrier);
DeclareKindCase(AccelerationStructureNV);
DeclareKindCase(CooperativeMatrixNV);
DeclareKindCase(RayQueryProvisionalKHR);
#undef DeclareKindCase
default:
assert(false && "Unhandled type");

View File

@ -59,6 +59,7 @@ class PipeStorage;
class NamedBarrier;
class AccelerationStructureNV;
class CooperativeMatrixNV;
class RayQueryProvisionalKHR;
// Abstract class for a SPIR-V type. It has a bunch of As<sublcass>() methods,
// which is used as a way to probe the actual <subclass>.
@ -94,7 +95,8 @@ class Type {
kPipeStorage,
kNamedBarrier,
kAccelerationStructureNV,
kCooperativeMatrixNV
kCooperativeMatrixNV,
kRayQueryProvisionalKHR
};
Type(Kind k) : kind_(k) {}
@ -199,6 +201,7 @@ class Type {
DeclareCastMethod(NamedBarrier)
DeclareCastMethod(AccelerationStructureNV)
DeclareCastMethod(CooperativeMatrixNV)
DeclareCastMethod(RayQueryProvisionalKHR)
#undef DeclareCastMethod
protected:
@ -659,6 +662,7 @@ DefineParameterlessType(Queue, queue);
DefineParameterlessType(PipeStorage, pipe_storage);
DefineParameterlessType(NamedBarrier, named_barrier);
DefineParameterlessType(AccelerationStructureNV, accelerationStructureNV);
DefineParameterlessType(RayQueryProvisionalKHR, rayQueryProvisionalKHR);
#undef DefineParameterlessType
} // namespace analysis