Re: [Piglit] [PATCH v2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Dylan Baker
Quoting Dylan Baker (2016-11-10 14:15:51)
> 
> Actually, I've got some patches I'm working on that completely rework this
> madness (which I forgot about working on other things) and what you have is
> easier to work into my series than what I suggested, lol.
> 
> Please just fix the newlines and you can have my rb:
> Reviewed-by: Dylan Baker 

Sorry for all the noise :/

Dylan


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Dylan Baker
Quoting Alejandro Piñeiro (2016-11-10 12:08:23)
> On 10/11/16 19:05, Dylan Baker wrote:
> > Quoting Alejandro Piñeiro (2016-11-10 07:01:03)
> >> This option was added mostly to being able to run the mustpass
> >> case list included on Vulkan CTS repository. As that file is in
> >> txt format, we assume that the case list will be in txt format.
> >>
> >> That is not the case for the other deqp-xxx profiles, that uses
> >> a xml format. In any case, it is properly documented on the
> >> piglit.conf.example
> >>
> >> v2: allow to receive a txt file with just the name of the test,
> >> without any formatting
> >> ---
> >>
> >> This new version is somewhat more intrusive. It allows to receive
> >> a txt file with just the name of the tests. But doing that
> >> it removed the ill-format-line check on deqp.make_profile.
> >>
> >> The advantage of this is that we don't need to transform the
> >> mustpass file that cames with the vulkan cts repository.
> >>
> >> FWIW, deqp-vk also accepts that format. So with this change,
> >> piglit just allows to receive the testcase list in both txt formats.
> >>
> >>  framework/test/deqp.py | 14 ++
> >>  piglit.conf.example|  7 +++
> >>  tests/deqp_vk.py   | 10 +++---
> >>  3 files changed, 24 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/framework/test/deqp.py b/framework/test/deqp.py
> >> index 5b53efd..a63bea7 100644
> >> --- a/framework/test/deqp.py
> >> +++ b/framework/test/deqp.py
> >> @@ -78,6 +78,14 @@ def select_source(bin_, filename, mustpass, extra_args):
> >>  return iter_deqp_test_cases(
> >>  gen_caselist_txt(bin_, filename, extra_args))
> >>  
> > You're missing a newline, it should be two for top level functions.
> 
> Ok.
> 
> >> +def select_source_txt(bin_, filename, mustpass, extra_args):
> >> +"""Return either the mustpass list in txt format or the generated 
> >> list."""
> >> +if options.OPTIONS.deqp_mustpass:
> >> +return iter_deqp_test_cases(mustpass)
> >> +else:
> >> +return iter_deqp_test_cases(
> >> +gen_caselist_txt(bin_, filename, extra_args))
> >> +
> > I'm not sure how to do it, but I'm also not thrilled with the near 
> > duplication
> > of select_source function. I think I'd rather see either a keyword argument 
> > that
> > passes the function to use for deqp_mustpass or do file extension detection 
> > or
> > something that reduces the need for another function.

Actually, I've got some patches I'm working on that completely rework this
madness (which I forgot about working on other things) and what you have is
easier to work into my series than what I suggested, lol.

Please just fix the newlines and you can have my rb:
Reviewed-by: Dylan Baker 


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Dylan Baker
Quoting Alejandro Piñeiro (2016-11-10 12:08:23)
> On 10/11/16 19:05, Dylan Baker wrote:
> > Quoting Alejandro Piñeiro (2016-11-10 07:01:03)
> >> This option was added mostly to being able to run the mustpass
> >> case list included on Vulkan CTS repository. As that file is in
> >> txt format, we assume that the case list will be in txt format.
> >>
> >> That is not the case for the other deqp-xxx profiles, that uses
> >> a xml format. In any case, it is properly documented on the
> >> piglit.conf.example
> >>
> >> v2: allow to receive a txt file with just the name of the test,
> >> without any formatting
> >> ---
> >>
> >> This new version is somewhat more intrusive. It allows to receive
> >> a txt file with just the name of the tests. But doing that
> >> it removed the ill-format-line check on deqp.make_profile.
> >>
> >> The advantage of this is that we don't need to transform the
> >> mustpass file that cames with the vulkan cts repository.
> >>
> >> FWIW, deqp-vk also accepts that format. So with this change,
> >> piglit just allows to receive the testcase list in both txt formats.
> >>
> >>  framework/test/deqp.py | 14 ++
> >>  piglit.conf.example|  7 +++
> >>  tests/deqp_vk.py   | 10 +++---
> >>  3 files changed, 24 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/framework/test/deqp.py b/framework/test/deqp.py
> >> index 5b53efd..a63bea7 100644
> >> --- a/framework/test/deqp.py
> >> +++ b/framework/test/deqp.py
> >> @@ -78,6 +78,14 @@ def select_source(bin_, filename, mustpass, extra_args):
> >>  return iter_deqp_test_cases(
> >>  gen_caselist_txt(bin_, filename, extra_args))
> >>  
> > You're missing a newline, it should be two for top level functions.
> 
> Ok.
> 
> >> +def select_source_txt(bin_, filename, mustpass, extra_args):
> >> +"""Return either the mustpass list in txt format or the generated 
> >> list."""
> >> +if options.OPTIONS.deqp_mustpass:
> >> +return iter_deqp_test_cases(mustpass)
> >> +else:
> >> +return iter_deqp_test_cases(
> >> +gen_caselist_txt(bin_, filename, extra_args))
> >> +
> > I'm not sure how to do it, but I'm also not thrilled with the near 
> > duplication
> > of select_source function. I think I'd rather see either a keyword argument 
> > that
> > passes the function to use for deqp_mustpass or do file extension detection 
> > or
> > something that reduces the need for another function.
> 
> Taking into account that at this moment, this method is only used at
> deqp_vk, other option is implement this logic there, without adding a
> new method on the framework.
> 
> In any case, I'm ok with trying the argument option. What option do you
> prefer?
> 
> >>  
> >>  def make_profile(test_list, test_class):
> >>  """Create a TestProfile instance."""
> >> @@ -146,10 +154,8 @@ def iter_deqp_test_cases(case_file):
> >>  continue
> >>  elif line.startswith('TEST:'):
> >>  yield line[len('TEST:'):].strip()
> >> -else:
> >> -raise exceptions.PiglitFatalError(
> >> -'deqp: {}:{}: ill-formed line'.format(case_file, i))
> >> -
> > Don't remove this newline, it was correct.
> 
> Ok.
> 
> >> +else: # We assume that the line is just the name of the test
> >> +yield line
> > I'm not sure I like this approach, it conflates two different files 
> > formats, and
> > it creates two functions that are nearly identical. I'll give you that this 
> > is
> > all kind of a mess, but I think you should create a new generator function 
> > for
> > the vulkan mustpass list, it's a different format.
> 
> Well, the issue here is not about vulkan cts using a different format.
> As far as I see all deqp-xxx works in a similar, and somewhat odd way.
> 
> The issue is that you can ask deqp to create a test list in a text
> format using the option "--deqp-runmode=txt-caselist". Right now, piglit
> can parse that text file to execute individually the tests. But funnily
> enough deqp can't. So if you try to use the txt file that deqp use on
> deqp you get this:
> 
>   $ ./deqp-xxx --deqp-runmode
> Writing test cases from 'dEQP-GLES3' to file 'dEQP-XXX-cases.txt'..
>   $ ./deqp-xxx --deqp-caselist-file=dEQP-XXX-cases.txt
> ERROR: Failed to parse test case list: Illegal character in test
> case name
> FATAL ERROR: Failed to parse command line
> Killed
> 
> So, I assume that this is the reason that the vulkan cts repository
> saves the mustpass list in a different format.
> 
> In any case, going back to this, what I could do is support only the
> format Im interested in, and create a new generator as you mention.
> Although that would make deqp_vk behaving somewhat different to other
> deqp_xxx.

I guess the other option, which I would be okay with, is to take the Vulkan
specific bits and put them in deqp_vk, that would at least allow us to hide the
different behavior since 

Re: [Piglit] [PATCH v2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Alejandro Piñeiro
On 10/11/16 19:05, Dylan Baker wrote:
> Quoting Alejandro Piñeiro (2016-11-10 07:01:03)
>> This option was added mostly to being able to run the mustpass
>> case list included on Vulkan CTS repository. As that file is in
>> txt format, we assume that the case list will be in txt format.
>>
>> That is not the case for the other deqp-xxx profiles, that uses
>> a xml format. In any case, it is properly documented on the
>> piglit.conf.example
>>
>> v2: allow to receive a txt file with just the name of the test,
>> without any formatting
>> ---
>>
>> This new version is somewhat more intrusive. It allows to receive
>> a txt file with just the name of the tests. But doing that
>> it removed the ill-format-line check on deqp.make_profile.
>>
>> The advantage of this is that we don't need to transform the
>> mustpass file that cames with the vulkan cts repository.
>>
>> FWIW, deqp-vk also accepts that format. So with this change,
>> piglit just allows to receive the testcase list in both txt formats.
>>
>>  framework/test/deqp.py | 14 ++
>>  piglit.conf.example|  7 +++
>>  tests/deqp_vk.py   | 10 +++---
>>  3 files changed, 24 insertions(+), 7 deletions(-)
>>
>> diff --git a/framework/test/deqp.py b/framework/test/deqp.py
>> index 5b53efd..a63bea7 100644
>> --- a/framework/test/deqp.py
>> +++ b/framework/test/deqp.py
>> @@ -78,6 +78,14 @@ def select_source(bin_, filename, mustpass, extra_args):
>>  return iter_deqp_test_cases(
>>  gen_caselist_txt(bin_, filename, extra_args))
>>  
> You're missing a newline, it should be two for top level functions.

Ok.

>> +def select_source_txt(bin_, filename, mustpass, extra_args):
>> +"""Return either the mustpass list in txt format or the generated 
>> list."""
>> +if options.OPTIONS.deqp_mustpass:
>> +return iter_deqp_test_cases(mustpass)
>> +else:
>> +return iter_deqp_test_cases(
>> +gen_caselist_txt(bin_, filename, extra_args))
>> +
> I'm not sure how to do it, but I'm also not thrilled with the near duplication
> of select_source function. I think I'd rather see either a keyword argument 
> that
> passes the function to use for deqp_mustpass or do file extension detection or
> something that reduces the need for another function.

Taking into account that at this moment, this method is only used at
deqp_vk, other option is implement this logic there, without adding a
new method on the framework.

In any case, I'm ok with trying the argument option. What option do you
prefer?

>>  
>>  def make_profile(test_list, test_class):
>>  """Create a TestProfile instance."""
>> @@ -146,10 +154,8 @@ def iter_deqp_test_cases(case_file):
>>  continue
>>  elif line.startswith('TEST:'):
>>  yield line[len('TEST:'):].strip()
>> -else:
>> -raise exceptions.PiglitFatalError(
>> -'deqp: {}:{}: ill-formed line'.format(case_file, i))
>> -
> Don't remove this newline, it was correct.

Ok.

>> +else: # We assume that the line is just the name of the test
>> +yield line
> I'm not sure I like this approach, it conflates two different files formats, 
> and
> it creates two functions that are nearly identical. I'll give you that this is
> all kind of a mess, but I think you should create a new generator function for
> the vulkan mustpass list, it's a different format.

Well, the issue here is not about vulkan cts using a different format.
As far as I see all deqp-xxx works in a similar, and somewhat odd way.

The issue is that you can ask deqp to create a test list in a text
format using the option "--deqp-runmode=txt-caselist". Right now, piglit
can parse that text file to execute individually the tests. But funnily
enough deqp can't. So if you try to use the txt file that deqp use on
deqp you get this:

  $ ./deqp-xxx --deqp-runmode
Writing test cases from 'dEQP-GLES3' to file 'dEQP-XXX-cases.txt'..
  $ ./deqp-xxx --deqp-caselist-file=dEQP-XXX-cases.txt
ERROR: Failed to parse test case list: Illegal character in test
case name
FATAL ERROR: Failed to parse command line
Killed

So, I assume that this is the reason that the vulkan cts repository
saves the mustpass list in a different format.

In any case, going back to this, what I could do is support only the
format Im interested in, and create a new generator as you mention.
Although that would make deqp_vk behaving somewhat different to other
deqp_xxx.

BR





___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Dylan Baker
Quoting Alejandro Piñeiro (2016-11-10 07:01:03)
> This option was added mostly to being able to run the mustpass
> case list included on Vulkan CTS repository. As that file is in
> txt format, we assume that the case list will be in txt format.
> 
> That is not the case for the other deqp-xxx profiles, that uses
> a xml format. In any case, it is properly documented on the
> piglit.conf.example
> 
> v2: allow to receive a txt file with just the name of the test,
> without any formatting
> ---
> 
> This new version is somewhat more intrusive. It allows to receive
> a txt file with just the name of the tests. But doing that
> it removed the ill-format-line check on deqp.make_profile.
> 
> The advantage of this is that we don't need to transform the
> mustpass file that cames with the vulkan cts repository.
> 
> FWIW, deqp-vk also accepts that format. So with this change,
> piglit just allows to receive the testcase list in both txt formats.
> 
>  framework/test/deqp.py | 14 ++
>  piglit.conf.example|  7 +++
>  tests/deqp_vk.py   | 10 +++---
>  3 files changed, 24 insertions(+), 7 deletions(-)
> 
> diff --git a/framework/test/deqp.py b/framework/test/deqp.py
> index 5b53efd..a63bea7 100644
> --- a/framework/test/deqp.py
> +++ b/framework/test/deqp.py
> @@ -78,6 +78,14 @@ def select_source(bin_, filename, mustpass, extra_args):
>  return iter_deqp_test_cases(
>  gen_caselist_txt(bin_, filename, extra_args))
>  

You're missing a newline, it should be two for top level functions.

> +def select_source_txt(bin_, filename, mustpass, extra_args):
> +"""Return either the mustpass list in txt format or the generated 
> list."""
> +if options.OPTIONS.deqp_mustpass:
> +return iter_deqp_test_cases(mustpass)
> +else:
> +return iter_deqp_test_cases(
> +gen_caselist_txt(bin_, filename, extra_args))
> +

I'm not sure how to do it, but I'm also not thrilled with the near duplication
of select_source function. I think I'd rather see either a keyword argument that
passes the function to use for deqp_mustpass or do file extension detection or
something that reduces the need for another function.

>  
>  def make_profile(test_list, test_class):
>  """Create a TestProfile instance."""
> @@ -146,10 +154,8 @@ def iter_deqp_test_cases(case_file):
>  continue
>  elif line.startswith('TEST:'):
>  yield line[len('TEST:'):].strip()
> -else:
> -raise exceptions.PiglitFatalError(
> -'deqp: {}:{}: ill-formed line'.format(case_file, i))
> -

Don't remove this newline, it was correct.

> +else: # We assume that the line is just the name of the test
> +yield line

I'm not sure I like this approach, it conflates two different files formats, and
it creates two functions that are nearly identical. I'll give you that this is
all kind of a mess, but I think you should create a new generator function for
the vulkan mustpass list, it's a different format.

Dylan


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 1/2] framework: fix typos on deqp-vk entry

2016-11-10 Thread Dylan Baker
This patch is:
Reviewed-by: Dylan Baker 

Quoting Alejandro Piñeiro (2016-11-10 05:41:31)
> ---
> 
> Those are really trivial, I put them on a different patch to make easier the
> review. But I think that when pushing, it would be better to squash it with
> the next patch.
> 
>  piglit.conf.example | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/piglit.conf.example b/piglit.conf.example
> index 17f2329..e1a91aa 100644
> --- a/piglit.conf.example
> +++ b/piglit.conf.example
> @@ -95,11 +95,11 @@ testB
>  
> ;mustpasslist=/home/knuth/src/deqp/android/cts/com.drawelements.deqp.gles31.xml
>  
>  [deqp-vk]
> -; Path to the deqp-ck executable
> +; Path to the deqp-vk executable
>  ; Can be overwritten by PIGLIT_DEQP_VK_BIN environment variable
>  ;bin=/home/knuth/Vulkan-CTS/external/vulkancts/modules/vulkan/deqp-vk
>  
> -; Space-separated list of extra command line arguments for deqp-gles31. The
> +; Space-separated list of extra command line arguments for deqp-vk. The
>  ; option is not required. The environment variable PIGLIT_DEQP_VK_EXTRA_ARGS
>  ; overrides the value set here.
>  ;extra_args=--deqp-visibility hidden
> -- 
> 2.9.3
> 
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] tests/quick.py: reduce the number of vs_in tests in quick.py

