egl: don't set modifier if no modifiers are available
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 28 Jun 2017 23:24:27 +0000 (00:24 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 12 Jul 2017 14:43:15 +0000 (15:43 +0100)
If no modifiers are available, the variable will never be used. Thus
there's no point in initialising it.

Cc: Varad Gautam <varad.gautam@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/egl/drivers/dri2/egl_dri2.c

index c96f0e0d21bf535971af85cb4d2b770c3b0a411f..a641d7745230e9829d7a022184ba5e62bb183da8 100644 (file)
@@ -2238,8 +2238,6 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
       modifier = (uint64_t) attrs.DMABufPlaneModifiersHi[0].Value << 32;
       modifier |= (uint64_t) (attrs.DMABufPlaneModifiersLo[0].Value & 0xffffffff);
       has_modifier = true;
-   } else {
-      modifier = DRM_FORMAT_MOD_INVALID;
    }
 
    if (has_modifier) {