st/dri: Don't require a dri_format for image creation.
[mesa.git] / src / gallium / state_trackers / dri / dri2.c
index e980698cfb6f1c4eaf038f6a30cfe81ad9c78f53..34205853335ca2e430105ea6f3cd20d2462add4f 100644 (file)
@@ -1318,7 +1318,7 @@ dri2_query_image(__DRIimage *image, int attrib, int *value)
       return GL_TRUE;
    case __DRI_IMAGE_ATTRIB_FOURCC:
       *value = convert_to_fourcc(image->dri_format);
-      return GL_TRUE;
+      return *value != -1;
    case __DRI_IMAGE_ATTRIB_NUM_PLANES:
       *value = 1;
       return GL_TRUE;