radv: store the total radv_shader_part_binary size
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>
This commit is contained in:
committed by
Marge Bot
parent
aec9fd394f
commit
aa15d64949
@@ -2786,6 +2786,7 @@ static void radv_aco_build_shader_part(void **bin,
|
||||
|
||||
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) {
|
||||
|
||||
@@ -466,6 +466,10 @@ struct radv_shader_part_binary {
|
||||
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];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user