[1/n] Mipmap support

* adding support for map/unmap
* adding support for origin/region validation with mipmaps
* fixing slices returned in map/unmap
* removing ambiguity around mipLevel naming
* enabling cl_khr_mipmap_image in current shape
* enabling cl_khr_mipmap_image_writes in current shape

* fixing CompileProgramWithReraFlag test

Change-Id: I0c9d83028c5c376f638e45151755fd2c7d0fb0ab
This commit is contained in:
Chodor, Jaroslaw
2018-04-04 09:29:48 +02:00
parent 6506df559b
commit 0a97dfbb2f
44 changed files with 777 additions and 246 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -170,7 +170,7 @@ TEST_F(clGetImageInfoTests, givenImageWithMipMapsWhenAskedForSziesItIsShiftedByM
size_t paramRetSize = sizeof(size_t);
for (int mipLevel = 0; mipLevel < 10; mipLevel++) {
pImage->setMipLevel(mipLevel);
pImage->setBaseMipLevel(mipLevel);
auto expectedWidth = initialWidth >> mipLevel;
expectedWidth = expectedWidth == 0 ? 1 : expectedWidth;
auto expectedHeight = initialHeight >> mipLevel;
@ -230,7 +230,7 @@ TEST_F(clGetImageInfoTests, CheckImage3DWidthAndHeightAndDepthWithMipmaps) {
auto pImgObj = castToObject<Image>(image2);
for (cl_uint n = 0; n <= imageDesc2.num_mip_levels; n++) {
pImgObj->setMipLevel(n);
pImgObj->setBaseMipLevel(n);
retVal = clGetImageInfo(image2, CL_IMAGE_WIDTH, sizeof(widthRet), &widthRet, NULL);
EXPECT_EQ(CL_SUCCESS, retVal);
@ -285,7 +285,7 @@ TEST_F(clGetImageInfoTests, CheckImage1DWidthAndHeightAndDepthWithMipmaps) {
auto pImgObj = castToObject<Image>(image2);
for (cl_uint n = 0; n <= imageDesc2.num_mip_levels; n++) {
pImgObj->setMipLevel(n);
pImgObj->setBaseMipLevel(n);
retVal = clGetImageInfo(image2, CL_IMAGE_WIDTH, sizeof(widthRet), &widthRet, NULL);
EXPECT_EQ(CL_SUCCESS, retVal);