anv: add missing device_memory_report for shaders

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d39e443ef8 ("anv: add infrastructure for common vk_pipeline")
Acked-by: Michael Cheng <michael.cheng@intel.com>
(cherry picked from commit 567c1b3af4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39003>
This commit is contained in:
Lionel Landwerlin 2025-12-05 21:58:06 +02:00 committed by Dylan Baker
parent 6686559724
commit 98293eb81e
2 changed files with 3 additions and 1 deletions

View file

@ -1614,7 +1614,7 @@
"description": "anv: add missing device_memory_report for shaders", "description": "anv: add missing device_memory_report for shaders",
"nominated": true, "nominated": true,
"nomination_type": 2, "nomination_type": 2,
"resolution": 0, "resolution": 1,
"main_sha": null, "main_sha": null,
"because_sha": "d39e443ef888ffd9c3385ed4c40e727868626b6b", "because_sha": "d39e443ef888ffd9c3385ed4c40e727868626b6b",
"notes": null "notes": null

View file

@ -630,6 +630,7 @@ anv_shader_create(struct anv_device *device,
shader->kernel = shader->kernel =
anv_state_pool_alloc(&device->instruction_state_pool, anv_state_pool_alloc(&device->instruction_state_pool,
shader_data->prog_data.base.program_size, 64); shader_data->prog_data.base.program_size, 64);
ANV_DMR_SP_ALLOC(&device->vk.base, &device->instruction_state_pool, shader->kernel);
if (shader->kernel.alloc_size == 0) { if (shader->kernel.alloc_size == 0) {
result = vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY); result = vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY);
goto error_embedded_samplers; goto error_embedded_samplers;
@ -716,6 +717,7 @@ anv_shader_create(struct anv_device *device,
error_embedded_samplers: error_embedded_samplers:
for (uint32_t s = 0; s < shader->bind_map.embedded_sampler_count; s++) for (uint32_t s = 0; s < shader->bind_map.embedded_sampler_count; s++)
anv_embedded_sampler_unref(device, shader->embedded_samplers[s]); anv_embedded_sampler_unref(device, shader->embedded_samplers[s]);
ANV_DMR_SP_FREE(&device->vk.base, &device->instruction_state_pool, shader->kernel);
anv_state_pool_free(&device->instruction_state_pool, shader->kernel); anv_state_pool_free(&device->instruction_state_pool, shader->kernel);
error_shader: error_shader:
anv_state_pool_free(&device->instruction_state_pool, shader->kernel); anv_state_pool_free(&device->instruction_state_pool, shader->kernel);