)]}'
{
  "commit": "95a343232b1b89c913804271afd360f41133c527",
  "tree": "75c4c9a4c70243abb675ab298feafbf07222831e",
  "parents": [
    "775dcba3bfe492932053ec766b70b6ffc3bfc9ca"
  ],
  "author": {
    "name": "Yuxin Hu",
    "email": "yuxinhu@google.com",
    "time": "Mon Mar 23 15:50:02 2026 -0700"
  },
  "committer": {
    "name": "Angle LUCI CQ",
    "email": "angle-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Mar 25 19:13:38 2026 -0700"
  },
  "message": "IR Validation: validate no identical types with different IDs\n\nThis change walks through the IR.meta.types vector, and checks that\nthere is no duplicated items in this vector. In order to use the\nHashSet, we need to implement Eq, PartialEq, and Hash traits for the\nType enum.\n\nSome transformation will mark some Type variables as\nDeadCodeEliminated, these Type variables won\u0027t be included in final IR,\nso the type uniqueness check will skip them.\n\nFor struct type, In GLSL ES Spec 3.2, section 4.1.8:\nhttps://registry.khronos.org/OpenGL/specs/es/3.2/GLSL_ES_Specification_3.20.html#structures\nIt says that for struct type, \"name becomes the user-defined type\".\n\nHowever, for struct specifier declared as follows:\n```\nstruct\n{\n    int field;\n}s;\n```\nThe GLSL parser code will use empty string for the struct type name.\nThis means if the GLSL shader code declares 2 struct types:\n```\nstruct\n{\n    int field;\n}s1;\n\nstruct\n{\n    int field;\n}s2;\n```\nIn IR, both will ends up with the same\nType::Struct(Name, Vec\u003cField\u003e, StructSpecialization). We can\u0027t tell\nthey are different struct types from the ir::Type enum itself.\n\nAnother problem is the interface blocks can end up with the same\nType::Struct(Name, Vec\u003cField\u003e, StructSpecialization).\n\nTo solve the problem, we treat two Struct Types as different types\nif they both have empty name, or if they are interface blocks.\nThis is a valid fallback, as SpirV doesn\u0027t enforce type uniqueness on\nstruct in general:\nhttps://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#TypesVariables:\n\"two different aggregate type \u003cid\u003es are allowed to have identical\ndeclarations and decorations, and will still be two different types.\"\n\nBug: angleproject:349994211\nChange-Id: I81df74607825bf7ceddc96c4374898a05385c1a0\nReviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/7689832\nCommit-Queue: Yuxin Hu \u003cyuxinhu@google.com\u003e\nReviewed-by: Shahbaz Youssefi \u003csyoussefi@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "55d3c4346f07e11b0905b526627e1840197bce4c",
      "old_mode": 33188,
      "old_path": "src/compiler/translator/ir/src/ir.rs",
      "new_id": "0d9808f1758a23fdddf9a66977fa0c43a85c2a97",
      "new_mode": 33188,
      "new_path": "src/compiler/translator/ir/src/ir.rs"
    },
    {
      "type": "modify",
      "old_id": "53b831e0d8354865c4732cb32950953b317590be",
      "old_mode": 33188,
      "old_path": "src/compiler/translator/ir/src/validator.rs",
      "new_id": "269b8fa1f4ac1145f0c0276299e41df245c72555",
      "new_mode": 33188,
      "new_path": "src/compiler/translator/ir/src/validator.rs"
    }
  ]
}
