[Mesa-dev] [PATCH 08/10] egl: don't set modifier if no modifiers are available
Emil Velikov
emil.l.velikov at gmail.com
Fri Jun 30 11:15:18 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
If no modifiers are available, the variable will never be used. Thus
there's no point in initialising it.
Cc: Varad Gautam <varad.gautam at collabora.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/drivers/dri2/egl_dri2.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index c96f0e0d21b..a641d774523 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -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) {
--
2.13.0
More information about the mesa-dev
mailing list