From 9c09e5ba242fffc4906d86ce111def89e481c048 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Wed, 13 Apr 2022 02:38:52 -0300 Subject: Fix some usages of 'GPU_shader_get_uniform_block' `GPU_shader_get_uniform_block` is marked as deprecated and the value returned does not match what `GPU_uniformbuf_bind` expects. Also, small typo fix in python error message. Differential Revision: https://developer.blender.org/D14638 --- source/blender/draw/intern/draw_cache_impl_subdivision.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/draw') diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc index 2653035a39f..e0ec0e64ea2 100644 --- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc +++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc @@ -1162,8 +1162,8 @@ static void draw_subdiv_ubo_update_and_bind(const DRWSubdivCache *cache, GPU_uniformbuf_update(cache->ubo, &storage); - const int location = GPU_shader_get_uniform_block(shader, "shader_data"); - GPU_uniformbuf_bind(cache->ubo, location); + const int binding = GPU_shader_get_uniform_block_binding(shader, "shader_data"); + GPU_uniformbuf_bind(cache->ubo, binding); } /** \} */ -- cgit v1.2.3