Re: [Piglit] [PATCH] arb_enhanced_layouts: UBO explicit offset test
On Sun, Jan 10, 2016 at 5:55 PM, Timothy Arceriwrote: > This is just a lazy copy of the arb_uniform_buffer_object bufferstorage > test updated to make use of explicit offsets. > > Test results: > Nvidia GeForce 840M - NVIDIA 352.41: fail > > This fails on the Nvidia driver due to a bug in handling the named > uniform block in the fragment shader. If the name is removed the > test works as expected. > --- > tests/all.py | 7 + > tests/spec/CMakeLists.txt | 1 + > tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt | 14 ++ > tests/spec/arb_enhanced_layouts/CMakeLists.txt | 1 + > .../explicit-offset-bufferstorage.c| 243 > + > 5 files changed, 266 insertions(+) > create mode 100644 tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt > create mode 100644 tests/spec/arb_enhanced_layouts/CMakeLists.txt > create mode 100644 > tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c > > diff --git a/tests/all.py b/tests/all.py > index 7982631..2fc8ec3 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -2368,6 +2368,13 @@ with profile.group_manager( >'multiple layout qualifiers') > g(['arb_shading_language_420pack-binding-layout'], 'binding layout') > > +# Group ARB_enhanced_layouts > +with profile.group_manager( > +PiglitGLTest, > +grouptools.join('spec', 'arb_enhanced_layouts')) as g: > +g(['arb_enhanced_layouts-explicit-offset-bufferstorage'], > + 'explicit-offset-bufferstorage') > + > # Group ARB_explicit_attrib_location > with profile.group_manager( > PiglitGLTest, > diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt > index b499cd8..c335ae3 100644 > --- a/tests/spec/CMakeLists.txt > +++ b/tests/spec/CMakeLists.txt > @@ -18,6 +18,7 @@ add_subdirectory (arb_draw_indirect) > add_subdirectory (arb_draw_instanced) > add_subdirectory (arb_es2_compatibility) > add_subdirectory (arb_es3_compatibility) > +add_subdirectory (arb_enhanced_layouts) > add_subdirectory (arb_explicit_attrib_location) > add_subdirectory (arb_explicit_uniform_location) > add_subdirectory (arb_framebuffer_no_attachments) > diff --git a/tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt > b/tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt > new file mode 100644 > index 000..97b8595 > --- /dev/null > +++ b/tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt > @@ -0,0 +1,14 @@ > +include_directories( > + ${GLEXT_INCLUDE_DIR} > + ${OPENGL_INCLUDE_PATH} > + ${piglit_SOURCE_DIR}/tests/util > +) > + > +link_libraries ( > + piglitutil_${piglit_target_api} > + ${OPENGL_gl_LIBRARY} > +) > + > +piglit_add_executable (arb_enhanced_layouts-explicit-offset-bufferstorage > explicit-offset-bufferstorage.c) > + > +# vim: ft=cmake: > diff --git a/tests/spec/arb_enhanced_layouts/CMakeLists.txt > b/tests/spec/arb_enhanced_layouts/CMakeLists.txt > new file mode 100644 > index 000..144a306 > --- /dev/null > +++ b/tests/spec/arb_enhanced_layouts/CMakeLists.txt > @@ -0,0 +1 @@ > +piglit_include_target_api() > diff --git a/tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c > b/tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c > new file mode 100644 > index 000..da3db8f > --- /dev/null > +++ b/tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c > @@ -0,0 +1,243 @@ > +/* > + * Copyright (c) 2014 VMware, 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. > + */ > + > +/** @file explicit-offset-bufferstorage.c > + * > + * This is a copy of the arb_uniform_buffer_object bufferstorage test updated > + * to make use of explicit offsets. > + * > + * Test rendering with UBOs. We draw four squares with different > + * positions, sizes, rotations and colors where those
[Piglit] [PATCH] arb_enhanced_layouts: UBO explicit offset test
This is just a lazy copy of the arb_uniform_buffer_object bufferstorage test updated to make use of explicit offsets. Test results: Nvidia GeForce 840M - NVIDIA 352.41: fail This fails on the Nvidia driver due to a bug in handling the named uniform block in the fragment shader. If the name is removed the test works as expected. --- tests/all.py | 7 + tests/spec/CMakeLists.txt | 1 + tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt | 14 ++ tests/spec/arb_enhanced_layouts/CMakeLists.txt | 1 + .../explicit-offset-bufferstorage.c| 243 + 5 files changed, 266 insertions(+) create mode 100644 tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt create mode 100644 tests/spec/arb_enhanced_layouts/CMakeLists.txt create mode 100644 tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c diff --git a/tests/all.py b/tests/all.py index 7982631..2fc8ec3 100644 --- a/tests/all.py +++ b/tests/all.py @@ -2368,6 +2368,13 @@ with profile.group_manager( 'multiple layout qualifiers') g(['arb_shading_language_420pack-binding-layout'], 'binding layout') +# Group ARB_enhanced_layouts +with profile.group_manager( +PiglitGLTest, +grouptools.join('spec', 'arb_enhanced_layouts')) as g: +g(['arb_enhanced_layouts-explicit-offset-bufferstorage'], + 'explicit-offset-bufferstorage') + # Group ARB_explicit_attrib_location with profile.group_manager( PiglitGLTest, diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt index b499cd8..c335ae3 100644 --- a/tests/spec/CMakeLists.txt +++ b/tests/spec/CMakeLists.txt @@ -18,6 +18,7 @@ add_subdirectory (arb_draw_indirect) add_subdirectory (arb_draw_instanced) add_subdirectory (arb_es2_compatibility) add_subdirectory (arb_es3_compatibility) +add_subdirectory (arb_enhanced_layouts) add_subdirectory (arb_explicit_attrib_location) add_subdirectory (arb_explicit_uniform_location) add_subdirectory (arb_framebuffer_no_attachments) diff --git a/tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt b/tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt new file mode 100644 index 000..97b8595 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/CMakeLists.gl.txt @@ -0,0 +1,14 @@ +include_directories( + ${GLEXT_INCLUDE_DIR} + ${OPENGL_INCLUDE_PATH} + ${piglit_SOURCE_DIR}/tests/util +) + +link_libraries ( + piglitutil_${piglit_target_api} + ${OPENGL_gl_LIBRARY} +) + +piglit_add_executable (arb_enhanced_layouts-explicit-offset-bufferstorage explicit-offset-bufferstorage.c) + +# vim: ft=cmake: diff --git a/tests/spec/arb_enhanced_layouts/CMakeLists.txt b/tests/spec/arb_enhanced_layouts/CMakeLists.txt new file mode 100644 index 000..144a306 --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/CMakeLists.txt @@ -0,0 +1 @@ +piglit_include_target_api() diff --git a/tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c b/tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c new file mode 100644 index 000..da3db8f --- /dev/null +++ b/tests/spec/arb_enhanced_layouts/explicit-offset-bufferstorage.c @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2014 VMware, 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. + */ + +/** @file explicit-offset-bufferstorage.c + * + * This is a copy of the arb_uniform_buffer_object bufferstorage test updated + * to make use of explicit offsets. + * + * Test rendering with UBOs. We draw four squares with different + * positions, sizes, rotations and colors where those parameters come + * from UBOs. Same as rendering.c, except that the UBOs are + * persistently mapped. + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_core_version = 32; + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; +