Blender
V3.3
|
Go to the source code of this file.
Typedefs | |
typedef struct GPUContext | GPUContext |
Functions | |
bool | GPU_backend_supported (void) |
eGPUBackendType | GPU_backend_get_type (void) |
GPUContext * | GPU_context_create (void *ghost_window) |
void | GPU_context_discard (GPUContext *) |
void | GPU_context_active_set (GPUContext *) |
GPUContext * | GPU_context_active_get (void) |
void | GPU_context_begin_frame (GPUContext *ctx) |
void | GPU_context_end_frame (GPUContext *ctx) |
void | GPU_context_main_lock (void) |
void | GPU_context_main_unlock (void) |
void | GPU_render_begin (void) |
void | GPU_render_end (void) |
void | GPU_render_step (void) |
This interface allow GPU to manage VAOs for multiple context and threads.
Definition in file GPU_context.h.
typedef struct GPUContext GPUContext |
Opaque type hiding blender::gpu::Context.
Definition at line 24 of file GPU_context.h.
eGPUBackendType GPU_backend_get_type | ( | void | ) |
Definition at line 274 of file gpu_context.cc.
References g_backend, GPU_BACKEND_METAL, GPU_BACKEND_NONE, and GPU_BACKEND_OPENGL.
Referenced by DRW_custom_pipeline(), is_subdivision_evaluation_possible_on_gpu(), and standard_defines().
Definition at line 218 of file gpu_context.cc.
References BLI_assert, g_backend_type, GPU_BACKEND_METAL, and GPU_BACKEND_OPENGL.
Referenced by gpu_backend_create(), RE_engine_render(), and WM_init_opengl().
GPUContext* GPU_context_active_get | ( | void | ) |
Definition at line 142 of file gpu_context.cc.
References blender::bke::image::partial_update::wrap().
Referenced by blender::gpu::MTLFrameBuffer::apply_state(), blender::gpu::MTLFrameBuffer::bake_render_pass_descriptor(), blender::gpu::MTLQueryPool::begin_query(), blender::gpu::MTLFrameBuffer::bind(), blender::gpu::MTLFrameBuffer::blit(), blender::gpu::MTLFrameBuffer::clear(), blender::gpu::MTLFrameBuffer::clear_attachment(), blender::gpu::MTLTexture::copy_to(), DRW_opengl_context_release(), blender::gpu::MTLQueryPool::end_query(), blender::gpu::MTLBackend::framebuffer_alloc(), blender::gpu::MTLTexture::generate_mipmap(), blender::gpu::MTLQueryPool::get_occlusion_result(), blender::gpu::MTLStateManager::issue_barrier(), pygpu_framebuffer__tp_new(), pygpu_offscreen__tp_new(), pygpu_texture__tp_new(), pygpu_uniformbuffer__tp_new(), blender::gpu::MTLStateManager::texture_bind(), blender::gpu::MTLStateManager::texture_unbind(), blender::gpu::MTLStateManager::texture_unbind_all(), blender::gpu::MTLStateManager::texture_unpack_row_length_set(), blender::gpu::MTLUniformBuf::update(), blender::gpu::MTLTexture::update_sub(), WM_init(), blender::gpu::MTLContext::~MTLContext(), blender::gpu::MTLFrameBuffer::~MTLFrameBuffer(), and blender::gpu::MTLTexture::~MTLTexture().
void GPU_context_active_set | ( | GPUContext * | ctx_ | ) |
Ctx can be NULL.
Definition at line 127 of file gpu_context.cc.
References blender::gpu::Context::activate(), active_ctx, blender::gpu::Context::deactivate(), and blender::bke::image::partial_update::unwrap().
Referenced by drw_deferred_shader_add(), drw_deferred_shader_compilation_exec(), drw_deferred_shader_compilation_free(), DRW_gpu_render_context_disable(), DRW_gpu_render_context_enable(), DRW_opengl_context_activate(), DRW_opengl_context_destroy(), DRW_opengl_context_disable_ex(), DRW_opengl_context_enable_ex(), DRW_opengl_context_release(), extrawindow_do_draw(), extrawindow_do_reshape(), GPU_context_create(), loggerwindow_do_draw(), loggerwindow_do_reshape(), mainwindow_do_draw(), mainwindow_do_reshape(), RE_gl_context_destroy(), wm_ghostwindow_destroy(), wm_main_playanim_intern(), wm_surface_clear_drawable(), wm_surface_set_drawable(), WM_window_pixel_sample_read(), WM_window_pixels_read(), and wm_window_set_drawable().
void GPU_context_begin_frame | ( | GPUContext * | ctx | ) |
Definition at line 147 of file gpu_context.cc.
References blender::gpu::Context::begin_frame(), and blender::bke::image::partial_update::unwrap().
Referenced by wm_draw_surface(), wm_draw_window(), and WM_init().
GPUContext* GPU_context_create | ( | void * | ghost_window | ) |
Definition at line 93 of file gpu_context.cc.
References backend_users_mutex, gpu_backend_create(), GPU_context_active_set(), lock, num_backend_users, and blender::bke::image::partial_update::wrap().
Referenced by drw_deferred_shader_add(), DRW_opengl_context_create(), eevee_lightbake_context_enable(), extrawindow_new(), blender::gpu::shader_builder::ShaderBuilder::init(), loggerwindow_new(), mainwindow_new(), RE_gpu_context_get(), blender::gpu::GPUTest::SetUp(), wm_main_playanim_intern(), and wm_window_ghostwindow_add().
void GPU_context_discard | ( | GPUContext * | ctx_ | ) |
To be called after #GPU_context_active_set(ctx_to_destroy).
Definition at line 110 of file gpu_context.cc.
References active_ctx, backend_users_mutex, BLI_assert, gpu_backend_discard(), lock, num_backend_users, and blender::bke::image::partial_update::unwrap().
Referenced by drw_deferred_shader_compilation_free(), DRW_opengl_context_destroy(), eevee_lightbake_delete_resources(), blender::gpu::shader_builder::ShaderBuilder::exit(), RE_gl_context_destroy(), blender::gpu::GPUTest::TearDown(), wm_ghostwindow_destroy(), and wm_main_playanim_intern().
void GPU_context_end_frame | ( | GPUContext * | ctx | ) |
Definition at line 155 of file gpu_context.cc.
References blender::gpu::Context::end_frame(), and blender::bke::image::partial_update::unwrap().
Referenced by wm_draw_surface(), wm_draw_window(), and WM_init().
Definition at line 171 of file gpu_context.cc.
References main_context_mutex.
Referenced by drw_deferred_shader_compilation_exec(), DRW_render_context_enable(), eevee_lightbake_context_enable(), and wm_draw_update().
Definition at line 176 of file gpu_context.cc.
References main_context_mutex.
Referenced by drw_deferred_shader_compilation_exec(), DRW_render_context_disable(), eevee_lightbake_context_disable(), and wm_draw_update().
Definition at line 190 of file gpu_context.cc.
References BLI_assert, and blender::gpu::GPUBackend::render_begin().
Referenced by drw_deferred_shader_compilation_exec(), DRW_opengl_context_enable_ex(), DRW_render_to_image(), wm_draw_update(), and WM_init().
Definition at line 196 of file gpu_context.cc.
References BLI_assert, and blender::gpu::GPUBackend::render_end().
Referenced by drw_deferred_shader_compilation_exec(), DRW_opengl_context_disable_ex(), DRW_render_to_image(), wm_draw_update(), and WM_init().
Definition at line 202 of file gpu_context.cc.
References BLI_assert, and blender::gpu::GPUBackend::render_step().
Referenced by EEVEE_render_draw(), wm_draw_update(), and workbench_render().