GPU: Rename gpu_extensions to gpu_capabilities

This makes more sense as this module has more to it than just
GL extensions.
This commit is contained in:
2020-09-07 19:35:56 +02:00
parent 5de4525e39
commit 6b436b80a4
43 changed files with 41 additions and 61 deletions

View File

@@ -46,7 +46,7 @@
#include "BLF_api.h" #include "BLF_api.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_immediate.h" #include "GPU_immediate.h"
#include "blf_internal.h" #include "blf_internal.h"

View File

@@ -39,7 +39,7 @@
#include "BKE_image.h" #include "BKE_image.h"
#include "BKE_main.h" #include "BKE_main.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_state.h" #include "GPU_state.h"
#include "GPU_texture.h" #include "GPU_texture.h"

View File

@@ -26,7 +26,7 @@
#include "BKE_global.h" /* for G.debug_value */ #include "BKE_global.h" /* for G.debug_value */
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_platform.h" #include "GPU_platform.h"
#include "GPU_state.h" #include "GPU_state.h"
#include "GPU_texture.h" #include "GPU_texture.h"

View File

@@ -41,8 +41,8 @@
#include "eevee_lightcache.h" #include "eevee_lightcache.h"
#include "eevee_private.h" #include "eevee_private.h"
#include "GPU_capabilities.h"
#include "GPU_context.h" #include "GPU_context.h"
#include "GPU_extensions.h"
#include "WM_api.h" #include "WM_api.h"
#include "WM_types.h" #include "WM_types.h"

View File

@@ -36,7 +36,7 @@
#include "BKE_object.h" #include "BKE_object.h"
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_texture.h" #include "GPU_texture.h"
#include "GPU_uniform_buffer.h" #include "GPU_uniform_buffer.h"

View File

@@ -32,7 +32,7 @@
#include "eevee_private.h" #include "eevee_private.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_platform.h" #include "GPU_platform.h"
#include "GPU_state.h" #include "GPU_state.h"

View File

@@ -38,7 +38,7 @@
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_framebuffer.h" #include "GPU_framebuffer.h"
#include "GPU_state.h" #include "GPU_state.h"

View File

@@ -32,7 +32,7 @@
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_shader.h" #include "GPU_shader.h"

View File

@@ -28,7 +28,7 @@
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_texture.h" #include "GPU_texture.h"

View File

@@ -44,7 +44,7 @@
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_texture.h" #include "GPU_texture.h"
#include "eevee_private.h" #include "eevee_private.h"

View File

@@ -31,8 +31,6 @@
#include "DRW_render.h" #include "DRW_render.h"
#include "GPU_extensions.h"
#include "workbench_engine.h" #include "workbench_engine.h"
#include "workbench_private.h" #include "workbench_private.h"

View File

@@ -35,8 +35,6 @@
#include "ED_view3d.h" #include "ED_view3d.h"
#include "GPU_extensions.h"
#include "workbench_engine.h" #include "workbench_engine.h"
#include "workbench_private.h" #include "workbench_private.h"

View File

@@ -59,7 +59,7 @@
#include "bmesh.h" #include "bmesh.h"
#include "GPU_batch.h" #include "GPU_batch.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "DRW_render.h" #include "DRW_render.h"

View File

@@ -37,7 +37,7 @@
#include "BKE_displist_tangent.h" #include "BKE_displist_tangent.h"
#include "GPU_batch.h" #include "GPU_batch.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "draw_cache_inline.h" #include "draw_cache_inline.h"

View File

@@ -64,7 +64,7 @@
#include "ED_space_api.h" #include "ED_space_api.h"
#include "ED_view3d.h" #include "ED_view3d.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_framebuffer.h" #include "GPU_framebuffer.h"
#include "GPU_immediate.h" #include "GPU_immediate.h"
#include "GPU_matrix.h" #include "GPU_matrix.h"

View File

@@ -29,7 +29,6 @@
#include "BKE_global.h" #include "BKE_global.h"
#include "GPU_extensions.h"
#include "GPU_platform.h" #include "GPU_platform.h"
#include "GPU_shader.h" #include "GPU_shader.h"
#include "GPU_state.h" #include "GPU_state.h"

View File

@@ -34,7 +34,7 @@
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_shader.h" #include "GPU_shader.h"

View File

@@ -89,7 +89,7 @@
#include "UI_resources.h" #include "UI_resources.h"
#include "UI_view2d.h" #include "UI_view2d.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "screen_intern.h" /* own module include */ #include "screen_intern.h" /* own module include */

View File

@@ -90,7 +90,7 @@
#include "ED_view3d.h" #include "ED_view3d.h"
#include "ED_view3d_offscreen.h" #include "ED_view3d_offscreen.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_init_exit.h" #include "GPU_init_exit.h"
#include "WM_api.h" #include "WM_api.h"

View File

@@ -64,7 +64,7 @@
#include "UI_resources.h" #include "UI_resources.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#define MAX_INFO_NUM_LEN 16 #define MAX_INFO_NUM_LEN 16

