Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
- if ((block->abbrev_count = sm6_parser_compute_global_abbrev_count_for_block_id(sm6, block->id)))
- {
if (!vkd3d_array_reserve((void **)&block->abbrevs, &block->abbrev_capacity,
block->abbrev_count, sizeof(*block->abbrevs)))
{
ERR("Failed to allocate block abbreviations.\n");
return VKD3D_ERROR_OUT_OF_MEMORY;
}
for (i = 0; i < sm6->abbrev_count; ++i)
if (sm6->abbrevs[i]->block_id == block->id)
block->abbrevs[abbrev_count++] = &sm6->abbrevs[i]->abbrev;
assert(abbrev_count == block->abbrev_count);
- }
Is it allowed to have a `BLOCKINFO` inside a block it describes? If so, I guess this would be wrong, because it computes the global abbreviations only at the beginning of the block, so it doesn't take into consideration whatever might be added inside the block itself.