summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2018-04-24 21:27:47 +0100
committerAdam Jackson <ajax@redhat.com>2018-04-24 16:59:08 -0400
commitc593d843f6305dd8bc5fa7762273d319a223abc4 (patch)
tree25982c5c41eb29d8954ff10f240dc3fe9cb749bc
parent54ac09717cd8c49259f53a4a227d903ebe8e0a32 (diff)
dri3: Don't call vfuncs on old DRI3 screens
Only call the get_supported_modifiers vfunc if the DRI3 screen struct is sufficiently new. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--dri3/dri3_screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c
index 23e33f401..a1d6f47dd 100644
--- a/dri3/dri3_screen.c
+++ b/dri3/dri3_screen.c
@@ -171,7 +171,7 @@ cache_formats_and_modifiers(ScreenPtr screen)
if (!info)
return BadImplementation;
- if (!info->get_formats || !info->get_modifiers) {
+ if (info->version < 2 || !info->get_formats || !info->get_modifiers) {
ds->formats = NULL;
ds->num_formats = 0;
ds->formats_cached = TRUE;