To behave in a similar fashion to other IHVs we need
to return XGL_MEMORY_TYPE_BUFFER for images that
use format_class of LINEAR and XGL_MEMORY_TYPE_IMAGE for
all other format classes.
return ret;
mem_req->size = img->total_size;
mem_req->alignment = 4096;
- mem_req->memType = XGL_MEMORY_TYPE_BUFFER;
+ if (img->format_class == XGL_IMAGE_FORMAT_CLASS_LINEAR) {
+ mem_req->memType = XGL_MEMORY_TYPE_BUFFER;
+ } else {
+ mem_req->memType = XGL_MEMORY_TYPE_IMAGE;
+ }
}
break;
case XGL_INFO_TYPE_IMAGE_MEMORY_REQUIREMENTS: