[PATCH 6/6] wined3d: Disable ARB_draw_indirect if ARB_base_instance is not available.
Józef Kucia
joseph.kucia at gmail.com
Fri Nov 3 08:35:20 CDT 2017
From: Józef Kucia <jkucia at codeweavers.com>
Avoids undefined behavior.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
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
More information about the wine-patches
mailing list