OCIO: Fix mip length in texture creation

Also add an assert to avoid reproducing the error in the future.
This commit is contained in:
2022-02-24 14:56:02 +01:00
parent 9be720d85e
commit 1685b1dba4
2 changed files with 3 additions and 2 deletions

View File

@@ -192,6 +192,7 @@ static inline GPUTexture *gpu_texture_create(const char *name,
eGPUDataFormat data_format,
const void *pixels)
{
BLI_assert(mips > 0);
Texture *tex = GPUBackend::get()->texture_alloc(name);
bool success = false;
switch (type) {