mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Unify mipmap layout accross platforms
- revert "Fix reported row/slicePitch for mip-maps" - calculate mipmap offset without gmm Change-Id: Id4802ef9624ad330e0d0f871dfa4d4fc35a7ba33
This commit is contained in:
committed by
sys_ocldev
parent
1b7738e0cf
commit
f624ec757b
@@ -21,25 +21,5 @@ void ImageHw<GfxFamily>::setMediaSurfaceRotation(void *) {}
|
||||
template <typename GfxFamily>
|
||||
void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *, uint32_t) {}
|
||||
|
||||
template <>
|
||||
size_t ImageHw<BDWFamily>::getHostPtrRowPitchForMap(uint32_t mipLevel) {
|
||||
if (getImageDesc().num_mip_levels <= 1) {
|
||||
return getHostPtrRowPitch();
|
||||
}
|
||||
size_t mipWidth = (getImageDesc().image_width >> mipLevel) > 0 ? (getImageDesc().image_width >> mipLevel) : 1;
|
||||
return mipWidth * getSurfaceFormatInfo().ImageElementSizeInBytes;
|
||||
}
|
||||
|
||||
template <>
|
||||
size_t ImageHw<BDWFamily>::getHostPtrSlicePitchForMap(uint32_t mipLevel) {
|
||||
if (getImageDesc().num_mip_levels <= 1) {
|
||||
return getHostPtrSlicePitch();
|
||||
}
|
||||
size_t mipHeight = (getImageDesc().image_height >> mipLevel) > 0 ? (getImageDesc().image_height >> mipLevel) : 1;
|
||||
size_t rowPitch = getHostPtrRowPitchForMap(mipLevel);
|
||||
|
||||
return rowPitch * mipHeight;
|
||||
}
|
||||
|
||||
#include "runtime/mem_obj/image_factory_init.inl"
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user