diff --git a/rocclr/runtime/device/gpu/gpuresource.cpp b/rocclr/runtime/device/gpu/gpuresource.cpp index 0ea9bedcd8..8c1ddcfd9a 100644 --- a/rocclr/runtime/device/gpu/gpuresource.cpp +++ b/rocclr/runtime/device/gpu/gpuresource.cpp @@ -765,8 +765,10 @@ bool Resource::create(MemoryType memType, CreateParams* params) { viewChannelOrder = cal()->channelOrder_; switch (d3dRes->layer_) { case -1: + bytePitch *= elementSize(); break; case 0: + bytePitch *= elementSize(); break; case 1: // Y - plane size to the offset