From e7082fbdb0eab8f8ba435ee6f3c065f0f57966b3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 21 Jul 2021 20:39:51 +1000 Subject: Cleanup: replace BLI_assert(0 && "text") with BLI_assert_msg --- source/blender/gpu/intern/gpu_batch.cc | 4 ++-- source/blender/gpu/intern/gpu_codegen.c | 2 +- source/blender/gpu/opengl/gl_shader_interface.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc index 9dc24c59e22..677777132e6 100644 --- a/source/blender/gpu/intern/gpu_batch.cc +++ b/source/blender/gpu/intern/gpu_batch.cc @@ -184,7 +184,7 @@ int GPU_batch_instbuf_add_ex(GPUBatch *batch, GPUVertBuf *insts, bool own_vbo) } } /* we only make it this far if there is no room for another GPUVertBuf */ - BLI_assert(0 && "Not enough Instance VBO slot in batch"); + BLI_assert_msg(0, "Not enough Instance VBO slot in batch"); return -1; } @@ -207,7 +207,7 @@ int GPU_batch_vertbuf_add_ex(GPUBatch *batch, GPUVertBuf *verts, bool own_vbo) } } /* we only make it this far if there is no room for another GPUVertBuf */ - BLI_assert(0 && "Not enough VBO slot in batch"); + BLI_assert_msg(0, "Not enough VBO slot in batch"); return -1; } diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index d12cecd129e..bb1ebc0e85d 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -657,7 +657,7 @@ static const char *attr_prefix_get(CustomDataType type) case CD_AUTO_FROM_NAME: return "a"; default: - BLI_assert(false && "GPUVertAttr Prefix type not found : This should not happen!"); + BLI_assert_msg(0, "GPUVertAttr Prefix type not found : This should not happen!"); return ""; } } diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc b/source/blender/gpu/opengl/gl_shader_interface.cc index 9cf072b2e8a..9900a4e0766 100644 --- a/source/blender/gpu/opengl/gl_shader_interface.cc +++ b/source/blender/gpu/opengl/gl_shader_interface.cc @@ -170,7 +170,7 @@ GLShaderInterface::GLShaderInterface(GLuint program) program, GL_SHADER_STORAGE_BLOCK, GL_MAX_NAME_LENGTH, &max_ssbo_name_len); } - BLI_assert(ubo_len <= 16 && "enabled_ubo_mask_ is uint16_t"); + BLI_assert_msg(ubo_len <= 16, "enabled_ubo_mask_ is uint16_t"); /* Work around driver bug with Intel HD 4600 on Windows 7/8, where * GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH does not work. */ -- cgit v1.2.3