Workaround for NVidia broken driver

This disable the indirect drawcall on all Nvidia hardware.

This has to be until nvidia fixes their drivers or instruct us
how to correctly fix the issue.

Related to T70011 Various display issues on NVIDIA
after draw call batching.
This commit is contained in:
Clément Foucault 2019-10-02 14:13:41 +02:00
parent d596a6368c
commit f8f28dc784
2 changed files with 5 additions and 4 deletions

View File

@ -3890,9 +3890,7 @@ static void nodelink_batch_draw(SpaceNode *snode)
void nodelink_batch_start(SpaceNode *UNUSED(snode))
{
/* TODO: partial workaround for NVIDIA driver bug on recent GTX/RTX cards,
* that breaks instancing when using indirect draw-call (see T70011). */
g_batch_link.enabled = !GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY);
g_batch_link.enabled = true;
}
void nodelink_batch_end(SpaceNode *snode)

View File

@ -718,8 +718,11 @@ void GPU_draw_primitive(GPUPrimType prim_type, int v_count)
#if 0
# define USE_MULTI_DRAW_INDIRECT 0
#else
/* TODO: partial workaround for NVIDIA driver bug on recent GTX/RTX cards,
* that breaks instancing when using indirect draw-call (see T70011). */
# define USE_MULTI_DRAW_INDIRECT \
(GL_ARB_multi_draw_indirect && GPU_arb_base_instance_is_supported())
(GL_ARB_multi_draw_indirect && GPU_arb_base_instance_is_supported() && \
!GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_OFFICIAL))
#endif
typedef struct GPUDrawCommand {