Re: [Piglit] [PATCH] egl-util: remove GL include
On Mon, Aug 18, 2014 at 5:43 PM, Ken Phillis Jr kphilli...@gmail.com wrote: I think a ifdef is needed since egl can create opengl contexts. EGL can create an OpenGL context using an EGLConfig that has EGL_RENDERABLE_TYPE with EGL_OPENGL_BIT. It does so by first binding to the OpenGL API, perhaps something like this: const EGLint egl_attribs[] = { ..., EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, EGL_NONE }; EGLConfig egl_configs[1]; EGLint num_configs; ... eglChooseConfig(egl_display, egl_attribs, configs, ARRAY_SIZE(configs), num_configs); if (num_configs 0) { eglBindAPI(EGL_OPENGL_API); eglCreateContext(egl_display, egl_configs[0], EGL_NO_CONTEXT, attrib_list); } EGL_OPENGL_API and EGL_OPENGL_BIT are both defined in EGL/egl.h, however, not GL/gl.h. I'm confused... what #ifdef is missing? On Aug 17, 2014 7:32 PM, Daniel Kurtz djku...@chromium.org wrote: On Aug 18, 2014 3:49 AM, Kristian Høgsberg k...@bitplanet.net wrote: On Sun, Aug 17, 2014 at 7:19 AM, Ken Phillis Jr kphilli...@gmail.com wrote: This patch looks good to me. On Aug 17, 2014 7:39 AM, Daniel Kurtz djku...@chromium.org wrote: EGL util should not in any way depend on the headers of a particular client library. In fact, this breaks compilation on pure OpenGL ES systems, since they do not have OpenGL headers installed (GL/gl.h). Signed-off-by: Daniel Kurtz djku...@chromium.org --- I've test built this change on two different systems with EGL/OpenGL ES-only (ARM Mali and Nvidia Tegra). I have not built on a system with EGL + OpenGL, or mixed GL/GLES... does anybody have a system like that and can double check? It certainly shouldn't be in the header, but egl-util.c needs it and breaks if you remove it. egl-util.c builds fine for GLES without GL/gl.h (and breaks with it). Why is it needed for GL? What am I missing? Kristian Also, I do not have commit access, so can someone please submit this for me if it looks good? Thanks, -djk tests/egl/egl-util.h | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/egl/egl-util.h b/tests/egl/egl-util.h index f5c74fd..27d2926 100644 --- a/tests/egl/egl-util.h +++ b/tests/egl/egl-util.h @@ -12,7 +12,6 @@ #include X11/Xlib.h #include X11/Xutil.h #include X11/keysym.h -#include GL/gl.h #include EGL/egl.h #include EGL/eglext.h -- 2.1.0.rc2.206.gedb03e5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] Support for waffle WGL and related cleanups
On 13/08/14 14:08, Brian Paul wrote: On 08/12/2014 11:18 AM, Emil Velikov wrote: Hello list, The series adds a piglit_wgl_framework based on my Add WGL support to waffle GSoC this summer. A sizeable chunk of the waffle code is not yet upstream, although I would expect that to change soon :P All but patches 04, 10 and 11 should be safe to land even without waffle in place. NOTE: I have broken the waffle API in a non-backwards compatible way and will update the above three to handle new and old waffle as soon as waffle WGL lands upstream and the version is bumped. FWIW, with this series and the latest one of waffle I can reliably lockup my nvidia GPU while running piglit on Windows 7 :) This series can be found in branch 'waffle-WGL' at https://urldefense.proofpoint.com/v1/url?u=https://github.com/evelikov/piglitk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0Am=CddOnmDlz5aH1zjrZeU33ysmfSWuyPviUBiN3J6nLrU%3D%0As=8d24d26b1abc98392e8f3942aed87dc09e2043ffafe61d61303ff9777575f7c4 while the latest waffle wgl (+fixes) 'yet-another-round-of-msvc-fixes' at https://urldefense.proofpoint.com/v1/url?u=https://github.com/evelikov/wafflek=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0Am=CddOnmDlz5aH1zjrZeU33ysmfSWuyPviUBiN3J6nLrU%3D%0As=d067ffd67d63004d28430effd2a65c87304ffae4366a3f4b6bf587c45e422605 Question, comments and reviews are greatly appreciated. The series looks OK to me, AFAICT. You might want to wait for Chad's review if you have any doubts though. See my other replies for a few minor nits. Reviewed-by: Brian Paul bri...@vmware.com Thanks for the review and comments Brian. Seems like I need to get a better spell-checker :\ I've went ahead all but the waffle WGL patches. The latter of which I'll postpone until all of waffle is in place. -Emil ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 05/12] cmake: cleanup PIGLIT_USE_WAFFLE builds
On 12/08/14 18:18, Emil Velikov wrote: [...] - Use WAFFLE_LIBRARIES over WAFFLE_LDFLAGS for linking purposes. [...] Emil, This particular change is causing the build to fail when libwaffle-1.so is not on a standard library directory (ie., outside /usr/lib or /usr/local/lib). This happened to me as my build machines don't install waffle on system directories. I'm not sure what was the driver for replacing WAFFLE_LIBRARIES with WAFFLE_LDFLAGS, but I believe we should undo it. Jose Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt| 18 +- tests/util/CMakeLists.txt | 15 ++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39fd0d1..6fc7889 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,14 +37,16 @@ else() endif() if(PIGLIT_USE_WAFFLE) - pkg_check_modules(WAFFLE REQUIRED waffle-1) + if (NOT MSVC) + pkg_check_modules(WAFFLE REQUIRED waffle-1) - if(NOT WAFFLE_FOUND) - message(FATAL_ERROR Failed to find Waffle. If Waffle is not - packaged for your distribution, you can get it at - https://urldefense.proofpoint.com/v1/url?u=http://www.waffle-gl.org/k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0Am=GCeqo9a0Xc7ai%2FC9u2WCmp0mtSQwRgI3rDzA4WOiAgo%3D%0As=72b63e94c236bd9ef6b7fdb1594ca4936bba0d9b805a35096e7dae5782c3b692.; - ) - endif() + if(NOT WAFFLE_FOUND) + message(FATAL_ERROR Failed to find Waffle. If Waffle + is not packaged for your distribution, you can get + it at https://urldefense.proofpoint.com/v1/url?u=http://www.waffle-gl.org/k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0Am=GCeqo9a0Xc7ai%2FC9u2WCmp0mtSQwRgI3rDzA4WOiAgo%3D%0As=72b63e94c236bd9ef6b7fdb1594ca4936bba0d9b805a35096e7dae5782c3b692.; + ) + endif() + } # Check the installed waffle version. # @@ -62,8 +64,6 @@ if(PIGLIT_USE_WAFFLE) add_definitions(-DPIGLIT_USE_WAFFLE) add_definitions(-DWAFFLE_API_VERSION=0x0103) - set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ${WAFFLE_CFLAGS}) - set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${WAFFLE_CFLAGS}) else() find_package(GLUT REQUIRED) diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt index 10c5dbc..35e2215 100644 --- a/tests/util/CMakeLists.txt +++ b/tests/util/CMakeLists.txt @@ -25,6 +25,7 @@ set(UTIL_GL_INCLUDES ${UTIL_INCLUDES} ${GLEXT_INCLUDE_DIR} ${OPENGL_INCLUDE_PATH} + ${WAFFLE_INCLUDE_DIRS} ) set(UTIL_GL_SOURCES @@ -47,6 +48,11 @@ set(UTIL_GL_SOURCES ${CMAKE_BINARY_DIR}/tests/util/piglit-util-gl-enum-gen.c ) +set(UTIL_GL_LIBS + piglitutil + ${WAFFLE_LDFLAGS} + ) + if(PIGLIT_USE_WAFFLE) list(APPEND UTIL_GL_SOURCES piglit-framework-gl/piglit_fbo_framework.c @@ -75,17 +81,16 @@ if(PIGLIT_USE_WAFFLE) piglit-framework-gl/piglit_x11_framework.c ) endif() + + list(APPEND UTIL_GL_LIBS + ${WAFFLE_LIBRARIES} + ) else() list(APPEND UTIL_GL_SOURCES piglit-framework-gl/piglit_glut_framework.c ) endif() -set(UTIL_GL_LIBS - piglitutil - ${WAFFLE_LDFLAGS} - ) - if(${CMAKE_SYSTEM_NAME} MATCHES Linux) # One needs to have at least one hardware driver present, otherwise # there is no point compiling just the dispatcher. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 05/12] cmake: cleanup PIGLIT_USE_WAFFLE builds
On 18/08/14 15:22, Jose Fonseca wrote: On 12/08/14 18:18, Emil Velikov wrote: [...] - Use WAFFLE_LIBRARIES over WAFFLE_LDFLAGS for linking purposes. [...] Emil, This particular change is causing the build to fail when libwaffle-1.so is not on a standard library directory (ie., outside /usr/lib or /usr/local/lib). This happened to me as my build machines don't install waffle on system directories. I'm not sure what was the driver for replacing WAFFLE_LIBRARIES with WAFFLE_LDFLAGS, but I believe we should undo it. The driver behind the change is (if I understand the cmake manual) that one should not use the *_LDFLAGS variables, but only INCLUDE_DIRS and LIBRARIES. I suspect that there is a bug with waffle-1.pc can you attach/inline it ? Whereas for a quick fix I would recommend adding back WAFFLE_LDFLAGS in set(UTIL_GL_LIBS Emil Jose ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 05/12] cmake: cleanup PIGLIT_USE_WAFFLE builds
On 18/08/14 15:51, Emil Velikov wrote: On 18/08/14 15:22, Jose Fonseca wrote: On 12/08/14 18:18, Emil Velikov wrote: [...] - Use WAFFLE_LIBRARIES over WAFFLE_LDFLAGS for linking purposes. [...] Emil, This particular change is causing the build to fail when libwaffle-1.so is not on a standard library directory (ie., outside /usr/lib or /usr/local/lib). This happened to me as my build machines don't install waffle on system directories. I'm not sure what was the driver for replacing WAFFLE_LIBRARIES with WAFFLE_LDFLAGS, but I believe we should undo it. The driver behind the change is (if I understand the cmake manual) that one should not use the *_LDFLAGS variables, but only INCLUDE_DIRS and LIBRARIES. It's possible. cmake's documentation for FindPkgConfig says: XPREFIX_FOUND ... set to 1 if module(s) exist XPREFIX_LIBRARIES ... only the libraries (w/o the '-l') XPREFIX_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') XPREFIX_LDFLAGS... all required linker flags XPREFIX_LDFLAGS_OTHER ... all other linker flags XPREFIX_INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') XPREFIX_CFLAGS ... all required cflags XPREFIX_CFLAGS_OTHER ... the other compiler flags But it's not clear whether the *_LIBRARIES is supposed to have absolute paths, or just the names. If just the names, then *_LIBRARIES alone can't work: one will also need to use *_LIBRARY_DIRS , or *_LDFLAGS... I suspect that there is a bug with waffle-1.pc can you attach/inline it ? $ cat ~/jobs/waffle-ubuntu64/lastSuccessful/archive/publish/lib/x86_64-linux-gnu/pkgconfig/waffle-1.pc prefix=/var/lib/hudson/jobs/waffle-ubuntu64/lastSuccessful/archive/publish exec_prefix=${prefix} libdir=/var/lib/hudson/jobs/waffle-ubuntu64/lastSuccessful/archive/publish/lib/x86_64-linux-gnu includedir=/var/lib/hudson/jobs/waffle-ubuntu64/lastSuccessful/archive/publish/include Name: waffle-1 Description: a library for selecting an OpenGL API and window system at runtime Version: 1.3.90 Libs: -L${libdir} -lwaffle-1 Cflags: -I${includedir}/waffle-1 Whereas for a quick fix I would recommend adding back WAFFLE_LDFLAGS in set(UTIL_GL_LIBS Yes, it fixes the build for now. And we can always revert once again after figuring out what's the correct way to do it. Jose ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [RFC] ARB_shader_precision tests
Hi all, I'm working on adding ARB_shader_precision tests to piglit. My primary goal is ensure that the intel driver supports this GL 4.x feature correctly, but the tests really ought to work for all mesa drivers, where possible. The GL_ARB_shader_precision spec has a list of rather innocent looking built-in functions and the associated precision requirements but as I'm finding out, things get a bit combinatorial. Floats have a number of corner cases (NaNs, Infs, subnormals, zeros, etc.) and it seems important to me to make sure that the compiler/hardware is performing correctly for each of these cases, for each built-in required by GL_ARB_shader_precision. There is also a much larger implied list of complex built-in functions that are constructed from a sequence of simple built-ins (eg. dot, cross, etc.), which will also need to be tested to ensure that they meet the precision requirements in the spec. To this end, I'm proposing to write a sub-suite of tests, located under tests/spec/arb_shader_precision. This has been done before, but this suite has the potential to grow quite large, so I figure it's good to start the review process early :) I've pasted a patch that describes a framework and a sample test (divide-by-zero) below. The test parameters test some of the limits but not all, and will need to be fleshed out further. The framework has been lightly optimized to reduce the manual labor associated with adding each new test for a built-in, but I'm sure it could use a few more optimization passes. I wanted to get most of the tests added first to find out just how much they had in common, and then revisit the optimization topic. The framework is basically just a couple of helper functions that encapsulate commonly used code. Tests are individual .c files that compile to individual tests. The framework is a statically linked library compiled into each test. The framework includes a function for setting up an unclamped output framebuffer so that any floating point value can be passed through as an output, a function that loads a list of test parameters from a (very rough) text-based data file format, and a function that executes precision tests using an array of test parameters and a vert and a frag shader as inputs. The basic goal of the precision test function is to calculate the operation with the given parameters on both the cpu (using libc) and on the gpu (using the supplied shaders), and then compare the results. The operation is tested in both a vert and a frag shader to cover those cases where the operation is implemented differently depending on the stage. Most requirements specify a maximum tolerance in ULPs, so this value can be passed as a parameter to the precision test function. Sometimes merely the correct result, or correct rounding is required, either of which can be tested by setting the ULPs difference to zero for that test, requiring an exact match. An interesting by-product of this design is that both success and failure cases can be specified in the params file - as long as the shader produces a result that matches the result produced by the cpu, the test will pass. This comes in handy when testing comparison operators. Please let me know if I'm heading in the right direction with this. I will be glad to consider revisions and recommendations to this project, especially from those with floating point experience, as I am a bit new to the topic. Thanks, Micah Fedke Collabora, Ltd. diff --git a/tests/shader_precision.py b/tests/shader_precision.py new file mode 100644 index 000..0997dde --- /dev/null +++ b/tests/shader_precision.py @@ -0,0 +1,23 @@ +# +# Minimal tests to check whether the installation is working +# + +from framework.profile import TestProfile +from framework.exectest import PiglitTest + +__all__ = ['profile'] + +profile = TestProfile() +profile.tests['spec/arb_shader_precision-divide-by-zero'] = PiglitTest('arb_shader_precision-divide-by-zero') diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt index 489ff0c..902307b 100644 --- a/tests/spec/CMakeLists.txt +++ b/tests/spec/CMakeLists.txt @@ -36,6 +36,7 @@ add_subdirectory (arb_separate_shader_objects) add_subdirectory (arb_shader_texture_lod/execution) add_subdirectory (arb_shader_atomic_counters) add_subdirectory (arb_shader_objects) +add_subdirectory (arb_shader_precision) add_subdirectory (arb_shading_language_420pack/execution) add_subdirectory (arb_stencil_texturing) add_subdirectory (arb_sync) diff --git a/tests/spec/arb_shader_precision/CMakeLists.gl.txt b/tests/spec/arb_shader_precision/CMakeLists.gl.txt new file mode 100644 index 000..2aa6216 --- /dev/null +++ b/tests/spec/arb_shader_precision/CMakeLists.gl.txt @@ -0,0 +1,27 @@ +include_directories( +${GLEXT_INCLUDE_DIR} +${OPENGL_INCLUDE_PATH} +) + +link_libraries ( +piglitutil_${piglit_target_api} +${OPENGL_gl_LIBRARY} +${OPENGL_glu_LIBRARY} +) +
[Piglit] [PATCH 1/3] core: Initialize ConfigParser with allow_no_value=True
--- framework/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core.py b/framework/core.py index d3922a9..950ed7e 100644 --- a/framework/core.py +++ b/framework/core.py @@ -37,7 +37,7 @@ __all__ = ['PIGLIT_CONFIG', 'parse_listfile'] -PIGLIT_CONFIG = ConfigParser.SafeConfigParser() +PIGLIT_CONFIG = ConfigParser.SafeConfigParser(allow_no_value=True) def get_config(arg=None): if arg: -- 1.8.1.5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/3] oclconform: Add test class for ocl conformance tests
--- framework/oclconform.py | 91 + piglit.conf.example | 34 ++ 2 files changed, 125 insertions(+) create mode 100644 framework/oclconform.py diff --git a/framework/oclconform.py b/framework/oclconform.py new file mode 100644 index 000..a3e44ee --- /dev/null +++ b/framework/oclconform.py @@ -0,0 +1,91 @@ +# Copyright 2014 Advanced Micro Devices, Inc. +# +# 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. +# +# Authors: Tom Stellard thomas.stell...@amd.com +# + +import re +import subprocess +from os import listdir +from os.path import isfile, join + +from framework.core import PIGLIT_CONFIG +from framework.exectest import Test + +def get_test_section_name(test): +return 'oclconform-{}'.format(test) + +class OCLConform(Test): +def __init__(self, commands, run_concurrent=False): +Test.__init__(self, commands, run_concurrent) + +def interpret_result(self): +if self.result['returncode'] != 0 or 'FAIL' in self.result['out']: +self.result['result'] = 'fail' +else: +self.result['result'] = 'pass' + +def add_sub_test(profile, test_name, subtest_name, subtest): +profile.tests['oclconform/{}/{}'.format(test_name, subtest_name)] = subtest + +def add_test(profile, test_name, test): +profile.tests['oclconform/{}'.format(test_name)] = test + +def add_oclconform_tests(profile): +section_name = 'oclconform' +if not PIGLIT_CONFIG.has_section(section_name): +return + +bindir = PIGLIT_CONFIG.get(section_name, 'bindir') +options = PIGLIT_CONFIG.options(section_name) + +tests = [] +for option in options: +if PIGLIT_CONFIG.get(section_name, option) == None: +tests.append(option) + +for test in tests: +test_section_name = get_test_section_name(test) +if not PIGLIT_CONFIG.has_section(test_section_name): +print Warning: not section defined for , test +continue + +test_name = PIGLIT_CONFIG.get(test_section_name, 'test_name') +should_run_concurrent = PIGLIT_CONFIG.has_option(test_section_name, 'concurrent') +if PIGLIT_CONFIG.has_option(test_section_name, 'list_subtests'): +# Test with subtests +list_tests = PIGLIT_CONFIG.get(test_section_name, 'list_subtests') +subtest_regex = PIGLIT_CONFIG.get(test_section_name, 'subtest_regex') +run_subtests = PIGLIT_CONFIG.get(test_section_name, 'run_subtest') +list_tests =list_tests.split() + +subtests = subprocess.check_output(args=list_tests, cwd=bindir).split('\n') +for subtest in subtests: +m = re.match(r'{}'.format(subtest_regex), subtest) +if not m: +continue +subtest = m.group(1) +subtest_command = join(bindir, run_subtests.replace('subtest', subtest)) +add_sub_test(profile, test_name, subtest, OCLConform(subtest_command, should_run_concurrent)) +else: +run_test = PIGLIT_CONFIG.get(test_section_name, 'run_test') +add_test(profile, test_name, OCLConform(run_test, should_run_concurrent)) + diff --git a/piglit.conf.example b/piglit.conf.example index 61a28cf..bdf27aa 100644 --- a/piglit.conf.example +++ b/piglit.conf.example @@ -14,3 +14,37 @@ [oglconform] ; Set bindir equal to the absolute root of the oglconform directory ;path=/home/usr/src/oglconform + +[oclconform] +; bindir is the directory that the commands to run tests and list subtests +; will be executed in. +bindir=/home/usr/oclconform +; List the tests you want to run +testA +testB + +; Section for specific oclconform test. One of these sections is required for +; each test list in the oclconform section and must be called: +; oclconform-$testname +[oclconform-testA] +test_name=testA +; Add concurrent to this section if
[Piglit] [PATCH 3/3] all_cl: Add ocl conformance tests to test list
--- tests/all_cl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/all_cl.py b/tests/all_cl.py index b62b6c1..45de569 100644 --- a/tests/all_cl.py +++ b/tests/all_cl.py @@ -25,6 +25,8 @@ # from tests.cl import profile +from framework.oclconform import add_oclconform_tests from framework.opencv import add_opencv_tests add_opencv_tests(profile, True) +add_oclconform_tests(profile) -- 1.8.1.5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] cmake: WAFFLE_LIBRARIES - WAFFLE_LDFLAGS
From: José Fonseca jfons...@vmware.com Otherwise the build fails when libwaffle-1.so is not on a standard library directory (ie., outside /usr/lib or /usr/local/lib). --- tests/util/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt index b71fc52..d8a72df 100644 --- a/tests/util/CMakeLists.txt +++ b/tests/util/CMakeLists.txt @@ -77,7 +77,7 @@ if(PIGLIT_USE_WAFFLE) endif() list(APPEND UTIL_GL_LIBS - ${WAFFLE_LIBRARIES} + ${WAFFLE_LDFLAGS} ) else() list(APPEND UTIL_GL_SOURCES -- 1.9.1 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] egl-util: remove GL include
On Sun, Aug 17, 2014 at 5:32 PM, Daniel Kurtz djku...@chromium.org wrote: On Aug 18, 2014 3:49 AM, Kristian Høgsberg k...@bitplanet.net wrote: On Sun, Aug 17, 2014 at 7:19 AM, Ken Phillis Jr kphilli...@gmail.com wrote: This patch looks good to me. On Aug 17, 2014 7:39 AM, Daniel Kurtz djku...@chromium.org wrote: EGL util should not in any way depend on the headers of a particular client library. In fact, this breaks compilation on pure OpenGL ES systems, since they do not have OpenGL headers installed (GL/gl.h). Signed-off-by: Daniel Kurtz djku...@chromium.org --- I've test built this change on two different systems with EGL/OpenGL ES-only (ARM Mali and Nvidia Tegra). I have not built on a system with EGL + OpenGL, or mixed GL/GLES... does anybody have a system like that and can double check? It certainly shouldn't be in the header, but egl-util.c needs it and breaks if you remove it. egl-util.c builds fine for GLES without GL/gl.h (and breaks with it). Why is it needed for GL? What am I missing? I got compile errors that looked like a missing Xlib.h include, not gl.h. Trying again it was just Xlib deprecation warnings, and they're there without your patch. Sorry for the false alarm. Reviewed-by: Kristian Høgsberg k...@bitplanet.net Kristian Also, I do not have commit access, so can someone please submit this for me if it looks good? Thanks, -djk tests/egl/egl-util.h | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/egl/egl-util.h b/tests/egl/egl-util.h index f5c74fd..27d2926 100644 --- a/tests/egl/egl-util.h +++ b/tests/egl/egl-util.h @@ -12,7 +12,6 @@ #include X11/Xlib.h #include X11/Xutil.h #include X11/keysym.h -#include GL/gl.h #include EGL/egl.h #include EGL/eglext.h -- 2.1.0.rc2.206.gedb03e5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] egl-util: remove GL include
On 08/18/2014 11:15 AM, Kristian Høgsberg wrote: On Sun, Aug 17, 2014 at 5:32 PM, Daniel Kurtz djku...@chromium.org wrote: On Aug 18, 2014 3:49 AM, Kristian Høgsberg k...@bitplanet.net wrote: It certainly shouldn't be in the header, but egl-util.c needs it and breaks if you remove it. egl-util.c builds fine for GLES without GL/gl.h (and breaks with it). Why is it needed for GL? What am I missing? I think this file used to require GL/gl.h before the EGL tests began using piglit-dispatch. I got compile errors that looked like a missing Xlib.h include, not gl.h. Trying again it was just Xlib deprecation warnings, and they're there without your patch. Sorry for the false alarm. Reviewed-by: Kristian Høgsberg k...@bitplanet.net Looks good to me too. Reviewed-by: Chad Versace chad.vers...@linux.intel.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/3] oclconform: Add test class for ocl conformance tests
On Monday, August 18, 2014 10:44:41 AM Tom Stellard wrote: --- framework/oclconform.py | 91 + piglit.conf.example | 34 ++ 2 files changed, 125 insertions(+) create mode 100644 framework/oclconform.py diff --git a/framework/oclconform.py b/framework/oclconform.py new file mode 100644 index 000..a3e44ee --- /dev/null +++ b/framework/oclconform.py @@ -0,0 +1,91 @@ +# Copyright 2014 Advanced Micro Devices, Inc. +# +# 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. +# +# Authors: Tom Stellard thomas.stell...@amd.com +# + +import re +import subprocess +from os import listdir +from os.path import isfile, join + +from framework.core import PIGLIT_CONFIG +from framework.exectest import Test + +def get_test_section_name(test): +return 'oclconform-{}'.format(test) + +class OCLConform(Test): +def __init__(self, commands, run_concurrent=False): +Test.__init__(self, commands, run_concurrent) You would probably be better served to do __init__(self, *args, **kwargs) here, and pass those as Test.__init__(self, *args, **kwargs), it will give you more flexibility and protect you from changes to Test. + +def interpret_result(self): +if self.result['returncode'] != 0 or 'FAIL' in self.result['out']: +self.result['result'] = 'fail' +else: +self.result['result'] = 'pass' + +def add_sub_test(profile, test_name, subtest_name, subtest): +profile.tests['oclconform/{}/{}'.format(test_name, subtest_name)] = subtest + +def add_test(profile, test_name, test): +profile.tests['oclconform/{}'.format(test_name)] = test + +def add_oclconform_tests(profile): +section_name = 'oclconform' +if not PIGLIT_CONFIG.has_section(section_name): +return + +bindir = PIGLIT_CONFIG.get(section_name, 'bindir') +options = PIGLIT_CONFIG.options(section_name) + +tests = [] +for option in options: +if PIGLIT_CONFIG.get(section_name, option) == None: Dont use == with None, this should be 'if thing is None', although, if you dont specifically need to know that it is None and not another falsy value it is more pythonic to say 'if not condition' +tests.append(option) You should refactor this to: tests = (o for o in options if not PIGLIT_CONFIg.get(section_name, o)) or to this if you really need to test for None tests = (o for o in options if PIGLIT_CONFIg.get(section_name, o) is None) + +for test in tests: +test_section_name = get_test_section_name(test) +if not PIGLIT_CONFIG.has_section(test_section_name): +print Warning: not section defined for , test no section Please use print_function from the __future__ module? I've been trying to get all of piglit using it. You might also want to redirect this to stderr instead stdout, but that's just a suggestion. If you wanted to use stderr (with the print_function): print(Warning: no section defined for {}.foramt(test), file=sys.stderr) Obviously you'd need sys for printing to stderr, be aware that the print function unlike the print statement does not print all arguments, it prints only the first one, so format is necessary. +continue + +test_name = PIGLIT_CONFIG.get(test_section_name, 'test_name') +should_run_concurrent = PIGLIT_CONFIG.has_option(test_section_name, 'concurrent') +if PIGLIT_CONFIG.has_option(test_section_name, 'list_subtests'): +# Test with subtests +list_tests = PIGLIT_CONFIG.get(test_section_name, 'list_subtests') +subtest_regex = PIGLIT_CONFIG.get(test_section_name, 'subtest_regex') I would refactor your re like this subtest_regex = PIGLIT_CONFIG.get(test_section_name, 'subtest_regex') subtest_regex.encode('string_escape') # This converts to a raw string +
Re: [Piglit] [PATCH 1/3] core: Initialize ConfigParser with allow_no_value=True
On Monday, August 18, 2014 10:44:40 AM Tom Stellard wrote: --- framework/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core.py b/framework/core.py index d3922a9..950ed7e 100644 --- a/framework/core.py +++ b/framework/core.py @@ -37,7 +37,7 @@ __all__ = ['PIGLIT_CONFIG', 'parse_listfile'] -PIGLIT_CONFIG = ConfigParser.SafeConfigParser() +PIGLIT_CONFIG = ConfigParser.SafeConfigParser(allow_no_value=True) def get_config(arg=None): if arg: Reviewed-by: Dylan Baker baker.dyla...@gmail.com -- 1.8.1.5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit signature.asc Description: This is a digitally signed message part. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] egl_khr_fence_sync: check for EGL_KHR_reusable_sync
On 08/13/2014 07:13 PM, Daniel Kurtz wrote: On Thu, Aug 14, 2014 at 6:41 AM, Chad Versace chad.vers...@linux.intel.com mailto:chad.vers...@linux.intel.com wrote: On 08/07/2014 04:09 AM, Daniel Kurtz wrote: These tests all require EGL_KHR_reusable_sync. No they don't, at least according to the spec. Have you found a buggy driver? Or... maybe I wrote the test totally wrong... I hope not. EGL_KHR_resuable_sync defines the sync type EGL_SYNC_REUSABLE_KHR, which this test does not use according to grep, but does not define EGL_SYNC_FENCE_KHR. EGL_KHR_fence_sync defines the sync type EGL_SYNC_FENCE_KHR, which this test does use. What driver is causing you problems? Could you add a workaround to this test for that driver? http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_reusable_sync.txt EGL_KHR_reusable_sync defines some of the functions this test actually uses AFAICT, without this extension, the following procedures and functions don't exist: EGLSyncKHR eglCreateSyncKHR( EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); EGLBoolean eglDestroySyncKHR( EGLDisplay dpy, EGLSyncKHR sync); EGLint eglClientWaitSyncKHR( EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); EGLBoolean eglSignalSyncKHR( EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); EGLBoolean eglGetSyncAttribKHR( EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); The test uses 4 of the above 5 functions, listed below. EGL_KHR_fence_sync also provides these 4 functions (http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_fence_sync.txt). eglCreateSyncKHR eglDestroySyncKHR eglClientWaitSyncKHR eglGetSyncAttribKHR Function eglSignalSyncKHR, EGL_KHR_resuable_sync provides it but EGL_KHR_fence_sync does not. The test does not use this function, because it is testing EGL_KHR_fence_sync, not EGL_KHR_reusable_sync. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Add tests arb_conditional_render_inverted
Mostly looks good. Some of the comments could use a bit of work. There's no such thing as inverted conditional rendering. It's just conditional rendering -- the conditions themselves happen to be inverted though. I made a few suggestions inline: On Sun, Aug 17, 2014 at 3:11 PM, Tobias Klausmann tobias.johannes.klausm...@mni.thm.de wrote: Adopted tests from NV_conditional_render Signed-off-by: Tobias Klausmann tobias.johannes.klausm...@mni.thm.de --- tests/all.py | 15 ++ tests/spec/CMakeLists.txt | 1 + .../CMakeLists.gl.txt | 23 .../arb_conditional_render_inverted/CMakeLists.txt | 1 + .../begin-while-active.c | 77 +++ .../arb_conditional_render_inverted/begin-zero.c | 70 ++ .../spec/arb_conditional_render_inverted/bitmap.c | 111 +++ .../blitframebuffer.c | 151 + tests/spec/arb_conditional_render_inverted/clear.c | 103 ++ .../arb_conditional_render_inverted/copypixels.c | 104 ++ .../arb_conditional_render_inverted/copyteximage.c | 127 + .../copytexsubimage.c | 127 + tests/spec/arb_conditional_render_inverted/dlist.c | 98 + .../arb_conditional_render_inverted/drawpixels.c | 121 + .../generatemipmap.c | 126 + .../arb_conditional_render_inverted/vertex_array.c | 102 ++ 16 files changed, 1357 insertions(+) create mode 100644 tests/spec/arb_conditional_render_inverted/CMakeLists.gl.txt create mode 100644 tests/spec/arb_conditional_render_inverted/CMakeLists.txt create mode 100644 tests/spec/arb_conditional_render_inverted/begin-while-active.c create mode 100644 tests/spec/arb_conditional_render_inverted/begin-zero.c create mode 100644 tests/spec/arb_conditional_render_inverted/bitmap.c create mode 100644 tests/spec/arb_conditional_render_inverted/blitframebuffer.c create mode 100644 tests/spec/arb_conditional_render_inverted/clear.c create mode 100644 tests/spec/arb_conditional_render_inverted/copypixels.c create mode 100644 tests/spec/arb_conditional_render_inverted/copyteximage.c create mode 100644 tests/spec/arb_conditional_render_inverted/copytexsubimage.c create mode 100644 tests/spec/arb_conditional_render_inverted/dlist.c create mode 100644 tests/spec/arb_conditional_render_inverted/drawpixels.c create mode 100644 tests/spec/arb_conditional_render_inverted/generatemipmap.c create mode 100644 tests/spec/arb_conditional_render_inverted/vertex_array.c diff --git a/tests/all.py b/tests/all.py index 12f57c8..4ddd0ce 100644 --- a/tests/all.py +++ b/tests/all.py @@ -3355,6 +3355,21 @@ arb_copy_buffer['overlap'] = concurrent_test('arb_copy_buffer-overlap') arb_copy_buffer['targets'] = concurrent_test('arb_copy_buffer-targets') arb_copy_buffer['subdata-sync'] = concurrent_test('arb_copy_buffer-subdata-sync') +arb_conditional_render_inverted = {} +spec['ARB_conditional_render_inverted'] = arb_conditional_render_inverted +arb_conditional_render_inverted['begin-while-active'] = concurrent_test('arb_conditional_render_inverted-begin-while-active') +arb_conditional_render_inverted['begin-zero'] = concurrent_test('arb_conditional_render_inverted-begin-zero') +arb_conditional_render_inverted['bitmap'] = PiglitTest(['arb_conditional_render_inverted-bitmap', '-auto']) +arb_conditional_render_inverted['blitframebuffer'] = PiglitTest(['arb_conditional_render_inverted-blitframebuffer', '-auto']) +arb_conditional_render_inverted['clear'] = PiglitTest(['arb_conditional_render_inverted-clear', '-auto']) +arb_conditional_render_inverted['copypixels'] = PiglitTest(['arb_conditional_render_inverted-copypixels', '-auto']) +arb_conditional_render_inverted['copyteximage'] = PiglitTest(['arb_conditional_render_inverted-copyteximage', '-auto']) +arb_conditional_render_inverted['copytexsubimage'] = PiglitTest(['arb_conditional_render_inverted-copytexsubimage', '-auto']) +arb_conditional_render_inverted['dlist'] = PiglitTest(['arb_conditional_render_inverted-dlist', '-auto']) +arb_conditional_render_inverted['drawpixels'] = PiglitTest(['arb_conditional_render_inverted-drawpixels', '-auto']) +arb_conditional_render_inverted['generatemipmap'] = PiglitTest(['arb_conditional_render_inverted-generatemipmap', '-auto']) +arb_conditional_render_inverted['vertex_array'] = PiglitTest(['arb_conditional_render_inverted-vertex_array', '-auto']) + arb_half_float_vertex = {} spec['ARB_half_float_vertex'] = arb_half_float_vertex add_plain_test(arb_half_float_vertex, 'draw-vertices-half-float') diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt index 5148412..eba0f45 100644 --- a/tests/spec/CMakeLists.txt +++
Re: [Piglit] [PATCH] egl_khr_fence_sync: check for EGL_KHR_reusable_sync
On Tue, Aug 19, 2014 at 7:05 AM, Chad Versace chad.vers...@linux.intel.com wrote: On 08/13/2014 07:13 PM, Daniel Kurtz wrote: On Thu, Aug 14, 2014 at 6:41 AM, Chad Versace chad.vers...@linux.intel.com mailto:chad.vers...@linux.intel.com wrote: On 08/07/2014 04:09 AM, Daniel Kurtz wrote: These tests all require EGL_KHR_reusable_sync. No they don't, at least according to the spec. Have you found a buggy driver? Or... maybe I wrote the test totally wrong... I hope not. EGL_KHR_resuable_sync defines the sync type EGL_SYNC_REUSABLE_KHR, which this test does not use according to grep, but does not define EGL_SYNC_FENCE_KHR. EGL_KHR_fence_sync defines the sync type EGL_SYNC_FENCE_KHR, which this test does use. What driver is causing you problems? Could you add a workaround to this test for that driver? http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_reusable_sync.txt EGL_KHR_reusable_sync defines some of the functions this test actually uses AFAICT, without this extension, the following procedures and functions don't exist: EGLSyncKHR eglCreateSyncKHR( EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); EGLBoolean eglDestroySyncKHR( EGLDisplay dpy, EGLSyncKHR sync); EGLint eglClientWaitSyncKHR( EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); EGLBoolean eglSignalSyncKHR( EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); EGLBoolean eglGetSyncAttribKHR( EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); The test uses 4 of the above 5 functions, listed below. EGL_KHR_fence_sync also provides these 4 functions (http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_fence_sync.txt). eglCreateSyncKHR eglDestroySyncKHR eglClientWaitSyncKHR eglGetSyncAttribKHR Function eglSignalSyncKHR, EGL_KHR_resuable_sync provides it but EGL_KHR_fence_sync does not. The test does not use this function, because it is testing EGL_KHR_fence_sync, not EGL_KHR_reusable_sync. Oops, I didn't notice those functions are defined in both extensions. I think the original reason why I wrote this patch was to address build breakage due to the incomplete dispatch (using symbol eglCreateSyncKHR instead of egl-looked-up peglCreatSyncKHR). This is fixed by Ilja's patch, which I assume he is going to send upstream shortly. -Dan ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit