Lines Matching defs:memory
289 * system memory
425 /* We can create 2 or 3 different heaps when we have local memory
426 * support, first heap with local memory size and second with system
427 * memory size and the third is added only if part of the vram is
430 device->memory.heap_count = 2;
431 device->memory.heaps[0] = (struct anv_memory_heap) {
440 device->memory.heaps[1] = (struct anv_memory_heap) {
449 device->memory.heap_count++;
450 device->memory.heaps[2] = (struct anv_memory_heap) {
457 device->memory.type_count = 3;
458 device->memory.types[0] = (struct anv_memory_type) {
462 device->memory.types[1] = (struct anv_memory_type) {
468 device->memory.types[2] = (struct anv_memory_type) {
472 /* This memory type either comes from heaps[0] if there is only
479 device->memory.heap_count = 1;
480 device->memory.heaps[0] = (struct anv_memory_heap) {
486 /* Big core GPUs share LLC with the CPU and thus one memory type can be
489 device->memory.type_count = 1;
490 device->memory.types[0] = (struct anv_memory_type) {
498 device->memory.heap_count = 1;
499 device->memory.heaps[0] = (struct anv_memory_heap) {
505 /* The spec requires that we expose a host-visible, coherent memory
506 * type, but Atom GPUs don't share LLC. Thus we offer two memory types
510 device->memory.type_count = 2;
511 device->memory.types[0] = (struct anv_memory_type) {
517 device->memory.types[1] = (struct anv_memory_type) {
525 device->memory.need_clflush = false;
526 for (unsigned i = 0; i < device->memory.type_count; i++) {
527 VkMemoryPropertyFlags props = device->memory.types[i].propertyFlags;
530 device->memory.need_clflush = true;
751 "Unable to open device %s: out of memory", path);
879 /* Initialize memory regions struct to 0. */
2444 /* Userptr needs page aligned memory. */
2737 pMemoryProperties->memoryTypeCount = physical_device->memory.type_count;
2738 for (uint32_t i = 0; i < physical_device->memory.type_count; i++) {
2740 .propertyFlags = physical_device->memory.types[i].propertyFlags,
2741 .heapIndex = physical_device->memory.types[i].heapIndex,
2745 pMemoryProperties->memoryHeapCount = physical_device->memory.heap_count;
2746 for (uint32_t i = 0; i < physical_device->memory.heap_count; i++) {
2748 .size = physical_device->memory.heaps[i].size,
2749 .flags = physical_device->memory.heaps[i].flags,
2766 for (size_t i = 0; i < device->memory.heap_count; i++) {
2767 if (device->memory.heaps[i].is_local_mem) {
2768 total_vram_heaps_size += device->memory.heaps[i].size;
2770 total_sys_heaps_size += device->memory.heaps[i].size;
2774 for (size_t i = 0; i < device->memory.heap_count; i++) {
2775 VkDeviceSize heap_size = device->memory.heaps[i].size;
2776 VkDeviceSize heap_used = device->memory.heaps[i].used;
2780 if (device->memory.heaps[i].is_local_mem) {
2797 * the available heap memory.
2821 for (uint32_t i = device->memory.heap_count; i < VK_MAX_MEMORY_HEAPS; i++) {
2965 if (device->physical->memory.need_clflush)
3328 * the base address 0 and start the pool memory at an offset. This way we
3795 assert(pAllocateInfo->memoryTypeIndex < pdevice->memory.type_count);
3797 &pdevice->memory.types[pAllocateInfo->memoryTypeIndex];
3798 assert(mem_type->heapIndex < pdevice->memory.heap_count);
3800 &pdevice->memory.heaps[mem_type->heapIndex];
3898 * create AHardwareBuffer and import memory from it.
3954 * "Importing memory from a file descriptor transfers ownership of
3989 * memory property flag has DEVICE_LOCAL_BIT set.
3994 /* Regular allocate (not importing memory). */
4025 "Out of heap memory");
4049 ANV_FROM_HANDLE(anv_device_memory, mem, pGetFdInfo->memory);
4069 /* dma-buf can be imported as any memory type */
4071 (1 << device->physical->memory.type_count) - 1;
4099 /* Host memory can be imported as any memory type. */
4101 (1ull << device->physical->memory.type_count) - 1;
4128 p_atomic_add(&device->physical->memory.heaps[mem->type->heapIndex].used,
4170 * equal to the size of the memory minus offset
4183 * "memory must not be currently host mapped"
4246 if (!device->physical->memory.need_clflush)
4253 ANV_FROM_HANDLE(anv_device_memory, mem, pMemoryRanges[i].memory);
4276 if (!device->physical->memory.need_clflush)
4280 ANV_FROM_HANDLE(anv_device_memory, mem, pMemoryRanges[i].memory);
4301 VkDeviceMemory memory,
4310 ANV_FROM_HANDLE(anv_device_memory, mem, pBindInfo->memory);
4440 * supported memory type for the resource. The bit `1<<i` is set if and
4441 * only if the memory type `i` in the VkPhysicalDeviceMemoryProperties
4444 uint32_t memory_types = (1ull << device->physical->memory.type_count) - 1;
4576 ANV_FROM_HANDLE(anv_device_memory, memory, pInfo->memory);
4578 assert(anv_bo_is_pinned(memory->bo));
4579 assert(memory->bo->has_client_visible_address);
4581 return intel_48b_address(memory->bo->offset);