P4 to Git Change 1083967 by gandryey@gera-dev-w7 on 2014/10/03 11:20:24
ECR #304775 - Fix for BUG#10330. - Add an optimized version for unaligned buffer copy Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/blitcl.cpp#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#111 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsablit.cpp#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsablit.cpp#5 edit
This commit is contained in:
@@ -1055,7 +1055,15 @@ KernelBlitManager::copyBuffer(
|
||||
}
|
||||
}
|
||||
|
||||
size.c[0] /= CopyBuffAlignment[i];
|
||||
cl_uint remain;
|
||||
if (blitType == BlitCopyBufferAligned) {
|
||||
size.c[0] /= CopyBuffAlignment[i];
|
||||
}
|
||||
else {
|
||||
remain = size[0] % 4;
|
||||
size.c[0] /= 4;
|
||||
size.c[0] += 1;
|
||||
}
|
||||
|
||||
// Program the dispatch dimensions
|
||||
localWorkSize = 256;
|
||||
@@ -1081,6 +1089,9 @@ KernelBlitManager::copyBuffer(
|
||||
cl_int alignment = CopyBuffAlignment[i];
|
||||
kernels_[blitType]->parameters().set(5, sizeof(alignment), &alignment);
|
||||
}
|
||||
else {
|
||||
kernels_[blitType]->parameters().set(5, sizeof(remain), &remain);
|
||||
}
|
||||
|
||||
// Create ND range object for the kernel's execution
|
||||
amd::NDRangeContainer ndrange(
|
||||
|
||||
Reference in New Issue
Block a user