diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-02-24 16:56:02 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-02-24 17:48:54 +0300 |
commit | 1685b1dba44e02ce1faace4a5de6d6cd0d98ef90 (patch) | |
tree | 59d9b03a24f116c2465fad263ad7b0d00221063b /source/blender/gpu | |
parent | 9be720d85efb307ad37b73f0f5fffd95629c7e20 (diff) |
OCIO: Fix mip length in texture creation
Also add an assert to avoid reproducing the error in the future.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index da5f08f003e..762b819036c 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -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) { |