From 13e575d1674a4a4ffdae121cd58a7212506930f6 Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 3 Oct 2016 16:00:17 -0400
Subject: [PATCH] P4 to Git Change 1321888 by gandryey@gera-w8 on 2016/10/03
15:55:50
SWDEV-79445 - OCL generic changes and code clean-up
- Add the destinaiton buffer size to the LF transfer method
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#406 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#75 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#97 edit
[ROCm/clr commit: 638eae7a23d0a668cb88c781acea9ead59e50e9c]
---
.../clr/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp
index 2bd79aaad9..02e0767d1b 100644
--- a/projects/clr/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp
+++ b/projects/clr/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp
@@ -73,8 +73,9 @@ LiquidFlashFile::close()
bool
LiquidFlashFile::transferBlock(
- bool writeBuffer,
- void* srcDst,
+ bool writeBuffer,
+ void* srcDst,
+ uint64_t bufferSize,
uint64_t fileOffset,
uint64_t bufferOffset,
uint64_t size) const
@@ -85,10 +86,10 @@ LiquidFlashFile::transferBlock(
lf_region_descriptor region =
{ fileOffset / blockSize(), bufferOffset / blockSize(), size / blockSize() };
if (writeBuffer) {
- status = lfReadFile(srcDst, size, (lf_file)handle_, 1, ®ion, NULL);
+ status = lfReadFile(srcDst, bufferSize, (lf_file)handle_, 1, ®ion, NULL);
}
else {
- status = lfWriteFile(srcDst, size, (lf_file)handle_, 1, ®ion, NULL);
+ status = lfWriteFile(srcDst, bufferSize, (lf_file)handle_, 1, ®ion, NULL);
}
if (lf_success == status) {
return true;