|
Blender V5.0
|
#include "DNA_userdef_types.h"#include "GPU_capabilities.hh"#include "gpu_context_private.hh"#include "gpu_capabilities_private.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::gpu |
Variables | |
| GPUCapabilities | blender::gpu::GCaps = {} |
Wrap OpenGL features such as textures, shaders and GLSL with checks for drivers and GPU support.
Definition in file gpu_capabilities.cc.
| void GPU_compilation_subprocess_override_set | ( | int | count | ) |
WARNING: Should only be called at startup from creator_args. Never call it at runtime.
Definition at line 247 of file gpu_capabilities.cc.
References BLI_assert, count, and blender::gpu::GCaps.
Referenced by arg_handle_gpu_compilation_subprocesses_set().
| bool GPU_depth_blitting_workaround | ( | ) |
Definition at line 155 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
| const char * GPU_extension_get | ( | int | i | ) |
Definition at line 135 of file gpu_capabilities.cc.
References blender::gpu::GCaps, and i.
Referenced by pygpu_extensions_get().
| int GPU_extensions_len | ( | ) |
Definition at line 130 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_extensions_get().
| bool GPU_geometry_shader_support | ( | ) |
Definition at line 175 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by gpu_shader_create_info_compile().
| bool GPU_hdr_support | ( | ) |
Definition at line 180 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by get_display_buffer_processor(), get_hdr_framebuffer_format(), IMB_colormanagement_setup_glsl_draw_from_space(), pygpu_hdr_support_get(), and WM_window_support_hdr_color().
| bool GPU_is_safe_texture_size | ( | int | width, |
| int | height ) |
Returns whether it should be "safe" to use texture of a given size.
The heuristic is that maybe allocating texture that is 25% of GPU_max_texture_size squared is fine. Note that the actual texture creation can still fail even if deemed "safe" by this function, depending on current memory usage, texture format, etc.
Definition at line 54 of file gpu_capabilities.cc.
References GPU_max_texture_size().
Referenced by is_compositing_possible(), and is_compositing_possible_on_gpu().
| int GPU_max_batch_indices | ( | ) |
Definition at line 110 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_batch_indices_get().
| int GPU_max_batch_vertices | ( | ) |
Definition at line 115 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_batch_vertices_get().
| uint32_t GPU_max_buffer_texture_size | ( | ) |
Definition at line 42 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::draw::CurvesEvalCache::batch_get().
| int GPU_max_compute_shader_storage_blocks | ( | ) |
Definition at line 195 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by is_subdivision_evaluation_possible_on_gpu().
| int GPU_max_images | ( | ) |
Definition at line 85 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_images_get().
| int GPU_max_parallel_compilations | ( | ) |
Definition at line 150 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::gpu::GLShaderCompiler::GLShaderCompiler(), blender::gpu::VKBackend::init_resources(), and blender::gpu::MTLShaderCompiler::MTLShaderCompiler().
| int GPU_max_samplers | ( | ) |
Definition at line 140 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::gpu::MSLGeneratorInterface::use_argument_buffer_for_samplers().
| int GPU_max_shader_storage_buffer_bindings | ( | ) |
Definition at line 190 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
| size_t GPU_max_storage_buffer_size | ( | ) |
Definition at line 210 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::gpu::GLStorageBuf::GLStorageBuf(), and blender::eevee::IrradianceBake::surfels_create().
| int GPU_max_texture_3d_size | ( | ) |
Definition at line 37 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::eevee::VolumeModule::init(), and blender::gpu::MTLTexture::init_internal().
| int GPU_max_texture_layers | ( | ) |
Definition at line 60 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_texture_layers_get().
| int GPU_max_texture_size | ( | ) |
Definition at line 32 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blf_glyph_draw(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), GPU_is_safe_texture_size(), GPU_texture_size_with_limit(), blender::eevee::Film::init(), pygpu_max_texture_size_get(), and texture_paint_image_from_view_exec().
| int GPU_max_textures | ( | ) |
Definition at line 80 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::gpu::MTLShaderInterface::add_texture(), blender::gpu::MTLContext::ensure_texture_bindings(), blender::gpu::MTLContext::ensure_texture_bindings(), gpu_pass_validate(), blender::gpu::MTLContext::pipeline_state_init(), pygpu_max_textures_get(), blender::gpu::MTLContext::sampler_bind(), blender::gpu::GLStateManager::texture_bind(), blender::gpu::MTLContext::texture_bind(), blender::gpu::MTLContext::texture_unbind(), and blender::gpu::MTLContext::texture_unbind_all().
| int GPU_max_textures_frag | ( | ) |
Definition at line 75 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by gpu_pass_validate(), and pygpu_max_textures_frag_get().
| int GPU_max_textures_geom | ( | ) |
Definition at line 70 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_textures_geom_get().
| int GPU_max_textures_vert | ( | ) |
Definition at line 65 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::gpu::MSLGeneratorInterface::generate_msl_textures_input_string(), gpu_pass_validate(), and pygpu_max_textures_vert_get().
| size_t GPU_max_uniform_buffer_size | ( | ) |
Definition at line 205 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::gpu::GLUniformBuf::GLUniformBuf(), and GPU_uniformbuf_create_from_list().
| int GPU_max_uniforms_frag | ( | ) |
Definition at line 105 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_uniforms_frag_get().
| int GPU_max_uniforms_vert | ( | ) |
Definition at line 100 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_uniforms_vert_get().
| int GPU_max_varying_floats | ( | ) |
Definition at line 125 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_varying_floats_get().
| int GPU_max_vertex_attribs | ( | ) |
Definition at line 120 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_vertex_attribs_get().
| int GPU_max_work_group_count | ( | int | index | ) |
Definition at line 90 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::draw::drw_subdiv_compute_dispatch(), blender::eevee::VelocityModule::geometry_steps_fill(), GPU_indexbuf_build_curves_on_device(), pygpu_compute_dispatch(), and pygpu_max_work_group_count_get().
| int GPU_max_work_group_size | ( | int | index | ) |
Definition at line 95 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by pygpu_max_work_group_size_get().
| void GPU_mem_stats_get | ( | int * | r_totalmem, |
| int * | r_freemem ) |
Definition at line 231 of file gpu_capabilities.cc.
References blender::gpu::Context::get(), and blender::gpu::Context::memory_statistics_get().
Referenced by ED_info_statusbar_string_ex(), and blender::eevee::IrradianceBake::surfels_create().
| bool GPU_mem_stats_supported | ( | ) |
Definition at line 226 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by ED_info_statusbar_string_ex(), ed_screens_statusbar_menu_create(), and blender::eevee::IrradianceBake::surfels_create().
| int GPU_minimum_per_vertex_stride | ( | ) |
Definition at line 200 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
| bool GPU_stencil_clasify_buffer_workaround | ( | ) |
Definition at line 170 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::eevee::DeferredLayer::end_sync(), and gpu_shader_create_info_init().
| bool GPU_stencil_export_support | ( | ) |
Definition at line 185 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::eevee::GBuffer::bind(), blender::eevee::DeferredLayer::end_sync(), blender::gpu::VKDevice::extensions_define(), glsl_patch_fragment_get(), and blender::gpu::VKExtensions::log().
| bool GPU_stereo_quadbuffer_support | ( | ) |
Return support for the active context + window.
Definition at line 236 of file gpu_capabilities.cc.
References blender::gpu::Context::front_right, and blender::gpu::Context::get().
Referenced by wm_stereo3d_set_exec().
| size_t GPU_storage_buffer_alignment | ( | ) |
Definition at line 215 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::gpu::GLImmediate::begin(), and blender::gpu::VKImmediate::begin().
| int GPU_texture_size_with_limit | ( | int | res | ) |
Definition at line 47 of file gpu_capabilities.cc.
References GPU_max_texture_size(), min_ii(), size(), and U.
Referenced by IMB_create_gpu_texture(), is_over_resolution_limit(), and smaller_power_of_2_limit().
| bool GPU_use_hq_normals_workaround | ( | ) |
Definition at line 165 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::draw::overlay::Curves::begin_sync(), blender::draw::overlay::Meshes::begin_sync(), blender::draw::curve_create_edit_curves_nor(), and blender::draw::drw_volume_wireframe_cb().
| bool GPU_use_main_context_workaround | ( | ) |
Definition at line 160 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by DRW_render_context_disable(), DRW_render_context_enable(), blender::eevee::LightBake::LightBake(), and blender::gpu::ShaderCompiler::ShaderCompiler().
| bool GPU_use_subprocess_compilation | ( | ) |
Definition at line 145 of file gpu_capabilities.cc.
References blender::gpu::GCaps.
Referenced by blender::eevee::Instance::draw_viewport(), and GPU_shader_builtin_warm_up().