[Bug 102704] vkAllocateDeviceMemory does not check memory heap size
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Sep 13 12:20:13 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=102704
Bug ID: 102704
Summary: vkAllocateDeviceMemory does not check memory heap size
Product: Mesa
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Vulkan/intel
Assignee: intel-3d-bugs at lists.freedesktop.org
Reporter: nioko1337 at googlemail.com
QA Contact: intel-3d-bugs at lists.freedesktop.org
CC: jason at jlekstrand.net
So there is a vulkan wrapper called vulkano (written in rust), and one test
case in particular fails on anv.
The code snippet allocates more memory than reported by vkMemoryHeap.size, but
in multiple allocations. I would expect this to fail with
VK_ERROR_OUT_OF_DEVICE_MEMORY, but it doesn't.
I currently only have a rust code snippet, but from the code it should be
obvious what's happening under the hood:
#[test]
#[ignore] // TODO: test fails for now on Mesa+Intel
fn oom_multi() {
let (device, _) = gfx_dev_and_queue!();
let mem_ty = device
.physical_device()
.memory_types()
.filter(|m| !m.is_lazily_allocated())
.next()
.unwrap();
let heap_size = mem_ty.heap().size();
let mut allocs = Vec::new();
for _ in 0 .. 4 {
match DeviceMemory::alloc(device.clone(), mem_ty, heap_size / 3) {
Err(DeviceMemoryAllocError::OomError(OomError::OutOfDeviceMemory)) => return,
// test succeeded
Ok(a) => allocs.push(a),
_ => (),
}
}
panic!()
}
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170913/e621d76c/attachment.html>
More information about the intel-3d-bugs
mailing list