From patchwork Wed May 17 23:00:17 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: 100018 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp452651qge; Wed, 17 May 2017 16:01:06 -0700 (PDT) X-Received: by 10.84.216.30 with SMTP id m30mr1076257pli.161.1495062066366; Wed, 17 May 2017 16:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495062066; cv=none; d=google.com; s=arc-20160816; b=NVn7Lg3BmsaVNHr3i2HWFiNvqPUFyvEparptxbO9GEkYEvdCucccQEd0f+pzSsJtbh s2VBA6NIMn9ADXsHECbkpCq+soSpB6WKwlEpELMvtHbbaBQH3VJDTdAku/1DlybSF/K2 zXANY295G86lRCJl1agWyn2y7Wg5q8Ic9JonlI7RyPoJX8AnqEL90hciw3oiM6KTsPCX VZ0A6zQEFHlAhpF3Irwk7jMs/OmfFEIaB0WzjI5AliARtvf/otoEwBYxel1H+fAmVqWt CNmDEitO11pVa3h3XTnmvq+03HOXNG0X+bcahrcbjTE1PZSe1IqGsukUmI3oZbTybRh6 DOyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=UX64iZPGk52Tlv6jNlOib2WoqSc68Cu4aVYwezp9EcM=; b=hAarl7jyrkEn9V+2FdbQ4jljyyJ1wLkpkdvejIdqb2neOAdI5it7A0+t1fwVUnH6Mo MFOr3PYOxoHDnCPPLEXOEpp/4LAVx2+La/de4tKE63Wq0JoNN00JnMVQSdNJ/MhmC6lW Eks43MtCAnT6ftDP6+G5AI/SKSPppz8SX3IJ2D3Dwqs1WGZx1TSp0y2D9n2t810Fd+tr ZjK9Q2lrtL8IdfAzwZKcwR8T8+QRZ/gWaC1BZJSoNU5bSPPrEaFanX4iJyrd5w+xvtr+ 8/D8HWmoPd46Gi/Hq9tiYArcWAEfbQe9NhQs9wrBadkxsjJlEgDNBNkhSlxTHRD38Mux 6hVQ== 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 piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=piglit-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id z5si3278733pge.418.2017.05.17.16.01.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 16:01:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; 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 piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=piglit-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A750189D30; Wed, 17 May 2017 23:01:05 +0000 (UTC) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com [IPv6:2607:f8b0:4003:c06::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5621589D49 for ; Wed, 17 May 2017 23:01:04 +0000 (UTC) Received: by mail-oi0-x229.google.com with SMTP id w10so34265360oif.0 for ; Wed, 17 May 2017 16:01:04 -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=DNTMHJCr9FJTDVsB8tOeqVaDURMLbSBb4dFtkdHehy4=; b=dzw+Hb7otlzLXEnZy+ycF36khlCLFBj58vfYs2CYSapqvodIQN8GLaYliQnrUTVGHH sDYc0kUGv8y4/6X11IB+Aw8CPVxAvToje2IQnyDlDkAAYpF/Qrv2iIzDgbwns8JZotcL nPV2CbWNIwmCvDcC4XPX3yCiLyj+GCPz+pF8E= 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=DNTMHJCr9FJTDVsB8tOeqVaDURMLbSBb4dFtkdHehy4=; b=mdqXn247bKRYz3aai9KeAp2bZ39qXJiH1DsyRXOCNLiph9CrSheuhEloifQrSsOekC W67fNmxpglv/fEbDJq4cFpd15esyH4a/DVSVqbp8QP5b+rn6tnezojvics60aub0y/Wv vQk+YIIyLYsM+/AyMAGOXq5byOCfksgdwKY6gDu8JR5wGJDrT3eRxz+EagCA1fETv2Em Ef4N/79dJfD06l8Yfz02AGR2oL3gcympWPSyP4rQTknpz1rVZ6FO3dxU9uwnrb1P5mQl YkkFngrM+TWt/1qXbPy8LWn37gn7bTsZpqbwPRnpDSHzyGIzG7/CVE2wx4j2C2pIFI5k hhrw== X-Gm-Message-State: AODbwcAmvNlCLQsKP/+Xd/PP9Pf6mwV1HMpv3OH74ALE46U7PT5jFint Fz1IDzRwLG+uFhD/0WzIyA== X-Received: by 10.157.82.95 with SMTP id q31mr835235otg.165.1495062063475; Wed, 17 May 2017 16:01:03 -0700 (PDT) Received: from aura.cortijodelrio.net (CableLink67-82.telefonia.InterCable.net. [201.172.67.82]) by smtp.googlemail.com with ESMTPSA id c50sm1784149ote.29.2017.05.17.16.01.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 May 2017 16:01:02 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: piglit@lists.freedesktop.org Date: Wed, 17 May 2017 18:00:17 -0500 Message-Id: <1495062017-6955-3-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1495062017-6955-1-git-send-email-daniel.diaz@linaro.org> References: <1495062017-6955-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Cc: emil.l.velikov@gmail.com Subject: [Piglit] [PATCH 3/3] egl_mesa_platform_surfaceless: Use EXT functions for surfaces X-BeenThere: piglit@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: piglit-bounces@lists.freedesktop.org Sender: "Piglit" These EXT symbols are guaranteed to exist since they require EGL_EXT_platform_base. Signed-off-by: Daniel Díaz --- .../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);