uint64_t pasted_text_size = 0;
uint64_t rx_align = 1;
uint64_t rx_size = 0;
+ uint64_t exec_size = 0;
#define report_if(cond) \
do { \
if (!strcmp(s->name, ".text"))
s->is_pasted_text = true;
+
+ exec_size += shdr->sh_size;
}
if (s->is_pasted_text) {
}
binary->rx_size += rx_size;
+ binary->exec_size = exec_size;
if (i.info->chip_class >= GFX10) {
/* In gfx10, the SQ fetches up to 3 cache lines of 16 dwords
/* Required buffer sizes, currently read/executable only. */
uint64_t rx_size;
+ /* Size of executable code, for reporting purposes. */
+ uint64_t exec_size;
+
uint64_t rx_end_markers;
unsigned num_parts;
desc_copy(s->name, "Code size");
desc_copy(s->description, "Code size in bytes");
s->format = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR;
- s->value.u64 = shader->code_size;
+ s->value.u64 = shader->exec_size;
}
++s;
}
variant->code_size = rtld_binary.rx_size;
+ variant->exec_size = rtld_binary.exec_size;
} else {
assert(binary->type == RADV_BINARY_TYPE_LEGACY);
config = ((struct radv_shader_binary_legacy *)binary)->config;
- variant->code_size = radv_get_shader_binary_size(((struct radv_shader_binary_legacy *)binary)->code_size);
+ variant->code_size = radv_get_shader_binary_size(((struct radv_shader_binary_legacy *)binary)->code_size);
+ variant->exec_size = variant->code_size;
}
variant->info = binary->variant_info;
"********************\n\n\n",
conf->num_sgprs, conf->num_vgprs,
conf->spilled_sgprs, conf->spilled_vgprs,
- variant->info.private_mem_vgprs, variant->code_size,
+ variant->info.private_mem_vgprs, variant->exec_size,
conf->lds_size, conf->scratch_bytes_per_wave,
max_simd_waves);
}
uint64_t bo_offset;
struct ac_shader_config config;
uint32_t code_size;
+ uint32_t exec_size;
struct radv_shader_variant_info info;
/* debug only */
{
struct ac_rtld_binary rtld;
si_shader_binary_open(screen, shader, &rtld);
- return rtld.rx_size;
+ return rtld.exec_size;
}
static bool si_get_external_symbol(void *data, const char *name, uint64_t *value)