Commit f8a114aa authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

st/dri: add note about GL interop version checks

... and make them more explicit.
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Tested-by: default avatarTom Stellard <thomas.stellard@amd.com>
parent 923bdbf4
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment