From 53685404316e05879bc9ff46837dd224ba3cce4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 4 Dec 2018 20:29:30 +0100 Subject: Workbench: Fix workbench broken on some config due to usuned fb slot This seems to be a driver bug. Only windows + Radeon HD 7500M seems to be affected. Fix can be extended to more config if necessary. --- source/blender/gpu/intern/gpu_extensions.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/blender/gpu/intern/gpu_extensions.c') diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 99f770b4d03..92d91bd440d 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -95,6 +95,9 @@ static struct GPUGlobal { * GPU_DEPTH32F_STENCIL8. Then Blitting depth will work but blitting stencil will * still be broken. */ bool depth_blitting_workaround; + /* Crappy driver don't know how to map framebuffer slot to output vars... + * We need to have no "holes" in the output buffer slots. */ + bool unused_fb_slot_workaround; } GG = {1, 0}; @@ -211,6 +214,11 @@ bool GPU_depth_blitting_workaround(void) return GG.depth_blitting_workaround; } +bool GPU_unused_fb_slot_workaround(void) +{ + return GG.unused_fb_slot_workaround; +} + void gpu_extensions_init(void) { /* during 2.8 development each platform has its own OpenGL minimum requirements @@ -262,6 +270,14 @@ void gpu_extensions_init(void) GG.device = GPU_DEVICE_ATI; GG.driver = GPU_DRIVER_OFFICIAL; +#ifdef _WIN32 + if (strstr(vendor, "Radeon HD 7500M") || + strstr(vendor, "Radeon HD 7570M")) + { + GG.unused_fb_slot_workaround = true; + } +#endif + #if defined(__APPLE__) if (strstr(renderer, "AMD Radeon Pro") || strstr(renderer, "AMD Radeon R9") || -- cgit v1.2.3