Correct pitch alignment calculation
When we're aligning rowPitch to imagePitchAlignment, rowPitch is in pixels,
but imagePitchAlignment_ is bytes, so we end up overaligning the pitch.
Convert imagePitchAlignment_ to pixels before doing any logic.
Change-Id: Ia5ab9d54bed150fe974e86b060dbadc196165b29
[ROCm/clr commit: 696d00e71b]
This commit is contained in:
@@ -1143,7 +1143,7 @@ bool Image::createView(const Memory& parent) {
|
||||
}
|
||||
|
||||
// Make sure the row pitch is aligned to pixels
|
||||
rowPitch = elementSize * amd::alignUp(rowPitch, dev().info().imagePitchAlignment_);
|
||||
rowPitch = elementSize * amd::alignUp(rowPitch, (dev().info().imagePitchAlignment_ / elementSize));
|
||||
|
||||
status = hsa_ext_image_create_with_layout(
|
||||
dev().getBackendDevice(), &imageDescriptor_, deviceMemory_, permission_,
|
||||
|
||||
Reference in New Issue
Block a user