Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-02-24 16:56:02 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-02-24 17:48:54 +0300
commit1685b1dba44e02ce1faace4a5de6d6cd0d98ef90 (patch)
tree59d9b03a24f116c2465fad263ad7b0d00221063b /source/blender/gpu/intern/gpu_texture.cc
parent9be720d85efb307ad37b73f0f5fffd95629c7e20 (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/intern/gpu_texture.cc')
-rw-r--r--source/blender/gpu/intern/gpu_texture.cc1
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) {