mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-24 00:40:14 +00:00
Fix list of opcodes allowed for OpSpecConstantOp
Was missing BitcastXor, GenericCastToPtr. Remove duplicate of SLessThanEqual
This commit is contained in:
parent
d0de196439
commit
969ce4b323
@ -109,6 +109,7 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
|
||||
CASE(UConvert),
|
||||
CASE(ConvertPtrToU),
|
||||
CASE(ConvertUToPtr),
|
||||
CASE(GenericCastToPtr),
|
||||
CASE(PtrCastToGeneric),
|
||||
CASE(Bitcast),
|
||||
CASE(QuantizeToF16),
|
||||
@ -128,6 +129,7 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
|
||||
CASE(ShiftLeftLogical),
|
||||
CASE(BitwiseOr),
|
||||
CASE(BitwiseAnd),
|
||||
CASE(BitwiseXor),
|
||||
CASE(FNegate),
|
||||
CASE(FAdd),
|
||||
CASE(FSub),
|
||||
@ -154,7 +156,6 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
|
||||
CASE(SGreaterThan),
|
||||
CASE(ULessThanEqual),
|
||||
CASE(SLessThanEqual),
|
||||
CASE(SLessThanEqual),
|
||||
CASE(UGreaterThanEqual),
|
||||
CASE(SGreaterThanEqual),
|
||||
// Memory
|
||||
@ -163,6 +164,10 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
|
||||
CASE(PtrAccessChain),
|
||||
CASE(InBoundsPtrAccessChain),
|
||||
};
|
||||
|
||||
// The 58 is determined by counting the opcodes listed in the spec.
|
||||
static_assert(58 == sizeof(kOpSpecConstantOpcodes)/sizeof(kOpSpecConstantOpcodes[0]),
|
||||
"OpSpecConstantOp opcode table is incomplete");
|
||||
#undef CASE
|
||||
// clang-format on
|
||||
|
||||
|
@ -512,6 +512,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
CASE1(UConvert),
|
||||
CASE1(ConvertPtrToU),
|
||||
CASE1(ConvertUToPtr),
|
||||
CASE1(GenericCastToPtr),
|
||||
CASE1(PtrCastToGeneric),
|
||||
CASE1(Bitcast),
|
||||
CASE1(QuantizeToF16),
|
||||
@ -531,6 +532,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
CASE2(ShiftLeftLogical),
|
||||
CASE2(BitwiseOr),
|
||||
CASE2(BitwiseAnd),
|
||||
CASE2(BitwiseXor),
|
||||
CASE1(FNegate),
|
||||
CASE2(FAdd),
|
||||
CASE2(FSub),
|
||||
@ -554,7 +556,6 @@ INSTANTIATE_TEST_CASE_P(
|
||||
CASE2(SGreaterThan),
|
||||
CASE2(ULessThanEqual),
|
||||
CASE2(SLessThanEqual),
|
||||
CASE2(SLessThanEqual),
|
||||
CASE2(UGreaterThanEqual),
|
||||
CASE2(SGreaterThanEqual),
|
||||
// Memory
|
||||
|
Loading…
Reference in New Issue
Block a user