[PATCH 6/6] wined3d: Disable ARB_draw_indirect if ARB_base_instance is not available.
Józef Kucia <[email protected]> Fri, 3 Nov 2017 14:35:20 +0100
| Newsgroups | gmane.comp.emulators.wine.patches |
|---|---|
| Message-ID | <[email protected]> |
From: Józef Kucia <[email protected]> Avoids undefined behavior. Signed-off-by: Józef Kucia <[email protected]> --- 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 c89d55642f37..ee04b12bed40 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); -- 2.13.6