View File

@@ -59,11 +59,11 @@ set(SRC
intern/gpu_batch_presets.c intern/gpu_batch_presets.c
intern/gpu_batch_utils.c intern/gpu_batch_utils.c
intern/gpu_buffers.c intern/gpu_buffers.c
intern/gpu_capabilities.cc
intern/gpu_codegen.c intern/gpu_codegen.c
intern/gpu_context.cc intern/gpu_context.cc
intern/gpu_debug.cc intern/gpu_debug.cc
intern/gpu_drawlist.cc intern/gpu_drawlist.cc
intern/gpu_extensions.cc
intern/gpu_framebuffer.cc intern/gpu_framebuffer.cc
intern/gpu_immediate.cc intern/gpu_immediate.cc
intern/gpu_immediate_util.c intern/gpu_immediate_util.c
@@ -107,11 +107,11 @@ set(SRC
GPU_batch_presets.h GPU_batch_presets.h
GPU_batch_utils.h GPU_batch_utils.h
GPU_buffers.h GPU_buffers.h
GPU_capabilities.h
GPU_common.h GPU_common.h
GPU_context.h GPU_context.h
GPU_debug.h GPU_debug.h
GPU_drawlist.h GPU_drawlist.h
GPU_extensions.h
GPU_framebuffer.h GPU_framebuffer.h
GPU_glew.h GPU_glew.h
GPU_immediate.h GPU_immediate.h
@@ -134,10 +134,10 @@ set(SRC
intern/gpu_backend.hh intern/gpu_backend.hh
intern/gpu_batch_private.hh intern/gpu_batch_private.hh
intern/gpu_capabilities_private.hh
intern/gpu_codegen.h intern/gpu_codegen.h
intern/gpu_context_private.hh intern/gpu_context_private.hh
intern/gpu_drawlist_private.hh intern/gpu_drawlist_private.hh
intern/gpu_extensions_private.hh
intern/gpu_framebuffer_private.hh intern/gpu_framebuffer_private.hh
intern/gpu_immediate_private.hh intern/gpu_immediate_private.hh
intern/gpu_index_buffer_private.hh intern/gpu_index_buffer_private.hh

View File

@@ -19,6 +19,10 @@
/** \file /** \file
* \ingroup gpu * \ingroup gpu
*
* GPU Capabilities & workarounds
* This module expose the reported implementation limits & enabled
* workaround for drivers that needs specific codepaths.
*/ */
#pragma once #pragma once
@@ -27,32 +31,23 @@
extern "C" { extern "C" {
#endif #endif
/* GPU extensions support */
int GPU_max_texture_size(void); int GPU_max_texture_size(void);
int GPU_max_texture_3d_size(void);
int GPU_max_texture_layers(void); int GPU_max_texture_layers(void);
int GPU_max_textures(void); int GPU_max_textures(void);
int GPU_max_textures_vert(void); int GPU_max_textures_vert(void);
int GPU_max_textures_geom(void); int GPU_max_textures_geom(void);
int GPU_max_textures_frag(void); int GPU_max_textures_frag(void);
float GPU_max_texture_anisotropy(void);
int GPU_max_color_texture_samples(void); int GPU_texture_size_with_limit(int res);
int GPU_max_cube_map_size(void);
int GPU_max_ubo_binds(void);
int GPU_max_ubo_size(void);
bool GPU_mip_render_workaround(void); bool GPU_mip_render_workaround(void);
bool GPU_depth_blitting_workaround(void); bool GPU_depth_blitting_workaround(void);
bool GPU_use_main_context_workaround(void); bool GPU_use_main_context_workaround(void);
bool GPU_crappy_amd_driver(void); bool GPU_crappy_amd_driver(void);
int GPU_texture_size_with_limit(int res);
bool GPU_mem_stats_supported(void); bool GPU_mem_stats_supported(void);
void GPU_mem_stats_get(int *totalmem, int *freemem); void GPU_mem_stats_get(int *totalmem, int *freemem);
void GPU_code_generate_glsl_lib(void);
bool GPU_stereo_quadbuffer_support(void); bool GPU_stereo_quadbuffer_support(void);
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -30,7 +30,6 @@
#include "GPU_batch.h" #include "GPU_batch.h"
#include "GPU_batch_presets.h" #include "GPU_batch_presets.h"
#include "GPU_extensions.h"
#include "GPU_matrix.h" #include "GPU_matrix.h"
#include "GPU_platform.h" #include "GPU_platform.h"
#include "GPU_shader.h" #include "GPU_shader.h"

View File

@@ -26,9 +26,9 @@
#include "DNA_userdef_types.h" #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 */ #include "gl_backend.hh" /* TODO remove */

View File

@@ -40,7 +40,7 @@
#include "BKE_material.h" #include "BKE_material.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_shader.h" #include "GPU_shader.h"
#include "GPU_uniform_buffer.h" #include "GPU_uniform_buffer.h"

View File

@@ -28,7 +28,7 @@
#include "BLI_utildefines.h" #include "BLI_utildefines.h"
#include "GPU_batch.h" #include "GPU_batch.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_shader.h" #include "GPU_shader.h"
#include "GPU_texture.h" #include "GPU_texture.h"

View File

@@ -36,7 +36,7 @@
#include "DNA_space_types.h" #include "DNA_space_types.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_matrix.h" #include "GPU_matrix.h"
#include "GPU_platform.h" #include "GPU_platform.h"
#include "GPU_shader.h" #include "GPU_shader.h"

View File

@@ -35,7 +35,6 @@
#include "DNA_space_types.h" #include "DNA_space_types.h"
#include "GPU_extensions.h"
#include "GPU_matrix.h" #include "GPU_matrix.h"
#include "GPU_platform.h" #include "GPU_platform.h"
#include "GPU_shader.h" #include "GPU_shader.h"

View File

@@ -30,7 +30,6 @@
#include "BKE_global.h" #include "BKE_global.h"
#include "GPU_extensions.h"
#include "GPU_glew.h" #include "GPU_glew.h"
#include "GPU_state.h" #include "GPU_state.h"

View File

@@ -32,8 +32,6 @@
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_extensions.h"
#include "GPU_uniform_buffer.h" #include "GPU_uniform_buffer.h"
#include "gpu_uniform_buffer_private.hh" #include "gpu_uniform_buffer_private.hh"

View File

@@ -23,7 +23,7 @@
#include "BKE_global.h" #include "BKE_global.h"
#include "gpu_extensions_private.hh" #include "gpu_capabilities_private.hh"
#include "gpu_platform_private.hh" #include "gpu_platform_private.hh"
#include "glew-mx.h" #include "glew-mx.h"

View File

@@ -29,8 +29,6 @@
#include "glew-mx.h" #include "glew-mx.h"
#include "GPU_extensions.h"
#include "gpu_batch_private.hh" #include "gpu_batch_private.hh"
#include "gpu_shader_private.hh" #include "gpu_shader_private.hh"

View File

@@ -27,7 +27,7 @@
#include "BLI_assert.h" #include "BLI_assert.h"
#include "GPU_batch.h" #include "GPU_batch.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "glew-mx.h" #include "glew-mx.h"

View File

@@ -23,7 +23,7 @@
#include "BKE_global.h" #include "BKE_global.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "gl_backend.hh" #include "gl_backend.hh"
#include "gl_framebuffer.hh" #include "gl_framebuffer.hh"

View File

@@ -25,7 +25,6 @@
#include "BLI_string.h" #include "BLI_string.h"
#include "GPU_extensions.h"
#include "GPU_platform.h" #include "GPU_platform.h"
#include "gl_backend.hh" #include "gl_backend.hh"

View File

@@ -25,7 +25,7 @@
#include "BLI_math_base.h" #include "BLI_math_base.h"
#include "BLI_math_bits.h" #include "BLI_math_bits.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "glew-mx.h" #include "glew-mx.h"

View File

@@ -25,7 +25,7 @@
#include "DNA_userdef_types.h" #include "DNA_userdef_types.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_framebuffer.h" #include "GPU_framebuffer.h"
#include "GPU_platform.h" #include "GPU_platform.h"

View File

@@ -25,8 +25,6 @@
#include "BLI_string.h" #include "BLI_string.h"
#include "GPU_extensions.h"
#include "gpu_backend.hh" #include "gpu_backend.hh"
#include "gpu_context_private.hh" #include "gpu_context_private.hh"

View File

@@ -30,7 +30,7 @@
#include "BKE_global.h" #include "BKE_global.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_texture.h" #include "GPU_texture.h"
#include "IMB_colormanagement.h" #include "IMB_colormanagement.h"

View File

@@ -100,7 +100,7 @@ const EnumPropertyItem rna_enum_bake_pass_type_items[] = {
# include "BKE_context.h" # include "BKE_context.h"
# include "BKE_report.h" # include "BKE_report.h"
# include "GPU_extensions.h" # include "GPU_capabilities.h"
# include "GPU_shader.h" # include "GPU_shader.h"
# include "IMB_colormanagement.h" # include "IMB_colormanagement.h"

View File

@@ -188,7 +188,7 @@ static const EnumPropertyItem rna_enum_userdef_viewport_aa_items[] = {
# include "DEG_depsgraph.h" # include "DEG_depsgraph.h"
# include "GPU_extensions.h" # include "GPU_capabilities.h"
# include "GPU_select.h" # include "GPU_select.h"
# include "GPU_texture.h" # include "GPU_texture.h"

View File

@@ -40,7 +40,7 @@
#include "ED_screen.h" #include "ED_screen.h"
#include "GPU_extensions.h" #include "GPU_capabilities.h"
#include "GPU_immediate.h" #include "GPU_immediate.h"
#include "GPU_texture.h" #include "GPU_texture.h"
#include "GPU_viewport.h" #include "GPU_viewport.h"