diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-04 22:29:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-05 04:51:48 +0300 |
commit | 53685404316e05879bc9ff46837dd224ba3cce4f (patch) | |
tree | 28dfb1b80186a35c235fa1fa73804e444cfb50a8 /source/blender/gpu/intern/gpu_extensions.c | |
parent | f4261cd2ed4a1e3bfcd12a6602abdaf717c349cd (diff) |
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.
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 16 |
1 files changed, 16 insertions, 0 deletions
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") || |