Allow empty B->T copies

This adds a test that empty copies are valid for B->B copies too. Tests
for B->T will come in a follow up commit.
This commit is contained in:
Corentin Wallez
2017-06-26 10:57:45 -04:00
committed by Corentin Wallez
parent eaae746433
commit 4b4922cdce
2 changed files with 18 additions and 12 deletions

View File

@@ -250,11 +250,6 @@ namespace backend {
uint64_t z = copy->z;
uint32_t level = copy->level;
if (width == 0 || height == 0 || depth == 0) {
HandleError("Empty copy");
return false;
}
// TODO(cwallez@chromium.org): check for overflows
uint64_t pixelSize = TextureFormatPixelSize(texture->GetFormat());
uint64_t dataSize = width * height * depth * pixelSize;