[Piglit] [PATCH] SSO: reproduce linking bug in Dead Island
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85564 --- .../large-number-of-unused-varyings.shader_test| 51 ++ 1 file changed, 51 insertions(+) create mode 100644 tests/spec/arb_separate_shader_objects/linker/large-number-of-unused-varyings.shader_test diff --git a/tests/spec/arb_separate_shader_objects/linker/large-number-of-unused-varyings.shader_test b/tests/spec/arb_separate_shader_objects/linker/large-number-of-unused-varyings.shader_test new file mode 100644 index 000..f7a37fa --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/linker/large-number-of-unused-varyings.shader_test @@ -0,0 +1,51 @@ +// Test that a large number of unused varyings doesn't cause any issues during +// linking. This reproduces a bug seen in the game Dead Island. + +[require] +GLSL >= 1.40 +GL_ARB_separate_shader_objects +SSO ENABLED + +[vertex shader] +#version 140 +#extension GL_ARB_separate_shader_objects: require + +in vec4 piglit_vertex; + +out vec4 a; +out vec4 b; +out vec4 c; +out vec4 d; +out vec4 e; +out vec4 f; + +void main() +{ + a = vec4(1.0, 0.0, 0.0, 1.0); + + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 140 +#extension GL_ARB_separate_shader_objects: require + +uniform vec4 u; + +in vec4 a; +in vec4 b; +in vec4 c; +in vec4 d; +in vec4 e; +in vec4 f; + + +out vec4 color; + +void main() +{ + color = u; +} + +[test] +link success -- 2.5.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] EGL: build the egl_chromium_sync_control test only if PIGLIT_HAS_X11
On Fri, Feb 12, 2016 at 06:04:53PM +0100, Mircea Gherzan wrote: > On 12-Feb-16 1:35 AM, Ben Widawsky wrote: > >On Fri, Feb 12, 2016 at 12:22:49AM +0100, Mircea Gherzan wrote: > >>The test uses X11 headers so this guard is needed. > >> > >>Signed-off-by: Mircea Gherzan > > > >Both are: > >Acked-by: Ben Widawsky > > Ben, can you please push these two patches? I do not have commmit rights. > > Thanks. > > -- > Mircea Both pushed, since nobody seemed opposed. Note, I didn't actually attempt to build without X deps. Emil, do you have any gripes with the corresponding waffle patch? -- Ben Widawsky, Intel Open Source Technology Center ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] egl: add new test egl-create-largest-pbuffer-surface
On Mon, Feb 15, 2016 at 12:14 AM, Tapani Pälli wrote: > Test is based on egl-create-pbuffer-surface but tests that using > EGL_LARGEST_PBUFFER attribute works as specified > > Test fails on current Mesa and Nvidia binary driver version 355.11. > > Signed-off-by: Tapani Pälli > --- > tests/all.py | 3 + > tests/egl/CMakeLists.gl.txt| 2 + > tests/egl/egl-create-largest-pbuffer-surface.c | 113 > + > 3 files changed, 118 insertions(+) > create mode 100644 tests/egl/egl-create-largest-pbuffer-surface.c > > diff --git a/tests/all.py b/tests/all.py > index c5009cc..440eb0f 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -4332,6 +4332,9 @@ with profile.group_manager( > g(['egl-create-pbuffer-surface'], >'eglCreatePbufferSurface and then glClear', >run_concurrent=False) > +g(['egl-create-largest-pbuffer-surface'], > + 'largest possible eglCreatePbufferSurface and then glClear', > + run_concurrent=False) > > with profile.group_manager( > PiglitGLTest, > diff --git a/tests/egl/CMakeLists.gl.txt b/tests/egl/CMakeLists.gl.txt > index eccd470..06fbecb 100644 > --- a/tests/egl/CMakeLists.gl.txt > +++ b/tests/egl/CMakeLists.gl.txt > @@ -21,6 +21,8 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") > target_link_libraries(egl-query-surface pthread ${X11_X11_LIB}) > piglit_add_executable (egl-create-pbuffer-surface egl-util.c > egl-create-pbuffer-surface.c) > target_link_libraries(egl-create-pbuffer-surface pthread > ${X11_X11_LIB}) > + piglit_add_executable (egl-create-largest-pbuffer-surface egl-util.c > egl-create-largest-pbuffer-surface.c) > + target_link_libraries(egl-create-largest-pbuffer-surface pthread > ${X11_X11_LIB}) > piglit_add_executable (egl-configless-context > egl-configless-context.c) > target_link_libraries(egl-configless-context pthread ${X11_X11_LIB}) > piglit_add_executable (egl-gl-colorspace egl-util.c > egl-gl-colorspace.c) > diff --git a/tests/egl/egl-create-largest-pbuffer-surface.c > b/tests/egl/egl-create-largest-pbuffer-surface.c > new file mode 100644 > index 000..c02971f > --- /dev/null > +++ b/tests/egl/egl-create-largest-pbuffer-surface.c > @@ -0,0 +1,113 @@ > +/* > + * Copyright © 2014 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. > + * > + */ > + > +/** @file egl-create-largest-pbuffer-surface.c > + * > + * Test EGLCreatePBufferSurface behaviour with EGL_LARGEST_PBUFFER attribute. > + * > + * From EGL 1.5 spec: > + * > + * "Use EGL_LARGEST_PBUFFER to get the largest available pbuffer when the > + * allocation of the pbuffer would otherwise fail." > + */ > + > +#include > +#include "piglit-util-gl.h" > +#include "egl-util.h" > + > +static enum piglit_result > +draw(struct egl_state *state) > +{ > + EGLSurface surf; > + const float purple[] = {1.0, 0.0, 1.0, 1.0}; > + EGLint width, height; > + > + const EGLint srfPbufferAttr[] = static > + { > + EGL_WIDTH, INT_MAX, > + EGL_HEIGHT, INT_MAX, > + EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA, > + EGL_TEXTURE_TARGET, EGL_TEXTURE_2D, > + EGL_LARGEST_PBUFFER, EGL_TRUE, > + EGL_NONE > + }; > + > + surf = eglCreatePbufferSurface(state->egl_dpy, state->cfg, > + srfPbufferAttr); > + > + if (eglGetError() != EGL_SUCCESS || surf == EGL_NO_SURFACE) { > + fprintf(stderr, "eglCreatePbufferSurface failed\n"); > + piglit_report_result(PIGLIT_FAIL); > + } > + > + /* Query what are the dimensions we got. */ > + eglQuerySurface(state->egl_dpy, surf, EGL_WIDTH, &width); > + eglQuerySurface(state->egl_dpy, surf, EGL_HEIGHT, &height); > + > + glEnable(GL_TEXTURE_2D); > + > + eglMakeCurrent(state->egl_dpy, state->surf, state->surf, state->ctx
[Piglit] [PATCH] gl-1.0-dlist-bitmaps: add code to exercise deleting lists
--- tests/spec/gl-1.0/dlist-bitmap.c | 46 +--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/tests/spec/gl-1.0/dlist-bitmap.c b/tests/spec/gl-1.0/dlist-bitmap.c index a8c3e6d..203a9d9 100644 --- a/tests/spec/gl-1.0/dlist-bitmap.c +++ b/tests/spec/gl-1.0/dlist-bitmap.c @@ -61,11 +61,11 @@ struct bitmap_info static struct bitmap_info bitmaps[NUM_BITMAPS]; static GLuint ListBase; static GLubyte *refImage; -static const float yellow[3] = {0.7, 1, 0.5}; +static const float yellow[3] = {1, 1, 0.0}; static void -init_bitmaps(void) +create_bitmaps(void) { unsigned i, j; @@ -94,6 +94,17 @@ init_bitmaps(void) static void +free_bitmaps(void) +{ + glDeleteLists(ListBase, NUM_BITMAPS); +} + + +/** + * Draw all the bitmaps using the given drawing mode. + * \param count indicates the number of bitmaps to draw. + */ +static void draw_bitmaps(enum draw_mode mode, unsigned count) { unsigned i; @@ -182,6 +193,8 @@ piglit_display(void) glViewport(0, 0, piglit_width, piglit_height); + create_bitmaps(); + /* * draw reference image with plain glBitmap calls */ @@ -221,9 +234,37 @@ piglit_display(void) pass = false; } + /* +* Delete three of the bitmap display lists. This basically +* generates a "hole" in Mesa's bitmap texture atlas which has +* to be coped with. +*/ + glDeleteLists(ListBase + 7, 3); + + /* +* Draw new reference image with separate glCallList calls. +* Calling the deleted list should be a no-op. +*/ + glClear(GL_COLOR_BUFFER_BIT); + glColor3fv(yellow); + glRasterPos2f(-1, 0); + draw_bitmaps(CALL_LIST, NUM_BITMAPS); + glReadPixels(0, 0, piglit_width, piglit_height, +GL_RGBA, GL_UNSIGNED_BYTE, refImage); + + /* +* Draw bitmaps with glCallLists again. +* Calling the deleted list should be a no-op. +*/ + if (!test_mode(CALL_LISTS, NUM_BITMAPS, + "glCallLists(bitmaps) after delete")) { + pass = false; + } + piglit_present_results(); free(refImage); + free_bitmaps(); return pass ? PIGLIT_PASS : PIGLIT_FAIL; } @@ -232,5 +273,4 @@ piglit_display(void) void piglit_init(int argc, char **argv) { - init_bitmaps(); } -- 1.9.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] egl: add new test egl-create-largest-pbuffer-surface
On 15.02.2016 10:14, Tapani Pälli wrote: Test is based on egl-create-pbuffer-surface but tests that using EGL_LARGEST_PBUFFER attribute works as specified Test fails on current Mesa and Nvidia binary driver version 355.11. Signed-off-by: Tapani Pälli --- tests/all.py | 3 + tests/egl/CMakeLists.gl.txt| 2 + tests/egl/egl-create-largest-pbuffer-surface.c | 113 + 3 files changed, 118 insertions(+) create mode 100644 tests/egl/egl-create-largest-pbuffer-surface.c diff --git a/tests/all.py b/tests/all.py index c5009cc..440eb0f 100644 --- a/tests/all.py +++ b/tests/all.py @@ -4332,6 +4332,9 @@ with profile.group_manager( g(['egl-create-pbuffer-surface'], 'eglCreatePbufferSurface and then glClear', run_concurrent=False) +g(['egl-create-largest-pbuffer-surface'], + 'largest possible eglCreatePbufferSurface and then glClear', + run_concurrent=False) with profile.group_manager( PiglitGLTest, diff --git a/tests/egl/CMakeLists.gl.txt b/tests/egl/CMakeLists.gl.txt index eccd470..06fbecb 100644 --- a/tests/egl/CMakeLists.gl.txt +++ b/tests/egl/CMakeLists.gl.txt @@ -21,6 +21,8 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(egl-query-surface pthread ${X11_X11_LIB}) piglit_add_executable (egl-create-pbuffer-surface egl-util.c egl-create-pbuffer-surface.c) target_link_libraries(egl-create-pbuffer-surface pthread ${X11_X11_LIB}) + piglit_add_executable (egl-create-largest-pbuffer-surface egl-util.c egl-create-largest-pbuffer-surface.c) + target_link_libraries(egl-create-largest-pbuffer-surface pthread ${X11_X11_LIB}) piglit_add_executable (egl-configless-context egl-configless-context.c) target_link_libraries(egl-configless-context pthread ${X11_X11_LIB}) piglit_add_executable (egl-gl-colorspace egl-util.c egl-gl-colorspace.c) diff --git a/tests/egl/egl-create-largest-pbuffer-surface.c b/tests/egl/egl-create-largest-pbuffer-surface.c new file mode 100644 index 000..c02971f --- /dev/null +++ b/tests/egl/egl-create-largest-pbuffer-surface.c @@ -0,0 +1,113 @@ +/* + * Copyright © 2014 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. + * + */ + +/** @file egl-create-largest-pbuffer-surface.c + * + * Test EGLCreatePBufferSurface behaviour with EGL_LARGEST_PBUFFER attribute. + * + * From EGL 1.5 spec: + * + * "Use EGL_LARGEST_PBUFFER to get the largest available pbuffer when the + * allocation of the pbuffer would otherwise fail." + */ + +#include +#include "piglit-util-gl.h" +#include "egl-util.h" + +static enum piglit_result +draw(struct egl_state *state) +{ + EGLSurface surf; + const float purple[] = {1.0, 0.0, 1.0, 1.0}; + EGLint width, height; + + const EGLint srfPbufferAttr[] = + { + EGL_WIDTH, INT_MAX, + EGL_HEIGHT, INT_MAX, + EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA, + EGL_TEXTURE_TARGET, EGL_TEXTURE_2D, + EGL_LARGEST_PBUFFER, EGL_TRUE, + EGL_NONE + }; + + surf = eglCreatePbufferSurface(state->egl_dpy, state->cfg, + srfPbufferAttr); + + if (eglGetError() != EGL_SUCCESS || surf == EGL_NO_SURFACE) { + fprintf(stderr, "eglCreatePbufferSurface failed\n"); + piglit_report_result(PIGLIT_FAIL); + } + + /* Query what are the dimensions we got. */ + eglQuerySurface(state->egl_dpy, surf, EGL_WIDTH, &width); + eglQuerySurface(state->egl_dpy, surf, EGL_HEIGHT, &height); These are not needed. + + glEnable(GL_TEXTURE_2D); + + eglMakeCurrent(state->egl_dpy, state->surf, state->surf, state->ctx); + glClearColor(1.0, 1.0, 1.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + eglBindTexImage(state->egl_dpy, surf, EGL_BACK_BUFFER); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + gl
[Piglit] [PATCH] egl: add new test egl-create-largest-pbuffer-surface
Test is based on egl-create-pbuffer-surface but tests that using EGL_LARGEST_PBUFFER attribute works as specified Test fails on current Mesa and Nvidia binary driver version 355.11. Signed-off-by: Tapani Pälli --- tests/all.py | 3 + tests/egl/CMakeLists.gl.txt| 2 + tests/egl/egl-create-largest-pbuffer-surface.c | 113 + 3 files changed, 118 insertions(+) create mode 100644 tests/egl/egl-create-largest-pbuffer-surface.c diff --git a/tests/all.py b/tests/all.py index c5009cc..440eb0f 100644 --- a/tests/all.py +++ b/tests/all.py @@ -4332,6 +4332,9 @@ with profile.group_manager( g(['egl-create-pbuffer-surface'], 'eglCreatePbufferSurface and then glClear', run_concurrent=False) +g(['egl-create-largest-pbuffer-surface'], + 'largest possible eglCreatePbufferSurface and then glClear', + run_concurrent=False) with profile.group_manager( PiglitGLTest, diff --git a/tests/egl/CMakeLists.gl.txt b/tests/egl/CMakeLists.gl.txt index eccd470..06fbecb 100644 --- a/tests/egl/CMakeLists.gl.txt +++ b/tests/egl/CMakeLists.gl.txt @@ -21,6 +21,8 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(egl-query-surface pthread ${X11_X11_LIB}) piglit_add_executable (egl-create-pbuffer-surface egl-util.c egl-create-pbuffer-surface.c) target_link_libraries(egl-create-pbuffer-surface pthread ${X11_X11_LIB}) + piglit_add_executable (egl-create-largest-pbuffer-surface egl-util.c egl-create-largest-pbuffer-surface.c) + target_link_libraries(egl-create-largest-pbuffer-surface pthread ${X11_X11_LIB}) piglit_add_executable (egl-configless-context egl-configless-context.c) target_link_libraries(egl-configless-context pthread ${X11_X11_LIB}) piglit_add_executable (egl-gl-colorspace egl-util.c egl-gl-colorspace.c) diff --git a/tests/egl/egl-create-largest-pbuffer-surface.c b/tests/egl/egl-create-largest-pbuffer-surface.c new file mode 100644 index 000..c02971f --- /dev/null +++ b/tests/egl/egl-create-largest-pbuffer-surface.c @@ -0,0 +1,113 @@ +/* + * Copyright © 2014 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. + * + */ + +/** @file egl-create-largest-pbuffer-surface.c + * + * Test EGLCreatePBufferSurface behaviour with EGL_LARGEST_PBUFFER attribute. + * + * From EGL 1.5 spec: + * + * "Use EGL_LARGEST_PBUFFER to get the largest available pbuffer when the + * allocation of the pbuffer would otherwise fail." + */ + +#include +#include "piglit-util-gl.h" +#include "egl-util.h" + +static enum piglit_result +draw(struct egl_state *state) +{ + EGLSurface surf; + const float purple[] = {1.0, 0.0, 1.0, 1.0}; + EGLint width, height; + + const EGLint srfPbufferAttr[] = + { + EGL_WIDTH, INT_MAX, + EGL_HEIGHT, INT_MAX, + EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA, + EGL_TEXTURE_TARGET, EGL_TEXTURE_2D, + EGL_LARGEST_PBUFFER, EGL_TRUE, + EGL_NONE + }; + + surf = eglCreatePbufferSurface(state->egl_dpy, state->cfg, + srfPbufferAttr); + + if (eglGetError() != EGL_SUCCESS || surf == EGL_NO_SURFACE) { + fprintf(stderr, "eglCreatePbufferSurface failed\n"); + piglit_report_result(PIGLIT_FAIL); + } + + /* Query what are the dimensions we got. */ + eglQuerySurface(state->egl_dpy, surf, EGL_WIDTH, &width); + eglQuerySurface(state->egl_dpy, surf, EGL_HEIGHT, &height); + + glEnable(GL_TEXTURE_2D); + + eglMakeCurrent(state->egl_dpy, state->surf, state->surf, state->ctx); + glClearColor(1.0, 1.0, 1.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + eglBindTexImage(state->egl_dpy, surf, EGL_BACK_BUFFER); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + + glViewp