P4 to Git Change 1201783 by gandryey@gera-w8 on 2015/10/20 18:03:34

SWDEV-79151 - clenqueuereadImage is slow when using a pinned buffer and a row_picth!0
	- Add a check if the provided rowPitch is equal to the actual transfer width. SDMA doesn't support row/slice pitches, thus runtime still has to fall back to compute in other cases

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#120 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#122 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#92 edit
This commit is contained in:
foreman
2015-10-20 18:37:35 -04:00
parent b817bb5898
commit 922e14c46d
3 changed files with 24 additions and 11 deletions
+9 -5
View File
@@ -1226,17 +1226,21 @@ Image::validateRegion(const Coord3D& origin, const Coord3D& region) const
}
bool
Image::isSliceValid(
const size_t& rowPitch,
const size_t& slice,
const size_t& height) const
Image::isRowSliceValid(
size_t rowPitch,
size_t slice,
size_t width,
size_t height) const
{
size_t tmpHeight =
(getType() == CL_MEM_OBJECT_IMAGE1D_ARRAY) ? 1 : height;
bool valid = (rowPitch == 0) || ((rowPitch != 0) &&
(rowPitch >= width * getImageFormat().getElementSize()));
return ((slice == 0) ||
((slice != 0) &&
(slice >= rowPitch * tmpHeight))) ? true : false;
(slice >= rowPitch * tmpHeight))) ? valid : false;
}
void