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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38869>
(cherry picked from commit 567c1b3af4)
This commit is contained in:
Lionel Landwerlin 2025-12-05 21:58:06 +02:00 committed by Dylan Baker
parent 6a28b684cc
commit 907dddeafc
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -630,6 +630,7 @@ anv_shader_create(struct anv_device *device,
shader->kernel =
anv_state_pool_alloc(&device->instruction_state_pool,
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) {
result = vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY);
goto error_embedded_samplers;
@ -716,6 +717,7 @@ anv_shader_create(struct anv_device *device,
error_embedded_samplers:
for (uint32_t s = 0; s < shader->bind_map.embedded_sampler_count; 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);
error_shader:
anv_state_pool_free(&device->instruction_state_pool, shader->kernel);