}
case SpvOpImageRead: {
- if (!_.IsIntVectorType(result_type) &&
- !_.IsFloatVectorType(result_type)) {
+ if (!_.IsIntScalarOrVectorType(result_type) &&
+ !_.IsFloatScalarOrVectorType(result_type)) {
return _.diag(SPV_ERROR_INVALID_DATA)
- << "Expected Result Type to be int or float vector type: "
+ << "Expected Result Type to be int or float scalar or vector type: "
<< spvOpcodeString(opcode);
}
+#if 0
+ // TODO(atgoo@github.com) Disabled until the spec is clarified.
if (_.GetDimension(result_type) != 4) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Result Type to have 4 components: "
<< spvOpcodeString(opcode);
}
+#endif
const uint32_t image_type = _.GetOperandTypeId(inst, 2);
if (_.GetIdOpcode(image_type) != SpvOpTypeImage) {
"ImageRead"));
}
-TEST_F(ValidateImage, ReadWrongResultType) {
+// TODO(atgoo@github.com) Disabled until the spec is clarified.
+TEST_F(ValidateImage, DISABLED_ReadWrongResultType) {
const std::string body = R"(
%img = OpLoad %type_image_u32_2d_0000 %uniform_image_u32_2d_0000
%res1 = OpImageRead %f32 %img %u32vec2_01
"Expected Result Type to be int or float vector type: ImageRead"));
}
-TEST_F(ValidateImage, ReadWrongNumComponentsResultType) {
+// TODO(atgoo@github.com) Disabled until the spec is clarified.
+TEST_F(ValidateImage, DISABLED_ReadWrongNumComponentsResultType) {
const std::string body = R"(
%img = OpLoad %type_image_u32_2d_0000 %uniform_image_u32_2d_0000
%res1 = OpImageRead %f32vec3 %img %u32vec2_01