From patchwork Wed Jun 7 14:51:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 103267 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp1796723obh; Wed, 7 Jun 2017 07:52:00 -0700 (PDT) X-Received: by 10.84.224.1 with SMTP id r1mr28989047plj.262.1496847120411; Wed, 07 Jun 2017 07:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496847120; cv=none; d=google.com; s=arc-20160816; b=y4j/DRUirrGigkNQCcQoNfyKB+lNEZuinkS+FX5DUe7I3Z5AHRxKena8uSUuPKpiR5 t/fWjurT2EM9Wcc+RbWCG+KwSfPf7zeQCF7Ypm0Zswu1Pz/RIO3xwTjH3V3iMpCqIbGD 9PHhiOPCF4DMoc5aGoEtm/reqXLghEU5JjHUsxlNba0Tr1Fd7vo0PuIfwL0BvmYKh/Le cerWrDVSTyTueJUsweHaT1QofGPnG8tT/WeV8ONu+DbnxwyWZZPaUFTT+7l9dXbRHYDK ABpT1osa6thMkjFqUe5XyE28cYJOmJHb59/onunZJNQ9XnTQJ9eLEgVuutox4F4dw85a 1wkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=4/Gyu7IrcPh5cj494IBiWLn8hQCJMyNJhbFTsNA5AF0=; b=z4ihp7dNpTa6RaDPIwbOI/eYn6mwwFg+TZ9ePq8920NNoIaCe+9kGZaFaVdwIR3ODx OdHDEXlpNETarDcZJt7zBHIkgiNzpAz00iUSYyhOY0gGhIO7u6QdI6NXtgtzDyqC/uhB ORIKtS4Fp137tte9OmcFmLJC3XSt0fLQzT/UuwyHIQqnOPidj4rhl6RM5JZMgD6XCVlq /t43aZYB6bSY1hkPaXkdtUDl7baUU/Yv7LIxW/VOlNyl8mtf9mpVY03k4+yM0yOcsM8M FHMMZatdSfNAy8DyBuJSkqqVvQR2N3EBhtCx4vJgedrJJHsvT5L5dW+K0yPgg4j+tDFX QkDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id t2si2030687plj.60.2017.06.07.07.52.00; Wed, 07 Jun 2017 07:52:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id AF9E0780BD; Wed, 7 Jun 2017 14:51:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by mail.openembedded.org (Postfix) with ESMTP id 2D72F780F3 for ; Wed, 7 Jun 2017 14:51:53 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id p7so6590426oif.2 for ; Wed, 07 Jun 2017 07:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+9vqCrhooU++hH7LUYZMPJR7aHEvPDwPWC5FlULkAFE=; b=J5wGVigQ7Wi6p9b5pRCGLqPgvo8zs8cNTaPlRxWEGvcbxY+7d08O/hhVqTqr7NsyuL euEqtrox6D0NXyzJusxdlX5FSIxxmofE6k5vsF3t4AUjO6+ly+cu3ySLCYdXxt8euVeX a+ardTP2xyajeeLhX1p/xIZj/9FibgOQ8pL+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+9vqCrhooU++hH7LUYZMPJR7aHEvPDwPWC5FlULkAFE=; b=ukQgKG9GbJXKRe3rpXCk4DymhJan69xnLB0xSWQkOIp4Kd6bSbgMZQqgdPYSAvrjAK PuWTXzw7m/tyy/q+YrVQIzpgDY9+BIlGRK1GCzSCay31BhIC0q+nl03dB4icEPwiTUJy 4cNiqNGneFEuJigfNdOcDeIvk7QFG4nfdr4CFCKaO37qX/xoPjDXNLZJTdNPtpbJU1q+ KzTKz/+8pxs4IxXczftv0pzQYBNZqVIfHkUTQecjBON1b/Tf8vNyFpcPx6b/7lev+ixF jhIcsvqwgdsXOaG7HrhIER6j1whKEIgawtrGziodgiJs3+uDuG41bAmaarlGSPs+H5Q+ huXw== X-Gm-Message-State: AODbwcAGgg8I76nXyVLTIg5/Usf4uwPBKsqZAf3T/btbiQcsVvNCSS7F Rsf/SRYiA2UMQbZhbQPN2Q== X-Received: by 10.202.80.209 with SMTP id e200mr3194270oib.18.1496847114759; Wed, 07 Jun 2017 07:51:54 -0700 (PDT) Received: from aura.cortijodelrio.net (CableLink67-82.telefonia.InterCable.net. [201.172.67.82]) by smtp.googlemail.com with ESMTPSA id f35sm986880otd.15.2017.06.07.07.51.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jun 2017 07:51:53 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Wed, 7 Jun 2017 09:51:19 -0500 Message-Id: <1496847081-30528-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH 1/3 v2][pyro] piglit: depend on virtual/egl X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org [Backported from master.] While building for Hikey using Mali 450 driver (r6p0), an error like the following appears while linking: [ 1%] Linking C shared library ../../../../lib/libpiglitutil.so [...] [...]/aarch64-linaro-linux/gcc/aarch64-linaro-linux/6.3.1/ld: cannot find -lEGL collect2: error: ld returned 1 exit status make[2]: *** [lib/libpiglitutil.so.0] Error 1 Mesa generally provides virtual/egl (along with virtual/libgl, which satisfies Piglit's current DEPENDS) but that is not the implementation to use with Mali. Signed-off-by: Daniel Díaz --- v2: No change, just resending. meta/recipes-graphics/piglit/piglit_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index d6bfb14..eae3eed 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb @@ -14,7 +14,7 @@ PV = "1.0+gitr${SRCPV}" S = "${WORKDIR}/git" -DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native" +DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl" inherit cmake python3native distro_features_check bash-completion # depends on virtual/libx11 From patchwork Wed Jun 7 14:51:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 103270 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp1796834obh; Wed, 7 Jun 2017 07:52:18 -0700 (PDT) X-Received: by 10.101.77.74 with SMTP id j10mr29891399pgt.43.1496847138401; Wed, 07 Jun 2017 07:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496847138; cv=none; d=google.com; s=arc-20160816; b=wmJ5jNA5mdbBaHdjxR3eEC2BAVdVumjA3WwC7fHTn7+5Moml4eMu6NPA0PxOVT3gvh 452nkZiag9KQG4kAQ7LUQOSyh/PG3UWJ1ZC4y0SuzaH67M+svuAf48UvonuSdx7kPsY/ X90woKWsgV2lDpVn9o0aLPQbCRDln2vFAYLsa4Zm+9dBAWCROCRMofA8tDRhUrUvZ00e f1ySMBy7TSI4+/uH/dGv7wd4BmUIH/kT1ssCFVykFQ8BMUWeklxvnWT+hD7Qxa63LscI ohWU2nsC6Y1Z9z4XQIEheZ/J5URbMrWtU3Q3FB3l1JvBXQ0wkh86PLvUObR1M+cW/cS2 biDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=3iNRfby6SKaq4jvgQI2mX/1620g+4NnBI4MiEWoPAuQ=; b=DFAyZdf64mxM5pEK/srnm1QEs5nB/1np7iqOcZmdeVdadkP2Btf0XGtjBD4KAVw9IT St4T39ynXyKCbRnqurCpO8HXP3CP/YKiI+aKaKltf9nT/iF8mWvWvYWf0L2b8/wA1Cuf Cjy800+F0PGtGjYoFOUmE3f3Xz7PTlbRqutKVlsbZVkYCdyaG4nn445UehaylMhO5Ear +XdjfIHl90mUwjW8zME2+b0fq37ZH4mRhwx/rvGOGMt0u1rA/JEknN6I5SaJ2j0ctU5b ekpXfxJWDX85p6+TYqWnSuizZscSi/DIAp6k4CMLI7EWhvLTKbBYE9YP8AXBorxeBWGn rNug== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g126si1915184pgc.266.2017.06.07.07.52.18; Wed, 07 Jun 2017 07:52:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id E119F78195; Wed, 7 Jun 2017 14:52:15 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by mail.openembedded.org (Postfix) with ESMTP id 5A30F78145 for ; Wed, 7 Jun 2017 14:51:55 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id o65so6575266oif.1 for ; Wed, 07 Jun 2017 07:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vOzv5KCvkh2jZcBoNSZChfNH7vBLk5jwOucPcWo1T+c=; b=hLVXlT1zIMSmyVrNB+2po+90kDmSKkER/CIPR38kvCGMCZXs+CDGVOJ6eQ5o/RyxtN CmPdtu9nLNWEUzvR7bSgjPHJfxm2mQ+gwMqyXEsNewecx+Gd+/rHiduqJVgel6Q/s7p6 QdopXNIbpCFznKOzw9d5e63iF+spXA0YjEU8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vOzv5KCvkh2jZcBoNSZChfNH7vBLk5jwOucPcWo1T+c=; b=gGlwQPeRKXnzrdcSGhdc4n3VYCU/yIq4uUwQXo62uYSimqb7zKBY8jOS8c8v/9f/as 4rycbIjXn0QGgheSG+dWPNw2AFVj4XIjTIFvrdly6Wsg5MGtdQjcAsCazDCP0rGJcJmn bCVMPsT9MA6P5hQ/Ex3hAgIlDdGH0BgJ5sBGbJcRW20D983sj9AelR1KNz7i3r+kJZ/7 aK/n20z2VAg/2MGfYyEncWO6YJRx5sy/YLBO4C4iY8991LBZpunJTyJQqD5n5w4lB9Dw kDBh6vzz2dc+mUWfdvUw3iJt16+aLQuoeH8FWmopVBoTPbFhTGRkySehurkaOrr5qT3t Kbtg== X-Gm-Message-State: AODbwcAo0ChRbmAMkoFGehyh+1z8VmpJzHZaVSH/oNZj6Zhedj7qU2oR yKznU7qvhh+DiDSaq2tOOQ== X-Received: by 10.202.85.3 with SMTP id j3mr6036576oib.207.1496847117091; Wed, 07 Jun 2017 07:51:57 -0700 (PDT) Received: from aura.cortijodelrio.net (CableLink67-82.telefonia.InterCable.net. [201.172.67.82]) by smtp.googlemail.com with ESMTPSA id f35sm986880otd.15.2017.06.07.07.51.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jun 2017 07:51:56 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Wed, 7 Jun 2017 09:51:20 -0500 Message-Id: <1496847081-30528-2-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496847081-30528-1-git-send-email-daniel.diaz@linaro.org> References: <1496847081-30528-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Subject: [OE-core] [PATCH 2/3 v2][pyro] piglit: add patch for lack of gbm_bo_map X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org [Backported from master.] [Piglit Bug #100978] -- https://bugs.freedesktop.org/show_bug.cgi?id=100978 When linking against Mali 450 r6, errors like the following can be seen: ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap' ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map' collect2: error: ld returned 1 exit status make[2]: *** [bin/point-sprite] Error 1 This is due to gbm_bo_map() and gbm_bo_unmap() being recently added but not yet implemented by all graphics drivers. Instead of relying on GBM's version, actually try to link against those symbols. Signed-off-by: Daniel Díaz --- v2: Embed upstream status into patch; add patch into recipe. ...fine-GBM_BO_MAP-only-when-symbol-is-found.patch | 51 ++++++++++++++++++++++ meta/recipes-graphics/piglit/piglit_git.bb | 1 + 2 files changed, 52 insertions(+) create mode 100644 meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch diff --git a/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch new file mode 100644 index 0000000..8b63424 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch @@ -0,0 +1,51 @@ +From 47697aee05a112422acf203982085e7b3e6c05b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20D=C3=ADaz?= +Date: Thu, 4 May 2017 00:57:39 -0500 +Subject: [PATCH 1/4] CMake: define GBM_BO_MAP only when symbol is found +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +gbm_bo_map() and _unmap() have been added recently to Mesa, +and this update may not have reached all implementations of +GBM, such as the one provided by Mali r6, where said +definitions can be found in the header file but not in the +library itself. This leads to errors like the following when +linking: + ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap' + ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map' + collect2: error: ld returned 1 exit status + make[2]: *** [bin/point-sprite] Error 1 + +Instead of relying on the header file, actually try to link +using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP +should be defined. + +Upstream-Status: Submitted [piglit@lists.freedesktop.org] + +Signed-off-by: Daniel Díaz +Reviewed-by: Jan Vesely +Reviewed-by: Dylan Baker +--- + CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4ff99e..cc26fa8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,8 +141,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + if(GBM_FOUND) + set(PIGLIT_HAS_GBM True) + add_definitions(-DPIGLIT_HAS_GBM) +- if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION VERSION_GREATER "12.1") +- set(PIGLIT_HAS_GBM_BO_MAP True) ++ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GBM_LIBRARIES}) ++ CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP) ++ if (PIGLIT_HAS_GBM_BO_MAP) + add_definitions(-DPIGLIT_HAS_GBM_BO_MAP) + endif() + endif(GBM_FOUND) +-- +1.9.1 + diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index eae3eed..19db86c 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb @@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" SRC_URI = "git://anongit.freedesktop.org/piglit \ file://0001-cmake-install-bash-completions-in-the-right-place.patch \ file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \ + file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch \ " # From 2017-02-06 From patchwork Wed Jun 7 14:51:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 103271 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp1796870obh; Wed, 7 Jun 2017 07:52:23 -0700 (PDT) X-Received: by 10.84.210.137 with SMTP id a9mr28087023pli.199.1496847143465; Wed, 07 Jun 2017 07:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496847143; cv=none; d=google.com; s=arc-20160816; b=pUiemlPgGe95PxKfrgW+ve/VSFR/rohOzFUrPExirM1U+Eb+Fokzt4Pky3oSI7Vfrb jVo/V9h0fl1ggTaYfP6YWyeF69z+ffg/P2E0HlAXXAGPeEgFeT0SC9/VXGCCQUbTelxS CZk9TC2kiWYtSt8j19Wj9Ler7Txg9wu6NX+Smw7NbeRZX22pSa2wkWWfqWcZB8SM7Er1 h1UZ+HDV+vtkftb9UPAmPQE629GyVS5HLjzzCfnHXne1dqSyN3kIzMu95QkgqOOfTLvm scaECn29tGBpXWFRHn6N8pVkprW4sRWKyMJXEyuCUhkiL1Ecs+DiWhdT88ue92LqD8ss /yLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=sid/da509UmFcuA5DG86kjthcdxbPTIMigH0IRLNJPI=; b=T5KBKv7tdB/8mqEFsUR5+S0TA7tJXBWxm76L+T7OxyEuQxSXLnvmacKKKbeGZwGcTv SSuS9Ty/KDKgpkXfJkzJsXMRSXF5jI8LdRTORshag8ttf0kF8CaM81MnvHCygSQkw9a7 YbsWXwADRcgUBO75LdrXLBKY4vxgptqKJkd8Zh7wkdWthmPbOcy73Tv5OS1JLWDEbZ34 0XSysBTIwCjOjnK8822NCMLvdQCpcg/ERzCXf7Th8d9ZSMCQmBpPDHBzdByQUr9aYrpb 5eP8A3vMnmIEy/N36tC/TfiGNAZU6zIBPpTdUjX96yNAcgC+4/2BwL/OC7fzyC5KWLZk otLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o186si2024672pga.24.2017.06.07.07.52.23; Wed, 07 Jun 2017 07:52:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id DA8B6781E4; Wed, 7 Jun 2017 14:52:16 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-ot0-f169.google.com (mail-ot0-f169.google.com [74.125.82.169]) by mail.openembedded.org (Postfix) with ESMTP id 12D9B781AD for ; Wed, 7 Jun 2017 14:51:58 +0000 (UTC) Received: by mail-ot0-f169.google.com with SMTP id k4so8266740otd.0 for ; Wed, 07 Jun 2017 07:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/IcL302nhDCBnSj+SB809veek5f2yD6GEZ0mCJSXWmU=; b=Vx9MHdKbLgn7wDADoNFXV4e5J5CMthbf0y3Dv5/8ZzEj6I8vSyV1164c3Km4xt/gMT P6S4NUaV+BNtmoY2Ei/40qbdtB8z7GS/a0OGhCrz7dROpN9hgNrR5dzetkq5C6PLXEBF c+QfO7mpIYDZx/WXyDAb933jd0zRdeQWxaEBE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/IcL302nhDCBnSj+SB809veek5f2yD6GEZ0mCJSXWmU=; b=euACWWESURHHZetKKu+pnOWBmjAiFmcdQAgFAE+zsPrstpSnzqqzhnts74sDDitv+a mSoN5nKH5bJe82MV5/64t5hRyQDCgPptVz5rcUg9wirtTm2Sfko+zC9t7L1oW276O2ug 4VrUUQAI0LqOg/UbpbcICKlv2Sczmgw05nSSrFYjxlKGDtZQn8EAfa7qfkC4CSh9j9wl +NINB4T8bRtFg3p+AfGT9D3nuhsncztnP4ysn3QARehqa4Kan6f0OrWGYueriqPzflgK loJa/+ql4gskSuMzH5q5sJt1AtSwXGBAOVk5MpRDakmI9YOtYd1I+jYFvcsPqCmSB11u 425g== X-Gm-Message-State: AODbwcASJbSG7oLfJzkP2zCJ3KDl7wxZA1x9i2jlZ3KlqJF9zBWxGAeF vfe//XBkjEmsMZtx+c4kew== X-Received: by 10.157.73.143 with SMTP id g15mr9005563otf.59.1496847119678; Wed, 07 Jun 2017 07:51:59 -0700 (PDT) Received: from aura.cortijodelrio.net (CableLink67-82.telefonia.InterCable.net. [201.172.67.82]) by smtp.googlemail.com with ESMTPSA id f35sm986880otd.15.2017.06.07.07.51.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jun 2017 07:51:59 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Wed, 7 Jun 2017 09:51:21 -0500 Message-Id: <1496847081-30528-3-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496847081-30528-1-git-send-email-daniel.diaz@linaro.org> References: <1496847081-30528-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Subject: [OE-core] [PATCH 3/3 v2][pyro] piglit: add patches for unbuildable surfaceless Mesa test X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org [Backported from master.] Some EGL implementations do not actually ship all Khronos- extensions. As it turns out, the Mali 450 driver does not include any of the following symbols, used by the egl_mesa_platform_surfaceless.c spec test: * eglGetPlatformDisplay * eglCreatePlatformPixmapSurface * eglCreatePlatformWindowSurface The Right Thing To Do was to obtain the implementation of these functions (via eglGetProcAddress), as is provided by their EXT counterparts. These are guaranteed to exist since they are required by EGL_EXT_platform_base. Signed-off-by: Daniel Díaz --- v2: Embed upstream status into patches; add patch into recipe. ...nour-Surfaceless-MESA-in-get_default_disp.patch | 54 +++++++++++++++ ...atform_surfaceless-Don-t-use-eglGetPlatfo.patch | 36 ++++++++++ ...atform_surfaceless-Use-EXT-functions-for-.patch | 78 ++++++++++++++++++++++ meta/recipes-graphics/piglit/piglit_git.bb | 3 + 4 files changed, 171 insertions(+) create mode 100644 meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch create mode 100644 meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch create mode 100644 meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch diff --git a/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch new file mode 100644 index 0000000..f3aa1ba --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch @@ -0,0 +1,54 @@ +From a6608f218b5023cef36b3de5ec3c5f00b0211d1c Mon Sep 17 00:00:00 2001 +From: Daniel Diaz +Date: Wed, 17 May 2017 18:00:15 -0500 +Subject: [PATCH 2/4] util/egl: Honour Surfaceless MESA in get_default_display +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The EGL_MESA_platform_surfaceless extension was introduced not too long +ago. Add support for it our helper. + +Upstream-Status: Accepted, since git 7b74602. + +Signed-off-by: Daniel Díaz +Reviewed-by: Emil Velikov +--- + tests/util/piglit-util-egl.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c +index 106c735..389fe12 100644 +--- a/tests/util/piglit-util-egl.c ++++ b/tests/util/piglit-util-egl.c +@@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform) + static bool has_x11 = false; + static bool has_wayland = false; + static bool has_gbm = false; ++ static bool has_surfaceless_mesa = false; + + static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void *native_display, const EGLint *attrib_list); + +@@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform) + has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_x11"); + has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_wayland"); + has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_gbm"); ++ has_surfaceless_mesa = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless"); + + peglGetPlatformDisplayEXT = (void*) eglGetProcAddress("eglGetPlatformDisplayEXT"); + } +@@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform) + return EGL_NO_DISPLAY; + } + break; ++ case EGL_PLATFORM_SURFACELESS_MESA: ++ if (!has_surfaceless_mesa) { ++ return EGL_NO_DISPLAY; ++ } ++ break; + default: + fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, platform); + return EGL_NO_DISPLAY; +-- +1.9.1 + diff --git a/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch new file mode 100644 index 0000000..0f24dc1 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch @@ -0,0 +1,36 @@ +From c0dc430b8f5deeacdb11cd188195e16f512af233 Mon Sep 17 00:00:00 2001 +From: Daniel Diaz +Date: Wed, 17 May 2017 18:00:16 -0500 +Subject: [PATCH 3/4] egl_mesa_platform_surfaceless: Don't use + eglGetPlatformDisplay directly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The entry point is not guaranteed to exist, so use the +piglit_egl_get_default_display() helper which does the correct thing. + +Upstream-Status: Accepted, since git 7b74602. + +Signed-off-by: Daniel Díaz +Reviewed-by: Emil Velikov +--- + .../spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c +index 3bbd6aa..81a3919 100644 +--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c ++++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c +@@ -31,7 +31,7 @@ test_setup(EGLDisplay *dpy) + + piglit_require_egl_extension(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless"); + +- *dpy = eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, NULL, NULL); ++ *dpy = piglit_egl_get_default_display(EGL_PLATFORM_SURFACELESS_MESA); + if (*dpy == EGL_NO_DISPLAY) { + printf("failed to get EGLDisplay\n"); + piglit_report_result(PIGLIT_SKIP); +-- +1.9.1 + diff --git a/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch b/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch new file mode 100644 index 0000000..0952af5 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch @@ -0,0 +1,78 @@ +From 57de1ff6758ec5ea4a52637f233e3e3150086255 Mon Sep 17 00:00:00 2001 +From: Daniel Diaz +Date: Wed, 17 May 2017 18:00:17 -0500 +Subject: [PATCH 4/4] egl_mesa_platform_surfaceless: Use EXT functions for + surfaces +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These EXT symbols are guaranteed to exist since they require +EGL_EXT_platform_base. + +Upstream-Status: Accepted, since git 7b74602. + +Signed-off-by: Daniel Díaz +Reviewed-by: Emil Velikov +--- + .../egl_mesa_platform_surfaceless.c | 23 ++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c +index 81a3919..264ed71 100644 +--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c ++++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c +@@ -24,6 +24,24 @@ + #include "piglit-util.h" + #include "piglit-util-egl.h" + ++/* Extension function pointers. ++ * ++ * Use prefix 'pegl' (piglit egl) instead of 'egl' to avoid collisions with ++ * prototypes in eglext.h. */ ++EGLSurface (*peglCreatePlatformPixmapSurfaceEXT)(EGLDisplay display, EGLConfig config, ++ NativePixmapType native_pixmap, const EGLint *attrib_list); ++EGLSurface (*peglCreatePlatformWindowSurfaceEXT)(EGLDisplay display, EGLConfig config, ++ NativeWindowType native_window, const EGLint *attrib_list); ++ ++static void ++init_egl_extension_funcs(void) ++{ ++ peglCreatePlatformPixmapSurfaceEXT = (void*) ++ eglGetProcAddress("eglCreatePlatformPixmapSurfaceEXT"); ++ peglCreatePlatformWindowSurfaceEXT = (void*) ++ eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"); ++} ++ + static void + test_setup(EGLDisplay *dpy) + { +@@ -72,7 +90,7 @@ test_create_window(void *test_data) + + test_setup(&dpy); + +- surf = eglCreatePlatformWindowSurface(dpy, EGL_NO_CONFIG_KHR, ++ surf = peglCreatePlatformWindowSurfaceEXT(dpy, EGL_NO_CONFIG_KHR, + /*native_window*/ NULL, + /*attrib_list*/ NULL); + if (surf) { +@@ -103,7 +121,7 @@ test_create_pixmap(void *test_data) + + test_setup(&dpy); + +- surf = eglCreatePlatformPixmapSurface(dpy, EGL_NO_CONFIG_KHR, ++ surf = peglCreatePlatformPixmapSurfaceEXT(dpy, EGL_NO_CONFIG_KHR, + /*native_window*/ NULL, + /*attrib_list*/ NULL); + if (surf) { +@@ -205,6 +223,7 @@ main(int argc, char **argv) + piglit_report_result(PIGLIT_FAIL); + } + ++ init_egl_extension_funcs(); + result = piglit_run_selected_subtests(subtests, selected_names, + num_selected, result); + piglit_report_result(result); +-- +1.9.1 + diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index 19db86c..2ea5779 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb @@ -6,6 +6,9 @@ SRC_URI = "git://anongit.freedesktop.org/piglit \ file://0001-cmake-install-bash-completions-in-the-right-place.patch \ file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \ file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch \ + file://0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch \ + file://0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch \ + file://0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch \ " # From 2017-02-06