From patchwork Mon Aug 17 11:05:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: 'Timothy Arceri' via Patchwork Forward X-Patchwork-Id: 52472 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 0D23B22DB1 for ; Mon, 17 Aug 2015 11:06:08 +0000 (UTC) Received: by labd1 with SMTP id d1sf46466152lab.0 for ; Mon, 17 Aug 2015 04:06:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:reply-to; bh=AoPbvQ52DOxH6yxlOAdFCX1c+nvztz5PdAtzrWrAKL8=; b=TzewlNNnistgW0YG8T7D9WejF6Bz/Rkci/DKNxbc1gQZgsE7UylRlnotF5u7hCzMvO Hrqe0So9vAwrsBzf9gfM0xU3ADL6NDMYVpca/TFMNAmkfwI90l7PUy0jxB/DfI5Z3jJ2 aj0OOkoe/HJ0af+HRYz8mZm3b7PVyT96UcmKkw5ZwPyXE6Y2j/nEV6nBOg9h25HFNott M9HdqLcUs2Xijji2wDG2WSRZ7GsK8FSdR23x6KqehBPZXCWTZ9RZDKFmJ7mXtUdFxndz rPevtCbx7qfCZGysH/HCnZF2DknAJYfx0gGJbnHx4C4tAUhG6jKHpgW+Ltg3H+jTo+pH D2ig== X-Gm-Message-State: ALoCoQk/dLt/e7wTVntpIQIz7vQ72SKRWor3LEDqGSKeO6YKRk4TBEPqAPH2gZ0eHcIdMyRtejM8 X-Received: by 10.180.216.12 with SMTP id om12mr4761930wic.1.1439809566906; Mon, 17 Aug 2015 04:06:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.1 with SMTP id h1ls566068lag.36.gmail; Mon, 17 Aug 2015 04:06:06 -0700 (PDT) X-Received: by 10.152.36.226 with SMTP id t2mr699612laj.6.1439809566771; Mon, 17 Aug 2015 04:06:06 -0700 (PDT) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com. [2a00:1450:4010:c04::22a]) by mx.google.com with ESMTPS id d3si11454998lab.63.2015.08.17.04.06.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Aug 2015 04:06:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) client-ip=2a00:1450:4010:c04::22a; Received: by lbbpu9 with SMTP id pu9so79700724lbb.3 for ; Mon, 17 Aug 2015 04:06:06 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr676329lbb.29.1439809566618; Mon, 17 Aug 2015 04:06:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1371361lba; Mon, 17 Aug 2015 04:06:05 -0700 (PDT) X-Received: by 10.66.243.70 with SMTP id ww6mr1654016pac.88.1439809564509; Mon, 17 Aug 2015 04:06:04 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id fb3si10989525pab.144.2015.08.17.04.06.03; Mon, 17 Aug 2015 04:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5AFFD6E8CE; Mon, 17 Aug 2015 04:06:03 -0700 (PDT) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm3-vm4.bullet.mail.gq1.yahoo.com (nm3-vm4.bullet.mail.gq1.yahoo.com [98.136.218.147]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9723C6E8CE for ; Mon, 17 Aug 2015 04:06:01 -0700 (PDT) Received: from [216.39.60.181] by nm3.bullet.mail.gq1.yahoo.com with NNFMP; 17 Aug 2015 11:06:00 -0000 Received: from [208.71.42.213] by tm17.bullet.mail.gq1.yahoo.com with NNFMP; 17 Aug 2015 11:06:00 -0000 Received: from [127.0.0.1] by smtp224.mail.gq1.yahoo.com with NNFMP; 17 Aug 2015 11:06:00 -0000 X-Yahoo-Newman-Id: 209919.49756.bm@smtp224.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: OwLBD.YVM1n31KhhYEkAC.HU_gmjHCKXNfGkWdpXTAURmse fb.yT8WrsaYy_3QDKlPufbZ6VT2aDP1rUDC1F1BF2hr9e8BPvrYHtB8oUMSk FWgvcA.bi0P5zETIsZ.3da7h35TNe827fKnmk_JMM8eZqNUfQORn3nGDJ8hi s0sp2ImEhMdycATWrIjSKxEvTd55cTiZsVv5.9c9Hyx3agOy.tUFVR5q1xfm Hm7mrhXkztpyfwFOHUpUETOPlprJanKInBwitjvp15mbVPQ4gUgx6woI2e9K LtbZ_F8Gdx.8XQgk1IH8JMmNzBHldr0Fr4DeUZqWWUMwpBZtPPRwX5.j9eeO 9MsIHTyd5dcBE1Q0lWpV4IdYg4Oz7vuxBIHSFfghE7eW5l4gMwbhI3ZUbxCF z7gz8gULA_b2HjMgGR.deqS2L_kUOVzpQs5tQfFebsps0JaBlLlOqQzuqSNi w7IgIVmzBPcS3i.J0RDB5cUST6q9_zl6B1Z82nc0wE.5IpxW8fgz0YtDkLqt VHQpuisiR.STLKi_hIahbY4yVueMjtQ8z8iI- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Mon, 17 Aug 2015 21:05:33 +1000 Message-Id: <1439809533-3385-1-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 2.4.3 MIME-Version: 1.0 Subject: [Piglit] [PATCH] arb_texture_multisample: add error check for samples == 0 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" X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@yahoo.com.au; dmarc=fail (p=NONE dis=NONE) header.from=yahoo.com.au Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 X-Original-From: Timothy Arceri Reply-To: Timothy Arceri Test results: Nvidia GeForce 840M - NVIDIA 346.47: pass Cc: Tapani Pälli --- tests/spec/arb_texture_multisample/errors.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/spec/arb_texture_multisample/errors.c b/tests/spec/arb_texture_multisample/errors.c index 0c16f4e..ba9f1e6 100644 --- a/tests/spec/arb_texture_multisample/errors.c +++ b/tests/spec/arb_texture_multisample/errors.c @@ -41,13 +41,14 @@ piglit_init(int argc, char **argv) { /* test some new error cases */ - GLuint fbo, tex; + GLuint fbo; + GLuint tex[2]; glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); - glGenTextures(1, &tex); - glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, tex); + glGenTextures(2, tex); + glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, tex[0]); glTexImage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 4, GL_RGBA, 64, 64, 2, GL_TRUE); @@ -57,7 +58,7 @@ piglit_init(int argc, char **argv) } /* binding a negative layer should fail */ - glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex, 0, -1); + glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex[0], 0, -1); if (!piglit_check_gl_error(GL_INVALID_VALUE)) { printf("glFramebufferTextureLayer w/ negative layer must " @@ -65,5 +66,16 @@ piglit_init(int argc, char **argv) piglit_report_result(PIGLIT_FAIL); } + /* An INVALID_VALUE error is generated if samples is zero. */ + glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, tex[1]); + glTexImage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, + 0, GL_RGBA, 64, 64, 2, GL_TRUE); + + if (!piglit_check_gl_error(GL_INVALID_VALUE)) { + printf("glFramebufferTextureLayer w/ sampler == 0 must " + "emit GL_INVALID_VALUE but did not\n"); + piglit_report_result(PIGLIT_FAIL); + } + piglit_report_result(PIGLIT_PASS); }