Module: wine Branch: master Commit: 2c51fc1bfc1d551aebb47616c19d3329c5e0f7f6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2c51fc1bfc1d551aebb47616c1...
Author: Józef Kucia jkucia@codeweavers.com Date: Fri Nov 3 14:35:20 2017 +0100
wined3d: Disable ARB_draw_indirect if ARB_base_instance is not available.
Avoids undefined behavior.
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/directx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c89d556..ee04b12 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -4211,9 +4211,17 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, if (gl_info->supported[ARB_TEXTURE_STORAGE] && gl_info->supported[APPLE_YCBCR_422]) { /* AFAIK APPLE_ycbcr_422 is only available in legacy contexts so we shouldn't ever hit this. */ - FIXME("Disabling APPLE_ycbcr_422 because of ARB_texture_storage.\n"); + ERR("Disabling APPLE_ycbcr_422 because of ARB_texture_storage.\n"); gl_info->supported[APPLE_YCBCR_422] = FALSE; } + if (gl_info->supported[ARB_DRAW_INDIRECT] && !gl_info->supported[ARB_BASE_INSTANCE]) + { + /* If ARB_base_instance is not supported the baseInstance field + * in indirect draw parameters must be 0 or behavior is undefined. + */ + WARN("Disabling ARB_draw_indirect because ARB_base_instance is not supported.\n"); + gl_info->supported[ARB_DRAW_INDIRECT] = FALSE; + }
wined3d_adapter_init_limits(gl_info);