Blender Git Loki

Git Commits -> Revision bc15ec0

Revision bc15ec0 by Clément Foucault (master)
March 25, 2018, 18:06 (GMT)
GPUFramebuffer: Refactor (Part 2)

This refactor modernise the use of framebuffers.
It also touches a lot of files so breaking down changes we have:
- GPUTexture: Allow textures to be attached to more than one GPUFrameBuffer.
This allows to create and configure more FBO without the need to attach
and detach texture at drawing time.
- GPUFrameBuffer: The wrapper starts to mimic opengl a bit closer. This
allows to configure the framebuffer inside a context other than the one
that will be rendering the framebuffer. We do the actual configuration
when binding the FBO. We also Keep track of config validity and save
drawbuffers state in the FBO. We remove the different bind/unbind
functions. These make little sense now that we have separate contexts.
- DRWFrameBuffer: We replace DRW_framebuffer functions by GPU_framebuffer
ones to avoid another layer of abstraction. We move the DRW convenience
functions to GPUFramebuffer instead and even add new ones. The MACRO
GPU_framebuffer_ensure_config is pretty much all you need to create and
config a GPUFramebuffer.
- DRWTexture: Due to the removal of DRWFrameBuffer, we needed to create
functions to create textures for thoses framebuffers. Pool textures are
now using default texture parameters for the texture type asked.
- DRWManager: Make sure no framebuffer object is bound when doing cache
filling.
- GPUViewport: Add new color_only_fb and depth_only_fb along with FB API
usage update. This let draw engines render to color/depth only target
and without the need to attach/detach textures.
- WM_window: Assert when a framebuffer is bound when changing context.
This balance the fact we are not track ogl context inside GPUFramebuffer.
- Eevee, Clay, Mode engines: Update to new API. This comes with a lot of
code simplification.

This also come with some cleanups in some engine codes.

Commit Details:

Full Hash: bc15ec0896c2deba2e2a45581fd0f408d4906df4
Parent Commit: f937123
Lines Changed: +1387, -1666

1 Deleted Path:

/source/blender/draw/intern/draw_manager_framebuffer.c (+0, -189)

34 Modified Paths:

/source/blender/draw/CMakeLists.txt (+0, -1) (Diff)
/source/blender/draw/DRW_engine.h (+2, -0) (Diff)
/source/blender/draw/engines/clay/clay_engine.c (+32, -37) (Diff)
/source/blender/draw/engines/clay/shaders/clay_frag.glsl (+4, -3) (Diff)
/source/blender/draw/engines/eevee/eevee_bloom.c (+32, -35) (Diff)
/source/blender/draw/engines/eevee/eevee_data.c (+7, -4) (Diff)
/source/blender/draw/engines/eevee/eevee_depth_of_field.c (+38, -54) (Diff)
/source/blender/draw/engines/eevee/eevee_effects.c (+65, -77) (Diff)
/source/blender/draw/engines/eevee/eevee_engine.c (+33, -28) (Diff)
/source/blender/draw/engines/eevee/eevee_lightprobes.c (+76, -108) (Diff)
/source/blender/draw/engines/eevee/eevee_lights.c (+23, -34) (Diff)
/source/blender/draw/engines/eevee/eevee_materials.c (+11, -12) (Diff)
/source/blender/draw/engines/eevee/eevee_mist.c (+10, -8) (Diff)
/source/blender/draw/engines/eevee/eevee_motion_blur.c (+1, -1) (Diff)
/source/blender/draw/engines/eevee/eevee_occlusion.c (+41, -34) (Diff)
/source/blender/draw/engines/eevee/eevee_private.h (+37, -33) (Diff)
/source/blender/draw/engines/eevee/eevee_render.c (+74, -43) (Diff)
/source/blender/draw/engines/eevee/eevee_screen_raytrace.c (+38, -56) (Diff)
/source/blender/draw/engines/eevee/eevee_subsurface.c (+81, -117) (Diff)
/source/blender/draw/engines/eevee/eevee_temporal_sampling.c (+11, -11) (Diff)
/source/blender/draw/engines/eevee/eevee_volumes.c (+31, -36) (Diff)
/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl (+4, -11) (Diff)
/source/blender/draw/intern/draw_manager.c (+20, -7) (Diff)
/source/blender/draw/intern/draw_manager_texture.c (+27, -0) (Diff)
/source/blender/draw/intern/DRW_render.h (+19, -41) (Diff)
/source/blender/draw/modes/edit_mesh_mode.c (+13, -26) (Diff)
/source/blender/draw/modes/object_mode.c (+32, -34) (Diff)
/source/blender/gpu/GPU_framebuffer.h (+86, -20) (Diff)
/source/blender/gpu/GPU_texture.h (+2, -3) (Diff)
/source/blender/gpu/intern/gpu_framebuffer.c (+409, -432) (Diff)
/source/blender/gpu/intern/gpu_lamp.c (+12, -67) (Diff)
/source/blender/gpu/intern/gpu_texture.c (+39, -19) (Diff)
/source/blender/gpu/intern/gpu_viewport.c (+69, -85) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+8, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021