• Home
  • Raw
  • Download

Lines Matching refs:slab

314 	list_for_each_entry(struct radv_shader_slab, slab, &device->shader_slabs, slabs) {  in radv_alloc_shader_memory()
316 list_for_each_entry(struct radv_shader_variant, s, &slab->shaders, slab_list) { in radv_alloc_shader_memory()
318 shader->bo = slab->bo; in radv_alloc_shader_memory()
322 return slab->ptr + offset; in radv_alloc_shader_memory()
326 if (slab->size - offset >= shader->code_size) { in radv_alloc_shader_memory()
327 shader->bo = slab->bo; in radv_alloc_shader_memory()
329 list_addtail(&shader->slab_list, &slab->shaders); in radv_alloc_shader_memory()
331 return slab->ptr + offset; in radv_alloc_shader_memory()
336 struct radv_shader_slab *slab = calloc(1, sizeof(struct radv_shader_slab)); in radv_alloc_shader_memory() local
338 slab->size = 256 * 1024; in radv_alloc_shader_memory()
339 slab->bo = device->ws->buffer_create(device->ws, slab->size, 256, in radv_alloc_shader_memory()
344 slab->ptr = (char*)device->ws->buffer_map(slab->bo); in radv_alloc_shader_memory()
345 list_inithead(&slab->shaders); in radv_alloc_shader_memory()
348 list_add(&slab->slabs, &device->shader_slabs); in radv_alloc_shader_memory()
350 shader->bo = slab->bo; in radv_alloc_shader_memory()
352 list_add(&shader->slab_list, &slab->shaders); in radv_alloc_shader_memory()
354 return slab->ptr; in radv_alloc_shader_memory()
360 list_for_each_entry_safe(struct radv_shader_slab, slab, &device->shader_slabs, slabs) { in radv_destroy_shader_slabs()
361 device->ws->buffer_destroy(slab->bo); in radv_destroy_shader_slabs()
362 free(slab); in radv_destroy_shader_slabs()