Reproducible bug: NVIDIA drivers crash during GL_TEXTURE_2D mipmap generation

More details here.

Backtrace:
=>0 0xf5c69874 in libnvidia-glcore.so.340.24 (+0x1512874) (0x00000000)
  1 0xf5c6c3af in libnvidia-glcore.so.340.24 (+0x15153ae) (0xf32e0008)
  2 0xf5e33604 in libnvidia-glcore.so.340.24 (+0x16dc603) (0xf32e0008)
  3 0xf5e370d5 in libnvidia-glcore.so.340.24 (+0x16e00d4) (0x0033d478)
  4 0xf5ca3848 in libnvidia-glcore.so.340.24 (+0x154c847) (0x0033d5c8)
  5 0xf5ca3b4d in libnvidia-glcore.so.340.24 (+0x154cb4c) (0x0033d5c8)
  6 0xf5ca3bb7 in libnvidia-glcore.so.340.24 (+0x154cbb6) (0x00000000)
  7 0xf5e33cbf in libnvidia-glcore.so.340.24 (+0x16dccbe) (0xf347cc5c)
  8 0xf5e51fe9 in libnvidia-glcore.so.340.24 (+0x16fafe8) (0xf347cc5c)
  9 0xf5e6060b in libnvidia-glcore.so.340.24 (+0x170960a) (0xf32e0008)
  10 0xf5d25716 in libnvidia-glcore.so.340.24 (+0x15ce715) (0xf345d000)
  11 0xf5946506 in libnvidia-glcore.so.340.24 (+0x11ef505) (0xf347cc5c)
  12 0xf594afc2 in libnvidia-glcore.so.340.24 (+0x11f3fc1) (0x0033fc48)
  13 0xf3f1415f glGenerateMipmap+0x92(target=0xde1) [/home/focht/projects/wine/wine.repo/src/dlls/opengl32/opengl_ext.c:3136] in opengl32 (0x0033fc48)
  14 0x00402de4 in timeless (+0x22de3) (0x0033fc70)
  15 0x00404480 in timeless (+0x2447f) (0x0033fca0)
  16 0x004048a1 in timeless (+0x248a0) (0x0033fcf8)
0xf5c69874: movzwl	0x8(%ebp),%ebx
Modules:
Module	Address			Debug info	Name (109 modules)
PE	  3e0000- 9ee0000	Export          timeless 
...
ELF	f4757000-f6cea000	Dwarf           libnvidia-glcore.so.340.24
ELF	f6cea000-f6cef000	Deferred        libnvidia-tls.so.340.24