#1004: Use after free of an instruction, in remove-duplicates transform
#1007: OpImageRead not required to return 4-component vector
#1009: OpImageRead can return scalar int/float types
+ #1011: OpImageRead should allow scalar int/float texel types
v2017.1 2017-11-23
- Update README with details on the public_spirv_tools_dev@khronos.org mailing list.
<< spvOpcodeString(opcode);
}
+ // TODO(atgoo@github.com) The spec doesn't explicitely say what the type
+ // of texel should be.
const uint32_t texel_type = _.GetOperandTypeId(inst, 2);
- if (!_.IsIntVectorType(texel_type) &&
- !_.IsFloatVectorType(texel_type)) {
+ if (!_.IsIntScalarOrVectorType(texel_type) &&
+ !_.IsFloatScalarOrVectorType(texel_type)) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Texel to be int or float vector or scalar: "
<< spvOpcodeString(opcode);
}
+#if 0
+ // TODO: See above.
if (_.GetDimension(texel_type) != 4) {
return _.diag(SPV_ERROR_INVALID_DATA)
<< "Expected Texel to have 4 components: "
<< spvOpcodeString(opcode);
}
+#endif
if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) {
const uint32_t texel_component_type = _.GetComponentType(texel_type);
"ImageWrite"));
}
-TEST_F(ValidateImage, WriteTexelNotVector) {
+TEST_F(ValidateImage, WriteTexelWrongType) {
const std::string body = R"(
%img = OpLoad %type_image_u32_2d_0000 %uniform_image_u32_2d_0000
-%res1 = OpImageWrite %img %u32vec2_01 %u32_0
+%res1 = OpImageWrite %img %u32vec2_01 %img
)";
const std::string extra = "\nOpCapability StorageImageWriteWithoutFormat\n";
"Expected Texel to be int or float vector or scalar: ImageWrite"));
}
-TEST_F(ValidateImage, WriteTexelNotVector4) {
+TEST_F(ValidateImage, DISABLED_WriteTexelNotVector4) {
const std::string body = R"(
%img = OpLoad %type_image_u32_2d_0000 %uniform_image_u32_2d_0000
%res1 = OpImageWrite %img %u32vec2_01 %u32vec3_012