P4 to Git Change 1369850 by gandryey@gera-w8 on 2017/02/06 18:15:17

SWDEV-112661 - [ROCm CQE][OCLonLC][QR][G] 80 failures observed with Images(Samplerless and Samplerless pitch) tests
	- Make sure the pitch for image buffer is properly aligned to the reported device info

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#10 edit


[ROCm/clr commit: c9cbcbf0f5]
此提交包含在:
foreman
2017-02-06 18:22:59 -05:00
父節點 18da2685da
當前提交 08a43a240b
+16 -1
查看文件
@@ -731,9 +731,24 @@ Image::createView(const Memory &parent)
amdImageDesc_, deviceMemory_, permission_, &hsaImageObject_);
}
else if (oldestParent->asBuffer()) {
size_t rowPitch;
amd::Image& ownerImage = *owner()->asImage();
size_t elementSize = ownerImage.getImageFormat().getElementSize();
// First get the row pitch in pixels
if (ownerImage.getRowPitch() != 0) {
rowPitch = ownerImage.getRowPitch() / elementSize;
}
else {
rowPitch = ownerImage.getWidth();
}
// Make sure the row pitch is aligned to pixels
rowPitch = elementSize *
amd::alignUp(rowPitch, dev_.info().imagePitchAlignment_);
status = hsa_ext_image_create_with_layout(dev_.getBackendDevice(),
&imageDescriptor_, deviceMemory_, permission_,
HSA_EXT_IMAGE_DATA_LAYOUT_LINEAR, owner()->asImage()->getRowPitch(), 0,
HSA_EXT_IMAGE_DATA_LAYOUT_LINEAR, rowPitch, 0,
&hsaImageObject_);
}
else {