From patchwork Mon Mar 12 00:48:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 7214 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C8CE523E00 for ; Mon, 12 Mar 2012 00:48:47 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8C384A18393 for ; Mon, 12 Mar 2012 00:48:47 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so7826951iag.11 for ; Sun, 11 Mar 2012 17:48:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=UFlOxaJImtM5ZGo1OCZbDpvFIlEKL5va/l7VlD0CqrM=; b=IEINkimiIRHco9y1ZWlpi8ZWjaq/NDWPVVCGY3nGnPdAq4zWQRGsPaMp38A+/L9Ol8 AU33g1k8IwcKLp1LwMAIXZO26pGiwptQcAmFquUoP41ZzvL/ujF76kgScOJ/zhDshLFE O5fskSYGt3epkX6trU56U5S5F5OheqGp7UKQOy1ENZ8gvo4PEJKlT0w10wJx/KKIPXWn TADQ1Eh6pmCXsPy9Q1vyUo5ldzwDlII5dIevSR28DLU5jOd/J9Eu3o8FDSzMYKwx8WuR UfJZtqoIzupZo/vlXaQXLY4tA3+Zia8TT8PWkCB1JIS5j+b/z1F9xTXqSNGnmXjSjkSY 7jpg== Received: by 10.50.158.133 with SMTP id wu5mr16172821igb.50.1331513327369; Sun, 11 Mar 2012 17:48:47 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.53.18 with SMTP id k18csp30741ibg; Sun, 11 Mar 2012 17:48:47 -0700 (PDT) Received: by 10.101.138.33 with SMTP id q33mr3496481ann.76.1331513326726; Sun, 11 Mar 2012 17:48:46 -0700 (PDT) Received: from mail-gy0-f178.google.com (mail-gy0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id e42si12166536yhh.121.2012.03.11.17.48.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Mar 2012 17:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-gy0-f178.google.com with SMTP id f1so2464189ghb.37 for ; Sun, 11 Mar 2012 17:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=UFlOxaJImtM5ZGo1OCZbDpvFIlEKL5va/l7VlD0CqrM=; b=lf7Spm3c/PHPYoU7V6f+5+XND3G3WAb5ifBw2jWVBEaT/EXZxKMAb4EsRWJ6NnKTQi 6liwWwhaAZuKySg3pu7zNNfAEQtOybMXkNMDU9oIgSbRZzgibht9cfMV0Q35VP213S3g Ibg9E56t1PAIeM2IWtVbXkzgHcKr4w9RSttz7xs4ouiJd+dajAvyO9iGx0kHueKD62GG OaiaIPJpWr4JrnsvLxY3aJGCmJZaC0K6JWFh4IMvSRLwVWAe8NvrRTUN6IXgffYDTdew U+Y3FUr3ywDag0BAkNKNuDoB9DRyxA9qR0kNR46qIT14f9gs2psWSlEynRfmiRcdbue2 KH8g== Received: by 10.60.28.137 with SMTP id b9mr5706264oeh.57.1331513326490; Sun, 11 Mar 2012 17:48:46 -0700 (PDT) Received: from localhost (ppp-70-129-134-19.dsl.rcsntx.swbell.net. [70.129.134.19]) by mx.google.com with ESMTPS id s9sm8684939oee.2.2012.03.11.17.48.45 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Mar 2012 17:48:46 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: wayland-devel@lists.freedesktop.org Cc: patches@linaro.org, Rob Clark Subject: [PATCH 5/5] RFC: add eglWaitGL() Date: Sun, 11 Mar 2012 19:48:45 -0500 Message-Id: <1331513325-1554-5-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1331513325-1554-1-git-send-email-rob.clark@linaro.org> References: <1331513325-1554-1-git-send-email-rob.clark@linaro.org> X-Gm-Message-State: ALoCoQlWh9mSSJsbAPjW9TYO4ntzCc/6A8fD4beuXxbLUtiJOHrX/FM7W1ytKwRaD6yO9gSWArPs From: Rob Clark For deferred rendering GPUs, some magic under the hood of eglSwapBuffers() is responsible for making sure rendering has actually started. (glFlush() doesn't do the trick.) I've managed to make weston drm compositor work on sgx/pvr stack (plus omapdrm providing the KMS bits) by getting eglWaitGL() to do the work that would normally be done in eglSwapBuffers(), in case that the surfaceless_gles2 extension is in use (as detected by eglMakeCurrent() call). I'm not sure if this eglWaitGL() call would potentially cause issues on other GL(ES) stacks? Or if it is a suitable work-around until the gbm-surface stuff is in use? --- src/compositor-drm.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index c8e6eaf..f556ac3 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -246,6 +246,7 @@ drm_output_repaint(struct weston_output *output_base, weston_surface_draw(surface, &output->base, damage); glFlush(); + eglWaitGL(); output->current ^= 1;