From e96623c19babcb4c0a59ac063c22d5b4deb39327 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 22 Apr 2022 11:21:03 -0500 Subject: Fix: Build error on macOS after previous commit --- source/blender/draw/intern/draw_curves.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/blender/draw/intern') diff --git a/source/blender/draw/intern/draw_curves.cc b/source/blender/draw/intern/draw_curves.cc index 139efdf4f8c..b3595ccf5fb 100644 --- a/source/blender/draw/intern/draw_curves.cc +++ b/source/blender/draw/intern/draw_curves.cc @@ -44,12 +44,12 @@ BLI_INLINE eParticleRefineShaderType drw_curves_shader_type_get() } #ifndef USE_TRANSFORM_FEEDBACK -typedef struct CurvesEvalCall { +struct CurvesEvalCall { struct CurvesEvalCall *next; GPUVertBuf *vbo; DRWShadingGroup *shgrp; uint vert_len; -} CurvesEvalCall; +}; static CurvesEvalCall *g_tf_calls = nullptr; static int g_tf_id_offset; @@ -138,7 +138,7 @@ static void drw_curves_cache_update_transform_feedback(CurvesEvalCache *cache, c #else DRWShadingGroup *tf_shgrp = DRW_shgroup_create(tf_shader, g_tf_pass); - CurvesEvalCall *pr_call = MEM_mallocN(sizeof(*pr_call), __func__); + CurvesEvalCall *pr_call = MEM_new(__func__); pr_call->next = g_tf_calls; pr_call->vbo = cache->final[subdiv].proc_buf; pr_call->shgrp = tf_shgrp; @@ -265,7 +265,7 @@ void DRW_curves_update() int width = 2048; int height = min_ii(width, 1 + max_size / width); GPUTexture *tex = DRW_texture_pool_query_2d( - width, height, GPU_RGBA32F, (void *)DRW_curves_update); + width, height, GPU_RGBA32F, (DrawEngineType *)DRW_curves_update); g_tf_target_height = height; g_tf_target_width = width; @@ -276,7 +276,8 @@ void DRW_curves_update() GPU_ATTACHMENT_TEXTURE(tex), }); - float *data = MEM_mallocN(sizeof(float[4]) * width * height, "tf fallback buffer"); + float *data = static_cast( + MEM_mallocN(sizeof(float[4]) * width * height, "tf fallback buffer")); GPU_framebuffer_bind(fb); while (g_tf_calls != nullptr) { -- cgit v1.2.3