Re: [Piglit] [PATCH] Add tests for GL_AMD_depth_clamp_separate
Thank you for such a constructive comments/suggestions. I took a reference from existing depth_clamp tests. I will apply your suggestions to both the new tests and existing tests and send next revision. Thank you so much for reviewing the series. On 08/22/2018 01:37 PM, Ian Romanick wrote: > On 08/21/2018 05:05 PM, Sagar Ghuge wrote: >> Signed-off-by: Sagar Ghuge >> --- >> tests/opengl.py | 8 + >> tests/spec/CMakeLists.txt | 1 + >> .../CMakeLists.gl.txt | 15 ++ >> .../amd_depth_clamp_separate/CMakeLists.txt | 1 + >> .../depth-clamp-far-status.c | 147 >> .../depth-clamp-near-status.c | 148 >> .../depth-clamp-range.c | 159 ++ >> 7 files changed, 479 insertions(+) >> create mode 100644 tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt >> create mode 100644 tests/spec/amd_depth_clamp_separate/CMakeLists.txt >> create mode 100644 >> tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c >> create mode 100644 >> tests/spec/amd_depth_clamp_separate/depth-clamp-near-status.c >> create mode 100644 tests/spec/amd_depth_clamp_separate/depth-clamp-range.c >> >> diff --git a/tests/opengl.py b/tests/opengl.py >> index 9c5290f49..fc35a61b2 100644 >> --- a/tests/opengl.py >> +++ b/tests/opengl.py >> @@ -1703,6 +1703,14 @@ with profile.test_list.group_manager( >> g(['depth-clamp-range']) >> g(['depth-clamp-status']) >> >> +# AMD_depth_clamp_separate >> +with profile.test_list.group_manager( >> +PiglitGLTest, grouptools.join('spec', 'AMD_depth_clamp_separate')) >> as g: >> +g(['amd_depth_clamp_far_status']) >> +g(['amd_depth_clamp_near_status']) >> +g(['amd_depth_clamp_separate_range']) >> + >> +# Group ARB_draw_elements_base_vertex >> # Group ARB_draw_elements_base_vertex >> with profile.test_list.group_manager( >> PiglitGLTest, >> diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt >> index bb3f02744..4df9d331d 100644 >> --- a/tests/spec/CMakeLists.txt >> +++ b/tests/spec/CMakeLists.txt >> @@ -1,4 +1,5 @@ >> add_subdirectory (amd_framebuffer_multisample_advanced) >> +add_subdirectory (amd_depth_clamp_separate) >> add_subdirectory (amd_performance_monitor) >> add_subdirectory (amd_pinned_memory) >> add_subdirectory (arb_arrays_of_arrays) >> diff --git a/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt >> b/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt >> new file mode 100644 >> index 0..40dad8f53 >> --- /dev/null >> +++ b/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt >> @@ -0,0 +1,15 @@ >> +include_directories( >> +${GLEXT_INCLUDE_DIR} >> +${OPENGL_INCLUDE_PATH} >> +) >> + >> +link_libraries ( >> +piglitutil_${piglit_target_api} >> +${OPENGL_gl_LIBRARY} >> +) >> + >> +piglit_add_executable (amd_depth_clamp_near_status >> depth-clamp-near-status.c) >> +piglit_add_executable (amd_depth_clamp_far_status depth-clamp-far-status.c) >> +piglit_add_executable (amd_depth_clamp_separate_range depth-clamp-range.c) >> + >> +# vim: ft=cmake: >> diff --git a/tests/spec/amd_depth_clamp_separate/CMakeLists.txt >> b/tests/spec/amd_depth_clamp_separate/CMakeLists.txt >> new file mode 100644 >> index 0..4a012b958 >> --- /dev/null >> +++ b/tests/spec/amd_depth_clamp_separate/CMakeLists.txt >> @@ -0,0 +1 @@ >> +piglit_include_target_api() >> \ No newline at end of file >> diff --git a/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c >> b/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c >> new file mode 100644 >> index 0..9d1accd79 >> --- /dev/null >> +++ b/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c >> @@ -0,0 +1,147 @@ >> +/** >> + * Copyright © 2018 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 >> + * FROM, OUT OF OR
Re: [Piglit] [PATCH] Add tests for GL_AMD_depth_clamp_separate
On 08/21/2018 05:05 PM, Sagar Ghuge wrote: > Signed-off-by: Sagar Ghuge > --- > tests/opengl.py | 8 + > tests/spec/CMakeLists.txt | 1 + > .../CMakeLists.gl.txt | 15 ++ > .../amd_depth_clamp_separate/CMakeLists.txt | 1 + > .../depth-clamp-far-status.c | 147 > .../depth-clamp-near-status.c | 148 > .../depth-clamp-range.c | 159 ++ > 7 files changed, 479 insertions(+) > create mode 100644 tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > create mode 100644 tests/spec/amd_depth_clamp_separate/CMakeLists.txt > create mode 100644 > tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > create mode 100644 > tests/spec/amd_depth_clamp_separate/depth-clamp-near-status.c > create mode 100644 tests/spec/amd_depth_clamp_separate/depth-clamp-range.c > > diff --git a/tests/opengl.py b/tests/opengl.py > index 9c5290f49..fc35a61b2 100644 > --- a/tests/opengl.py > +++ b/tests/opengl.py > @@ -1703,6 +1703,14 @@ with profile.test_list.group_manager( > g(['depth-clamp-range']) > g(['depth-clamp-status']) > > +# AMD_depth_clamp_separate > +with profile.test_list.group_manager( > +PiglitGLTest, grouptools.join('spec', 'AMD_depth_clamp_separate')) > as g: > +g(['amd_depth_clamp_far_status']) > +g(['amd_depth_clamp_near_status']) > +g(['amd_depth_clamp_separate_range']) > + > +# Group ARB_draw_elements_base_vertex > # Group ARB_draw_elements_base_vertex > with profile.test_list.group_manager( > PiglitGLTest, > diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt > index bb3f02744..4df9d331d 100644 > --- a/tests/spec/CMakeLists.txt > +++ b/tests/spec/CMakeLists.txt > @@ -1,4 +1,5 @@ > add_subdirectory (amd_framebuffer_multisample_advanced) > +add_subdirectory (amd_depth_clamp_separate) > add_subdirectory (amd_performance_monitor) > add_subdirectory (amd_pinned_memory) > add_subdirectory (arb_arrays_of_arrays) > diff --git a/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > b/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > new file mode 100644 > index 0..40dad8f53 > --- /dev/null > +++ b/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > @@ -0,0 +1,15 @@ > +include_directories( > + ${GLEXT_INCLUDE_DIR} > + ${OPENGL_INCLUDE_PATH} > +) > + > +link_libraries ( > + piglitutil_${piglit_target_api} > + ${OPENGL_gl_LIBRARY} > +) > + > +piglit_add_executable (amd_depth_clamp_near_status depth-clamp-near-status.c) > +piglit_add_executable (amd_depth_clamp_far_status depth-clamp-far-status.c) > +piglit_add_executable (amd_depth_clamp_separate_range depth-clamp-range.c) > + > +# vim: ft=cmake: > diff --git a/tests/spec/amd_depth_clamp_separate/CMakeLists.txt > b/tests/spec/amd_depth_clamp_separate/CMakeLists.txt > new file mode 100644 > index 0..4a012b958 > --- /dev/null > +++ b/tests/spec/amd_depth_clamp_separate/CMakeLists.txt > @@ -0,0 +1 @@ > +piglit_include_target_api() > \ No newline at end of file > diff --git a/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > b/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > new file mode 100644 > index 0..9d1accd79 > --- /dev/null > +++ b/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > @@ -0,0 +1,147 @@ > +/** > + * Copyright © 2018 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 > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > DEALINGS > + * IN THE SOFTWARE. > + */ > + > +/** > + * Test that GL_DEPTH_CLAMP_FAR_AMD is a valid state > + * > + * Table 6.9 (Transformation state) of OpenGL 4.1 Core added > + * DEPTH_CLAMP_FAR_AMD > + * > + */ > + > +#include "piglit-util-gl.h" > + > +PIGLIT_GL_TEST_CONFIG_BEGIN > + > + config.supports_gl_core_version = 41; The spec was written
Re: [Piglit] [PATCH] Add tests for GL_AMD_depth_clamp_separate
The other two tests should also do: piglit_require_extension("GL_AMD_depth_clamp_separate"); Marek On Tue, Aug 21, 2018 at 8:05 PM Sagar Ghuge wrote: > > Signed-off-by: Sagar Ghuge > --- > tests/opengl.py | 8 + > tests/spec/CMakeLists.txt | 1 + > .../CMakeLists.gl.txt | 15 ++ > .../amd_depth_clamp_separate/CMakeLists.txt | 1 + > .../depth-clamp-far-status.c | 147 > .../depth-clamp-near-status.c | 148 > .../depth-clamp-range.c | 159 ++ > 7 files changed, 479 insertions(+) > create mode 100644 tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > create mode 100644 tests/spec/amd_depth_clamp_separate/CMakeLists.txt > create mode 100644 > tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > create mode 100644 > tests/spec/amd_depth_clamp_separate/depth-clamp-near-status.c > create mode 100644 tests/spec/amd_depth_clamp_separate/depth-clamp-range.c > > diff --git a/tests/opengl.py b/tests/opengl.py > index 9c5290f49..fc35a61b2 100644 > --- a/tests/opengl.py > +++ b/tests/opengl.py > @@ -1703,6 +1703,14 @@ with profile.test_list.group_manager( > g(['depth-clamp-range']) > g(['depth-clamp-status']) > > +# AMD_depth_clamp_separate > +with profile.test_list.group_manager( > +PiglitGLTest, grouptools.join('spec', 'AMD_depth_clamp_separate')) > as g: > +g(['amd_depth_clamp_far_status']) > +g(['amd_depth_clamp_near_status']) > +g(['amd_depth_clamp_separate_range']) > + > +# Group ARB_draw_elements_base_vertex > # Group ARB_draw_elements_base_vertex > with profile.test_list.group_manager( > PiglitGLTest, > diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt > index bb3f02744..4df9d331d 100644 > --- a/tests/spec/CMakeLists.txt > +++ b/tests/spec/CMakeLists.txt > @@ -1,4 +1,5 @@ > add_subdirectory (amd_framebuffer_multisample_advanced) > +add_subdirectory (amd_depth_clamp_separate) > add_subdirectory (amd_performance_monitor) > add_subdirectory (amd_pinned_memory) > add_subdirectory (arb_arrays_of_arrays) > diff --git a/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > b/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > new file mode 100644 > index 0..40dad8f53 > --- /dev/null > +++ b/tests/spec/amd_depth_clamp_separate/CMakeLists.gl.txt > @@ -0,0 +1,15 @@ > +include_directories( > + ${GLEXT_INCLUDE_DIR} > + ${OPENGL_INCLUDE_PATH} > +) > + > +link_libraries ( > + piglitutil_${piglit_target_api} > + ${OPENGL_gl_LIBRARY} > +) > + > +piglit_add_executable (amd_depth_clamp_near_status depth-clamp-near-status.c) > +piglit_add_executable (amd_depth_clamp_far_status depth-clamp-far-status.c) > +piglit_add_executable (amd_depth_clamp_separate_range depth-clamp-range.c) > + > +# vim: ft=cmake: > diff --git a/tests/spec/amd_depth_clamp_separate/CMakeLists.txt > b/tests/spec/amd_depth_clamp_separate/CMakeLists.txt > new file mode 100644 > index 0..4a012b958 > --- /dev/null > +++ b/tests/spec/amd_depth_clamp_separate/CMakeLists.txt > @@ -0,0 +1 @@ > +piglit_include_target_api() > \ No newline at end of file > diff --git a/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > b/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > new file mode 100644 > index 0..9d1accd79 > --- /dev/null > +++ b/tests/spec/amd_depth_clamp_separate/depth-clamp-far-status.c > @@ -0,0 +1,147 @@ > +/** > + * Copyright © 2018 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 > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > DEALINGS > + * IN THE SOFTWARE. > + */ > + > +/** > + * Test that GL_DEPTH_CLAMP_FAR_AMD is a valid state > + * > + * Table 6.9 (Transformation state) of OpenGL 4.1 Core added > + * DEPTH_CLAMP_FAR_AMD > + * > + */ > + > +#include
[Piglit] [PATCH piglit] egl_khr_create_context: Proper invalid attributes for EGL 1.5
When EGL_KHR_create_context was originally written, EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR was an invalid attribute for OpenGL ES. After moving the extension to core EGL 1.5, the aforementioned attribute was made valid for both OpenGL and OpenGL ES. Check whether the EGL version is lower than 1.5 before checking EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR is an invalid attribute. Signed-off-by: Miguel A Vico Moya --- .../egl/spec/egl_khr_create_context/common.c | 5 ++-- .../egl/spec/egl_khr_create_context/common.h | 8 +++ .../invalid-attribute-gles.c | 24 +++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/tests/egl/spec/egl_khr_create_context/common.c b/tests/egl/spec/egl_khr_create_context/common.c index a443ced97..ba0311bff 100644 --- a/tests/egl/spec/egl_khr_create_context/common.c +++ b/tests/egl/spec/egl_khr_create_context/common.c @@ -27,6 +27,8 @@ static Display *dpy = NULL; EGLDisplay egl_dpy; +EGLint egl_major; +EGLint egl_minor; EGLConfig cfg; EGLContext ctx; @@ -87,7 +89,6 @@ EGL_KHR_create_context_setup(EGLint renderable_type_mask) EGL_NONE }; EGLint count; - EGLint major, minor; dpy = XOpenDisplay(NULL); if (dpy == NULL) { @@ -101,7 +102,7 @@ EGL_KHR_create_context_setup(EGLint renderable_type_mask) piglit_report_result(PIGLIT_FAIL); } - if (!eglInitialize(egl_dpy, , )) { + if (!eglInitialize(egl_dpy, _major, _minor)) { fprintf(stderr, "eglInitialize() failed\n"); piglit_report_result(PIGLIT_FAIL); } diff --git a/tests/egl/spec/egl_khr_create_context/common.h b/tests/egl/spec/egl_khr_create_context/common.h index f4f42760c..269610f01 100644 --- a/tests/egl/spec/egl_khr_create_context/common.h +++ b/tests/egl/spec/egl_khr_create_context/common.h @@ -51,6 +51,8 @@ #endif extern EGLDisplay egl_dpy; +extern EGLint egl_major; +extern EGLint egl_minor; extern EGLConfig cfg; extern EGLContext ctx; @@ -75,3 +77,9 @@ version_is_valid_for_context(int ctx_major, int major, int minor) } return false; } + +static inline bool +check_egl_version(int major, int minor) +{ + return ((egl_major > major) || ((egl_major == major) && (egl_minor >= minor))); +} diff --git a/tests/egl/spec/egl_khr_create_context/invalid-attribute-gles.c b/tests/egl/spec/egl_khr_create_context/invalid-attribute-gles.c index 7d23e5673..d2b98818c 100644 --- a/tests/egl/spec/egl_khr_create_context/invalid-attribute-gles.c +++ b/tests/egl/spec/egl_khr_create_context/invalid-attribute-gles.c @@ -79,6 +79,22 @@ int main(int argc, char **argv) *attribute is only meaningful for OpenGL contexts, and specifying it *for other types of contexts, including OpenGL ES contexts, will *generate an error." +* +* However, after making the extension part of core EGL 1.5, +* EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR was made a valid +* attribute for OpenGL ES contexts: +* +*"The attribute EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY +*specifies reset notification behavior for a context supporting +*robust buffer access. The attribute value may be either +*EGL_NO_RESET_NOTIFICATION or EGL_LOSE_CONTEXT_ON_RESET, which +*respectively result in reset notification behavior of +*GL_NO_RESET_NOTIFICATION_ARB and GL_LOSE_CONTEXT_ON_RESET_ARB, as +*described by the OpenGL GL_ARB_robustness extension, or by +*equivalent functionality. +* +*This attribute is supported only for OpenGL and OpenGL ES +*contexts." */ EGLint bad_attributes[] = { 0x, @@ -97,6 +113,14 @@ int main(int argc, char **argv) } for (i = 0; i < ARRAY_SIZE(bad_attributes); i++) { + /* Skip EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR if +* it's EGL 1.5+ +*/ + if ((bad_attributes[i] == EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR) && + check_egl_version(1, 5)) { + continue; + } + pass = try_attribute(bad_attributes[i]) && pass; } -- 2.18.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH piglit 4/4] egl: fix uninitialised counter
On Wed, Aug 22, 2018 at 12:38:42PM +0100, Eric Engestrom wrote: > CovID: 1438468 (UNINIT) > Fixes: e49d4479d6cabce970bb9 egl: Add basic EGL_MESA_device_software test" > Signed-off-by: Eric Engestrom > --- > .../spec/egl_mesa_device_software/egl_mesa_device_software.c| 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Both this and the previous similar patch are Reviewed-by: Caio Marcelo de Oliveira Filho ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH piglit 2/4] util: fix memory leak
On Wed, Aug 22, 2018 at 12:38:40PM +0100, Eric Engestrom wrote: > CovID: 1438469 (RESOURCE_LEAK) > Fixes: 606e40b2659ad7fc4ae8e "util: Add utilities to handle shader_test files" > Signed-off-by: Eric Engestrom > --- > tests/util/piglit-shader-test.c | 1 + > 1 file changed, 1 insertion(+) This patch is Reviewed-by: Caio Marcelo de Oliveira Filho > diff --git a/tests/util/piglit-shader-test.c b/tests/util/piglit-shader-test.c > index 6aeb5a521a25b2d62301..4802983e56d1037be079 100644 > --- a/tests/util/piglit-shader-test.c > +++ b/tests/util/piglit-shader-test.c > @@ -137,6 +137,7 @@ piglit_load_source_from_shader_test(const char *filename, > if (first_line == NULL) { > fprintf(stderr, "Could not find groupname \"%s\" on file > \"%s\"\n", > group_name, filename); > + free(text); > return false; > } Since you are touching this file, a patch suggestion. A few lines below there is text_size = line - first_line + 1; source = malloc(sizeof(char*) * text_size); snprintf(source, line - first_line + 1, "%s", first_line); if (output_source) *output_source = source; There's a leak lurking there (we don't currently hit it, though) in case output_source == NULL, source is ignored. Maybe just move the malloc/snprintf to inside the block? Thanks, Caio ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH piglit 1/4] arb_gpu_shader5: fix memory leak
On Wed, Aug 22, 2018 at 12:38:39PM +0100, Eric Engestrom wrote: > CovID: 1438471 (RESOURCE_LEAK) > Fixes: 7ec9b1734b66ee41c2700 "arb_gpu_shader5: Add support for testing > spirv with XFB streams" > Signed-off-by: Eric Engestrom > --- > .../execution/xfb-streams-without-invocations.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) This patch is Reviewed-by: Caio Marcelo de Oliveira Filho Thanks, Caio ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-1.20: test that 'invariant' qualifier does not propagate on uniforms
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100316 Signed-off-by: Danylo Piliaiev --- .../linker/invariant-propagation.shader_test | 25 +++ 1 file changed, 25 insertions(+) create mode 100644 tests/spec/glsl-1.20/linker/invariant-propagation.shader_test diff --git a/tests/spec/glsl-1.20/linker/invariant-propagation.shader_test b/tests/spec/glsl-1.20/linker/invariant-propagation.shader_test new file mode 100644 index 0..fc4096833 --- /dev/null +++ b/tests/spec/glsl-1.20/linker/invariant-propagation.shader_test @@ -0,0 +1,25 @@ +[require] +GLSL >= 1.20 + +# This test exercises a Mesa GLSL bug where 'invariant' qualifier +# propagated on uniforms causing a linker failure due to mismatch +# of uniforms declaration between stages. + +[vertex shader] +#version 120 +uniform float t; +invariant gl_Position; +void main() +{ + gl_Position = vec4(t); +} + +[fragment shader] +#version 120 +uniform float t; +void main() +{ +} + +[test] +link success -- 2.18.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH piglit 3/4] egl: fix uninitialised counter
CovID: 1438470 (UNINIT) Fixes: 6c08c9fab326a526b41e1 "egl: Add basic EGL_EXT_device_drm test" Signed-off-by: Eric Engestrom --- tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c b/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c index 3877d57d231800869ac1..537c8b60f83be03570e6 100644 --- a/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c +++ b/tests/egl/spec/egl_ext_device_drm/egl_ext_device_drm.c @@ -39,7 +39,7 @@ main(void) EGLDisplay dpy1, dpy2, dpy3; enum piglit_result result = PIGLIT_PASS; EGLDeviceEXT devs[NDEVS]; - EGLint i, numdevs, drmdevs; + EGLint i, numdevs, drmdevs = 0; EGLDeviceEXT device = EGL_NO_DEVICE_EXT; EGLAttrib attr; const char *devstring = NULL; -- Cheers, Eric ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH piglit 4/4] egl: fix uninitialised counter
CovID: 1438468 (UNINIT) Fixes: e49d4479d6cabce970bb9 egl: Add basic EGL_MESA_device_software test" Signed-off-by: Eric Engestrom --- .../spec/egl_mesa_device_software/egl_mesa_device_software.c| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/egl/spec/egl_mesa_device_software/egl_mesa_device_software.c b/tests/egl/spec/egl_mesa_device_software/egl_mesa_device_software.c index 5004f0c60c7152c7aee6..cdfa94680c0895cb2232 100644 --- a/tests/egl/spec/egl_mesa_device_software/egl_mesa_device_software.c +++ b/tests/egl/spec/egl_mesa_device_software/egl_mesa_device_software.c @@ -33,7 +33,7 @@ main(void) { enum piglit_result result = PIGLIT_PASS; EGLDeviceEXT devs[NDEVS]; - EGLint i, numdevs, swdevs; + EGLint i, numdevs, swdevs = 0; EGLDeviceEXT device = EGL_NO_DEVICE_EXT; EGLAttrib attr; const char *devstring = NULL; -- Cheers, Eric ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH piglit 2/4] util: fix memory leak
CovID: 1438469 (RESOURCE_LEAK) Fixes: 606e40b2659ad7fc4ae8e "util: Add utilities to handle shader_test files" Signed-off-by: Eric Engestrom --- tests/util/piglit-shader-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/util/piglit-shader-test.c b/tests/util/piglit-shader-test.c index 6aeb5a521a25b2d62301..4802983e56d1037be079 100644 --- a/tests/util/piglit-shader-test.c +++ b/tests/util/piglit-shader-test.c @@ -137,6 +137,7 @@ piglit_load_source_from_shader_test(const char *filename, if (first_line == NULL) { fprintf(stderr, "Could not find groupname \"%s\" on file \"%s\"\n", group_name, filename); + free(text); return false; } -- Cheers, Eric ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH piglit 1/4] arb_gpu_shader5: fix memory leak
CovID: 1438471 (RESOURCE_LEAK) Fixes: 7ec9b1734b66ee41c2700 "arb_gpu_shader5: Add support for testing spirv with XFB streams" Signed-off-by: Eric Engestrom --- .../execution/xfb-streams-without-invocations.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c b/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c index b604fd9732ebb26e5eb8..1c6f76c0cb631e4c7437 100644 --- a/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c +++ b/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c @@ -117,8 +117,10 @@ build_glsl_program() if (!piglit_load_source_from_shader_test(shader_source_filename, GL_VERTEX_SHADER, false, -_pass_thru_text, NULL)) +_pass_thru_text, NULL)) { + free(gs_text); return 0; + } prog = piglit_build_simple_program_multiple_shaders( -- Cheers, Eric ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] cl: Add tests for calls with special inputs
Also fixes apparently missing coverage for special input arguments not passed in registers. --- tests/cl/program/execute/calls-workitem-id.cl | 136 ++ 1 file changed, 136 insertions(+) diff --git a/tests/cl/program/execute/calls-workitem-id.cl b/tests/cl/program/execute/calls-workitem-id.cl index 7edfad7e9..b42c85959 100644 --- a/tests/cl/program/execute/calls-workitem-id.cl +++ b/tests/cl/program/execute/calls-workitem-id.cl @@ -38,6 +38,56 @@ arg_out: 2 buffer uint[64] \ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +[test] +name: Callee function stack passed get_local_id +kernel_name: kernel_call_too_many_argument_regs_get_local_id_012 +dimensions: 3 +global_size: 8 4 2 +local_size: 8 4 2 + +arg_out: 0 buffer uint[64] \ + 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 \ + 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 \ + 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 \ + 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 + +arg_out: 1 buffer uint[64] \ + 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 \ + 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 \ + 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 \ + 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 + +arg_out: 2 buffer uint[64] \ + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \ + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \ + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \ + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + +[test] +name: Callee function stack passed get_local_id with byval +kernel_name: kernel_call_too_many_argument_regs_byval_get_local_id_012 +dimensions: 3 +global_size: 8 4 2 +local_size: 8 4 2 + +arg_out: 0 buffer uint[64] \ + 45 46 47 48 49 50 51 52 45 46 47 48 49 50 51 52 \ + 45 46 47 48 49 50 51 52 45 46 47 48 49 50 51 52 \ + 45 46 47 48 49 50 51 52 45 46 47 48 49 50 51 52 \ + 45 46 47 48 49 50 51 52 45 46 47 48 49 50 51 52 + +arg_out: 1 buffer uint[64] \ + 47 47 47 47 47 47 47 47 48 48 48 48 48 48 48 48 \ + 49 49 49 49 49 49 49 49 50 50 50 50 50 50 50 50 \ + 47 47 47 47 47 47 47 47 48 48 48 48 48 48 48 48 \ + 49 49 49 49 49 49 49 49 50 50 50 50 50 50 50 50 + +arg_out: 2 buffer uint[64] \ + 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 \ + 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 \ + 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 \ + 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 + !*/ #define NOINLINE __attribute__((noinline)) @@ -75,3 +125,89 @@ kernel void kernel_call_pass_get_global_id_012(global uint *out0, { func_get_global_id_012(out0, out1, out2); } + +// On amdgcn, this will require the workitem IDs be passed as values +// on the stack after the arguments. +NOINLINE +uint3 too_many_argument_regs_get_local_id_012( + int arg0, int arg1, int arg2, int arg3, + int arg4, int arg5, int arg6, int arg7, + int arg8, int arg9, int arg10, int arg11, + int arg12, int arg13, int arg14, int arg15, + int arg16, int arg17, int arg18, int arg19, + int arg20, int arg21, int arg22, int arg23, + int arg24, int arg25, int arg26, int arg27, + int arg28, int arg29, int arg30, int arg31) +{ + uint3 id; + id.x = get_local_id(0); + id.y = get_local_id(1); + id.z = get_local_id(2); + return id; +} + +kernel void kernel_call_too_many_argument_regs_get_local_id_012(global uint* out0, global uint* out1, global uint* out2) +{ + uint id0 = get_global_id(0); + uint id1 = get_global_id(1); + uint id2 = get_global_id(2); + uint flat_id = (id2 * get_global_size(1) + id1) * get_global_size(0) + id0; + + uint3 result = too_many_argument_regs_get_local_id_012( + 1234, 999, 42, , , 9009, 777, 4242, + 202020, 6359, 8344, 1443, 552323, 33424, 666, 98765, + , 232556, 5, 934121, 94991, 1337, 0xdead, 0xbeef, + 0x, 0x, 0x666, 0x4141, 0x1234, 0x, 0x, 0x); + + out0[flat_id] = result.x; + out1[flat_id] = result.y; + out2[flat_id] = result.z; +} + + +typedef struct ByValStruct { + long array[9]; +} ByValStruct; + +// Same as previous, with an additional byval passed argument. +NOINLINE +uint3 too_many_argument_regs_byval_get_local_id_012( + ByValStruct byval_arg, + int arg0, int arg1, int arg2, int arg3, + int arg4, int arg5, int arg6, int arg7, + int arg8, int arg9, int arg10, int arg11, + int arg12, int arg13, int arg14, int arg15, + int arg16, int arg17, int arg18, int arg19, + int arg20, int arg21, int arg22, int arg23, + int arg24, int arg25, int arg26, int arg27, + int arg28, int arg29, int arg30, int arg31) +{ + uint3 id; + id.x = get_local_id(0) + byval_arg.array[3];
[Piglit] [PATCH 1/2] cl: Add test for respecting byval alignment in call setup
--- .../cl/program/execute/calls-large-struct.cl | 36 +++ 1 file changed, 36 insertions(+) diff --git a/tests/cl/program/execute/calls-large-struct.cl b/tests/cl/program/execute/calls-large-struct.cl index c10458f37..0eac4d470 100644 --- a/tests/cl/program/execute/calls-large-struct.cl +++ b/tests/cl/program/execute/calls-large-struct.cl @@ -37,6 +37,15 @@ arg_out: 0 buffer int[16]\ arg_in: 1 buffer int[16] \ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + +[test] +name: byval struct align 8 +kernel_name: kernel_call_byval_struct_align8 +dimensions: 1 +global_size: 1 0 0 + +arg_out: 0 buffer int[1] 1 + !*/ #define NOINLINE __attribute__((noinline)) @@ -154,3 +163,30 @@ kernel void call_sret_Char_IntArray_func(global int* output, global int* input) output[id] = sum; } + +typedef struct ByVal_Struct_Align8 { +long xs[9]; +} ByVal_Struct_Align8; + +__attribute__((noinline)) +int func(ByVal_Struct_Align8 val) +{ +for (int i = 0; i < 9; ++i) +{ +long ld = val.xs[i]; +if (ld != i) +return 0; +} +return 1; +} + +__kernel void kernel_call_byval_struct_align8(__global uint* result) +{ +struct ByVal_Struct_Align8 val = { { 0x1337 } }; +for (int i = 0; i < 9; ++i) +{ +val.xs[i] = i; +} + +*result = func(val); +} -- 2.17.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [Mesa-dev] XDC 2018: Call for Papers
Hi all, We received an overwhelming response for this CFP - 35+ proposals (and still some latecomers trickling in), for only 18 slots. What we didn't much get (and the CFP failed to make it clear that we're looking for this) is proposals for the workshop/discussion track in the 2nd room. In the past we scheduled that ad-hoc at the conference, but this year it would make sense to organize this. Especially since we expect a lot of the talks we had to reject to end up in hallway discussions. Formal workshop submissions also help us in scheduling the main track - anything that's expected to generate a lot of discussions will be put early. Right now we have 1 proposal for the workshop track. We'd like to have more. For details please look at "Workshop Track" at https://www.x.org/wiki/Events/PapersCommittee/ If you have a topic, please send your proposal to bo...@foundation.lists.org. Thanks, Daniel On Mon, Apr 2, 2018 at 12:47 PM, Samuel Iglesias Gonsálvez wrote: > Hello, > > I have the pleasure to announce that the X.org Developer Conference 2018 > will be held in A Coruña, Spain from September 26th to September 28th. > The venue is located at the Computer Science faculty of the University > of Coruña. > > This year, we have created a new website for the event: > > https://xdc2018.x.org > > And a Twitter account for announcing updates, please follow us! > > https://twitter.com/xdc2018 > > However, we are going to keep updating the good old wiki too: > > https://www.x.org/wiki/Events/XDC2018 > > As usual, we are open to talks across the layers of the graphics stack, > from the kernel to desktop environments / graphical applications and > about how to make things better for the developers who build them. Other > topics such as Virtual Reality are also welcome. If you're not sure if > something might fit, mail us or add it to the ideas list found in the > program page at: > > https://www.x.org/wiki/Events/XDC2018/Program/ > > The Call for Papers information is here: https://xdc2018.x.org/#cfp. > Remember, the deadline for submissions is Wednesday 25th July 2018 17:00 > UTC. Don't forget to send your proposals to bo...@foundation.x.org! > > The conference is free of charge and open to the general public. If you > plan on coming, please add yourself to the attendees list: > > https://www.x.org/wiki/Events/XDC2018/Attendees/ > > We'll use this list of attendees to make badges and plan for the > catering, so if you are attending please add your name as early as > possible. > > I am looking forward to seeing you there. If you have any > inquiries/questions, please send an email to xdc2...@gpul.org, adding on > CC the X.org board (bo...@foundation.x.org). > > Best regards, > > Sam > ___ > mesa-dev mailing list > mesa-...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit