@@ -1980,7 +1980,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) {
1980
1980
" CrossWorkgroup, Workgroup or Function" ;
1981
1981
}
1982
1982
1983
- if (result_type != p_data_type) {
1983
+ if (!_. ContainsUntypedPointer (p_type) && result_type != p_data_type) {
1984
1984
return _.diag (SPV_ERROR_INVALID_DATA, inst)
1985
1985
<< ext_inst_name () << " : "
1986
1986
<< " expected data type of the pointer to be equal to Result "
@@ -2042,15 +2042,17 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) {
2042
2042
" CrossWorkgroup, Workgroup or Function" ;
2043
2043
}
2044
2044
2045
- if (!_.IsIntScalarOrVectorType (p_data_type) ||
2046
- _.GetBitWidth (p_data_type) != 32 ) {
2045
+ if ((!_.IsIntScalarOrVectorType (p_data_type) ||
2046
+ _.GetBitWidth (p_data_type) != 32 ) &&
2047
+ !_.ContainsUntypedPointer (p_type)) {
2047
2048
return _.diag (SPV_ERROR_INVALID_DATA, inst)
2048
2049
<< ext_inst_name () << " : "
2049
2050
<< " expected data type of the pointer to be a 32-bit int "
2050
2051
" scalar or vector type" ;
2051
2052
}
2052
2053
2053
- if (_.GetDimension (p_data_type) != num_components) {
2054
+ if (!_.ContainsUntypedPointer (p_type) &&
2055
+ _.GetDimension (p_data_type) != num_components) {
2054
2056
return _.diag (SPV_ERROR_INVALID_DATA, inst)
2055
2057
<< ext_inst_name () << " : "
2056
2058
<< " expected data type of the pointer to have the same number "
0 commit comments