2016-11-10 Thread Dylan Baker
Quoting Andres Gomez (2016-11-10 01:06:57)
> On Wed, 2016-11-09 at 14:56 -0800, Dylan Baker wrote:
> > Bump.
> > 
> > Anyone interested in this?
> > 
> > 
> 
> As commented, although this is not a definitive solution I suppose this
> can help in the meanwhile.
> 
> I'm sorry I didn't contribute a follow up. I got tangled in other tasks
> and never found time to get to it.
> 
> In any case, my idea was to reduce the amount of tested cases since I
> think right now there are probably many tests that check very similar
> inputs. Additionally, I was thinking on something like this for the
> quick profile so this works for me.

That might be a better short term solution than this patch, since it shouldn't
be that hard to do, unlike a C test that would take someone an investment of
time to create. I think in the short term I'll land this to make quick.py
quicker, it's not very invasive and we can remove it easily enough.

> 
> However, maybe a C test could be a better idea, dunno.
> 
> From my side, this is:
> 
> Reviewed-by: Andres Gomez 

Thanks!

Dylan


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2] cl: add clGetExtensionFunctionAddressForPlatform

2016-11-10 Thread Jan Vesely
On Thu, 2016-11-10 at 15:57 +0100, Serge Martin wrote:
> ---
>  tests/cl.py|   2 +
>  tests/cl/api/CMakeLists.cl.txt |   1 +
>  .../get-extension-function-address-for-platform.c  | 101 
> +
>  3 files changed, 104 insertions(+)
>  create mode 100644 tests/cl/api/get-extension-function-address-for-platform.c
> 
> diff --git a/tests/cl.py b/tests/cl.py
> index 73fba0d..5aa76b6 100644
> --- a/tests/cl.py
> +++ b/tests/cl.py
> @@ -34,6 +34,8 @@ with profile.group_manager(PiglitCLTest, 'api') as g:
>  # Platform
>  g(['cl-api-get-platform-ids'], 'clGetPlatformIDs')
>  g(['cl-api-get-platform-info'], 'clGetPlatformInfo')
> +g(['cl-api-get-extension-function-address-for-platform'],
> +'clGetExtensionFunctionAddressForPlatform')
>  
>  # Device
>  g(['cl-api-get-device-ids'], 'clGetDeviceIDs')
> diff --git a/tests/cl/api/CMakeLists.cl.txt b/tests/cl/api/CMakeLists.cl.txt
> index c0b6540..9cfe9fb 100644
> --- a/tests/cl/api/CMakeLists.cl.txt
> +++ b/tests/cl/api/CMakeLists.cl.txt
> @@ -7,6 +7,7 @@ piglit_cl_add_api_test (create-context create-context.c)
>  piglit_cl_add_api_test (create-context-from-type create-context-from-type.c)
>  piglit_cl_add_api_test (get-context-info get-context-info.c)
>  piglit_cl_add_api_test (retain_release-context retain_release-context.c)
> +piglit_cl_add_api_test (get-extension-function-address-for-platform 
> get-extension-function-address-for-platform.c)
>  
>  # Command queues
>  piglit_cl_add_api_test (create-command-queue create-command-queue.c)
> diff --git a/tests/cl/api/get-extension-function-address-for-platform.c 
> b/tests/cl/api/get-extension-function-address-for-platform.c
> new file mode 100644
> index 000..6fc4442
> --- /dev/null
> +++ b/tests/cl/api/get-extension-function-address-for-platform.c
> @@ -0,0 +1,101 @@
> +/*
> + * Copyright © 2016 Serge Martin 
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + */
> +
> +/**
> + * @file get-extension-function-address-for-platform.c
> + *
> + * Test API function:
> + *
> + *   void *
> + *   clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
> + *const char *funcname)
> + */
> +
> +#include "piglit-framework-cl-api.h"
> +
> +
> +PIGLIT_CL_API_TEST_CONFIG_BEGIN
> +
> + config.name = "clGetExtensionFunctionAddressForPlatform";
> + config.version_min = 12;
> +
> + config.run_per_platform = true;
> +
> +PIGLIT_CL_API_TEST_CONFIG_END
> +
> +
> +enum piglit_result
> +piglit_cl_test(const int argc,
> +   const char **argv,
> +   const struct piglit_cl_api_test_config* config,
> +   const struct piglit_cl_api_test_env* env)
> +{
> +#if defined(CL_VERSION_1_2)
> + enum piglit_result result = PIGLIT_PASS;
> +
> + void *ptr;
> + char *exts_list = piglit_cl_get_platform_info(env->platform_id,
> +   CL_PLATFORM_EXTENSIONS);
> +
> + if(!exts_list) {
> + fprintf(stderr, "clGetPlatformInfo error.\n");
> + return PIGLIT_FAIL;
> + }
> +
> + printf("extensions list: %s\n", exts_list);
> +
> + /*** Normal usage ***/
> + if (strstr(exts_list, "cl_khr_icd") != NULL) {
> + printf("cl_khr_icd: clIcdGetPlatformIDsKHR\n");
> + ptr = clGetExtensionFunctionAddressForPlatform(env->platform_id,
> +
> "clIcdGetPlatformIDsKHR");
> + if (!ptr) {
> + fprintf(stderr, "Failed to get clIcdGetPlatformIDsKHR 
> address\n");
> + piglit_merge_result(, PIGLIT_FAIL);
> + }
> + }
> +
> + /*** Errors ***/
> +
> + /* clIcdGetPlatformIDsKHR should be present in most of 

Re: [Piglit] [PATCH] cl: add clGetExtensionFunctionAddressForPlatform

2016-11-10 Thread Serge Martin
On Sunday 06 November 2016 13:58:31 Jan Vesely wrote:
> On Sun, 2016-11-06 at 14:43 +0100, Serge Martin wrote:
> > ---
> > 
> >  tests/cl.py|   2 +
> >  tests/cl/api/CMakeLists.cl.txt |   1 +
> >  .../get-extension-function-address-for-platform.c  | 124
> >  + 3 files changed, 127 insertions(+)
> >  create mode 100644
> >  tests/cl/api/get-extension-function-address-for-platform.c> 
> > diff --git a/tests/cl.py b/tests/cl.py
> > index 73fba0d..5aa76b6 100644
> > --- a/tests/cl.py
> > +++ b/tests/cl.py
> > 
> > @@ -34,6 +34,8 @@ with profile.group_manager(PiglitCLTest, 'api') as g:
> >  # Platform
> >  g(['cl-api-get-platform-ids'], 'clGetPlatformIDs')
> >  g(['cl-api-get-platform-info'], 'clGetPlatformInfo')
> > 
> > +g(['cl-api-get-extension-function-address-for-platform'],
> > +'clGetExtensionFunctionAddressForPlatform')
> > 
> >  # Device
> >  g(['cl-api-get-device-ids'], 'clGetDeviceIDs')
> > 
> > diff --git a/tests/cl/api/CMakeLists.cl.txt
> > b/tests/cl/api/CMakeLists.cl.txt index c0b6540..9cfe9fb 100644
> > --- a/tests/cl/api/CMakeLists.cl.txt
> > +++ b/tests/cl/api/CMakeLists.cl.txt
> > @@ -7,6 +7,7 @@ piglit_cl_add_api_test (create-context create-context.c)
> > 
> >  piglit_cl_add_api_test (create-context-from-type
> >  create-context-from-type.c) piglit_cl_add_api_test (get-context-info
> >  get-context-info.c)
> >  piglit_cl_add_api_test (retain_release-context retain_release-context.c)
> > 
> > +piglit_cl_add_api_test (get-extension-function-address-for-platform
> > get-extension-function-address-for-platform.c)> 
> >  # Command queues
> >  piglit_cl_add_api_test (create-command-queue create-command-queue.c)
> > 
> > diff --git a/tests/cl/api/get-extension-function-address-for-platform.c
> > b/tests/cl/api/get-extension-function-address-for-platform.c new file
> > mode 100644
> > index 000..4a429ef
> > --- /dev/null
> > +++ b/tests/cl/api/get-extension-function-address-for-platform.c
> > @@ -0,0 +1,124 @@
> > +/*
> > + * Copyright © 2016 Serge Martin 
> > + *
> > + * Permission is hereby granted, free of charge, to any person obtaining
> > a
> > + * copy of this software and associated documentation files (the
> > "Software"), + * to deal in the Software without restriction, including
> > without limitation + * the rights to use, copy, modify, merge, publish,
> > distribute, sublicense, + * and/or sell copies of the Software, and to
> > permit persons to whom the + * Software is furnished to do so, subject to
> > the following conditions: + *
> > + * The above copyright notice and this permission notice (including the
> > next + * paragraph) shall be included in all copies or substantial
> > portions of the + * Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND
> > NONINFRINGEMENT.  IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS
> > BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN
> > ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN
> > CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE
> > SOFTWARE.
> > + */
> > +
> > +/**
> > + * @file get-extension-function-address-for-platform.c
> > + *
> > + * Test API function:
> > + *
> > + *   void *
> > + *   clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
> > + *const char *funcname)
> > + */
> > +
> > +#include "piglit-framework-cl-api.h"
> > +
> > +
> > +PIGLIT_CL_API_TEST_CONFIG_BEGIN
> > +
> > +   config.name = "clGetExtensionFunctionAddressForPlatform";
> > +   config.version_min = 12;
> > +
> > +   config.run_per_platform = true;
> > +
> > +PIGLIT_CL_API_TEST_CONFIG_END
> > +
> > +
> > +enum piglit_result
> > +piglit_cl_test(const int argc,
> > +   const char **argv,
> > +   const struct piglit_cl_api_test_config* config,
> > +   const struct piglit_cl_api_test_env* env)
> > +{
> > +#if defined(CL_VERSION_1_2)
> > +   enum piglit_result result = PIGLIT_PASS;
> > +
> > +   size_t pos;
> > +   size_t last_pos;
> > +   void *ptr;
> > +   char *exts_list = piglit_cl_get_platform_info(env->platform_id,
> > + CL_PLATFORM_EXTENSIONS);
> > +
> > +   if(!exts_list) {
> > +   fprintf(stderr, "clGetPlatformInfo error.\n");
> > +   return PIGLIT_FAIL;
> > +   }
> > +
> > +   printf("extensions list: %s\n", exts_list);
> > +
> > +   /*** Normal usage ***/
> > +
> > +   last_pos = 0;
> > +   pos = strcspn(exts_list + last_pos, " ");
> 
> I think the name "pos" is misleading since it's always extension name
> length, not position in string.
> 
> > +   while (pos) {
> > +   char *extension = NULL;
> > +   

[Piglit] [PATCH v2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Alejandro Piñeiro
This option was added mostly to being able to run the mustpass
case list included on Vulkan CTS repository. As that file is in
txt format, we assume that the case list will be in txt format.

That is not the case for the other deqp-xxx profiles, that uses
a xml format. In any case, it is properly documented on the
piglit.conf.example

v2: allow to receive a txt file with just the name of the test,
without any formatting
---

This new version is somewhat more intrusive. It allows to receive
a txt file with just the name of the tests. But doing that
it removed the ill-format-line check on deqp.make_profile.

The advantage of this is that we don't need to transform the
mustpass file that cames with the vulkan cts repository.

FWIW, deqp-vk also accepts that format. So with this change,
piglit just allows to receive the testcase list in both txt formats.

 framework/test/deqp.py | 14 ++
 piglit.conf.example|  7 +++
 tests/deqp_vk.py   | 10 +++---
 3 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/framework/test/deqp.py b/framework/test/deqp.py
index 5b53efd..a63bea7 100644
--- a/framework/test/deqp.py
+++ b/framework/test/deqp.py
@@ -78,6 +78,14 @@ def select_source(bin_, filename, mustpass, extra_args):
 return iter_deqp_test_cases(
 gen_caselist_txt(bin_, filename, extra_args))
 
+def select_source_txt(bin_, filename, mustpass, extra_args):
+"""Return either the mustpass list in txt format or the generated list."""
+if options.OPTIONS.deqp_mustpass:
+return iter_deqp_test_cases(mustpass)
+else:
+return iter_deqp_test_cases(
+gen_caselist_txt(bin_, filename, extra_args))
+
 
 def make_profile(test_list, test_class):
 """Create a TestProfile instance."""
@@ -146,10 +154,8 @@ def iter_deqp_test_cases(case_file):
 continue
 elif line.startswith('TEST:'):
 yield line[len('TEST:'):].strip()
-else:
-raise exceptions.PiglitFatalError(
-'deqp: {}:{}: ill-formed line'.format(case_file, i))
-
+else: # We assume that the line is just the name of the test
+yield line
 
 @six.add_metaclass(abc.ABCMeta)
 class DEQPBaseTest(Test):
diff --git a/piglit.conf.example b/piglit.conf.example
index e1a91aa..46d1ed6 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -99,6 +99,13 @@ testB
 ; Can be overwritten by PIGLIT_DEQP_VK_BIN environment variable
 ;bin=/home/knuth/Vulkan-CTS/external/vulkancts/modules/vulkan/deqp-vk
 
+; Path to the test case list for deqp-vk. You can also set this with
+; the environment variable PIGLIT_DEQP_VK_MUSTPASS. Piglit will run
+; the subset of dEQP-VK tests if this option is set. Note that in this
+; case the mustpass file is in txt format, in opposite to other
+; deqp-xxx mustpass list where they are on xml format.
+;mustpasslist=/home/knuth/Vulkan-CTS/external/vulkancts/mustpass/1.0.1/vk-default.txt
+
 ; Space-separated list of extra command line arguments for deqp-vk. The
 ; option is not required. The environment variable PIGLIT_DEQP_VK_EXTRA_ARGS
 ; overrides the value set here.
diff --git a/tests/deqp_vk.py b/tests/deqp_vk.py
index 4df9e3b..b802ff1 100644
--- a/tests/deqp_vk.py
+++ b/tests/deqp_vk.py
@@ -30,6 +30,7 @@ from __future__ import (
 import re
 
 from framework.test import deqp
+from framework.options import OPTIONS
 
 __all__ = ['profile']
 
@@ -38,6 +39,10 @@ _DEQP_VK_BIN = deqp.get_option('PIGLIT_DEQP_VK_BIN',
('deqp-vk', 'bin'),
required=True)
 
+_DEQP_MUSTPASS = deqp.get_option('PIGLIT_DEQP_VK_MUSTPASS',
+ ('deqp-vk', 'mustpasslist'),
+ required=OPTIONS.deqp_mustpass)
+
 _EXTRA_ARGS = deqp.get_option('PIGLIT_DEQP_VK_EXTRA_ARGS',
   ('deqp-vk', 'extra_args'),
   default='').split()
@@ -72,7 +77,6 @@ class DEQPVKTest(deqp.DEQPBaseTest):
 
 
 profile = deqp.make_profile(  # pylint: disable=invalid-name
-deqp.iter_deqp_test_cases(
-deqp.gen_caselist_txt(_DEQP_VK_BIN, 'dEQP-VK-cases.txt',
-  _EXTRA_ARGS)),
+deqp.select_source_txt(_DEQP_VK_BIN, 'dEQP-VK-cases.txt',
+   _DEQP_MUSTPASS, _EXTRA_ARGS),
 DEQPVKTest)
-- 
2.9.3

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 2/2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Alejandro Piñeiro
Im dropping this patch.

As the summary says, the initial idea was using this change with the
vk-default.txt file included on the mustpass directory at Vulkan-CTS.

But that file is not in the correct format for this patch. This patch
assumes the txt format that would result if you call ./deqp-vk
--deqp-runmode=txt-caselist.

I will try again to check if it is possible to use directly that file
(because as far as I see, I didn't find any other file with the mustpass
list of tests in other format)

Sorry for the noise.

On 10/11/16 14:41, Alejandro Piñeiro wrote:
> This option was added mostly to being able to run the mustpass
> case list included on Vulkan CTS repository. As that file is in
> txt format, we assume that the case list will be in txt format.
>
> That is not the case for the other deqp-xxx profiles, that uses
> a xml format. In any case, it is properly documented on the
> piglit.conf.example
> ---
>  framework/test/deqp.py |  8 
>  piglit.conf.example|  7 +++
>  tests/deqp_vk.py   | 10 +++---
>  3 files changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/framework/test/deqp.py b/framework/test/deqp.py
> index 5b53efd..b175445 100644
> --- a/framework/test/deqp.py
> +++ b/framework/test/deqp.py
> @@ -78,6 +78,14 @@ def select_source(bin_, filename, mustpass, extra_args):
>  return iter_deqp_test_cases(
>  gen_caselist_txt(bin_, filename, extra_args))
>  
> +def select_source_txt(bin_, filename, mustpass, extra_args):
> +"""Return either the mustpass list in txt format or the generated 
> list."""
> +if options.OPTIONS.deqp_mustpass:
> +return iter_deqp_test_cases(mustpass)
> +else:
> +return iter_deqp_test_cases(
> +gen_caselist_txt(bin_, filename, extra_args))
> +
>  
>  def make_profile(test_list, test_class):
>  """Create a TestProfile instance."""
> diff --git a/piglit.conf.example b/piglit.conf.example
> index e1a91aa..46d1ed6 100644
> --- a/piglit.conf.example
> +++ b/piglit.conf.example
> @@ -99,6 +99,13 @@ testB
>  ; Can be overwritten by PIGLIT_DEQP_VK_BIN environment variable
>  ;bin=/home/knuth/Vulkan-CTS/external/vulkancts/modules/vulkan/deqp-vk
>  
> +; Path to the test case list for deqp-vk. You can also set this with
> +; the environment variable PIGLIT_DEQP_VK_MUSTPASS. Piglit will run
> +; the subset of dEQP-VK tests if this option is set. Note that in this
> +; case the mustpass file is in txt format, in opposite to other
> +; deqp-xxx mustpass list where they are on xml format.
> +;mustpasslist=/home/knuth/Vulkan-CTS/external/vulkancts/mustpass/1.0.1/vk-default.txt
> +
>  ; Space-separated list of extra command line arguments for deqp-vk. The
>  ; option is not required. The environment variable PIGLIT_DEQP_VK_EXTRA_ARGS
>  ; overrides the value set here.
> diff --git a/tests/deqp_vk.py b/tests/deqp_vk.py
> index 4df9e3b..b802ff1 100644
> --- a/tests/deqp_vk.py
> +++ b/tests/deqp_vk.py
> @@ -30,6 +30,7 @@ from __future__ import (
>  import re
>  
>  from framework.test import deqp
> +from framework.options import OPTIONS
>  
>  __all__ = ['profile']
>  
> @@ -38,6 +39,10 @@ _DEQP_VK_BIN = deqp.get_option('PIGLIT_DEQP_VK_BIN',
> ('deqp-vk', 'bin'),
> required=True)
>  
> +_DEQP_MUSTPASS = deqp.get_option('PIGLIT_DEQP_VK_MUSTPASS',
> + ('deqp-vk', 'mustpasslist'),
> + required=OPTIONS.deqp_mustpass)
> +
>  _EXTRA_ARGS = deqp.get_option('PIGLIT_DEQP_VK_EXTRA_ARGS',
>('deqp-vk', 'extra_args'),
>default='').split()
> @@ -72,7 +77,6 @@ class DEQPVKTest(deqp.DEQPBaseTest):
>  
>  
>  profile = deqp.make_profile(  # pylint: disable=invalid-name
> -deqp.iter_deqp_test_cases(
> -deqp.gen_caselist_txt(_DEQP_VK_BIN, 'dEQP-VK-cases.txt',
> -  _EXTRA_ARGS)),
> +deqp.select_source_txt(_DEQP_VK_BIN, 'dEQP-VK-cases.txt',
> +   _DEQP_MUSTPASS, _EXTRA_ARGS),
>  DEQPVKTest)


___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 2/2] framework: Add mustpass option for the Vulkan CTS test runner

2016-11-10 Thread Alejandro Piñeiro
This option was added mostly to being able to run the mustpass
case list included on Vulkan CTS repository. As that file is in
txt format, we assume that the case list will be in txt format.

That is not the case for the other deqp-xxx profiles, that uses
a xml format. In any case, it is properly documented on the
piglit.conf.example
---
 framework/test/deqp.py |  8 
 piglit.conf.example|  7 +++
 tests/deqp_vk.py   | 10 +++---
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/framework/test/deqp.py b/framework/test/deqp.py
index 5b53efd..b175445 100644
--- a/framework/test/deqp.py
+++ b/framework/test/deqp.py
@@ -78,6 +78,14 @@ def select_source(bin_, filename, mustpass, extra_args):
 return iter_deqp_test_cases(
 gen_caselist_txt(bin_, filename, extra_args))
 
+def select_source_txt(bin_, filename, mustpass, extra_args):
+"""Return either the mustpass list in txt format or the generated list."""
+if options.OPTIONS.deqp_mustpass:
+return iter_deqp_test_cases(mustpass)
+else:
+return iter_deqp_test_cases(
+gen_caselist_txt(bin_, filename, extra_args))
+
 
 def make_profile(test_list, test_class):
 """Create a TestProfile instance."""
diff --git a/piglit.conf.example b/piglit.conf.example
index e1a91aa..46d1ed6 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -99,6 +99,13 @@ testB
 ; Can be overwritten by PIGLIT_DEQP_VK_BIN environment variable
 ;bin=/home/knuth/Vulkan-CTS/external/vulkancts/modules/vulkan/deqp-vk
 
+; Path to the test case list for deqp-vk. You can also set this with
+; the environment variable PIGLIT_DEQP_VK_MUSTPASS. Piglit will run
+; the subset of dEQP-VK tests if this option is set. Note that in this
+; case the mustpass file is in txt format, in opposite to other
+; deqp-xxx mustpass list where they are on xml format.
+;mustpasslist=/home/knuth/Vulkan-CTS/external/vulkancts/mustpass/1.0.1/vk-default.txt
+
 ; Space-separated list of extra command line arguments for deqp-vk. The
 ; option is not required. The environment variable PIGLIT_DEQP_VK_EXTRA_ARGS
 ; overrides the value set here.
diff --git a/tests/deqp_vk.py b/tests/deqp_vk.py
index 4df9e3b..b802ff1 100644
--- a/tests/deqp_vk.py
+++ b/tests/deqp_vk.py
@@ -30,6 +30,7 @@ from __future__ import (
 import re
 
 from framework.test import deqp
+from framework.options import OPTIONS
 
 __all__ = ['profile']
 
@@ -38,6 +39,10 @@ _DEQP_VK_BIN = deqp.get_option('PIGLIT_DEQP_VK_BIN',
('deqp-vk', 'bin'),
required=True)
 
+_DEQP_MUSTPASS = deqp.get_option('PIGLIT_DEQP_VK_MUSTPASS',
+ ('deqp-vk', 'mustpasslist'),
+ required=OPTIONS.deqp_mustpass)
+
 _EXTRA_ARGS = deqp.get_option('PIGLIT_DEQP_VK_EXTRA_ARGS',
   ('deqp-vk', 'extra_args'),
   default='').split()
@@ -72,7 +77,6 @@ class DEQPVKTest(deqp.DEQPBaseTest):
 
 
 profile = deqp.make_profile(  # pylint: disable=invalid-name
-deqp.iter_deqp_test_cases(
-deqp.gen_caselist_txt(_DEQP_VK_BIN, 'dEQP-VK-cases.txt',
-  _EXTRA_ARGS)),
+deqp.select_source_txt(_DEQP_VK_BIN, 'dEQP-VK-cases.txt',
+   _DEQP_MUSTPASS, _EXTRA_ARGS),
 DEQPVKTest)
-- 
2.9.3

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 1/2] framework: fix typos on deqp-vk entry

2016-11-10 Thread Alejandro Piñeiro
---

Those are really trivial, I put them on a different patch to make easier the
review. But I think that when pushing, it would be better to squash it with
the next patch.

 piglit.conf.example | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/piglit.conf.example b/piglit.conf.example
index 17f2329..e1a91aa 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -95,11 +95,11 @@ testB
 ;mustpasslist=/home/knuth/src/deqp/android/cts/com.drawelements.deqp.gles31.xml
 
 [deqp-vk]
-; Path to the deqp-ck executable
+; Path to the deqp-vk executable
 ; Can be overwritten by PIGLIT_DEQP_VK_BIN environment variable
 ;bin=/home/knuth/Vulkan-CTS/external/vulkancts/modules/vulkan/deqp-vk
 
-; Space-separated list of extra command line arguments for deqp-gles31. The
+; Space-separated list of extra command line arguments for deqp-vk. The
 ; option is not required. The environment variable PIGLIT_DEQP_VK_EXTRA_ARGS
 ; overrides the value set here.
 ;extra_args=--deqp-visibility hidden
-- 
2.9.3

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 1/5] arb_post_depth_coverage-basic: Add a basic initial test.

2016-11-10 Thread Ilia Mirkin
I don't think I received the rest of the series, and neither did the list
archive. If all you want to do is test the shader parsing, just use a
glslparsertest-runnable shader file.

IMHO there's not much point in testing the sample mask without any of the
other frag tests.

On Nov 10, 2016 7:03 AM, "Manolova, Plamena" 
wrote:



From: ibmir...@gmail.com [ibmir...@gmail.com] on behalf of Ilia Mirkin [
imir...@alum.mit.edu]
Sent: 10 November 2016 01:49
To: Manolova, Plamena
Cc: piglit@lists.freedesktop.org
Subject: Re: [Piglit] [PATCH 1/5] arb_post_depth_coverage-basic: Add a
basic initial test.

On Wed, Nov 9, 2016 at 6:39 PM, Plamena Manolova
 wrote:
> A basic test to check whether the values written to gl_SampleMaskIn
> are still correct after enabling the ARB_post_depth_coverage
> extension.
>
> Signed-off-by: Plamena Manolova 
> ---
>  registry/gl.xml|   2 +
>  tests/all.py   |   5 +
>  tests/spec/CMakeLists.txt  |   1 +
>  .../spec/arb_post_depth_coverage/CMakeLists.gl.txt |  11 ++
>  tests/spec/arb_post_depth_coverage/CMakeLists.txt  |   1 +
>  tests/spec/arb_post_depth_coverage/basic.c | 165
+
>  6 files changed, 185 insertions(+)
>  create mode 100644 tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt
>  create mode 100644 tests/spec/arb_post_depth_coverage/CMakeLists.txt
>  create mode 100644 tests/spec/arb_post_depth_coverage/basic.c
>
> diff --git a/registry/gl.xml b/registry/gl.xml
> index 3fc8863..59894e8 100644
> --- a/registry/gl.xml
> +++ b/registry/gl.xml

This file comes from Khronos and should be synchronized accordingly.
It appears that there's already a line



in there. Not sure why you needed your change in the first place, this
only matters for dispatch, of which there is none for this ext.

> @@ -38345,6 +38345,8 @@ typedef unsigned int GLhandleARB;
>  
>  
>  
> +
> +
>  
>  
>  
> diff --git a/tests/all.py b/tests/all.py
> index e56cae8..d47187e 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -4766,6 +4766,11 @@ with profile.group_manager(
>  g(['arb_shader_image_load_store-unused'], 'unused')
>
>  with profile.group_manager(
> +PiglitGLTest,
> +grouptools.join('spec', 'arb_post_depth_coverage')) as g:
> +g(['arb_post_depth_coverage-basic'])
> +
> +with profile.group_manager(
>  PiglitGLTest,
>  grouptools.join('spec', 'arb_shader_image_size')) as g:
>  g(['arb_shader_image_size-builtin'], 'builtin')
> diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
> index a057c02..4377196 100644
> --- a/tests/spec/CMakeLists.txt
> +++ b/tests/spec/CMakeLists.txt
> @@ -152,3 +152,4 @@ add_subdirectory (arb_query_buffer_object)
>  add_subdirectory (ext_window_rectangles)
>  add_subdirectory (arb_shader_texture_image_samples)
>  add_subdirectory (arb_texture_barrier)
> +add_subdirectory (arb_post_depth_coverage)
> diff --git a/tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt
b/tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt
> new file mode 100644
> index 000..1a71774
> --- /dev/null
> +++ b/tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt
> @@ -0,0 +1,11 @@
> +include_directories(
> +   ${GLEXT_INCLUDE_DIR}
> +   ${OPENGL_INCLUDE_PATH}
> +)
> +
> +link_libraries (
> +   piglitutil_${piglit_target_api}
> +   ${OPENGL_gl_LIBRARY}
> +)
> +
> +piglit_add_executable (arb_post_depth_coverage-basic basic.c)
> diff --git a/tests/spec/arb_post_depth_coverage/CMakeLists.txt
b/tests/spec/arb_post_depth_coverage/CMakeLists.txt
> new file mode 100644
> index 000..144a306
> --- /dev/null
> +++ b/tests/spec/arb_post_depth_coverage/CMakeLists.txt
> @@ -0,0 +1 @@
> +piglit_include_target_api()
> diff --git a/tests/spec/arb_post_depth_coverage/basic.c
b/tests/spec/arb_post_depth_coverage/basic.c
> new file mode 100644
> index 000..e1bd71f
> --- /dev/null
> +++ b/tests/spec/arb_post_depth_coverage/basic.c
> @@ -0,0 +1,165 @@
> +/*
> + * Copyright (c) 2015 Intel Corporation.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining
a
> + * copy of this software and associated documentation files (the
"Software"),
> + * to deal in the Software without restriction, including without
limitation
> + * the rights to use, copy, modify, merge, publish, distribute,
sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the
next
> + * paragraph) shall be included in all copies or substantial portions of
the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT 

Re: [Piglit] [PATCH 1/5] arb_post_depth_coverage-basic: Add a basic initial test.

2016-11-10 Thread Manolova, Plamena


From: ibmir...@gmail.com [ibmir...@gmail.com] on behalf of Ilia Mirkin 
[imir...@alum.mit.edu]
Sent: 10 November 2016 01:49
To: Manolova, Plamena
Cc: piglit@lists.freedesktop.org
Subject: Re: [Piglit] [PATCH 1/5] arb_post_depth_coverage-basic: Add a basic 
initial test.

On Wed, Nov 9, 2016 at 6:39 PM, Plamena Manolova
 wrote:
> A basic test to check whether the values written to gl_SampleMaskIn
> are still correct after enabling the ARB_post_depth_coverage
> extension.
>
> Signed-off-by: Plamena Manolova 
> ---
>  registry/gl.xml|   2 +
>  tests/all.py   |   5 +
>  tests/spec/CMakeLists.txt  |   1 +
>  .../spec/arb_post_depth_coverage/CMakeLists.gl.txt |  11 ++
>  tests/spec/arb_post_depth_coverage/CMakeLists.txt  |   1 +
>  tests/spec/arb_post_depth_coverage/basic.c | 165 
> +
>  6 files changed, 185 insertions(+)
>  create mode 100644 tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt
>  create mode 100644 tests/spec/arb_post_depth_coverage/CMakeLists.txt
>  create mode 100644 tests/spec/arb_post_depth_coverage/basic.c
>
> diff --git a/registry/gl.xml b/registry/gl.xml
> index 3fc8863..59894e8 100644
> --- a/registry/gl.xml
> +++ b/registry/gl.xml

This file comes from Khronos and should be synchronized accordingly.
It appears that there's already a line



in there. Not sure why you needed your change in the first place, this
only matters for dispatch, of which there is none for this ext.

> @@ -38345,6 +38345,8 @@ typedef unsigned int GLhandleARB;
>  
>  
>  
> +
> +
>  
>  
>  
> diff --git a/tests/all.py b/tests/all.py
> index e56cae8..d47187e 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -4766,6 +4766,11 @@ with profile.group_manager(
>  g(['arb_shader_image_load_store-unused'], 'unused')
>
>  with profile.group_manager(
> +PiglitGLTest,
> +grouptools.join('spec', 'arb_post_depth_coverage')) as g:
> +g(['arb_post_depth_coverage-basic'])
> +
> +with profile.group_manager(
>  PiglitGLTest,
>  grouptools.join('spec', 'arb_shader_image_size')) as g:
>  g(['arb_shader_image_size-builtin'], 'builtin')
> diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
> index a057c02..4377196 100644
> --- a/tests/spec/CMakeLists.txt
> +++ b/tests/spec/CMakeLists.txt
> @@ -152,3 +152,4 @@ add_subdirectory (arb_query_buffer_object)
>  add_subdirectory (ext_window_rectangles)
>  add_subdirectory (arb_shader_texture_image_samples)
>  add_subdirectory (arb_texture_barrier)
> +add_subdirectory (arb_post_depth_coverage)
> diff --git a/tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt 
> b/tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt
> new file mode 100644
> index 000..1a71774
> --- /dev/null
> +++ b/tests/spec/arb_post_depth_coverage/CMakeLists.gl.txt
> @@ -0,0 +1,11 @@
> +include_directories(
> +   ${GLEXT_INCLUDE_DIR}
> +   ${OPENGL_INCLUDE_PATH}
> +)
> +
> +link_libraries (
> +   piglitutil_${piglit_target_api}
> +   ${OPENGL_gl_LIBRARY}
> +)
> +
> +piglit_add_executable (arb_post_depth_coverage-basic basic.c)
> diff --git a/tests/spec/arb_post_depth_coverage/CMakeLists.txt 
> b/tests/spec/arb_post_depth_coverage/CMakeLists.txt
> new file mode 100644
> index 000..144a306
> --- /dev/null
> +++ b/tests/spec/arb_post_depth_coverage/CMakeLists.txt
> @@ -0,0 +1 @@
> +piglit_include_target_api()
> diff --git a/tests/spec/arb_post_depth_coverage/basic.c 
> b/tests/spec/arb_post_depth_coverage/basic.c
> new file mode 100644
> index 000..e1bd71f
> --- /dev/null
> +++ b/tests/spec/arb_post_depth_coverage/basic.c
> @@ -0,0 +1,165 @@
> +/*
> + * Copyright (c) 2015 Intel Corporation.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

Re: [Piglit] [Patch 1/1] texelFetch, textureSize: replace deprecated gl_FragColor

2016-11-10 Thread Olender, Sebastian D
Ken,

In forward compatible context deprecated features are disallowed.


-Original Message-
From: Kenneth Graunke [mailto:kenn...@whitecape.org] 
Sent: Wednesday, November 9, 2016 10:04 PM
To: Olender, Sebastian D 
Cc: piglit@lists.freedesktop.org; Graunke, Kenneth W 

Subject: Re: [Piglit] [Patch 1/1] texelFetch, textureSize: replace deprecated 
gl_FragColor

On Wednesday, November 9, 2016 3:18:36 PM PST Sebastian Olender wrote:
> According to GLSLLangSpec: Use of gl_FragData and gl_FragColor is 
> deprecated in version 1.3, using user-defined out instead.
> ---
>  tests/texturing/shaders/texelFetch.c  | 9 ++---  
> tests/texturing/shaders/textureSize.c | 9 ++---
>  2 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/texturing/shaders/texelFetch.c 
> b/tests/texturing/shaders/texelFetch.c
> index 0291a12..2e1d223 100644
> --- a/tests/texturing/shaders/texelFetch.c
> +++ b/tests/texturing/shaders/texelFetch.c
> @@ -627,9 +627,10 @@ generate_GLSL(enum shader_target test_stage)
>"#version %d\n"
>"flat in %s color;\n"
>"uniform vec4 divisor;\n"
> +  "out vec4 fragColor;\n"
>"void main()\n"
>"{\n"
> -  "gl_FragColor = vec4(color)/divisor;\n"
> +  "fragColor = vec4(color)/divisor;\n"
>"}\n",
>shader_version,
>sampler.return_type);
> @@ -676,9 +677,10 @@ generate_GLSL(enum shader_target test_stage)
>"#version %d\n"
>"flat in %s color;\n"
>"uniform vec4 divisor;\n"
> +  "out vec4 fragColor;\n"
>"void main()\n"
>"{\n"
> -  "gl_FragColor = vec4(color)/divisor;\n"
> +  "fragColor = vec4(color)/divisor;\n"
>"}\n",
>shader_version,
>sampler.return_type);
> @@ -703,10 +705,11 @@ generate_GLSL(enum shader_target test_stage)
>"flat in ivec4 tc;\n"
>"uniform vec4 divisor;\n"
>"uniform %s tex;\n"
> +  "out vec4 fragColor;\n"
>"void main()\n"
>"{\n"
>"vec4 color = texelFetch%s(tex, ivec%d(tc)%s%s);\n"
> -  "gl_FragColor = color/divisor;\n"
> +  "fragColor = color/divisor;\n"
>"}\n",
>shader_version,
>has_samples() ? "#extension 
> GL_ARB_texture_multisample: require" 
> : "", diff --git a/tests/texturing/shaders/textureSize.c 
> b/tests/texturing/shaders/textureSize.c
> index c02c566..ac3df04 100644
> --- a/tests/texturing/shaders/textureSize.c
> +++ b/tests/texturing/shaders/textureSize.c
> @@ -284,9 +284,10 @@ generate_GLSL(enum shader_target test_stage)
>"#define ivec1 int\n"
>"#define vec1 float\n"
>"flat in ivec%d size;\n"
> +  "out vec4 fragColor;\n"
>"void main()\n"
>"{\n"
> -  "gl_FragColor = vec4(0.01 * size,%s 1);\n"
> +  "fragColor = vec4(0.01 * size,%s 1);\n"
>"}\n",
>shader_version, size, zeroes[3 - size]);
>   break;
> @@ -325,9 +326,10 @@ generate_GLSL(enum shader_target test_stage)
>"#define ivec1 int\n"
>"#define vec1 float\n"
>"flat in ivec%d size;\n"
> +  "out vec4 fragColor;\n"
>"void main()\n"
>"{\n"
> -  "gl_FragColor = vec4(0.01 * size,%s 1);\n"
> +  "fragColor = vec4(0.01 * size,%s 1);\n"
>"}\n",
>shader_version, size, zeroes[3 - size]);
>   break;
> @@ -345,10 +347,11 @@ generate_GLSL(enum shader_target test_stage)
>"#define ivec1 int\n"
>"uniform int lod;\n"
>"uniform %s tex;\n"
> +  "out vec4 fragColor;\n"
>"void main()\n"
>"{\n"
>"ivec%d size = textureSize(tex%s);\n"
> -  "gl_FragColor = vec4(0.01 * size,%s 1);\n"
> +  "fragColor = vec4(0.01 * size,%s 1);\n"
>"}\n",
>shader_version, extension, sampler.name, size, lod_arg,
>zeroes[3 - 

Re: [Piglit] [PATCH] tests/quick.py: reduce the number of vs_in tests in quick.py

2016-11-10 Thread Andres Gomez
On Wed, 2016-11-09 at 14:56 -0800, Dylan Baker wrote:
> Bump.
> 
> Anyone interested in this?
> 
> 

As commented, although this is not a definitive solution I suppose this
can help in the meanwhile.

I'm sorry I didn't contribute a follow up. I got tangled in other tasks
and never found time to get to it.

In any case, my idea was to reduce the amount of tested cases since I
think right now there are probably many tests that check very similar
inputs. Additionally, I was thinking on something like this for the
quick profile so this works for me.

However, maybe a C test could be a better idea, dunno.

From my side, this is:

Reviewed-by: Andres Gomez 

> 
> Dylan
> 
> Quoting Dylan Baker (2016-10-31 14:40:35)
> > There are 18000 of these tests, quick.py has 53000 tests, which is 34%
> > of the total tests. That's just too many for quick.py.
> > 
> > This patch takes the somewhat naive approach of just filtering out 80%
> > of those tests from quick.py, which reduces the total number of tests to
> > 38000, which makes a pretty big dent in the amount of time it takes to
> > run quick.py. The approach is deterministic, but random.
> > 
> > cc: Andres Gomez 
> > Signed-off-by: 
> > ---
> >  tests/quick.py | 27 +++
> >  1 file changed, 27 insertions(+)
> > 
> > diff --git a/tests/quick.py b/tests/quick.py
> > index 0e02f92..5f7250f 100644
> > --- a/tests/quick.py
> > +++ b/tests/quick.py
> > @@ -1,8 +1,19 @@
> >  # -*- coding: utf-8 -*-
> >  
> > +"""A quicker profile than all.
> > +
> > +This profile filters out a number of very slow tests, and tests that are 
> > very
> > +exhaustively tested, since they add a good deal of runtime to piglit.
> > +
> > +There are 18000+ auto-generated tests that are exhaustive, but for 
> > quick.py we
> > +don't want that level of exhaustiveness, so this filter removes 80% in a 
> > random
> > +(but deterministic) way.
> > +"""
> > +
> >  from __future__ import (
> >  absolute_import, division, print_function, unicode_literals
> >  )
> > +import random
> >  
> >  from framework import grouptools
> >  from framework.test import (GleanTest, PiglitGLTest)
> > @@ -13,6 +24,21 @@ __all__ = ['profile']
> >  # See the note in all.py about this warning
> >  # pylint: disable=bad-continuation
> >  
> > +
> > +class FilterVsIn(object):
> > +"""Filter out 80% of the Vertex Attrib 64 vs_in tests."""
> > +
> > +def __init__(self):
> > +self.random = random.Random()
> > +self.random.seed(42)
> > +
> > +def __call__(self, name, _):
> > +if 'vs_in' in name:
> > +# 20%
> > +return self.random.random() <= .2
> > +return True
> > +
> > +
> >  GleanTest.GLOBAL_PARAMS += ["--quick"]
> >  
> >  # Set the --quick flag on a few image_load_store_tests
> > @@ -37,3 +63,4 @@ with profile.group_manager(
> >  
> >  # These take too long
> >  profile.filter_tests(lambda n, _: '-explosion' not in n)
> > +profile.filter_tests(FilterVsIn())
> > -- 
> > 2.10.2
> > 
-- 
Br,

Andres
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit