Skip to content

vmaCreateBuffer() fails on Raspberry Pi with Mesa drivers when called with VMA_MEMORY_USAGE_AUTO and VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. #362

@cos-public

Description

@cos-public

Call to vmaCreateBuffer() fails when called with VMA_MEMORY_USAGE_AUTO and VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT as random host access requires VK_MEMORY_PROPERTY_HOST_CACHED_BIT. However, there is no memory type with such properties available on Raspberry Pi. Here is an excerpt from vulkaninfo:

==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.250
...
Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
	apiVersion        = 1.2.246 (4202742)
	driverVersion     = 23.1.3 (96473091)
	vendorID          = 0x14e4
	deviceID          = 0xbe485fd3
	deviceType        = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
	deviceName        = V3D 4.2
	pipelineCacheUUID = aeb6494b-3e65-2f07-0af0-8fa9e0b21377
...
VkPhysicalDeviceMemoryProperties:
=================================
memoryHeaps: count = 1
	memoryHeaps[0]:
		size   = 969521152 (0x39c9b800) (924.61 MiB)
		budget = 969521152 (0x39c9b800) (924.61 MiB)
		usage  = 0 (0x00000000) (0.00 B)
		flags: count = 1
			MEMORY_HEAP_DEVICE_LOCAL_BIT
memoryTypes: count = 1
	memoryTypes[0]:
		heapIndex     = 0
		propertyFlags = 0x0007: count = 3
			MEMORY_PROPERTY_DEVICE_LOCAL_BIT
			MEMORY_PROPERTY_HOST_VISIBLE_BIT
			MEMORY_PROPERTY_HOST_COHERENT_BIT
		usable for:
			IMAGE_TILING_OPTIMAL:
				color images
				FORMAT_D16_UNORM
				FORMAT_X8_D24_UNORM_PACK32
				FORMAT_D32_SFLOAT
				FORMAT_D24_UNORM_S8_UINT
				(non-sparse)
			IMAGE_TILING_LINEAR:
				color images
				(non-sparse)

I would expect that such a broad request would return something usable on any platform.
Is this the intended behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompatibilityCompatibility with some platformsnext releaseTo be done as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions