[Piglit] [PATCH] arb_gpu_shader_fp64/ssbo: add another vertex ssbo check.
From: Dave AirlieThis adds another checks for vertex ssbos --- tests/spec/arb_gpu_shader_fp64/vs-non-uniform-control-flow-ssbo.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/spec/arb_gpu_shader_fp64/vs-non-uniform-control-flow-ssbo.c b/tests/spec/arb_gpu_shader_fp64/vs-non-uniform-control-flow-ssbo.c index bb287f5..509d4e0 100644 --- a/tests/spec/arb_gpu_shader_fp64/vs-non-uniform-control-flow-ssbo.c +++ b/tests/spec/arb_gpu_shader_fp64/vs-non-uniform-control-flow-ssbo.c @@ -83,6 +83,8 @@ piglit_init(int argc, char **argv) { GLuint buffer, vertexBuffer; double ssbo_values[SSBO_SIZE] = {0}; + GLint num_vertex_ssbo; + // Vertex data static const GLfloat vertexData[4 * 3] = { -1.0f, -1.0f, -1.0f, @@ -94,6 +96,9 @@ piglit_init(int argc, char **argv) piglit_require_extension("GL_ARB_shader_storage_buffer_object"); piglit_require_GLSL_version(400); + glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, _vertex_ssbo); + if (num_vertex_ssbo < 1) + piglit_report_result(PIGLIT_SKIP); prog = piglit_build_simple_program(vs_source, fs_source); glUseProgram(prog); -- 2.9.5 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] gl-3.0: Basic tests of glTexParameterIiv and friends
On 03/08/2018 02:22 PM, Brian Paul wrote: > On 03/08/2018 02:24 PM, Ian Romanick wrote: >> From: Ian Romanick>> >> Some GCC compiler warnings led me to find some bugs in Mesa's >> implementation of glGetTexParameterIuiv. I then discovered that piglit >> had zero tests for any of these functions. >> >> This test currently fails on Mesa. >> >> Signed-off-by: Ian Romanick >> --- >> tests/all.py | 1 + >> tests/spec/gl-3.0/CMakeLists.gl.txt | 2 +- >> tests/spec/gl-3.0/texparameteri.c | 184 >> >> 3 files changed, 186 insertions(+), 1 deletion(-) >> create mode 100644 tests/spec/gl-3.0/texparameteri.c >> >> diff --git a/tests/all.py b/tests/all.py >> index 85a8108..7fe618b 100644 >> --- a/tests/all.py >> +++ b/tests/all.py >> @@ -1181,6 +1181,7 @@ with profile.test_list.group_manager( >> 'forward-compatible-bit yes') >> g(['gl-3.0-forward-compatible-bit', 'no'], >> 'forward-compatible-bit no') >> + g(['gl-3.0-texparameteri']) >> g(['gl-3.0-texture-integer']) >> g(['gl-3.0-vertexattribipointer']) >> g(['gl30basic'], run_concurrent=False) >> diff --git a/tests/spec/gl-3.0/CMakeLists.gl.txt >> b/tests/spec/gl-3.0/CMakeLists.gl.txt >> index 9dc732b..6e9635c 100644 >> --- a/tests/spec/gl-3.0/CMakeLists.gl.txt >> +++ b/tests/spec/gl-3.0/CMakeLists.gl.txt >> @@ -15,7 +15,7 @@ piglit_add_executable (gl-3.0-render-integer >> render-integer.c) >> piglit_add_executable (gl-3.0-required-sized-texture-formats >> required-sized-texture-formats.c) >> piglit_add_executable >> (gl-3.0-required-renderbuffer-attachment-formats >> required-renderbuffer-attachment-formats.c) >> piglit_add_executable (gl-3.0-required-texture-attachment-formats >> required-texture-attachment-formats.c) >> +piglit_add_executable (gl-3.0-texparameteri texparameteri.c) >> piglit_add_executable (gl-3.0-texture-integer texture-integer.c) >> piglit_add_executable (gl-3.0-vertexattribipointer >> vertexattribipointer.c) >> - >> # vim: ft=cmake: >> diff --git a/tests/spec/gl-3.0/texparameteri.c >> b/tests/spec/gl-3.0/texparameteri.c >> new file mode 100644 >> index 000..9a14572 >> --- /dev/null >> +++ b/tests/spec/gl-3.0/texparameteri.c >> @@ -0,0 +1,184 @@ >> +/* >> + * 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 >> + * on the rights to use, copy, modify, merge, publish, distribute, sub >> + * license, 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 >> + * NON-INFRINGEMENT. IN NO EVENT SHALL VMWARE AND/OR THEIR SUPPLIERS >> + * 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 >> + * Basic tests of OpenGL 3.0 gl{Get,}TexParameterI{iv,uiv} functions >> + */ >> + >> +#include "piglit-util-gl.h" >> + >> +PIGLIT_GL_TEST_CONFIG_BEGIN >> + >> + config.supports_gl_compat_version = 10; > > 30 > > With that, Reviewed-by: Brian Paul I'll do that and remove the "piglit_require_gl_version(30);" below. Thanks! >> + config.window_visual = PIGLIT_GL_VISUAL_RGBA | >> PIGLIT_GL_VISUAL_DOUBLE; >> + >> +PIGLIT_GL_TEST_CONFIG_END >> + >> +#ifndef GL_TEXTURE_CROP_RECT_OES >> +#define GL_TEXTURE_CROP_RECT_OES 0x8B9D >> +#endif >> + >> +enum piglit_result >> +piglit_display(void) >> +{ >> + return PIGLIT_FAIL; >> +} >> + >> +static bool >> +check_values(const char *msg, const unsigned *expected, const >> unsigned *got) >> +{ >> + if (memcmp(expected, got, 4 * sizeof(*expected)) != 0) { >> + fprintf(stderr, "%s.\n" >> + " Got: 0x%08x 0x%08x 0x%08x 0x%08x\n" >> + " Expected: 0x%08x 0x%08x 0x%08x 0x%08x\n", >> + msg, >> + got[0], >> + got[1], >> + got[2], >> + got[3], >> + expected[0], >> + expected[1], >> + expected[2], >> + expected[3]); >> + return false; >> + } >> + >> + return true; >> +} >> + >> +void >> +piglit_init(int argc, char **argv) >>
Re: [Piglit] [PATCH] gl-3.0: Basic tests of glTexParameterIiv and friends
On 03/08/2018 02:24 PM, Ian Romanick wrote: From: Ian RomanickSome GCC compiler warnings led me to find some bugs in Mesa's implementation of glGetTexParameterIuiv. I then discovered that piglit had zero tests for any of these functions. This test currently fails on Mesa. Signed-off-by: Ian Romanick --- tests/all.py| 1 + tests/spec/gl-3.0/CMakeLists.gl.txt | 2 +- tests/spec/gl-3.0/texparameteri.c | 184 3 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 tests/spec/gl-3.0/texparameteri.c diff --git a/tests/all.py b/tests/all.py index 85a8108..7fe618b 100644 --- a/tests/all.py +++ b/tests/all.py @@ -1181,6 +1181,7 @@ with profile.test_list.group_manager( 'forward-compatible-bit yes') g(['gl-3.0-forward-compatible-bit', 'no'], 'forward-compatible-bit no') +g(['gl-3.0-texparameteri']) g(['gl-3.0-texture-integer']) g(['gl-3.0-vertexattribipointer']) g(['gl30basic'], run_concurrent=False) diff --git a/tests/spec/gl-3.0/CMakeLists.gl.txt b/tests/spec/gl-3.0/CMakeLists.gl.txt index 9dc732b..6e9635c 100644 --- a/tests/spec/gl-3.0/CMakeLists.gl.txt +++ b/tests/spec/gl-3.0/CMakeLists.gl.txt @@ -15,7 +15,7 @@ piglit_add_executable (gl-3.0-render-integer render-integer.c) piglit_add_executable (gl-3.0-required-sized-texture-formats required-sized-texture-formats.c) piglit_add_executable (gl-3.0-required-renderbuffer-attachment-formats required-renderbuffer-attachment-formats.c) piglit_add_executable (gl-3.0-required-texture-attachment-formats required-texture-attachment-formats.c) +piglit_add_executable (gl-3.0-texparameteri texparameteri.c) piglit_add_executable (gl-3.0-texture-integer texture-integer.c) piglit_add_executable (gl-3.0-vertexattribipointer vertexattribipointer.c) - # vim: ft=cmake: diff --git a/tests/spec/gl-3.0/texparameteri.c b/tests/spec/gl-3.0/texparameteri.c new file mode 100644 index 000..9a14572 --- /dev/null +++ b/tests/spec/gl-3.0/texparameteri.c @@ -0,0 +1,184 @@ +/* + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, 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 + * NON-INFRINGEMENT. IN NO EVENT SHALL VMWARE AND/OR THEIR SUPPLIERS + * 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 + * Basic tests of OpenGL 3.0 gl{Get,}TexParameterI{iv,uiv} functions + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 10; 30 With that, Reviewed-by: Brian Paul + config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE; + +PIGLIT_GL_TEST_CONFIG_END + +#ifndef GL_TEXTURE_CROP_RECT_OES +#define GL_TEXTURE_CROP_RECT_OES 0x8B9D +#endif + +enum piglit_result +piglit_display(void) +{ + return PIGLIT_FAIL; +} + +static bool +check_values(const char *msg, const unsigned *expected, const unsigned *got) +{ + if (memcmp(expected, got, 4 * sizeof(*expected)) != 0) { + fprintf(stderr, "%s.\n" + " Got: 0x%08x 0x%08x 0x%08x 0x%08x\n" + "Expected: 0x%08x 0x%08x 0x%08x 0x%08x\n", + msg, + got[0], + got[1], + got[2], + got[3], + expected[0], + expected[1], + expected[2], + expected[3]); + return false; + } + + return true; +} + +void +piglit_init(int argc, char **argv) +{ + static const GLuint uint_border[4] = { + 0x80706050, 0x40302010, + 0x08070605, 0x04030201 + }; + static const GLint int_border[4] = { -1, -2, -3, -4 }; + static const GLuint bad[4] = { + 0x0badc0de, 0x0badc0de, 0x0badc0de, 0x0badc0de + }; + GLuint uint_return[4]; + GLint int_return[4]; +
[Piglit] [PATCH] gl-3.0: Basic tests of glTexParameterIiv and friends
From: Ian RomanickSome GCC compiler warnings led me to find some bugs in Mesa's implementation of glGetTexParameterIuiv. I then discovered that piglit had zero tests for any of these functions. This test currently fails on Mesa. Signed-off-by: Ian Romanick --- tests/all.py| 1 + tests/spec/gl-3.0/CMakeLists.gl.txt | 2 +- tests/spec/gl-3.0/texparameteri.c | 184 3 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 tests/spec/gl-3.0/texparameteri.c diff --git a/tests/all.py b/tests/all.py index 85a8108..7fe618b 100644 --- a/tests/all.py +++ b/tests/all.py @@ -1181,6 +1181,7 @@ with profile.test_list.group_manager( 'forward-compatible-bit yes') g(['gl-3.0-forward-compatible-bit', 'no'], 'forward-compatible-bit no') +g(['gl-3.0-texparameteri']) g(['gl-3.0-texture-integer']) g(['gl-3.0-vertexattribipointer']) g(['gl30basic'], run_concurrent=False) diff --git a/tests/spec/gl-3.0/CMakeLists.gl.txt b/tests/spec/gl-3.0/CMakeLists.gl.txt index 9dc732b..6e9635c 100644 --- a/tests/spec/gl-3.0/CMakeLists.gl.txt +++ b/tests/spec/gl-3.0/CMakeLists.gl.txt @@ -15,7 +15,7 @@ piglit_add_executable (gl-3.0-render-integer render-integer.c) piglit_add_executable (gl-3.0-required-sized-texture-formats required-sized-texture-formats.c) piglit_add_executable (gl-3.0-required-renderbuffer-attachment-formats required-renderbuffer-attachment-formats.c) piglit_add_executable (gl-3.0-required-texture-attachment-formats required-texture-attachment-formats.c) +piglit_add_executable (gl-3.0-texparameteri texparameteri.c) piglit_add_executable (gl-3.0-texture-integer texture-integer.c) piglit_add_executable (gl-3.0-vertexattribipointer vertexattribipointer.c) - # vim: ft=cmake: diff --git a/tests/spec/gl-3.0/texparameteri.c b/tests/spec/gl-3.0/texparameteri.c new file mode 100644 index 000..9a14572 --- /dev/null +++ b/tests/spec/gl-3.0/texparameteri.c @@ -0,0 +1,184 @@ +/* + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, 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 + * NON-INFRINGEMENT. IN NO EVENT SHALL VMWARE AND/OR THEIR SUPPLIERS + * 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 + * Basic tests of OpenGL 3.0 gl{Get,}TexParameterI{iv,uiv} functions + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 10; + config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE; + +PIGLIT_GL_TEST_CONFIG_END + +#ifndef GL_TEXTURE_CROP_RECT_OES +#define GL_TEXTURE_CROP_RECT_OES 0x8B9D +#endif + +enum piglit_result +piglit_display(void) +{ + return PIGLIT_FAIL; +} + +static bool +check_values(const char *msg, const unsigned *expected, const unsigned *got) +{ + if (memcmp(expected, got, 4 * sizeof(*expected)) != 0) { + fprintf(stderr, "%s.\n" + " Got: 0x%08x 0x%08x 0x%08x 0x%08x\n" + "Expected: 0x%08x 0x%08x 0x%08x 0x%08x\n", + msg, + got[0], + got[1], + got[2], + got[3], + expected[0], + expected[1], + expected[2], + expected[3]); + return false; + } + + return true; +} + +void +piglit_init(int argc, char **argv) +{ + static const GLuint uint_border[4] = { + 0x80706050, 0x40302010, + 0x08070605, 0x04030201 + }; + static const GLint int_border[4] = { -1, -2, -3, -4 }; + static const GLuint bad[4] = { + 0x0badc0de, 0x0badc0de, 0x0badc0de, 0x0badc0de + }; + GLuint uint_return[4]; + GLint int_return[4]; + GLuint tex[2]; + bool pass = true; + + (void) argc; + (void) argv; + +