Fix checks for image mip level in OpenCL builtins

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2021-01-19 10:10:19 +00:00
committed by Compute-Runtime-Automation
parent 4168ee8120
commit edf339fdf1
12 changed files with 194 additions and 15 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -51,10 +51,10 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyImage(
dc.srcOffset = srcOrigin;
dc.dstOffset = dstOrigin;
dc.size = region;
if (srcImage->getImageDesc().num_mip_levels > 0) {
if (isMipMapped(srcImage->getImageDesc())) {
dc.srcMipLevel = findMipLevel(srcImage->getImageDesc().image_type, srcOrigin);
}
if (dstImage->getImageDesc().num_mip_levels > 0) {
if (isMipMapped(dstImage->getImageDesc())) {
dc.dstMipLevel = findMipLevel(dstImage->getImageDesc().image_type, dstOrigin);
}