gbm/dri: Fix sign-extension in modifier query
[mesa.git] / src / gbm / backends / dri / gbm_dri.c
index 71590d71103696efcaaa23ecdc051ae2bad5cc79..8cca35e0e06cbbda54066a0e8d5d5aad54e8491f 100644 (file)
@@ -772,7 +772,7 @@ gbm_dri_bo_get_modifier(struct gbm_bo *_bo)
                                &mod))
       return DRM_FORMAT_MOD_INVALID;
 
-   ret |= mod;
+   ret |= (uint64_t)(mod & 0xffffffff);
 
    return ret;
 }