Dawn: fix mipmap width and height computation during upload.
Don't go below 1 in width or height when downsizing for uploads. This can happen with rectangular textures, where one dimension hits the lower bound. Change-Id: Ica28e6274cf1df658145233ab6694f2c64c55201 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252316 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
1cc6067757
commit
b1576fd065
@ -168,7 +168,7 @@ void GrDawnTexture::upload(const GrMipLevel texels[], int mipLevels, const SkIRe
|
||||
copyEncoder.CopyBufferToTexture(&srcBuffer, &dstTexture, ©Size);
|
||||
x /= 2;
|
||||
y /= 2;
|
||||
width /= 2;
|
||||
height /= 2;
|
||||
width = SkTMax(1u, width / 2);
|
||||
height = SkTMax(1u, height / 2);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user