radv/null_device: don't attempt to upload shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37525>
This commit is contained in:
committed by
Marge Bot
parent
6c2d614412
commit
4ad9fb9d2e
@@ -156,8 +156,7 @@ radv_sqtt_reloc_graphics_shaders(struct radv_device *device, struct radv_graphic
|
||||
return VK_SUCCESS;
|
||||
|
||||
fail:
|
||||
if (reloc->alloc)
|
||||
radv_free_shader_memory(device, reloc->alloc);
|
||||
radv_free_shader_memory(device, reloc->alloc);
|
||||
free(reloc);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1253,6 +1253,9 @@ get_hole(struct radv_shader_arena *arena, struct list_head *head)
|
||||
void
|
||||
radv_free_shader_memory(struct radv_device *device, union radv_shader_arena_block *alloc)
|
||||
{
|
||||
if (!alloc)
|
||||
return;
|
||||
|
||||
mtx_lock(&device->shader_arena_mutex);
|
||||
|
||||
union radv_shader_arena_block *hole_prev = get_hole(alloc->arena, alloc->list.prev);
|
||||
@@ -2860,6 +2863,11 @@ radv_shader_create_uncached(struct radv_device *device, const struct radv_shader
|
||||
}
|
||||
}
|
||||
|
||||
if (radv_device_physical(device)->info.family_overridden) {
|
||||
*out_shader = shader;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
if (replay_block) {
|
||||
shader->alloc = radv_replay_shader_arena_block(device, replay_block, shader);
|
||||
if (!shader->alloc) {
|
||||
@@ -2962,6 +2970,9 @@ radv_shader_part_create(struct radv_device *device, struct radv_shader_part_bina
|
||||
shader_part->cb_shader_mask = binary->info.cb_shader_mask;
|
||||
shader_part->spi_shader_z_format = binary->info.spi_shader_z_format;
|
||||
|
||||
if (radv_device_physical(device)->info.family_overridden)
|
||||
return shader_part;
|
||||
|
||||
/* Allocate memory and upload. */
|
||||
shader_part->alloc = radv_alloc_shader_memory(device, shader_part->code_size, false, NULL);
|
||||
if (!shader_part->alloc)
|
||||
@@ -3562,8 +3573,7 @@ radv_shader_part_destroy(struct radv_device *device, struct radv_shader_part *sh
|
||||
radv_shader_wait_for_upload(device, shader_part->upload_seq);
|
||||
}
|
||||
|
||||
if (shader_part->alloc)
|
||||
radv_free_shader_memory(device, shader_part->alloc);
|
||||
radv_free_shader_memory(device, shader_part->alloc);
|
||||
free(shader_part->disasm_string);
|
||||
free(shader_part);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user