[Piglit] [PATCH] Enable etc2 tests on gl contexts that support GL_ARB_ES3_compatibility extension

Anuj Phogat anuj.phogat at gmail.com
Tue Mar 5 11:31:58 PST 2013


On Mon, Mar 4, 2013 at 3:34 PM, Eric Anholt <eric at anholt.net> wrote:
> Matt Turner <mattst88 at gmail.com> writes:
>
>> On Mon, Mar 4, 2013 at 2:43 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>>
>>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>>> ---
>>>  tests/spec/gles-3.0/CMakeLists.gl.txt                     | 5 +++++
>>>  tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c | 4 ++++
>>>  2 files changed, 9 insertions(+)
>>>  create mode 100644 tests/spec/gles-3.0/CMakeLists.gl.txt
>>>
>>> diff --git a/tests/spec/gles-3.0/CMakeLists.gl.txt b/tests/spec/gles-3.0/CMakeLists.gl.txt
>>> new file mode 100644
>>> index 0000000..258a1b9
>>> --- /dev/null
>>> +++ b/tests/spec/gles-3.0/CMakeLists.gl.txt
>>> @@ -0,0 +1,5 @@
>>> +link_libraries (
>>> +       piglitutil_${piglit_target_api}
>>> +)
>>> +
>>> +piglit_add_executable(oes_compressed_etc2_texture-miptree oes_compressed_etc2_texture-miptree.c)
>>> diff --git a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c
>>> index fceafab..802d55e 100644
>>> --- a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c
>>> +++ b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c
>>> @@ -56,6 +56,7 @@ static const int window_height = 64;
>>>
>>>  PIGLIT_GL_TEST_CONFIG_BEGIN
>>>         config.supports_gl_es_version = 30;
>>> +       config.supports_gl_compat_version = 30;
>>>         config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
>>>
>>>  PIGLIT_GL_TEST_CONFIG_END
>>> @@ -177,6 +178,9 @@ piglit_init(int argc, char **argv)
>>>         if (argc < 2)
>>>                 print_usage_and_exit(argv[0]);
>>>
>>> +       if (!piglit_is_gles())
>>> +               piglit_require_extension("GL_ARB_ES3_compatibility");
>>> +
>>>         if (strcmp(argv[1], "rgb8") == 0) {
>>>                 compressed_filename =
>>>                         "waffles-compressed-etc2-rgb8-64x32-miptree.ktx";
>>> --
>>> 1.7.11.7
>>>
>>
>> I guess we should also add this to all.tests?
>
> That would imply some way to make the test only consider an ES or
> desktop context, which I think we should do given that we had bugs here.
> There's an example in 9407d09cec3e587a15cd61154474a473888cfc28 of
> manually setting config flags based on command line args.

yeah. it'll be useful to force the test to run on core or compatibility contexts
based on command line argument. I'll post an updated patch to include
that feature. Let me know if I misunderstood your comment.


More information about the Piglit mailing list