SWDEV-239502 - Create copyImageBuffer_ without flags

Change-Id: Ifcb5992d58f3419635d2aca2d51f2dacd7cd466d


[ROCm/clr commit: c33470ab4d]
This commit is contained in:
Jason Tang
2020-08-13 18:26:36 -04:00
parent 8b61666254
commit bbe0df36bf
@@ -1302,10 +1302,11 @@ bool Image::ValidateMemory() {
owner()->asImage()->getRowPitch())) { owner()->asImage()->getRowPitch())) {
constexpr bool ForceLinear = true; constexpr bool ForceLinear = true;
amd::Image* img = owner()->asImage(); amd::Image* img = owner()->asImage();
// Create a native image without pitch for validation // Create a native image without pitch for validation
copyImageBuffer_ = copyImageBuffer_ =
new (dev().context()) amd::Image(dev().context(), CL_MEM_OBJECT_IMAGE2D, img->getMemFlags(), new (dev().context()) amd::Image(
img->getImageFormat(), img->getWidth(), img->getHeight(), 1, 0, 0); dev().context(), CL_MEM_OBJECT_IMAGE2D, 0, img->getImageFormat(),
img->getWidth(), img->getHeight(), 1, 0, 0);
if ((copyImageBuffer_ == nullptr) || !copyImageBuffer_->create()) { if ((copyImageBuffer_ == nullptr) || !copyImageBuffer_->create()) {
return false; return false;