diff options
author | Jeroen Bakker <jbakker> | 2020-03-19 10:06:49 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-03-19 10:26:48 +0300 |
commit | fd48ff1296f45b32bffeca2c60dca2a12bb84229 (patch) | |
tree | 250137802d4bed0628a7926df724227349320757 /source/blender/editors | |
parent | fe045b2b77dc6d7f0b552619fe824b496d34db6c (diff) |
Fix T73931: Stereo Viewport Color Management
Stereoscopic viewport didn't support Color Manangement due recent
changes in the color management pipeline. In order to solve the issue we
will migrate the strereo rendering into the GPUViewport. This will share
some textures and reduce required GPU memory.
Reviewed By: fclem, dfelinto
Differential Revision: https://developer.blender.org/D6922
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 42a8a746eef..1fff40ab73a 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -646,8 +646,7 @@ static void image_main_region_draw(const bContext *C, ARegion *region) * old context since we now use it for drawing the entire area. */ gpu_batch_presets_reset(); - GPUViewport *viewport = - region->draw_buffer->viewport[region->draw_buffer->stereo ? sima->iuser.multiview_eye : 0]; + GPUViewport *viewport = region->draw_buffer->viewport; DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(viewport); GPU_framebuffer_bind(fbl->default_fb); GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 78d053c36a7..75865bc50e1 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -855,7 +855,7 @@ void ED_view3d_draw_depth(Depsgraph *depsgraph, ARegion *region, View3D *v3d, bo WM_draw_region_viewport_ensure(region, SPACE_VIEW3D); WM_draw_region_viewport_bind(region); - GPUViewport *viewport = WM_draw_region_get_viewport(region, 0); + GPUViewport *viewport = WM_draw_region_get_viewport(region); /* When Blender is starting, a click event can trigger a depth test while the viewport is not * yet available. */ if (viewport != NULL) { @@ -2216,7 +2216,7 @@ void ED_view3d_backbuf_depth_validate(ViewContext *vc) Object *obact_eval = DEG_get_evaluated_object(vc->depsgraph, vc->obact); if (obact_eval && ((obact_eval->base_flag & BASE_VISIBLE_DEPSGRAPH) != 0)) { - GPUViewport *viewport = WM_draw_region_get_viewport(region, 0); + GPUViewport *viewport = WM_draw_region_get_viewport(region); DRW_draw_depth_object(vc->region, vc->v3d, viewport, obact_eval); } @@ -2279,7 +2279,7 @@ void view3d_update_depths_rect(ARegion *region, ViewDepths *d, rcti *rect) } if (d->damaged) { - GPUViewport *viewport = WM_draw_region_get_viewport(region, 0); + GPUViewport *viewport = WM_draw_region_get_viewport(region); view3d_opengl_read_Z_pixels(viewport, rect, d->depths); glGetDoublev(GL_DEPTH_RANGE, d->depth_range); d->damaged = false; @@ -2308,7 +2308,7 @@ void ED_view3d_depth_update(ARegion *region) } if (d->damaged) { - GPUViewport *viewport = WM_draw_region_get_viewport(region, 0); + GPUViewport *viewport = WM_draw_region_get_viewport(region); rcti r = { .xmin = 0, .xmax = d->w, @@ -2355,7 +2355,7 @@ void ED_view3d_draw_depth_gpencil(Depsgraph *depsgraph, Scene *scene, ARegion *r GPU_depth_test(true); - GPUViewport *viewport = WM_draw_region_get_viewport(region, 0); + GPUViewport *viewport = WM_draw_region_get_viewport(region); DRW_draw_depth_loop_gpencil(depsgraph, region, v3d, viewport); GPU_depth_test(false); |