fix: forward mip map level for 3D images

Related-To: NEO-14539

1D and 2D images have already mip map level set correctly.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2025-04-02 09:37:44 +00:00
committed by Compute-Runtime-Automation
parent 255a6c6ead
commit 8836f6df0b
4 changed files with 55 additions and 15 deletions

View File

@@ -15,6 +15,7 @@
#include "opencl/source/context/context.h"
#include "opencl/source/event/user_event.h"
#include "opencl/source/helpers/base_object.h"
#include "opencl/source/helpers/mipmap.h"
#include "opencl/source/mem_obj/buffer.h"
#include "opencl/source/mem_obj/image.h"
@@ -72,9 +73,10 @@ cl_int CommandQueue::enqueueStagingImageTransfer(cl_command_type commandType, Im
auto bytesPerPixel = image->getSurfaceFormatInfo().surfaceFormat.imageElementSizeInBytes;
auto dstRowPitch = inputRowPitch ? inputRowPitch : globalRegion[0] * bytesPerPixel;
auto dstSlicePitch = inputSlicePitch ? inputSlicePitch : globalRegion[1] * dstRowPitch;
auto isMipMap = isMipMapped(image->getImageDesc());
auto stagingBufferManager = this->context->getStagingBufferManager();
auto ret = stagingBufferManager->performImageTransfer(ptr, globalOrigin, globalRegion, dstRowPitch, dstSlicePitch, bytesPerPixel, chunkWrite, &csr, isRead);
auto ret = stagingBufferManager->performImageTransfer(ptr, globalOrigin, globalRegion, dstRowPitch, dstSlicePitch, bytesPerPixel, isMipMap, chunkWrite, &csr, isRead);
if (isRead && context->isProvidingPerformanceHints()) {
auto hostPtrSize = calculateHostPtrSizeForImage(globalRegion, inputRowPitch, inputSlicePitch, image);