.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO,
.pNext = &img_alloc,
.allocationSize = 0,
- .alignment = 0,
.memProps = XGL_MEMORY_PROPERTY_GPU_ONLY,
.memType = XGL_MEMORY_TYPE_IMAGE,
.heapCount = 0,
img_alloc.samples = img_reqs.samples;
for (XGL_UINT i = 0; i < num_allocations; i ++) {
mem_alloc.allocationSize = mem_reqs[i].size;
- mem_alloc.alignment = mem_reqs[i].alignment;
mem_alloc.heapCount = mem_reqs[i].heapCount;
XGL_UINT heapInfo[mem_reqs[i].heapCount];
mem_alloc.pHeaps = (const XGL_UINT *) heapInfo;
.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO,
.pNext = &img_alloc,
.allocationSize = 0,
- .alignment = 0,
.memProps = XGL_MEMORY_PROPERTY_GPU_ONLY,
.memType = XGL_MEMORY_TYPE_IMAGE,
.heapCount = 0,
img_alloc.samples = img_reqs.samples;
for (XGL_UINT j = 0; j < num_allocations; j ++) {
mem_alloc.allocationSize = mem_reqs[j].size;
- mem_alloc.alignment = mem_reqs[j].alignment;
mem_alloc.heapCount = mem_reqs[j].heapCount;
XGL_UINT heapInfo[mem_reqs[j].heapCount];
mem_alloc.pHeaps = (const XGL_UINT *)heapInfo;
.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO,
.pNext = &buf_alloc,
.allocationSize = 0,
- .alignment = 0,
.memProps = XGL_MEMORY_PROPERTY_CPU_VISIBLE_BIT,
.memType = XGL_MEMORY_TYPE_BUFFER,
.heapCount = 0,
buf_alloc.usage = buf_reqs.usage;
for (XGL_UINT i = 0; i < num_allocations; i ++) {
alloc_info.allocationSize = mem_reqs[i].size;
- alloc_info.alignment = mem_reqs[i].alignment;
alloc_info.heapCount = mem_reqs[i].heapCount;
XGL_UINT heapInfo[mem_reqs[i].heapCount];
alloc_info.pHeaps = (const XGL_UINT *)heapInfo;
.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO,
.pNext = &img_alloc,
.allocationSize = 0,
- .alignment = 0,
.memProps = XGL_MEMORY_PROPERTY_GPU_ONLY,
.memType = XGL_MEMORY_TYPE_IMAGE,
.heapCount = 0,
img_alloc.samples = img_reqs.samples;
for (XGL_UINT i = 0; i < num_allocations; i ++) {
mem_alloc.allocationSize = mem_reqs[i].size;
- mem_alloc.alignment = mem_reqs[i].alignment;
mem_alloc.heapCount = mem_reqs[i].heapCount;
XGL_UINT heapInfo[mem_reqs[i].heapCount];
mem_alloc.pHeaps = (const XGL_UINT *)heapInfo;
.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO,
.pNext = &img_alloc,
.allocationSize = 0,
- .alignment = 0,
.memProps = XGL_MEMORY_PROPERTY_GPU_ONLY,
.memType = XGL_MEMORY_TYPE_IMAGE,
.heapCount = 0,
img_alloc.samples = img_reqs.samples;
for (XGL_UINT j = 0; j < num_allocations; j ++) {
mem_alloc.allocationSize = mem_reqs[j].size;
- mem_alloc.alignment = mem_reqs[j].alignment;
mem_alloc.heapCount = mem_reqs[j].heapCount;
XGL_UINT heapInfo[mem_reqs[j].heapCount];
mem_alloc.pHeaps = (const XGL_UINT *)heapInfo;
.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO,
.pNext = &buf_alloc,
.allocationSize = 0,
- .alignment = 0,
.memProps = XGL_MEMORY_PROPERTY_CPU_VISIBLE_BIT,
.memType = XGL_MEMORY_TYPE_BUFFER,
.heapCount = 0,
buf_alloc.usage = buf_reqs.usage;
for (XGL_UINT i = 0; i < num_allocations; i ++) {
mem_alloc.allocationSize = mem_reqs[i].size;
- mem_alloc.alignment = mem_reqs[i].alignment;
mem_alloc.heapCount = mem_reqs[i].heapCount;
mem_alloc.pHeaps = mem_reqs[i].pHeaps;
memcpy((void *) mem_alloc.pHeaps, mem_reqs[i].pHeaps,
struct intel_mem *mem;
/* ignore any IMAGE_INFO and BUFFER_INFO usage: they don't alter allocations */
- if ((info->alignment != 0) && (4096 % info->alignment))
- return XGL_ERROR_INVALID_ALIGNMENT;
if (info->heapCount != 1 || info->pHeaps[0] != 0)
return XGL_ERROR_INVALID_POINTER;
memset(&mem_info, 0, sizeof(mem_info));
mem_info.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO;
mem_info.allocationSize = img->total_size;
- mem_info.alignment = 4096;
mem_info.memProps = 0;
mem_info.memType = XGL_MEMORY_TYPE_IMAGE;
mem_info.heapCount = 1;
XGL_STRUCTURE_TYPE sType; // Must be XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO
XGL_VOID* pNext; // Pointer to next structure
XGL_GPU_SIZE allocationSize; // Size of memory allocation
- XGL_GPU_SIZE alignment;
XGL_UINT heapCount;
const XGL_UINT* pHeaps;
XGL_MEMORY_PRIORITY memPriority;
memset(&mem_info, 0, sizeof(mem_info));
mem_info.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO;
mem_info.allocationSize = mem_req.size;
- mem_info.alignment = mem_req.alignment;
mem_info.heapCount = mem_req.heapCount;
mem_info.pHeaps = heapInfo;
memcpy(heapInfo, mem_req.pHeaps, sizeof(XGL_UINT)*mem_info.heapCount);
for (XGL_UINT i = 0; i < num_allocations; i ++) {
ASSERT_NE(0, mem_req[i].size) << "xglGetObjectInfo (Image): Failed - expect images to require memory";
mem_info.allocationSize = mem_req[i].size;
- mem_info.alignment = mem_req[i].alignment;
mem_info.heapCount = mem_req[i].heapCount;
XGL_UINT heapInfo[mem_req[i].heapCount];
mem_info.pHeaps = heapInfo;
memcpy(heapInfo, mem_req[i].pHeaps, sizeof(XGL_UINT)*mem_info.heapCount);
mem_info.memProps = XGL_MEMORY_PROPERTY_SHAREABLE_BIT;
- mem_info.memPriority = XGL_MEMORY_PRIORITY_NORMAL;
mem_info.memType = XGL_MEMORY_TYPE_IMAGE;
+ mem_info.memPriority = XGL_MEMORY_PRIORITY_NORMAL;
/* allocate memory */
err = xglAllocMemory(device(), &mem_info, &m_image_mem[i]);
alloc_info.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO;
alloc_info.allocationSize = 1024 * 1024; // 1MB
- alloc_info.alignment = 0;
alloc_info.memProps = XGL_MEMORY_PROPERTY_SHAREABLE_BIT |
XGL_MEMORY_PROPERTY_CPU_VISIBLE_BIT;
alloc_info.memType = XGL_MEMORY_TYPE_OTHER,
memset(&mem_info, 0, sizeof(mem_info));
mem_info.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO;
mem_info.allocationSize = mem_req.size;
- mem_info.alignment = mem_req.alignment;
mem_info.memProps = XGL_MEMORY_PROPERTY_SHAREABLE_BIT;
mem_info.heapCount = mem_req.heapCount;
mem_info.pHeaps = heapInfo;
mem_info.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO;
// TODO: Is a simple multiple all that's needed here?
mem_info.allocationSize = mem_req.size * MAX_QUERY_SLOTS;
- mem_info.alignment = mem_req.alignment;
mem_info.heapCount = mem_req.heapCount;
mem_info.pHeaps = heapInfo;
memcpy(heapInfo, mem_req.pHeaps, sizeof(XGL_UINT)*mem_info.heapCount);
mem_info.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO;
mem_info.pNext = &img_alloc;
mem_info.allocationSize = mem_req.size;
- mem_info.alignment = mem_req.alignment;
mem_info.heapCount = mem_req.heapCount;
mem_info.pHeaps = heapInfo;
memcpy(heapInfo, mem_req.pHeaps, sizeof(XGL_UINT)*mem_info.heapCount);
mem_alloc.sType = XGL_STRUCTURE_TYPE_MEMORY_ALLOC_INFO;
mem_alloc.pNext = &img_alloc;
mem_alloc.allocationSize = 0;
- mem_alloc.alignment = 0;
mem_alloc.memProps = XGL_MEMORY_PROPERTY_GPU_ONLY;
mem_alloc.memType = XGL_MEMORY_TYPE_IMAGE;
mem_alloc.heapCount = 0;
img_alloc.samples = img_reqs.samples;
for (XGL_UINT i = 0; i < num_allocations; i ++) {
mem_alloc.allocationSize = mem_reqs[i].size;
- mem_alloc.alignment = mem_reqs[i].alignment;
mem_alloc.heapCount = mem_reqs[i].heapCount;
XGL_UINT heapInfo[mem_reqs[i].heapCount];
mem_alloc.pHeaps = heapInfo;
info.pNext = (XGL_VOID *) next_info;
info.allocationSize = reqs.size;
- info.alignment = reqs.alignment;
info.heapCount = reqs.heapCount;
info.pHeaps = reqs.pHeaps;
info.memProps = reqs.memProps;