)]}'
{
  "commit": "1cecf91701def0981f987c101e282bec31f7d542",
  "tree": "1e32105802b693cfbf21d19458e0963718afcdb2",
  "parents": [
    "a6e6454ef27f9c3c652d6a37281c3b9ed45d4667"
  ],
  "author": {
    "name": "gmitrano-unity",
    "email": "89797527+gmitrano-unity@users.noreply.github.com",
    "time": "Thu Oct 06 10:35:18 2022 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Oct 06 10:35:18 2022 -0400"
  },
  "message": "Support Narrow Types in BitCast Folding Rule (#4941)\n\n* Support Narrow Types in BitCast Folding Rule\r\n\r\nThis change adds support for narrow types in the BitCastScalarOrVector\r\nfolding rule. According to Section 2.2.1 of the SPIR-V spec, types that\r\nare narrower than 32 bits are automatically either sign extended, or\r\nzero extended depending on the type. With that guaranteed, we should\r\nbe able to use the first 32-bit word of any narrow type for the folding\r\nlogic without performing any special conversions.\r\n\r\nIn order to reduce code duplication, this change moves the\r\nGetU32BitValue and GetU64BitValue functions from IntConstant to\r\nScalarConstant. Without this move, we would have needed an identical\r\nversion of GetU32BitValue on FloatConstant.\r\n\r\n* Add Tests for 16-bit BitCast Folding\r\n\r\nThis change adds several new test cases to the\r\nIntegerInstructionFoldingTest which trigger the 16-bit BitCast logic.\r\nThe logic for half types was also added to the integer case since we\r\ncan\u0027t easily validate half float types in C++ code. It\u0027s easier to\r\nvalidate them as unsigned integers instead. Pllus this also allows us\r\nto verify the SPIR-V constant sign extension logic too.\r\n\r\n* Add 8-Bit Folding Test Cases\r\n\r\nThis change adds a couple more test cases to the integer instruction\r\nfolding test suite in order to ensure that the BitCast logic also\r\nworks correctly with the Int8 shader capability.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c039ae087fcbdfb9c6c8c65aa5373d73c4a91058",
      "old_mode": 33188,
      "old_path": "source/opt/constants.h",
      "new_id": "588ca3e76a7bea4c63df7fea126708ec2b70ebdd",
      "new_mode": 33188,
      "new_path": "source/opt/constants.h"
    },
    {
      "type": "modify",
      "old_id": "3f10bd00921a115af217cbbe26a2f2558d0af7fd",
      "old_mode": 33188,
      "old_path": "source/opt/folding_rules.cpp",
      "new_id": "3d803addcc315dde9a946159fce5ca0a5de5339f",
      "new_mode": 33188,
      "new_path": "source/opt/folding_rules.cpp"
    },
    {
      "type": "modify",
      "old_id": "a034e959a44c23c864cb90fe4f7aecc852cf5213",
      "old_mode": 33188,
      "old_path": "test/opt/fold_test.cpp",
      "new_id": "b32480326f3dec4900f59bc75cc56ca2845d1a0b",
      "new_mode": 33188,
      "new_path": "test/opt/fold_test.cpp"
    }
  ]
}
