)]}'
{
  "commit": "4b8a3d34d4e5185c580ca613dbdd4e84ba78f3c8",
  "tree": "4de9c96307f3bfd090e84728cf28e9f2effb77d6",
  "parents": [
    "8ab22d45da518d74ba300723e2580ed8b983ef0c"
  ],
  "author": {
    "name": "Ben Clayton",
    "email": "bclayton@google.com",
    "time": "Tue Jun 13 16:55:57 2023 +0000"
  },
  "committer": {
    "name": "Dawn LUCI CQ",
    "email": "dawn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Jun 13 16:55:57 2023 +0000"
  },
  "message": "[tint][transform][hlsl] Fix bad materialization\n\nAs reported in tint:1963, the PromoteSideEffectsToDecl transform could\nhoist a constant expression to an implicitly typed \u0027let\u0027 declaration,\nresulting in the expression type materializing early and resolve to a\ndifferent type.\n\nConstant expressions don\u0027t need to be hoisted, but it seems generally\nsafer to continue emitting these, but with an explicit type on the\n\u0027let\u0027 declaration. This is what this CL does.\n\nIn doing this, I uncovered a second bug where the DecomposeMemoryAccess\ntransform would create a new a struct for the result of the\natomicCompareExchangeWeak() intrinsic, which would fail to assign to\nthe new explicitly typed lets. The fix for this is simple - don\u0027t\ngenerate a new struct, but instead use the (fairly new) internal struct\ndeclarations for these. This keeps the resolver happy, and actually\nreduces a bunch of spew from the HLSL output.\n\nFixed: tint:1963\nChange-Id: I271a2130dc303da3b9f11876ec5c6e8b98a16ee7\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/137100\nKokoro: Kokoro \u003cnoreply+kokoro@google.com\u003e\nReviewed-by: James Price \u003cjrprice@google.com\u003e\nCommit-Queue: Ben Clayton \u003cbclayton@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bd4860634103faf19dc3b9384a9a3fd62d6d0f0f",
      "old_mode": 33188,
      "old_path": "src/tint/ast/transform/decompose_memory_access.cc",
      "new_id": "c1b606c55677088ea7992beab24c73d299e144ba",
      "new_mode": 33188,
      "new_path": "src/tint/ast/transform/decompose_memory_access.cc"
    },
    {
      "type": "modify",
      "old_id": "52f2ff2554c87848040b73e5a5293bf474abc558",
      "old_mode": 33188,
      "old_path": "src/tint/ast/transform/decompose_memory_access_test.cc",
      "new_id": "3bff4a88c350052b90a38e201d8cc1b8dc6e56eb",
      "new_mode": 33188,
      "new_path": "src/tint/ast/transform/decompose_memory_access_test.cc"
    },
    {
      "type": "modify",
      "old_id": "19136ddf7b285ceb871fcd6825a3bc6e68bdb75c",
      "old_mode": 33188,
      "old_path": "src/tint/ast/transform/promote_side_effects_to_decl.cc",
      "new_id": "fed83270bc23d4e7f88032b53264f42dc4345da2",
      "new_mode": 33188,
      "new_path": "src/tint/ast/transform/promote_side_effects_to_decl.cc"
    },
    {
      "type": "modify",
      "old_id": "f8ce8600e6712f4b6fb959e78c6fb29ba783ccfe",
      "old_mode": 33188,
      "old_path": "src/tint/ast/transform/promote_side_effects_to_decl_test.cc",
      "new_id": "ec54d247e8cc8603fed45a3cf13f4494355da16a",
      "new_mode": 33188,
      "new_path": "src/tint/ast/transform/promote_side_effects_to_decl_test.cc"
    },
    {
      "type": "modify",
      "old_id": "1b30d8d56c2875b0ee65defbd249eb0c9554f787",
      "old_mode": 33188,
      "old_path": "src/tint/writer/hlsl/generator_impl.cc",
      "new_id": "def946ac038d5a22af2e2d7d8d628f5c57ad3461",
      "new_mode": 33188,
      "new_path": "src/tint/writer/hlsl/generator_impl.cc"
    },
    {
      "type": "modify",
      "old_id": "aa5655207d95733693d3842f37507843222691e5",
      "old_mode": 33188,
      "old_path": "test/tint/bug/tint/1573.wgsl.expected.dxc.hlsl",
      "new_id": "31f56b4f3739b3922b3253fd58aa85c3248197f7",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1573.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "aa5655207d95733693d3842f37507843222691e5",
      "old_mode": 33188,
      "old_path": "test/tint/bug/tint/1573.wgsl.expected.fxc.hlsl",
      "new_id": "31f56b4f3739b3922b3253fd58aa85c3248197f7",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1573.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "8a4a1bac1a8b8521fa45bd664ebb5748e1fd8673",
      "old_mode": 33188,
      "old_path": "test/tint/bug/tint/1574.wgsl.expected.dxc.hlsl",
      "new_id": "1e5c7233760e1d882c074f438b2f142e2c91778d",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1574.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "8a4a1bac1a8b8521fa45bd664ebb5748e1fd8673",
      "old_mode": 33188,
      "old_path": "test/tint/bug/tint/1574.wgsl.expected.fxc.hlsl",
      "new_id": "1e5c7233760e1d882c074f438b2f142e2c91778d",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1574.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "90b4ae829abde51f42e50afce098f1a7eb36a0ac",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_a.wgsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e1213df9f6553360ffd67aa306ad64f428fa55f6",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_a.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e1213df9f6553360ffd67aa306ad64f428fa55f6",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_a.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8ac552f920fe56f16adc6e162f47f7dd145d2e59",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_a.wgsl.expected.glsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7158f2f164c921eecc3c679c0e84242971721d19",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_a.wgsl.expected.msl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "610e6ec37e1c1b8f43ca096efaa65f3d7a9a241b",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_a.wgsl.expected.spvasm"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2941e83c308f8d81066e9e15dd33c2a32cd63bb7",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_a.wgsl.expected.wgsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "29c0e25612fc2f682b7dbba5d865d81ae472ab2c",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_b.wgsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9c7b402ff005bd6196b1f8285707d1a34288d48e",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_b.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9c7b402ff005bd6196b1f8285707d1a34288d48e",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_b.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9565468666750e012e4de169fcde8ab5217c2114",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_b.wgsl.expected.glsl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d3fa9e73c86a333ea070f1c6d32f9b8274f7bcca",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_b.wgsl.expected.msl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ae057804b71aacf869c216ff3e4ace47f0db469c",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_b.wgsl.expected.spvasm"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4955fd0bebc156fe5e7aee22fa000a1d9a61acc9",
      "new_mode": 33188,
      "new_path": "test/tint/bug/tint/1963_b.wgsl.expected.wgsl"
    },
    {
      "type": "modify",
      "old_id": "994456a0f5b86a4a8e644fd27947ad3ae93f62a2",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl",
      "new_id": "0a188ef927c4e09c73998962277dad6beb16d9f4",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "994456a0f5b86a4a8e644fd27947ad3ae93f62a2",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl",
      "new_id": "0a188ef927c4e09c73998962277dad6beb16d9f4",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "41c8e6f1b5a208315901cd45bdde18f5a69f221f",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl",
      "new_id": "de0fce41b8f752159b8774cd4a79dacac502e675",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "41c8e6f1b5a208315901cd45bdde18f5a69f221f",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl",
      "new_id": "de0fce41b8f752159b8774cd4a79dacac502e675",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/literal/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "e9bd8f68b58f2df5c08cef194332cda437933362",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl",
      "new_id": "97da599614983c6ee0c32be8ed68c542638d7638",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "e9bd8f68b58f2df5c08cef194332cda437933362",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl",
      "new_id": "97da599614983c6ee0c32be8ed68c542638d7638",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_i32.spvasm.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "ec3eff192edce43305c5ac1e9f943441940282c1",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl",
      "new_id": "368a192676a16c73704032e5fa268867852a569b",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "ec3eff192edce43305c5ac1e9f943441940282c1",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl",
      "new_id": "368a192676a16c73704032e5fa268867852a569b",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/atomics/from_gen/var/atomicCompareExchangeWeak/storage_u32.spvasm.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "0d3c442d5d6718f161f74bfcb08546c3334809d5",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl",
      "new_id": "53eff7221bda2729a40f398d3621177038cce670",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "0d3c442d5d6718f161f74bfcb08546c3334809d5",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl",
      "new_id": "53eff7221bda2729a40f398d3621177038cce670",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "4a8edfcdb4c6975f60da18a879dc934899cca56b",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl",
      "new_id": "904b54e3a5428b6ce74130e946f2b139d900fa58",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "4a8edfcdb4c6975f60da18a879dc934899cca56b",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl",
      "new_id": "904b54e3a5428b6ce74130e946f2b139d900fa58",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/literal/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "6d7060e52d7e63a38e7001250a0a638977eecb73",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl",
      "new_id": "72ad802f45ffd97e784005101cbaa9f741da3e44",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "6d7060e52d7e63a38e7001250a0a638977eecb73",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl",
      "new_id": "72ad802f45ffd97e784005101cbaa9f741da3e44",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/1bd40a.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "25ba9b83169b0670d9045892c8284cd6b83fccdd",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl",
      "new_id": "c1804c6d9a89287f15d92bc4b92787c478617e79",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "25ba9b83169b0670d9045892c8284cd6b83fccdd",
      "old_mode": 33188,
      "old_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl",
      "new_id": "c1804c6d9a89287f15d92bc4b92787c478617e79",
      "new_mode": 33188,
      "new_path": "test/tint/builtins/gen/var/atomicCompareExchangeWeak/63d8e6.wgsl.expected.fxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "248ab255e19da4ec38d31bead556eaf66e979b9a",
      "old_mode": 33188,
      "old_path": "test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.dxc.hlsl",
      "new_id": "2f5f807ec6e50f0d561e71727bab50d447f29ff6",
      "new_mode": 33188,
      "new_path": "test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.dxc.hlsl"
    },
    {
      "type": "modify",
      "old_id": "248ab255e19da4ec38d31bead556eaf66e979b9a",
      "old_mode": 33188,
      "old_path": "test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.fxc.hlsl",
      "new_id": "2f5f807ec6e50f0d561e71727bab50d447f29ff6",
      "new_mode": 33188,
      "new_path": "test/tint/statements/discard/atomic_cmpxchg.wgsl.expected.fxc.hlsl"
    }
  ]
}
