mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
fix: correctly calculate host ptr size for images
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f332571d96
commit
91ff22f255
@@ -1572,7 +1572,7 @@ void CommandQueue::unregisterGpgpuAndBcsCsrClients() {
|
||||
}
|
||||
}
|
||||
|
||||
size_t CommandQueue::calculateHostPtrSizeForImage(const size_t *region, size_t rowPitch, size_t slicePitch, Image *image) {
|
||||
size_t CommandQueue::calculateHostPtrSizeForImage(const size_t *region, size_t rowPitch, size_t slicePitch, Image *image) const {
|
||||
auto bytesPerPixel = image->getSurfaceFormatInfo().surfaceFormat.imageElementSizeInBytes;
|
||||
auto dstRowPitch = rowPitch ? rowPitch : region[0] * bytesPerPixel;
|
||||
auto dstSlicePitch = slicePitch ? slicePitch : ((image->getImageDesc().image_type == CL_MEM_OBJECT_IMAGE1D_ARRAY ? 1 : region[1]) * dstRowPitch);
|
||||
|
||||
Reference in New Issue
Block a user