[Piglit] [PATCH] cl: add clGetKernelArgInfo
v2 and v3: modifications according Jan Vesely's comments --- tests/cl.py| 1 + tests/cl/api/CMakeLists.cl.txt | 1 + tests/cl/api/get-kernel-arg-info.c | 274 + tests/util/piglit-util-cl-enum.c | 11 ++ tests/util/piglit-util-cl-enum.h | 3 + 5 files changed, 290 insertions(+) create mode 100644 tests/cl/api/get-kernel-arg-info.c diff --git a/tests/cl.py b/tests/cl.py index 4668ddc..673b522 100644 --- a/tests/cl.py +++ b/tests/cl.py @@ -77,6 +77,7 @@ with profile.group_manager(PiglitCLTest, 'api') as g: # Kernel g(['cl-api-create-kernel'], 'clCreateKernel') g(['cl-api-create-kernels-in-program'], 'clCreateKernelsInProgram') +g(['cl-api-get-kernel-arg-info'], 'clGetKernelArgInfo') g(['cl-api-get-kernel-info'], 'clGetKernelInfo') g(['cl-api-get-kernel-work-group-info'], 'clGetKernelWorkGroupInfo') g(['cl-api-retain_release-kernel'], 'clRetainKernel and clReleaseKernel') diff --git a/tests/cl/api/CMakeLists.cl.txt b/tests/cl/api/CMakeLists.cl.txt index b598528..4f2f268 100644 --- a/tests/cl/api/CMakeLists.cl.txt +++ b/tests/cl/api/CMakeLists.cl.txt @@ -42,6 +42,7 @@ piglit_cl_add_api_test (create-kernels-in-program create-kernels-in-program.c) piglit_cl_add_api_test (set-kernel-arg set-kernel-arg.c) piglit_cl_add_api_test (retain_release-kernel retain_release-kernel.c) piglit_cl_add_api_test (get-kernel-info get-kernel-info.c) +piglit_cl_add_api_test (get-kernel-arg-info get-kernel-arg-info.c) piglit_cl_add_api_test (get-kernel-work-group-info get-kernel-work-group-info.c) # Events diff --git a/tests/cl/api/get-kernel-arg-info.c b/tests/cl/api/get-kernel-arg-info.c new file mode 100644 index 000..5f51cb2 --- /dev/null +++ b/tests/cl/api/get-kernel-arg-info.c @@ -0,0 +1,274 @@ +/* + * Copyright © 2014 EdB + * + * 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. + * + * copied from get-kernel-info.c + * Copyright © 2012 Blaž Tomažič + */ + +/** + * @file get-kernel-arg-info.c + * + * Test API function: + * + * cl_int clGetKernelArgInfo (cl_kernel kernel, + * cl_uint arg_indx, + * cl_kernel_arg_info param_name, + * size_t param_value_size, + * void *param_value, + * size_t *param_value_size_ret) + */ + +#include "piglit-framework-cl-api.h" + + +PIGLIT_CL_API_TEST_CONFIG_BEGIN + + config.name = "clGetKernelArgInfo"; + config.version_min = 12; + + config.run_per_platform = true; + config.create_context = true; + + config.program_source = "kernel void dummy_kernel(int param_1) {}"; + config.build_options = "-cl-kernel-arg-info"; + +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; + + int i; + cl_int errNo; + cl_kernel kernel; + + size_t param_value_size; + size_t ret_value_size; + size_t expected_size; +#define BUFFER_SIZE 8 + char param_value[BUFFER_SIZE]; + + int num_kernel_arg_infos = PIGLIT_CL_ENUM_NUM(cl_kernel_arg_info, env->version); + const cl_kernel_arg_info* kernel_arg_infos = PIGLIT_CL_ENUM_ARRAY(cl_kernel_arg_info); + + kernel = clCreateKernel(env->program, + "dummy_kernel", + &errNo); + if(!piglit_cl_check_error(errNo, CL_SUCCESS)) { + fprintf(stderr, + "Failed (error code: %s): Create kernel.\n", + piglit_cl_get_error_name(errNo)); + return PIGLIT_FAIL; + } + + /*** N
[Piglit] [PATCH v2] cl: add clEnqueueFillBuffer
v2: spaces/tabs formating clReleaseMemObject the buffer Reviewed-by: Tom Stellard --- tests/cl.py| 1 + tests/cl/api/CMakeLists.cl.txt | 1 + tests/cl/api/enqueue-fill-buffer.c | 270 + 3 files changed, 272 insertions(+) create mode 100644 tests/cl/api/enqueue-fill-buffer.c diff --git a/tests/cl.py b/tests/cl.py index 4668ddc..6246ba1 100644 --- a/tests/cl.py +++ b/tests/cl.py @@ -58,6 +58,7 @@ with profile.group_manager(PiglitCLTest, 'api') as g: g(['cl-api-enqueue-copy-buffer-rect'], 'clEnqueueCopyBufferRect') g(['cl-api-enqueue-read_write-buffer'], 'clEnqueueReadBuffer and clEnqueueWriteBuffer') +g(['cl-api-enqueue-fill-buffer'], 'clEnqueueFillBuffer') g(['cl-api-get-mem-object-info'], 'clGetMemObjectInfo') g(['cl-api-get-image-info'], 'clGetImageInfo') g(['cl-api-retain_release-mem-object'], diff --git a/tests/cl/api/CMakeLists.cl.txt b/tests/cl/api/CMakeLists.cl.txt index b598528..0af42d1 100644 --- a/tests/cl/api/CMakeLists.cl.txt +++ b/tests/cl/api/CMakeLists.cl.txt @@ -21,6 +21,7 @@ piglit_cl_add_api_test (enqueue-copy-buffer enqueue-copy-buffer.c) piglit_cl_add_api_test (enqueue-map-buffer enqueue-map-buffer.c) piglit_cl_add_api_test (enqueue-copy-buffer-rect enqueue-copy-buffer-rect.c) piglit_cl_add_api_test (enqueue-read_write-buffer enqueue-read_write-buffer.c) +piglit_cl_add_api_test (enqueue-fill-buffer enqueue-fill-buffer.c) piglit_cl_add_api_test (retain_release-mem-object retain_release-mem-object.c) piglit_cl_add_api_test (get-mem-object-info get-mem-object-info.c) piglit_cl_add_api_test (get-image-info get-image-info.c) diff --git a/tests/cl/api/enqueue-fill-buffer.c b/tests/cl/api/enqueue-fill-buffer.c new file mode 100644 index 000..a77c422 --- /dev/null +++ b/tests/cl/api/enqueue-fill-buffer.c @@ -0,0 +1,270 @@ +/* + * Copyright © 2015 Serge Martin (EdB) + * + * 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 enqueue-fill-buffer.c + * + * Test API function: + * + * cl_int + * clEnqueueFillBuffer(cl_command_queue command_queue, cl_mem buffer, + * const void *pattern, size_t pattern_size, + * size_t offset, size_t size, + * cl_uint num_events_in_wait_list, + * const cl_event *event_wait_list, + * cl_event *event ) + */ + +#include "piglit-framework-cl-api.h" + + +PIGLIT_CL_API_TEST_CONFIG_BEGIN + + config.name = "clEnqueueFillBuffer"; + config.version_min = 12; + + config.run_per_device = true; + config.create_context = true; + +PIGLIT_CL_API_TEST_CONFIG_END + + +#if defined(CL_VERSION_1_2) +static bool +test(cl_command_queue queue, cl_mem buffer, + const void *pattern, size_t pattern_size, + size_t offset, size_t size, + cl_uint num_events_in_wait_list, + const cl_event *event_wait_list, + cl_event *event , + cl_int expected_error, enum piglit_result* result, + const char* test_str) { + cl_int errNo; + + errNo = clEnqueueFillBuffer(queue, buffer, + pattern, pattern_size, offset, size, + num_events_in_wait_list, event_wait_list, + event); + + if(!piglit_cl_check_error(errNo, expected_error)) { + fprintf(stderr, "Failed (error code: %s): %s.\n", + piglit_cl_get_error_name(errNo), test_str); + piglit_merge_result(result, PIGLIT_FAIL); + return false; + } + + return true; +} +#endif + +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_
[Piglit] [PATCH] cl: add clEnqueueFillImage
--- tests/cl.py | 1 + tests/cl/api/CMakeLists.cl.txt| 1 + tests/cl/api/enqueue-fill-image.c | 297 ++ 3 files changed, 299 insertions(+) create mode 100644 tests/cl/api/enqueue-fill-image.c diff --git a/tests/cl.py b/tests/cl.py index 4668ddc..1680d29 100644 --- a/tests/cl.py +++ b/tests/cl.py @@ -58,6 +58,7 @@ with profile.group_manager(PiglitCLTest, 'api') as g: g(['cl-api-enqueue-copy-buffer-rect'], 'clEnqueueCopyBufferRect') g(['cl-api-enqueue-read_write-buffer'], 'clEnqueueReadBuffer and clEnqueueWriteBuffer') +g(['cl-api-enqueue-fill-image'], 'clEnqueueFillImage') g(['cl-api-get-mem-object-info'], 'clGetMemObjectInfo') g(['cl-api-get-image-info'], 'clGetImageInfo') g(['cl-api-retain_release-mem-object'], diff --git a/tests/cl/api/CMakeLists.cl.txt b/tests/cl/api/CMakeLists.cl.txt index b598528..2d55e23 100644 --- a/tests/cl/api/CMakeLists.cl.txt +++ b/tests/cl/api/CMakeLists.cl.txt @@ -21,6 +21,7 @@ piglit_cl_add_api_test (enqueue-copy-buffer enqueue-copy-buffer.c) piglit_cl_add_api_test (enqueue-map-buffer enqueue-map-buffer.c) piglit_cl_add_api_test (enqueue-copy-buffer-rect enqueue-copy-buffer-rect.c) piglit_cl_add_api_test (enqueue-read_write-buffer enqueue-read_write-buffer.c) +piglit_cl_add_api_test (enqueue-fill-image enqueue-fill-image.c) piglit_cl_add_api_test (retain_release-mem-object retain_release-mem-object.c) piglit_cl_add_api_test (get-mem-object-info get-mem-object-info.c) piglit_cl_add_api_test (get-image-info get-image-info.c) diff --git a/tests/cl/api/enqueue-fill-image.c b/tests/cl/api/enqueue-fill-image.c new file mode 100644 index 000..479475d --- /dev/null +++ b/tests/cl/api/enqueue-fill-image.c @@ -0,0 +1,297 @@ +/* + * Copyright © 2015 Serge Martin (EdB) + * + * 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 enqueue-fill-image.c + * + * Test API function: + * + * cl_int + * clEnqueueFillImage(cl_command_queue command_queue, cl_mem image, + * const void *fill_color, size_t *origin, size_t *region + * cl_uint num_events_in_wait_list, + * const cl_event *event_wait_list, + * cl_event *event ) + */ + +#include "piglit-framework-cl-api.h" + + +PIGLIT_CL_API_TEST_CONFIG_BEGIN + + config.name = "clEnqueueFillImage"; + config.version_min = 12; + + config.run_per_device = true; + config.create_context = true; + +PIGLIT_CL_API_TEST_CONFIG_END + + +#if defined(CL_VERSION_1_2) +static bool +test(cl_command_queue queue, cl_mem image, + const void *fill_color, size_t *origin, size_t *region, + cl_uint num_events_in_wait_list, + const cl_event *event_wait_list, + cl_event *event, + cl_int expected_error, enum piglit_result* result, + const char* test_str) { + cl_int errNo; + + errNo = clEnqueueFillImage(queue, image, + fill_color, origin, region, + num_events_in_wait_list, event_wait_list, + event); + + if(!piglit_cl_check_error(errNo, expected_error)) { + fprintf(stderr, "Failed (error code: %s): %s.\n", + piglit_cl_get_error_name(errNo), test_str); + piglit_merge_result(result, PIGLIT_FAIL); + return false; + } + + return true; +} +#endif + +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; + cl_int err; + +#define IMG_WIDTH 4 +#define IMG_HEIGHT 4 +#define IMG_DATA_SIZE 4 +#define IMG_BUFFER_SIZE IMG_WIDTH * IMG_HEIGHT * IMG_DATA_S
Re: [Piglit] [PATCH] cl: add clGetKernelArgInfo
On Tue, 2015-08-11 at 10:52 +0200, Serge Martin (EdB) wrote: > v2 and v3: modifications according Jan Vesely's comments I think the nature of those comments would be more useful than the author works on ocl1.1 (warn) and ocl1.2 (intel fail) Reviewed-by: Jan Vesely > --- > tests/cl.py| 1 + > tests/cl/api/CMakeLists.cl.txt | 1 + > tests/cl/api/get-kernel-arg-info.c | 274 > + > tests/util/piglit-util-cl-enum.c | 11 ++ > tests/util/piglit-util-cl-enum.h | 3 + > 5 files changed, 290 insertions(+) > create mode 100644 tests/cl/api/get-kernel-arg-info.c > > diff --git a/tests/cl.py b/tests/cl.py > index 4668ddc..673b522 100644 > --- a/tests/cl.py > +++ b/tests/cl.py > @@ -77,6 +77,7 @@ with profile.group_manager(PiglitCLTest, 'api') as g: > # Kernel > g(['cl-api-create-kernel'], 'clCreateKernel') > g(['cl-api-create-kernels-in-program'], 'clCreateKernelsInProgram') > +g(['cl-api-get-kernel-arg-info'], 'clGetKernelArgInfo') > g(['cl-api-get-kernel-info'], 'clGetKernelInfo') > g(['cl-api-get-kernel-work-group-info'], 'clGetKernelWorkGroupInfo') > g(['cl-api-retain_release-kernel'], 'clRetainKernel and clReleaseKernel') > diff --git a/tests/cl/api/CMakeLists.cl.txt b/tests/cl/api/CMakeLists.cl.txt > index b598528..4f2f268 100644 > --- a/tests/cl/api/CMakeLists.cl.txt > +++ b/tests/cl/api/CMakeLists.cl.txt > @@ -42,6 +42,7 @@ piglit_cl_add_api_test (create-kernels-in-program > create-kernels-in-program.c) > piglit_cl_add_api_test (set-kernel-arg set-kernel-arg.c) > piglit_cl_add_api_test (retain_release-kernel retain_release-kernel.c) > piglit_cl_add_api_test (get-kernel-info get-kernel-info.c) > +piglit_cl_add_api_test (get-kernel-arg-info get-kernel-arg-info.c) > piglit_cl_add_api_test (get-kernel-work-group-info > get-kernel-work-group-info.c) > > # Events > diff --git a/tests/cl/api/get-kernel-arg-info.c > b/tests/cl/api/get-kernel-arg-info.c > new file mode 100644 > index 000..5f51cb2 > --- /dev/null > +++ b/tests/cl/api/get-kernel-arg-info.c > @@ -0,0 +1,274 @@ > +/* > + * Copyright © 2014 EdB > + * > + * 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. > + * > + * copied from get-kernel-info.c > + * Copyright © 2012 Blaž Tomažič > + */ > + > +/** > + * @file get-kernel-arg-info.c > + * > + * Test API function: > + * > + * cl_int clGetKernelArgInfo (cl_kernel kernel, > + * cl_uint arg_indx, > + * cl_kernel_arg_info param_name, > + * size_t param_value_size, > + * void *param_value, > + * size_t *param_value_size_ret) > + */ > + > +#include "piglit-framework-cl-api.h" > + > + > +PIGLIT_CL_API_TEST_CONFIG_BEGIN > + > +>> config.name = "clGetKernelArgInfo"; > +>> config.version_min = 12; > + > +>> config.run_per_platform = true; > +>> config.create_context = true; > + > +>> config.program_source = "kernel void dummy_kernel(int param_1) {}"; > +>> config.build_options = "-cl-kernel-arg-info"; > + > +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; > + > +>> int i; > +>> cl_int errNo; > +>> cl_kernel kernel; > + > +>> size_t param_value_size; > +>> size_t ret_value_size; > +>> size_t expected_size; > +#define BUFFER_SIZE 8 > +>> char param_value[BUFFER_SIZE]; > + > +>> int num_kernel_arg_infos = PIGLIT_CL_ENUM_NUM(cl_kernel_arg_info, > env->version); > +>> const cl_kernel_arg_info* kernel_arg_infos =
[Piglit] [PATCH] arb_arrays_of_arrays: add simple execution test for tessellation
This test is a copy of tcs-tes-patch-array.shader_test extended for arrays of arrays. --- .../tessellation/tcs-tes-patch.shader_test | 65 ++ 1 file changed, 65 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/execution/tessellation/tcs-tes-patch.shader_test diff --git a/tests/spec/arb_arrays_of_arrays/execution/tessellation/tcs-tes-patch.shader_test b/tests/spec/arb_arrays_of_arrays/execution/tessellation/tcs-tes-patch.shader_test new file mode 100644 index 000..57582bb --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/execution/tessellation/tcs-tes-patch.shader_test @@ -0,0 +1,65 @@ +[require] +GLSL >= 1.50 +GL_ARB_tessellation_shader +GL_ARB_arrays_of_arrays + +[vertex shader passthrough] + +[tessellation control shader] +#extension GL_ARB_tessellation_shader: require +#extension GL_ARB_arrays_of_arrays: require +layout(vertices = 3) out; + +patch out vec4 color[3][2]; + +void main() { + gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position; + gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0); + gl_TessLevelInner = float[2](0.0, 0.0); + color[0][1] = vec4(0, 0.1, 0, 1); + color[1][0] = vec4(0, 0.5, 0, 1); + color[2][0] = vec4(0, 0.2, 0, 1); + color[2][1] = vec4(0, 0.2, 0, 1); +} + + +[tessellation evaluation shader] +#extension GL_ARB_tessellation_shader: require +#extension GL_ARB_arrays_of_arrays: require +layout(triangles) in; + +patch in vec4 color[3][2]; +out vec4 color_fs; + +void main() { + gl_Position = gl_in[0].gl_Position * gl_TessCoord[0] + + gl_in[1].gl_Position * gl_TessCoord[1] + + gl_in[2].gl_Position * gl_TessCoord[2]; + + color_fs = color[0][1] + color[2][0] + color[2][1] + color[1][0]; +} + + +[fragment shader] +in vec4 color_fs; + +void main() +{ + gl_FragColor = color_fs; +} + +[vertex data] +piglit_vertex/float/2 +-1.0 -1.0 + 1.0 -1.0 +-1.0 1.0 +-1.0 1.0 + 1.0 -1.0 + 1.0 1.0 + +[test] +clear color 0.1 0.1 0.1 0.1 +clear +patch parameter vertices 3 +draw arrays GL_PATCHES 0 6 +probe all rgba 0.0 1.0 0.0 1.0 -- 2.4.3 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] piglit summary output no longer greppable?
Hi Dylan, Looks like something happened to piglit summary redirection... Note that I had to hit ^C, or else nothing was coming out. Seems like the xz check is somehow not getting its own separate stdout or something? $ python piglit-summary.py asdf2 | grep fail ^CTraceback (most recent call last): File "piglit-summary.py", line 26, in from framework.programs.summary import console File "/home/ilia/src/piglit/framework/programs/summary.py", line 30, in from framework import summary, status, core, backends, exceptions File "/home/ilia/src/piglit/framework/summary.py", line 41, in from framework import grouptools, backends, exceptions File "/home/ilia/src/piglit/framework/backends/__init__.py", line 48, in from .compression import COMPRESSION_SUFFIXES File "/home/ilia/src/piglit/framework/backends/compression.py", line 98, in subprocess.check_call(['xz'], stderr=d) File "/usr/lib64/python2.7/subprocess.py", line 535, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib64/python2.7/subprocess.py", line 522, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib64/python2.7/subprocess.py", line 1384, in wait pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0) File "/usr/lib64/python2.7/subprocess.py", line 476, in _eintr_retry_call return func(*args) KeyboardInterrupt ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] add textureSamples tests
--- tests/all.py | 10 + tests/texturing/shaders/CMakeLists.gl.txt | 1 + tests/texturing/shaders/textureSamples.c | 358 ++ 3 files changed, 369 insertions(+) create mode 100644 tests/texturing/shaders/textureSamples.c diff --git a/tests/all.py b/tests/all.py index 07cf557..d0e78e6 100644 --- a/tests/all.py +++ b/tests/all.py @@ -1425,6 +1425,16 @@ for stage in ['vs', 'gs', 'fs']: PiglitGLTest(['texelFetch', stage, '{}sampler2DArray'.format(type), 'b0r1']) +for type in ('i', 'u', ''): +for sampler in ('sampler2DMS', 'sampler2DMSArray'): +for samples in map(str, (2, 4, 8)): +stype = '{}{}'.format(type, sampler) +profile.test_list[grouptools.join( +'spec', 'arb_shader_texture_image_samples', +'textureSamples', '{}-{}-{}'.format(stage, stype, samples)) +] = PiglitGLTest([ +'textureSamples', stage, stype, samples]) + with profile.group_manager( PiglitGLTest, grouptools.join('spec', 'glsl-1.30')) as g: diff --git a/tests/texturing/shaders/CMakeLists.gl.txt b/tests/texturing/shaders/CMakeLists.gl.txt index 6e4e9a7..8dcb865 100644 --- a/tests/texturing/shaders/CMakeLists.gl.txt +++ b/tests/texturing/shaders/CMakeLists.gl.txt @@ -13,3 +13,4 @@ link_libraries ( piglit_add_executable (textureSize textureSize.c common.c) piglit_add_executable (texelFetch texelFetch.c common.c) piglit_add_executable (textureGather textureGather.c) +piglit_add_executable (textureSamples textureSamples.c common.c) diff --git a/tests/texturing/shaders/textureSamples.c b/tests/texturing/shaders/textureSamples.c new file mode 100644 index 000..fcf2098 --- /dev/null +++ b/tests/texturing/shaders/textureSamples.c @@ -0,0 +1,358 @@ +/* + * Copyright © 2015 Ilia Mirkin + * + * 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. + * + * Heavily based on textureSize.c + */ + +/** + * \file textureSamples.c + * + * Tests the ARB_shader_texture_image_samples textureSamples() built-in. + * + * The test covers: + * - All pipeline stages (VS, GS, FS) + * - Sampler data types (floating point, signed integer, unsigned integer) + * - Sampler dimensionality (2DMS, 2DMSArray) + * + * The "textureSamples" binary takes three arguments: + * shader stage + * sampler type + * number of samples + * + * For example: + * ./bin/textureSamples fs sampler2DMS 4 + * ./bin/textureSamples vs usampler2DMSArray 2 + */ +#include "common.h" + +void +parse_args(int argc, char **argv); +static enum shader_target test_stage = UNKNOWN; + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; + + piglit_gl_process_args(&argc, argv, &config); + + parse_args(argc, argv); + if (test_stage == GS) { + config.supports_gl_compat_version = 32; + config.supports_gl_core_version = 32; + } else { + config.supports_gl_compat_version = 30; + config.supports_gl_core_version = 31; + } + +PIGLIT_GL_TEST_CONFIG_END + +static int vertex_location; + +enum piglit_result +piglit_display() +{ + bool pass = true; + static const float verts[] = { + -1, -1, + -1, 1, +1, 1, +1, -1, + }; + GLuint vbo; + + glClearColor(0.5, 0.5, 0.5, 1.0); + glClear(GL_COLOR_BUFFER_BIT); + + /* For GL core, we need to have a vertex array object bound. +* Otherwise, we don't particularly have to. Always use a +* vertex buffer object, though. +*/ + if (piglit_get_gl_version() >= 31) { + GLuint vao; + glGenVertexArrays(1, &vao); + glBindVertexArray(vao); + } + glGenBuffers(1, &vbo); +
Re: [Piglit] piglit summary output no longer greppable?
I think Jordan had a patch for this that I'd reviewed with some comments. I'll just push it tomorrow. On Aug 11, 2015 18:41, "Ilia Mirkin" wrote: > Hi Dylan, > > Looks like something happened to piglit summary redirection... Note > that I had to hit ^C, or else nothing was coming out. Seems like the > xz check is somehow not getting its own separate stdout or something? > > $ python piglit-summary.py asdf2 | grep fail > ^CTraceback (most recent call last): > File "piglit-summary.py", line 26, in > from framework.programs.summary import console > File "/home/ilia/src/piglit/framework/programs/summary.py", line 30, > in > from framework import summary, status, core, backends, exceptions > File "/home/ilia/src/piglit/framework/summary.py", line 41, in > from framework import grouptools, backends, exceptions > File "/home/ilia/src/piglit/framework/backends/__init__.py", line > 48, in > from .compression import COMPRESSION_SUFFIXES > File "/home/ilia/src/piglit/framework/backends/compression.py", line > 98, in > subprocess.check_call(['xz'], stderr=d) > File "/usr/lib64/python2.7/subprocess.py", line 535, in check_call > retcode = call(*popenargs, **kwargs) > File "/usr/lib64/python2.7/subprocess.py", line 522, in call > return Popen(*popenargs, **kwargs).wait() > File "/usr/lib64/python2.7/subprocess.py", line 1384, in wait > pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0) > File "/usr/lib64/python2.7/subprocess.py", line 476, in _eintr_retry_call > return func(*args) > KeyboardInterrupt > ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] add textureSamples tests
On Aug 11, 2015 18:49, "Ilia Mirkin" wrote: > > --- > tests/all.py | 10 + > tests/texturing/shaders/CMakeLists.gl.txt | 1 + > tests/texturing/shaders/textureSamples.c | 358 ++ > 3 files changed, 369 insertions(+) > create mode 100644 tests/texturing/shaders/textureSamples.c > > diff --git a/tests/all.py b/tests/all.py > index 07cf557..d0e78e6 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -1425,6 +1425,16 @@ for stage in ['vs', 'gs', 'fs']: > PiglitGLTest(['texelFetch', stage, '{}sampler2DArray'.format(type), >'b0r1']) > > +for type in ('i', 'u', ''): > +for sampler in ('sampler2DMS', 'sampler2DMSArray'): > +for samples in map(str, (2, 4, 8)): Or maybe just ('2', '4', '8') ? > +stype = '{}{}'.format(type, sampler) > +profile.test_list[grouptools.join( > +'spec', 'arb_shader_texture_image_samples', > +'textureSamples', '{}-{}-{}'.format(stage, stype, samples)) > +] = PiglitGLTest([ > +'textureSamples', stage, stype, samples]) > + > with profile.group_manager( > PiglitGLTest, > grouptools.join('spec', 'glsl-1.30')) as g: > diff --git a/tests/texturing/shaders/CMakeLists.gl.txt b/tests/texturing/shaders/CMakeLists.gl.txt > index 6e4e9a7..8dcb865 100644 > --- a/tests/texturing/shaders/CMakeLists.gl.txt > +++ b/tests/texturing/shaders/CMakeLists.gl.txt > @@ -13,3 +13,4 @@ link_libraries ( > piglit_add_executable (textureSize textureSize.c common.c) > piglit_add_executable (texelFetch texelFetch.c common.c) > piglit_add_executable (textureGather textureGather.c) > +piglit_add_executable (textureSamples textureSamples.c common.c) > diff --git a/tests/texturing/shaders/textureSamples.c b/tests/texturing/shaders/textureSamples.c > new file mode 100644 > index 000..fcf2098 > --- /dev/null > +++ b/tests/texturing/shaders/textureSamples.c > @@ -0,0 +1,358 @@ > +/* > + * Copyright © 2015 Ilia Mirkin > + * > + * 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. > + * > + * Heavily based on textureSize.c > + */ > + > +/** > + * \file textureSamples.c > + * > + * Tests the ARB_shader_texture_image_samples textureSamples() built-in. > + * > + * The test covers: > + * - All pipeline stages (VS, GS, FS) > + * - Sampler data types (floating point, signed integer, unsigned integer) > + * - Sampler dimensionality (2DMS, 2DMSArray) > + * > + * The "textureSamples" binary takes three arguments: > + * shader stage > + * sampler type > + * number of samples > + * > + * For example: > + * ./bin/textureSamples fs sampler2DMS 4 > + * ./bin/textureSamples vs usampler2DMSArray 2 > + */ > +#include "common.h" > + > +void > +parse_args(int argc, char **argv); > +static enum shader_target test_stage = UNKNOWN; > + > +PIGLIT_GL_TEST_CONFIG_BEGIN > + > + config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; > + > + piglit_gl_process_args(&argc, argv, &config); > + > + parse_args(argc, argv); > + if (test_stage == GS) { > + config.supports_gl_compat_version = 32; > + config.supports_gl_core_version = 32; > + } else { > + config.supports_gl_compat_version = 30; > + config.supports_gl_core_version = 31; > + } > + > +PIGLIT_GL_TEST_CONFIG_END > + > +static int vertex_location; > + > +enum piglit_result > +piglit_display() > +{ > + bool pass = true; > + static const float verts[] = { > + -1, -1, > + -1, 1, > +1, 1, > +1, -1, > + }; > + GLuint vbo; > + > + glClearColor(0.5, 0.5, 0.5, 1.0); > + glClear(GL_COLOR_BUFFER_BIT); > + > + /* For GL core, we need to have a vertex array ob
[Piglit] [PATCH] arb_program_interface_query: fix getprogramresourceiv errors
move IS_PER_PATCH as part of tessellation queries, require GL_ARB_compute_shader for compute shader enum queries. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91608 --- tests/spec/arb_program_interface_query/getprogramresourceiv.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/spec/arb_program_interface_query/getprogramresourceiv.c b/tests/spec/arb_program_interface_query/getprogramresourceiv.c index 03f2fc6..67f0fbf 100755 --- a/tests/spec/arb_program_interface_query/getprogramresourceiv.c +++ b/tests/spec/arb_program_interface_query/getprogramresourceiv.c @@ -571,16 +571,15 @@ check_extensions_prop(GLenum prop) } if ((prop == GL_REFERENCED_BY_TESS_CONTROL_SHADER || -prop == GL_REFERENCED_BY_TESS_EVALUATION_SHADER) && +prop == GL_REFERENCED_BY_TESS_EVALUATION_SHADER || + prop == GL_IS_PER_PATCH) && !piglit_is_extension_supported("GL_ARB_tessellation_shader")) { return false; } - if ((prop == GL_REFERENCED_BY_COMPUTE_SHADER || -prop == GL_COMPUTE_SUBROUTINE_UNIFORM || -prop == GL_IS_PER_PATCH) && -!piglit_is_extension_supported("GL_ARB_compute_shader") && -!piglit_is_extension_supported("GL_ARB_shader_image_load_store")) { + if (prop == GL_REFERENCED_BY_COMPUTE_SHADER || +prop == GL_COMPUTE_SUBROUTINE_UNIFORM && +!piglit_is_extension_supported("GL_ARB_compute_shader")) { return false; } -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit