This adds an increment of buffer_count and changes a border value with ARRAY_SIZE() macro.
Signed-off-by: Mun Gwan-gyeong <elong...@gmail.com> --- src/egl/drivers/dri2/platform_drm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index d18c73cb33..4176fde7d1 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -326,7 +326,7 @@ dri2_drm_get_buffers_with_format(__DRIdrawable *driDrawable, dri2_surf->buffer_count = 0; for (i = 0, j = 0; i < 2 * count; i += 2, j++) { assert(attachments[i] < __DRI_BUFFER_COUNT); - assert(dri2_surf->buffer_count < 5); + assert(dri2_surf->buffer_count < ARRAY_SIZE(dri2_surf->buffers)); switch (attachments[i]) { case __DRI_BUFFER_BACK_LEFT: @@ -344,6 +344,7 @@ dri2_drm_get_buffers_with_format(__DRIdrawable *driDrawable, } break; } + dri2_surf->buffer_count++; } *out_count = j; -- 2.13.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev