From 8527d84d3588563123bfad7ccbdeeff62ee90bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sat, 29 Aug 2020 15:17:13 +0200 Subject: GPUState: Move Scissor and Viewport state to framebuffer This way it is way clearer what each viewport state is. There is no more save and reset. The scissor test is also saved per framebuffer. The only rule to remember is that the viewport state (size and origin) is reset for both the viewport and scissor when a texture is attached or detached from an attachment slot. --- source/blender/draw/engines/eevee/eevee_motion_blur.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/draw/engines/eevee/eevee_motion_blur.c') diff --git a/source/blender/draw/engines/eevee/eevee_motion_blur.c b/source/blender/draw/engines/eevee/eevee_motion_blur.c index fa517e2d5c9..f10a3f42077 100644 --- a/source/blender/draw/engines/eevee/eevee_motion_blur.c +++ b/source/blender/draw/engines/eevee/eevee_motion_blur.c @@ -616,6 +616,8 @@ void EEVEE_motion_blur_draw(EEVEE_Data *vedata) DRW_draw_pass(psl->velocity_tiles_expand[buf]); + GPU_framebuffer_viewport_reset(fbl->velocity_tiles_fb[buf]); + buf = buf ? 0 : 1; } -- cgit v1.2.3