From: Courtney Goeltzenleuchter Date: Wed, 25 Feb 2015 20:54:22 +0000 (-0700) Subject: intel: use buffer type memory for linear formats X-Git-Tag: sdk-0.1.0~443 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f73aaead85bd9cc47efe85da32a75ef9d76dd2b;p=platform%2Fupstream%2FVulkan-LoaderAndValidationLayers.git intel: use buffer type memory for linear formats 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. --- diff --git a/icd/intel/img.c b/icd/intel/img.c index 722d254..4b6a1bd 100644 --- a/icd/intel/img.c +++ b/icd/intel/img.c @@ -64,7 +64,11 @@ static XGL_RESULT img_get_info(struct intel_base *base, int type, 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: