Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
- }
- return true;
+}
+static bool shader_sm6_block_add_record(struct vkd3d_shader_sm6_block *block, struct vkd3d_shader_sm6_record *record) +{
- unsigned int reserve;
- switch (block->id)
- {
case CONSTANTS_BLOCK: reserve = 32; break;
case FUNCTION_BLOCK: reserve = 128; break;
case METADATA_BLOCK: reserve = 32; break;
case TYPE_BLOCK: reserve = 32; break;
default: reserve = 8; break;
Are there specific reasons for these magic numbers? It seems they're just used to initialize the capacity, so they're basically irrelevant except perhaps for a little performance optimization. But you seem to have a rather precise idea of what they should be, so I wonder where they come from (maybe I am missing something).
The same applies to `shader_sm6_block_read`.