diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc index 35e4d0b7a90..eb62ddb143b 100644 --- a/intern/opencolorio/ocio_impl_glsl.cc +++ b/intern/opencolorio/ocio_impl_glsl.cc @@ -21,7 +21,7 @@ #include "GPU_immediate.h" #include "GPU_shader.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "gpu_shader_create_info.hh" diff --git a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc index 77bd2c66990..c9eb4c36919 100644 --- a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc +++ b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc @@ -16,7 +16,7 @@ #include "GPU_capabilities.h" #include "GPU_shader.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "gpu_shader_create_info.hh" diff --git a/source/blender/compositor/realtime_compositor/intern/shader_operation.cc b/source/blender/compositor/realtime_compositor/intern/shader_operation.cc index a59b3f11796..8ef4e9555fa 100644 --- a/source/blender/compositor/realtime_compositor/intern/shader_operation.cc +++ b/source/blender/compositor/realtime_compositor/intern/shader_operation.cc @@ -17,7 +17,7 @@ #include "GPU_material.hh" #include "GPU_shader.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "gpu_shader_create_info.hh" diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.cc b/source/blender/draw/engines/eevee/eevee_lightprobes.cc index 6bb442c89f0..fb8ba406868 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.cc +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.cc @@ -25,7 +25,7 @@ #include "GPU_capabilities.h" #include "GPU_material.hh" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "DEG_depsgraph_query.hh" diff --git a/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc b/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc index c713e386804..0278fe24e5a 100644 --- a/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc +++ b/source/blender/draw/engines/eevee_next/eevee_depth_of_field.cc @@ -24,7 +24,7 @@ #include "GPU_platform.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "eevee_camera.hh" #include "eevee_instance.hh" diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.cc b/source/blender/draw/engines/gpencil/gpencil_draw_data.cc index d84dfc44612..d762f6ca533 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_data.cc +++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.cc @@ -16,7 +16,7 @@ #include "BLI_math_color.h" #include "BLI_memblock.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "IMB_imbuf_types.hh" diff --git a/source/blender/draw/engines/gpencil/gpencil_engine_c.cc b/source/blender/draw/engines/gpencil/gpencil_engine_c.cc index a3a6c8766cd..b1f0ff32e8a 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine_c.cc +++ b/source/blender/draw/engines/gpencil/gpencil_engine_c.cc @@ -29,7 +29,7 @@ #include "DNA_view3d_types.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "gpencil_engine.h" diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh index 563db401002..e6c20e49e53 100644 --- a/source/blender/draw/intern/DRW_gpu_wrapper.hh +++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh @@ -75,7 +75,7 @@ #include "GPU_framebuffer.h" #include "GPU_storage_buffer.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" namespace blender::draw { diff --git a/source/blender/draw/intern/DRW_render.hh b/source/blender/draw/intern/DRW_render.hh index d8a50f2a0d6..48ba694fdf4 100644 --- a/source/blender/draw/intern/DRW_render.hh +++ b/source/blender/draw/intern/DRW_render.hh @@ -35,7 +35,7 @@ #include "GPU_shader.h" #include "GPU_storage_buffer.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "draw_cache.hh" #include "draw_common.h" diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index fc7c2e54978..53958b3f1b7 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -24,7 +24,7 @@ #include "GPU_drawlist.h" #include "GPU_framebuffer.h" #include "GPU_shader.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "GPU_viewport.h" #include "draw_instance_data.h" diff --git a/source/blender/draw/intern/draw_manager_c.cc b/source/blender/draw/intern/draw_manager_c.cc index eeef30e1706..3604a769ea4 100644 --- a/source/blender/draw/intern/draw_manager_c.cc +++ b/source/blender/draw/intern/draw_manager_c.cc @@ -62,7 +62,7 @@ #include "GPU_platform.h" #include "GPU_shader_shared.h" #include "GPU_state.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "GPU_viewport.h" #include "RE_engine.h" diff --git a/source/blender/draw/intern/draw_manager_data.cc b/source/blender/draw/intern/draw_manager_data.cc index d19d4e4a484..0266d1fe3d5 100644 --- a/source/blender/draw/intern/draw_manager_data.cc +++ b/source/blender/draw/intern/draw_manager_data.cc @@ -46,7 +46,7 @@ #include "GPU_capabilities.h" #include "GPU_material.hh" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "intern/gpu_codegen.h" diff --git a/source/blender/editors/gpencil_legacy/drawgpencil.cc b/source/blender/editors/gpencil_legacy/drawgpencil.cc index 135bc184497..dceab19d750 100644 --- a/source/blender/editors/gpencil_legacy/drawgpencil.cc +++ b/source/blender/editors/gpencil_legacy/drawgpencil.cc @@ -35,7 +35,7 @@ #include "GPU_matrix.h" #include "GPU_shader_shared.h" #include "GPU_state.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "ED_gpencil_legacy.hh" diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index 9f605c6f32d..49303484d80 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -42,7 +42,7 @@ #include "GPU_platform.h" #include "GPU_shader_shared.h" #include "GPU_state.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "DRW_engine.hh" diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index e3012742514..c6d0f299436 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -108,7 +108,7 @@ set(SRC GPU_state.h GPU_storage_buffer.h GPU_texture.h - GPU_uniform_buffer.h + GPU_uniform_buffer.hh GPU_vertex_buffer.h GPU_vertex_format.h GPU_viewport.h diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 83cbf38c574..1c8d79637f9 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -23,7 +23,7 @@ #include "GPU_index_buffer.h" #include "GPU_shader.h" #include "GPU_storage_buffer.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "GPU_vertex_buffer.h" #define GPU_BATCH_VBO_MAX_LEN 16 diff --git a/source/blender/gpu/GPU_uniform_buffer.h b/source/blender/gpu/GPU_uniform_buffer.hh similarity index 85% rename from source/blender/gpu/GPU_uniform_buffer.h rename to source/blender/gpu/GPU_uniform_buffer.hh index 98f16a76dc2..2d691ee0046 100644 --- a/source/blender/gpu/GPU_uniform_buffer.h +++ b/source/blender/gpu/GPU_uniform_buffer.hh @@ -15,14 +15,10 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - struct ListBase; /** Opaque type hiding blender::gpu::UniformBuf. */ -typedef struct GPUUniformBuf GPUUniformBuf; +struct GPUUniformBuf; GPUUniformBuf *GPU_uniformbuf_create_ex(size_t size, const void *data, const char *name); /** @@ -31,7 +27,7 @@ GPUUniformBuf *GPU_uniformbuf_create_ex(size_t size, const void *data, const cha * * \param inputs: ListBase of #BLI_genericNodeN(#GPUInput). */ -GPUUniformBuf *GPU_uniformbuf_create_from_list(struct ListBase *inputs, const char *name); +GPUUniformBuf *GPU_uniformbuf_create_from_list(ListBase *inputs, const char *name); #define GPU_uniformbuf_create(size) GPU_uniformbuf_create_ex(size, NULL, __func__); @@ -42,7 +38,7 @@ void GPU_uniformbuf_update(GPUUniformBuf *ubo, const void *data); void GPU_uniformbuf_bind(GPUUniformBuf *ubo, int slot); void GPU_uniformbuf_bind_as_ssbo(GPUUniformBuf *ubo, int slot); void GPU_uniformbuf_unbind(GPUUniformBuf *ubo); -void GPU_uniformbuf_unbind_all(void); +void GPU_uniformbuf_unbind_all(); void GPU_uniformbuf_clear_to_zero(GPUUniformBuf *ubo); @@ -50,7 +46,3 @@ void GPU_uniformbuf_clear_to_zero(GPUUniformBuf *ubo); #define GPU_ATTRIBUTE_UBO_BLOCK_NAME "unf_attrs" #define GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME "drw_layer_attrs" #define GPU_NODE_TREE_UBO_SLOT 0 - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc index 8d0f1f5dd7d..1ed14559d90 100644 --- a/source/blender/gpu/intern/gpu_codegen.cc +++ b/source/blender/gpu/intern/gpu_codegen.cc @@ -30,7 +30,7 @@ #include "GPU_context.h" #include "GPU_material.hh" #include "GPU_shader.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "GPU_vertex_format.h" #include "BLI_sys_types.h" /* for intptr_t support */ diff --git a/source/blender/gpu/intern/gpu_material.cc b/source/blender/gpu/intern/gpu_material.cc index 0d0f4f58bc2..1f6f106ec0a 100644 --- a/source/blender/gpu/intern/gpu_material.cc +++ b/source/blender/gpu/intern/gpu_material.cc @@ -33,7 +33,7 @@ #include "GPU_material.hh" #include "GPU_shader.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "DRW_engine.hh" diff --git a/source/blender/gpu/intern/gpu_uniform_buffer.cc b/source/blender/gpu/intern/gpu_uniform_buffer.cc index 01d44b7bacf..605b5b07f16 100644 --- a/source/blender/gpu/intern/gpu_uniform_buffer.cc +++ b/source/blender/gpu/intern/gpu_uniform_buffer.cc @@ -18,7 +18,7 @@ #include "GPU_context.h" #include "GPU_material.hh" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "gpu_uniform_buffer_private.hh" /* -------------------------------------------------------------------- */ diff --git a/source/blender/gpu/intern/gpu_viewport.cc b/source/blender/gpu/intern/gpu_viewport.cc index dd3dc2b8309..7a90fe88a0b 100644 --- a/source/blender/gpu/intern/gpu_viewport.cc +++ b/source/blender/gpu/intern/gpu_viewport.cc @@ -24,7 +24,7 @@ #include "GPU_immediate.h" #include "GPU_matrix.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "GPU_viewport.h" #include "DRW_engine.hh" diff --git a/source/blender/gpu/metal/mtl_context.mm b/source/blender/gpu/metal/mtl_context.mm index 90a86a7fce5..92bd091b92f 100644 --- a/source/blender/gpu/metal/mtl_context.mm +++ b/source/blender/gpu/metal/mtl_context.mm @@ -25,7 +25,7 @@ #include "GPU_shader.h" #include "GPU_storage_buffer.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "GPU_vertex_buffer.h" #include "intern/gpu_matrix_private.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc b/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc index 3c6959646bc..8f429bdeb6f 100644 --- a/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc +++ b/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc @@ -28,7 +28,7 @@ #include "GPU_shader.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "COM_algorithm_smaa.hh" #include "COM_node_operation.hh" diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index 915cf5219c8..753cdb8df7a 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -15,7 +15,7 @@ #include "GPU_shader.h" #include "GPU_texture.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "../generic/py_capi_utils.h" #include "../generic/python_compat.h" diff --git a/source/blender/python/gpu/gpu_py_uniformbuffer.cc b/source/blender/python/gpu/gpu_py_uniformbuffer.cc index 1c3be53d5e8..695d35bf803 100644 --- a/source/blender/python/gpu/gpu_py_uniformbuffer.cc +++ b/source/blender/python/gpu/gpu_py_uniformbuffer.cc @@ -16,7 +16,7 @@ #include "BLI_string.h" #include "GPU_context.h" -#include "GPU_uniform_buffer.h" +#include "GPU_uniform_buffer.hh" #include "../generic/python_compat.h"