)]}'
{
  "commit": "bc38083d0698a089ef71bb8838f082f346857291",
  "tree": "83604123b50fe7d0d1eeaa52a0dfed9a1b480260",
  "parents": [
    "96635e67208bbf8ec4288ce3a0941ca3e90b0ee9"
  ],
  "author": {
    "name": "Tex Riddell",
    "email": "texr@microsoft.com",
    "time": "Thu Mar 14 16:44:27 2019"
  },
  "committer": {
    "name": "Tex Riddell",
    "email": "texr@microsoft.com",
    "time": "Thu Mar 14 16:44:27 2019"
  },
  "message": "Fill in usage flags for constant buffers for library reflection. (#2028)\n\nTODO: drill into ConstantBuffer\u003c\u003e type to make cbuffer reflection useful here.  The change would be something like this: CShaderReflectionConstantBuffer::Initialize:\n   if (!annotation)\n     return;\n\n+  if (ST-\u003egetNumElements() \u003d\u003d 1 \u0026\u0026\n+      isa\u003cStructType\u003e(Ty-\u003egetContainedType(0)) \u0026\u0026\n+      annotation-\u003eGetFieldAnnotation(0).GetFieldName() \u003d\u003d CB.GetGlobalName()) {\n+    // Assume we need to drill one level deeper into struct.\n+    // This is the case when you use ConstantBuffer\u003cMyStruct\u003e ...\n+    // It could also misfire in a narrow case where you use:\n+    // struct MyStruct { ... }; cbuffer MyCBuffer { MyStruct MyCBuffer; }\n+    // But the effect would be to drill one level into MyCBuffer for cbuffer VarDesc,\n+    // which wouldn\u0027t be bad.\n+    ST \u003d cast\u003cStructType\u003e(Ty-\u003egetContainedType(0));\n+    annotation \u003d\n+      typeSys.GetStructAnnotation(cast\u003cStructType\u003e(ST));\n+  }\n+\n   m_Desc.Variables \u003d ST-\u003egetNumContainedTypes();\n   unsigned lastIndex \u003d ST-\u003egetNumContainedTypes() - 1;\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c7cffe8d97cd694048473e467dbacd78cc3cf82",
      "old_mode": 33188,
      "old_path": "lib/HLSL/DxilContainerReflection.cpp",
      "new_id": "d34e9448adc62e72eae32196d070b150a271c9c2",
      "new_mode": 33188,
      "new_path": "lib/HLSL/DxilContainerReflection.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "74e1e51543b52372a140b0f15c48b94fa103d815",
      "new_mode": 33188,
      "new_path": "tools/clang/test/CodeGenHLSL/quick-test/d3dreflect/cbuf-usage-lib.hlsl"
    }
  ]
}
