diff options
43 files changed, 41 insertions, 61 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 773d3409905..8e74d5bba7c 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -46,7 +46,7 @@ #include "BLF_api.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_immediate.h" #include "blf_internal.h" diff --git a/source/blender/blenkernel/intern/image_gpu.c b/source/blender/blenkernel/intern/image_gpu.c index 083d6c1d973..8b6bd47a0db 100644 --- a/source/blender/blenkernel/intern/image_gpu.c +++ b/source/blender/blenkernel/intern/image_gpu.c @@ -39,7 +39,7 @@ #include "BKE_image.h" #include "BKE_main.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_state.h" #include "GPU_texture.h" diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index 2bd1a875371..3b2a3cc7c01 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -26,7 +26,7 @@ #include "BKE_global.h" /* for G.debug_value */ -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_platform.h" #include "GPU_state.h" #include "GPU_texture.h" diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index 5de161a646b..5a676bf4004 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -41,8 +41,8 @@ #include "eevee_lightcache.h" #include "eevee_private.h" +#include "GPU_capabilities.h" #include "GPU_context.h" -#include "GPU_extensions.h" #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c index 9f86958cef8..89e61ab939a 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.c +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c @@ -36,7 +36,7 @@ #include "BKE_object.h" #include "MEM_guardedalloc.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_material.h" #include "GPU_texture.h" #include "GPU_uniform_buffer.h" diff --git a/source/blender/draw/engines/eevee/eevee_occlusion.c b/source/blender/draw/engines/eevee/eevee_occlusion.c index b7b765d9c00..3c684c467a4 100644 --- a/source/blender/draw/engines/eevee/eevee_occlusion.c +++ b/source/blender/draw/engines/eevee/eevee_occlusion.c @@ -32,7 +32,7 @@ #include "eevee_private.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_platform.h" #include "GPU_state.h" diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c index 2351b06db98..504e4e1d336 100644 --- a/source/blender/draw/engines/eevee/eevee_render.c +++ b/source/blender/draw/engines/eevee/eevee_render.c @@ -38,7 +38,7 @@ #include "DEG_depsgraph_query.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_framebuffer.h" #include "GPU_state.h" diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c index bbc5801b0f7..d4b1d421603 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.c +++ b/source/blender/draw/engines/eevee/eevee_shaders.c @@ -32,7 +32,7 @@ #include "MEM_guardedalloc.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_material.h" #include "GPU_shader.h" diff --git a/source/blender/draw/engines/eevee/eevee_subsurface.c b/source/blender/draw/engines/eevee/eevee_subsurface.c index 58b545be2f5..f9195e5861d 100644 --- a/source/blender/draw/engines/eevee/eevee_subsurface.c +++ b/source/blender/draw/engines/eevee/eevee_subsurface.c @@ -28,7 +28,7 @@ #include "DEG_depsgraph_query.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_material.h" #include "GPU_texture.h" diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index 85c7c89934c..69b916244b5 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -44,7 +44,7 @@ #include "DEG_depsgraph_query.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_material.h" #include "GPU_texture.h" #include "eevee_private.h" diff --git a/source/blender/draw/engines/workbench/workbench_opaque.c b/source/blender/draw/engines/workbench/workbench_opaque.c index 738f4a67471..9fdefed019f 100644 --- a/source/blender/draw/engines/workbench/workbench_opaque.c +++ b/source/blender/draw/engines/workbench/workbench_opaque.c @@ -31,8 +31,6 @@ #include "DRW_render.h" -#include "GPU_extensions.h" - #include "workbench_engine.h" #include "workbench_private.h" diff --git a/source/blender/draw/engines/workbench/workbench_transparent.c b/source/blender/draw/engines/workbench/workbench_transparent.c index 5eff056846c..1c8575ddc12 100644 --- a/source/blender/draw/engines/workbench/workbench_transparent.c +++ b/source/blender/draw/engines/workbench/workbench_transparent.c @@ -35,8 +35,6 @@ #include "ED_view3d.h" -#include "GPU_extensions.h" - #include "workbench_engine.h" #include "workbench_private.h" diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.c b/source/blender/draw/intern/draw_cache_extract_mesh.c index 9f4ae8fbfbf..cb716b3130a 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh.c +++ b/source/blender/draw/intern/draw_cache_extract_mesh.c @@ -59,7 +59,7 @@ #include "bmesh.h" #include "GPU_batch.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "DRW_render.h" diff --git a/source/blender/draw/intern/draw_cache_impl_displist.c b/source/blender/draw/intern/draw_cache_impl_displist.c index 2f7ce54aef4..42e410ad189 100644 --- a/source/blender/draw/intern/draw_cache_impl_displist.c +++ b/source/blender/draw/intern/draw_cache_impl_displist.c @@ -37,7 +37,7 @@ #include "BKE_displist_tangent.h" #include "GPU_batch.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "draw_cache_inline.h" diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 49780f59db3..8d69ed05fc6 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -64,7 +64,7 @@ #include "ED_space_api.h" #include "ED_view3d.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_framebuffer.h" #include "GPU_immediate.h" #include "GPU_matrix.h" diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 58464c0a15a..79d74e1f67d 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -29,7 +29,6 @@ #include "BKE_global.h" -#include "GPU_extensions.h" #include "GPU_platform.h" #include "GPU_shader.h" #include "GPU_state.h" diff --git a/source/blender/draw/intern/draw_manager_shader.c b/source/blender/draw/intern/draw_manager_shader.c index 7602bbb39ac..7eeb5a2fb67 100644 --- a/source/blender/draw/intern/draw_manager_shader.c +++ b/source/blender/draw/intern/draw_manager_shader.c @@ -34,7 +34,7 @@ #include "DEG_depsgraph_query.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_material.h" #include "GPU_shader.h" diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 6c3b47db155..b79447273d6 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -89,7 +89,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "screen_intern.h" /* own module include */ diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 456c1f61cb1..3886b78286b 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -90,7 +90,7 @@ #include "ED_view3d.h" #include "ED_view3d_offscreen.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_init_exit.h" #include "WM_api.h" diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 301e88b0904..3650fbdc9f8 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -64,7 +64,7 @@ #include "UI_resources.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #define MAX_INFO_NUM_LEN 16 diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 358bd045c2f..6fdd510ad28 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -59,11 +59,11 @@ set(SRC intern/gpu_batch_presets.c intern/gpu_batch_utils.c intern/gpu_buffers.c + intern/gpu_capabilities.cc intern/gpu_codegen.c intern/gpu_context.cc intern/gpu_debug.cc intern/gpu_drawlist.cc - intern/gpu_extensions.cc intern/gpu_framebuffer.cc intern/gpu_immediate.cc intern/gpu_immediate_util.c @@ -107,11 +107,11 @@ set(SRC GPU_batch_presets.h GPU_batch_utils.h GPU_buffers.h + GPU_capabilities.h GPU_common.h GPU_context.h GPU_debug.h GPU_drawlist.h - GPU_extensions.h GPU_framebuffer.h GPU_glew.h GPU_immediate.h @@ -134,10 +134,10 @@ set(SRC intern/gpu_backend.hh intern/gpu_batch_private.hh + intern/gpu_capabilities_private.hh intern/gpu_codegen.h intern/gpu_context_private.hh intern/gpu_drawlist_private.hh - intern/gpu_extensions_private.hh intern/gpu_framebuffer_private.hh intern/gpu_immediate_private.hh intern/gpu_index_buffer_private.hh diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_capabilities.h index 357e867775a..b8a48735548 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_capabilities.h @@ -19,6 +19,10 @@ /** \file * \ingroup gpu + * + * GPU Capabilities & workarounds + * This module expose the reported implementation limits & enabled + * workaround for drivers that needs specific codepaths. */ #pragma once @@ -27,32 +31,23 @@ extern "C" { #endif -/* GPU extensions support */ - int GPU_max_texture_size(void); -int GPU_max_texture_3d_size(void); int GPU_max_texture_layers(void); int GPU_max_textures(void); int GPU_max_textures_vert(void); int GPU_max_textures_geom(void); int GPU_max_textures_frag(void); -float GPU_max_texture_anisotropy(void); -int GPU_max_color_texture_samples(void); -int GPU_max_cube_map_size(void); -int GPU_max_ubo_binds(void); -int GPU_max_ubo_size(void); + +int GPU_texture_size_with_limit(int res); + bool GPU_mip_render_workaround(void); bool GPU_depth_blitting_workaround(void); bool GPU_use_main_context_workaround(void); bool GPU_crappy_amd_driver(void); -int GPU_texture_size_with_limit(int res); - bool GPU_mem_stats_supported(void); void GPU_mem_stats_get(int *totalmem, int *freemem); -void GPU_code_generate_glsl_lib(void); - bool GPU_stereo_quadbuffer_support(void); #ifdef __cplusplus diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc index 34655c48ca4..d6f4f223a83 100644 --- a/source/blender/gpu/intern/gpu_batch.cc +++ b/source/blender/gpu/intern/gpu_batch.cc @@ -30,7 +30,6 @@ #include "GPU_batch.h" #include "GPU_batch_presets.h" -#include "GPU_extensions.h" #include "GPU_matrix.h" #include "GPU_platform.h" #include "GPU_shader.h" diff --git a/source/blender/gpu/intern/gpu_extensions.cc b/source/blender/gpu/intern/gpu_capabilities.cc index e06828bf994..83b9597abbb 100644 --- a/source/blender/gpu/intern/gpu_extensions.cc +++ b/source/blender/gpu/intern/gpu_capabilities.cc @@ -26,9 +26,9 @@ #include "DNA_userdef_types.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" -#include "gpu_extensions_private.hh" +#include "gpu_capabilities_private.hh" #include "gl_backend.hh" /* TODO remove */ diff --git a/source/blender/gpu/intern/gpu_extensions_private.hh b/source/blender/gpu/intern/gpu_capabilities_private.hh index ec387555bfe..ec387555bfe 100644 --- a/source/blender/gpu/intern/gpu_extensions_private.hh +++ b/source/blender/gpu/intern/gpu_capabilities_private.hh diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index d67ce0be310..f10fd8cd137 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -40,7 +40,7 @@ #include "BKE_material.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_material.h" #include "GPU_shader.h" #include "GPU_uniform_buffer.h" diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index 44994c2cabf..a0b05df583a 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -28,7 +28,7 @@ #include "BLI_utildefines.h" #include "GPU_batch.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_shader.h" #include "GPU_texture.h" diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc index fd01160cff6..38acc773c49 100644 --- a/source/blender/gpu/intern/gpu_shader.cc +++ b/source/blender/gpu/intern/gpu_shader.cc @@ -36,7 +36,7 @@ #include "DNA_space_types.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_matrix.h" #include "GPU_platform.h" #include "GPU_shader.h" diff --git a/source/blender/gpu/intern/gpu_shader_builtin.c b/source/blender/gpu/intern/gpu_shader_builtin.c index ed95a236da5..f528e67a80a 100644 --- a/source/blender/gpu/intern/gpu_shader_builtin.c +++ b/source/blender/gpu/intern/gpu_shader_builtin.c @@ -35,7 +35,6 @@ #include "DNA_space_types.h" -#include "GPU_extensions.h" #include "GPU_matrix.h" #include "GPU_platform.h" #include "GPU_shader.h" diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc index 478fd639cdd..90c6efad2e8 100644 --- a/source/blender/gpu/intern/gpu_state.cc +++ b/source/blender/gpu/intern/gpu_state.cc @@ -30,7 +30,6 @@ #include "BKE_global.h" -#include "GPU_extensions.h" #include "GPU_glew.h" #include "GPU_state.h" diff --git a/source/blender/gpu/intern/gpu_uniform_buffer.cc b/source/blender/gpu/intern/gpu_uniform_buffer.cc index 24e5b452e03..4926a5fa2dc 100644 --- a/source/blender/gpu/intern/gpu_uniform_buffer.cc +++ b/source/blender/gpu/intern/gpu_uniform_buffer.cc @@ -32,8 +32,6 @@ #include "GPU_material.h" -#include "GPU_extensions.h" - #include "GPU_uniform_buffer.h" #include "gpu_uniform_buffer_private.hh" diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 317416ca355..fedc03f5787 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -23,7 +23,7 @@ #include "BKE_global.h" -#include "gpu_extensions_private.hh" +#include "gpu_capabilities_private.hh" #include "gpu_platform_private.hh" #include "glew-mx.h" diff --git a/source/blender/gpu/opengl/gl_batch.cc b/source/blender/gpu/opengl/gl_batch.cc index f4ad7194ce1..c28d3e33e65 100644 --- a/source/blender/gpu/opengl/gl_batch.cc +++ b/source/blender/gpu/opengl/gl_batch.cc @@ -29,8 +29,6 @@ #include "glew-mx.h" -#include "GPU_extensions.h" - #include "gpu_batch_private.hh" #include "gpu_shader_private.hh" diff --git a/source/blender/gpu/opengl/gl_drawlist.cc b/source/blender/gpu/opengl/gl_drawlist.cc index 0768f7502ce..7cec6da7541 100644 --- a/source/blender/gpu/opengl/gl_drawlist.cc +++ b/source/blender/gpu/opengl/gl_drawlist.cc @@ -27,7 +27,7 @@ #include "BLI_assert.h" #include "GPU_batch.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "glew-mx.h" diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index 506a945d9d4..d0644b356ac 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -23,7 +23,7 @@ #include "BKE_global.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "gl_backend.hh" #include "gl_framebuffer.hh" diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc index 76e20de1e51..a303229fc3c 100644 --- a/source/blender/gpu/opengl/gl_shader.cc +++ b/source/blender/gpu/opengl/gl_shader.cc @@ -25,7 +25,6 @@ #include "BLI_string.h" -#include "GPU_extensions.h" #include "GPU_platform.h" #include "gl_backend.hh" diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc index dc6d475d39f..b43b01aed4f 100644 --- a/source/blender/gpu/opengl/gl_state.cc +++ b/source/blender/gpu/opengl/gl_state.cc @@ -25,7 +25,7 @@ #include "BLI_math_base.h" #include "BLI_math_bits.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "glew-mx.h" diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index 4c3d34a759f..2934865f4d1 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -25,7 +25,7 @@ #include "DNA_userdef_types.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_framebuffer.h" #include "GPU_platform.h" diff --git a/source/blender/gpu/opengl/gl_uniform_buffer.cc b/source/blender/gpu/opengl/gl_uniform_buffer.cc index 82b7341d145..8c8fac44fdc 100644 --- a/source/blender/gpu/opengl/gl_uniform_buffer.cc +++ b/source/blender/gpu/opengl/gl_uniform_buffer.cc @@ -25,8 +25,6 @@ #include "BLI_string.h" -#include "GPU_extensions.h" - #include "gpu_backend.hh" #include "gpu_context_private.hh" diff --git a/source/blender/imbuf/intern/util_gpu.c b/source/blender/imbuf/intern/util_gpu.c index 73532a1825e..2826bd63cc1 100644 --- a/source/blender/imbuf/intern/util_gpu.c +++ b/source/blender/imbuf/intern/util_gpu.c @@ -30,7 +30,7 @@ #include "BKE_global.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_texture.h" #include "IMB_colormanagement.h" diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 5b77632be79..35563ad143e 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -100,7 +100,7 @@ const EnumPropertyItem rna_enum_bake_pass_type_items[] = { # include "BKE_context.h" # include "BKE_report.h" -# include "GPU_extensions.h" +# include "GPU_capabilities.h" # include "GPU_shader.h" # include "IMB_colormanagement.h" diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 6682cd743eb..7b777aa642a 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -188,7 +188,7 @@ static const EnumPropertyItem rna_enum_userdef_viewport_aa_items[] = { # include "DEG_depsgraph.h" -# include "GPU_extensions.h" +# include "GPU_capabilities.h" # include "GPU_select.h" # include "GPU_texture.h" diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 9667ed5b631..ab6da2cc947 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -40,7 +40,7 @@ #include "ED_screen.h" -#include "GPU_extensions.h" +#include "GPU_capabilities.h" #include "GPU_immediate.h" #include "GPU_texture.h" #include "GPU_viewport.h" |