mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
fixed driver aligned alloc
This commit is contained in:
@@ -50,6 +50,16 @@ gpgpu_genode::~gpgpu_genode()
|
||||
|
||||
void* gpgpu_genode::aligned_alloc(uint32_t alignment, uint32_t size)
|
||||
{
|
||||
if(alignment == 0x1000)
|
||||
{
|
||||
alignment = 12;
|
||||
}
|
||||
else if(alignment != 0x0)
|
||||
{
|
||||
Genode::error("[GPU] Unsupported alignment: ", alignment);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return alloc.alloc_aligned(size, alignment).convert<void *>(
|
||||
|
||||
[&] (void *ptr) { return ptr; },
|
||||
|
||||
Reference in New Issue
Block a user