radv: only include executable size when capturing shaders with RGP

This might help RGP to not try to disassemble past s_endpgm and crashes
on unknown instructions.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14419
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38885>
(cherry picked from commit 31a24caad9)
This commit is contained in:
Samuel Pitoiset 2025-12-10 10:26:38 +01:00 committed by Dylan Baker
parent 6b5b9b5518
commit f3489af028
2 changed files with 3 additions and 2 deletions

View file

@ -1404,7 +1404,7 @@
"description": "radv: only include executable size when capturing shaders with RGP",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1389,7 +1389,8 @@ radv_fill_code_object_record(struct radv_device *device, struct rgp_shader_data
memset(shader_data->rt_shader_name, 0, sizeof(shader_data->rt_shader_name));
shader_data->hash[0] = (uint64_t)(uintptr_t)shader;
shader_data->hash[1] = (uint64_t)(uintptr_t)shader >> 32;
shader_data->code_size = shader->code_size;
shader_data->code_size =
shader->exec_size; /* Only include executable size so RGP doesn't try to disassemble constant data. */
shader_data->code = shader->code;
shader_data->vgpr_count = shader->config.num_vgprs;
shader_data->sgpr_count = shader->config.num_sgprs;