summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-05-03 11:13:12 +0100
committerEmil Velikov <[email protected]>2016-05-24 23:03:00 +0100
commitf8a114aa5c1141c1a5e4052deeeafd164fb5f1ef (patch)
tree6620bcfb76537ae96b1d3d3b92e9f598b4052326 /src/gallium/state_trackers
parent923bdbf48c4113326773e98c786e4405b2e1838b (diff)
st/dri: add note about GL interop version checks
... and make them more explicit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 8b6af600e32..15e34431881 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1468,7 +1468,8 @@ dri2_interop_query_device_info(__DRIcontext *_ctx,
{
struct pipe_screen *screen = dri_context(_ctx)->st->pipe->screen;
- if (!out->version)
+ /* There is no version 0, thus we do not support it */
+ if (out->version == 0)
return MESA_GLINTEROP_INVALID_VERSION;
out->pci_segment_group = screen->get_param(screen, PIPE_CAP_PCI_GROUP);
@@ -1497,7 +1498,8 @@ dri2_interop_export_object(__DRIcontext *_ctx,
unsigned target, usage;
boolean success;
- if (!in->version || !out->version)
+ /* There is no version 0, thus we do not support it */
+ if (in->version == 0 || out->version == 0)
return MESA_GLINTEROP_INVALID_VERSION;
/* Validate the target. */