Similar to radv_shader. This will be used for the shaders cache.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21897>
part_binary->num_sgprs = num_sgprs;
part_binary->num_vgprs = num_vgprs;
+ part_binary->total_size = size;
part_binary->code_size = code_size * sizeof(uint32_t);
memcpy(part_binary->data, code, part_binary->code_size);
if (disasm_size) {
uint8_t num_vgprs;
unsigned code_size;
unsigned disasm_size;
+
+ /* Self-referential size so we avoid consistency issues. */
+ uint32_t total_size;
+
uint8_t data[0];
};