[Piglit] [PATCH] gl-3.2/layered-rendering/framebuffertexture: check for MSAA support
Skip testing MSAA textures if GL_MAX_SAMPLES = 0. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102123 --- tests/spec/gl-3.2/layered-rendering/framebuffertexture.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c b/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c index 6d11d7e..70ad350 100644 --- a/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c +++ b/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c @@ -205,6 +205,18 @@ test_framebuffertexture(GLenum textureType) float expected[] = { 0, 1, 0 }; + if (textureType == GL_TEXTURE_2D_MULTISAMPLE || + textureType == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) { + GLint maxSamples; + glGetIntegerv(GL_MAX_SAMPLES, ); + if (maxSamples == 0) { + /* skip */ + printf("Skipping %s because GL_MAX_SAMPLES=0\n", + piglit_get_gl_enum_name(textureType)); + return true; + } + } + glGenFramebuffers(1, ); glBindFramebuffer(GL_FRAMEBUFFER, fbo); -- 1.9.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glx: Fix glx-swap-exchange
On 08/07/2017 11:21 AM, Thomas Hellstrom wrote: Fix the following problems with this test: 1) The spec is not referring to glXChooseVisual attributes, only to glXChooseFBConfig attributes. So use glXChooseFBConfig. 2) Make sure we have an alpha channel. 3) Call piglit_dispatch_default_init before issuing GL commands. 4) Restrict the test to the RGB channels. At least temporary. The spec says the front buffer contents should become the new back buffer contents but I'm not 100% sure all implementations actually support front buffer alpha. I think the expectation has always been that the front and back color buffers have the same color depth for all channels. We might need to revisit this. Signed-off-by: Thomas Hellstrom--- tests/glx/glx-swap-exchange.c | 74 +++ 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/tests/glx/glx-swap-exchange.c b/tests/glx/glx-swap-exchange.c index 3f045f8..137140f 100644 --- a/tests/glx/glx-swap-exchange.c +++ b/tests/glx/glx-swap-exchange.c @@ -1,5 +1,6 @@ /* * Copyright © 2010 Intel Corporation + * Copyright © 2010 VMWare Inc. 2017? * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,6 +23,7 @@ * * Authors: *Eric Anholt + *Thomas Hellstrom * */ @@ -36,60 +38,63 @@ int piglit_width = 50, piglit_height = 50; static Display *dpy; -static Window win; -static XVisualInfo *visinfo; +static GLXFBConfig *config; +static GLXContext ctx; +static GLXWindow gwin; enum piglit_result draw(Display *dpy) { GLboolean pass = GL_TRUE; - float green[] = {0.0, 1.0, 0.0, 0.0}; - GLXContext ctx; + float green[] = {0.0, 1.0, 0.0, 0.3}; const, while you're there? - ctx = piglit_get_glx_context(dpy, visinfo); - glXMakeCurrent(dpy, win, ctx); - - /* Clear background to gray */ - glClearColor(0.0, 1.0, 0.0, 0.0); + glXMakeContextCurrent(dpy, gwin, gwin, ctx); + glClearColor(0.0, 1.0, 0.0, 0.3); + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); glClear(GL_COLOR_BUFFER_BIT); - glXSwapBuffers(dpy, win); - glClearColor(1.0, 0.0, 0.0, 0.0); + glXSwapBuffers(dpy, gwin); + glClearColor(1.0, 0.0, 0.0, 0.5); glClear(GL_COLOR_BUFFER_BIT); - glXSwapBuffers(dpy, win); - - pass = piglit_probe_pixel_rgba(0, 0, green); + glXSwapBuffers(dpy, gwin); - glXSwapBuffers(dpy, win); + /* +* Spec says the front buffer contents should be the new back buffer, +* but are front buffer contents required to have alpha? +* Ignore the alpha channel for now. +*/ + pass = piglit_probe_pixel_rgb(0, 0, green); Maybe we could test the alpha channel too, but print/return a warning if it's incorrect. return pass ? PIGLIT_PASS : PIGLIT_FAIL; } -XVisualInfo * -piglit_get_swap_exchange_visual(Display *dpy) +static GLXFBConfig * +piglit_get_swap_exchange_config(Display *dpy) { - XVisualInfo *visinfo; + GLXFBConfig *fbc; + int nele; int attrib[] = { - GLX_RGBA, - GLX_RED_SIZE, 1, - GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, + GLX_RENDER_TYPE, GLX_RGBA_BIT, + GLX_RED_SIZE, 8, + GLX_GREEN_SIZE, 8, + GLX_BLUE_SIZE, 8, + GLX_ALPHA_SIZE, 8, GLX_SWAP_METHOD_OML, GLX_SWAP_EXCHANGE_OML, + GLX_DOUBLEBUFFER, True, None }; int screen = DefaultScreen(dpy); - visinfo = glXChooseVisual(dpy, screen, attrib); - if (visinfo == NULL) { + fbc = glXChooseFBConfig(dpy, screen, attrib, ); + if (fbc == NULL) { fprintf(stderr, "Couldn't get a GLX_SWAP_EXCHANGE_OML, RGBA, " - "double-buffered visual\n"); + "double-buffered fbconfig\n"); piglit_report_result(PIGLIT_SKIP); exit(1); } - return visinfo; + return fbc; } int @@ -97,6 +102,8 @@ main(int argc, char **argv) { int i; const char *glx_extension_list; + Window win; + XVisualInfo *visinfo; for(i = 1; i < argc; ++i) { if (!strcmp(argv[i], "-auto")) @@ -117,10 +124,21 @@ main(int argc, char **argv) piglit_report_result(PIGLIT_SKIP); } - visinfo = piglit_get_swap_exchange_visual(dpy); + config = piglit_get_swap_exchange_config(dpy); + visinfo = glXGetVisualFromFBConfig(dpy, config[0]); + if (!visinfo) { + printf("Error: couldn't create a visual from fbconfig.\n"); +
Re: [Piglit] [PATCH] glsl-es-1.00: constant initializer type mismatch causes an error
Reviewed-by: Timothy Arceri___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] glean: remove pointless switch statements from fbo test
All switch cases did the same thing. Spotted by Eric Anholt. --- tests/glean/tfbo.cpp | 62 +++- 1 file changed, 18 insertions(+), 44 deletions(-) diff --git a/tests/glean/tfbo.cpp b/tests/glean/tfbo.cpp index 1768956..288fb0e 100644 --- a/tests/glean/tfbo.cpp +++ b/tests/glean/tfbo.cpp @@ -603,21 +603,12 @@ FBOTest::testRender2SingleTexture(void) // Init depth buffer glEnable(GL_DEPTH_TEST); glDepthFunc(GL_ALWAYS); -switch (textureModes[mode]) { -case GL_TEXTURE_1D: -case GL_TEXTURE_2D: -case GL_TEXTURE_3D: -case GL_TEXTURE_CUBE_MAP: -glBegin(GL_POLYGON); -glVertex3f(TEXSIZE / 4, 0, 0.3); -glVertex3f(TEXSIZE * 5 / 8, 0, 0.3); -glVertex3f(TEXSIZE * 5 / 8, TEXSIZE, 0.3); -glVertex3f(TEXSIZE / 4, TEXSIZE, 0.3); -glEnd(); -break; -default: -break; -} + glBegin(GL_POLYGON); + glVertex3f(TEXSIZE / 4, 0, 0.3); + glVertex3f(TEXSIZE * 5 / 8, 0, 0.3); + glVertex3f(TEXSIZE * 5 / 8, TEXSIZE, 0.3); + glVertex3f(TEXSIZE / 4, TEXSIZE, 0.3); + glEnd(); glDepthFunc(GL_LESS); } @@ -628,22 +619,12 @@ FBOTest::testRender2SingleTexture(void) glStencilFunc(GL_ALWAYS, 0x1, 0x1); glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); -switch (textureModes[mode]) { -case GL_TEXTURE_1D: -case GL_TEXTURE_2D: -case GL_TEXTURE_3D: -case GL_TEXTURE_CUBE_MAP: -glBegin(GL_POLYGON); -glVertex3f(TEXSIZE / 2, 0, 0.3); -glVertex3f(TEXSIZE * 7 / 8, 0, 0.3); -glVertex3f(TEXSIZE * 7 / 8, TEXSIZE, 0.3); -glVertex3f(TEXSIZE / 2, TEXSIZE, 0.3); -glEnd(); -break; -default: -break; -} - + glBegin(GL_POLYGON); + glVertex3f(TEXSIZE / 2, 0, 0.3); + glVertex3f(TEXSIZE * 7 / 8, 0, 0.3); + glVertex3f(TEXSIZE * 7 / 8, TEXSIZE, 0.3); + glVertex3f(TEXSIZE / 2, TEXSIZE, 0.3); + glEnd(); glStencilFunc(GL_NOTEQUAL, 0x1, 0x1); } @@ -654,19 +635,12 @@ FBOTest::testRender2SingleTexture(void) glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); -switch (textureModes[mode]) { -case GL_TEXTURE_1D: -case GL_TEXTURE_2D: -case GL_TEXTURE_3D: -case GL_TEXTURE_CUBE_MAP: -glBegin(GL_POLYGON); -glVertex3f(0, 0, 0.2); -glVertex3f(TEXSIZE, 0, 0.2); -glVertex3f(TEXSIZE, TEXSIZE, 0.2); -glVertex3f(0, TEXSIZE, 0.2); -glEnd(); -break; -} + glBegin(GL_POLYGON); + glVertex3f(0, 0,
[Piglit] [PATCH] arb_tessellation_shader: new tests for a radeonsi bug
From: Marek Olšák--- .../execution/16in-1out.shader_test| 76 ++ .../execution/1in-1out.shader_test | 72 2 files changed, 148 insertions(+) create mode 100644 tests/spec/arb_tessellation_shader/execution/16in-1out.shader_test create mode 100644 tests/spec/arb_tessellation_shader/execution/1in-1out.shader_test diff --git a/tests/spec/arb_tessellation_shader/execution/16in-1out.shader_test b/tests/spec/arb_tessellation_shader/execution/16in-1out.shader_test new file mode 100644 index 000..ec87238 --- /dev/null +++ b/tests/spec/arb_tessellation_shader/execution/16in-1out.shader_test @@ -0,0 +1,76 @@ +# Number of input CP = 16 +# Number of output CP = 1 +# Draw 256 patches. (4K vertices) +# +# Each patch is tessellated like a quad with a 4x4 vertex pattern. +# (which is 3x3 sub-quads = 18 triangles) + +[require] +GLSL >= 1.50 +GL_ARB_tessellation_shader + +[vertex shader] +#version 150 + +out vec2 inpos; + +void main() +{ + const int num = 16; // number of patches in one direction, num*num patches in total + int patch_id = gl_VertexID / 16; + int vertex_id = gl_VertexID % 16; + + inpos = vec2(patch_id % num, patch_id / num) / num + + vec2(vertex_id % 4, vertex_id / 4) / (3 * num); +} + +[tessellation control shader] +#version 150 +#extension GL_ARB_tessellation_shader : require +#extension GL_ARB_arrays_of_arrays : require + +layout(vertices = 1) out; +in vec2 inpos[]; +out vec2 outpos[][16]; + +void main() +{ + gl_TessLevelInner[0] = + gl_TessLevelInner[1] = + gl_TessLevelOuter[0] = + gl_TessLevelOuter[1] = + gl_TessLevelOuter[2] = + gl_TessLevelOuter[3] = 3.0; + + for (int i = 0; i < 16; i++) +outpos[gl_InvocationID][i] = inpos[i]; +} + +[tessellation evaluation shader] +#version 150 +#extension GL_ARB_tessellation_shader : require +#extension GL_ARB_arrays_of_arrays : require + +layout(quads, equal_spacing) in; +in vec2 outpos[][16]; + +void main() +{ + ivec2 coord = ivec2(round(gl_TessCoord.xy * 3)); + gl_Position = vec4(outpos[0][coord.y * 4 + coord.x] * 2 - 1, 0, 1); +} + +[fragment shader] +#version 150 + +void main() +{ + gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); +} + +[test] +clear color 0.1 0.1 0.1 0.1 +clear +patch parameter vertices 16 +draw arrays GL_PATCHES 0 4096 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_tessellation_shader/execution/1in-1out.shader_test b/tests/spec/arb_tessellation_shader/execution/1in-1out.shader_test new file mode 100644 index 000..2620e03 --- /dev/null +++ b/tests/spec/arb_tessellation_shader/execution/1in-1out.shader_test @@ -0,0 +1,72 @@ +# Number of input CP = 1 +# Number of output CP = 1 +# Draw 256 patches. +# +# Each patch is tessellated like a quad with a 4x4 vertex pattern. +# (which is 3x3 sub-quads = 18 triangles) + +[require] +GLSL >= 1.50 +GL_ARB_tessellation_shader + +[vertex shader] +#version 150 + +out vec2 inpos[16]; + +void main() +{ + const int num = 16; // number of patches in one direction, num*num patches in total + + for (int i = 0; i < 16; i++) +inpos[i] = vec2(gl_VertexID % num, gl_VertexID / num) / num + vec2(i % 4, i / 4) / (3 * num); +} + +[tessellation control shader] +#version 150 +#extension GL_ARB_tessellation_shader : require +#extension GL_ARB_arrays_of_arrays : require + +layout(vertices = 1) out; +in vec2 inpos[][16]; +out vec2 outpos[][16]; + +void main() +{ + gl_TessLevelInner[0] = + gl_TessLevelInner[1] = + gl_TessLevelOuter[0] = + gl_TessLevelOuter[1] = + gl_TessLevelOuter[2] = + gl_TessLevelOuter[3] = 3.0; + outpos[gl_InvocationID] = inpos[gl_InvocationID]; +} + +[tessellation evaluation shader] +#version 150 +#extension GL_ARB_tessellation_shader : require +#extension GL_ARB_arrays_of_arrays : require + +layout(quads, equal_spacing) in; +in vec2 outpos[][16]; + +void main() +{ + ivec2 coord = ivec2(round(gl_TessCoord.xy * 3)); + gl_Position = vec4(outpos[0][coord.y * 4 + coord.x] * 2 - 1, 0, 1); +} + +[fragment shader] +#version 150 + +void main() +{ + gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); +} + +[test] +clear color 0.1 0.1 0.1 0.1 +clear +patch parameter vertices 1 +draw arrays GL_PATCHES 0 256 +probe all rgba 0.0 1.0 0.0 1.0 -- 2.7.4 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] OES_required_internalformat: Add a test for renderbuffer sizing.
Eric Anholtwrites: > dEQP provides some coverage for texture and renderbuffer formats being > supported, but doesn't test that the storage reports appropriate > sizes. We can't test textures easily becase GetTexLevelParameter > doesn't exist, but GetRenderbufferParameter can let us test > renderbuffers at least. Anybody up for reviewing this test? signature.asc Description: PGP signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/1] cl: Add more arithmetic tests to exercise 24bit udiv/umod routines
just a heads up. unless there are objections, I plan to push this in few days Jan On Fri, 2017-08-04 at 16:38 -0400, Jan Vesely wrote: > based on 9f65c0a26 "cl: Add tests for 24-bit div / rem optimization" by Matt > Arsenault > > Signed-off-by: Jan Vesely> --- > tests/cl/program/execute/scalar-arithmetic-uint.cl | 1657 > > 1 file changed, 1657 insertions(+) > > diff --git a/tests/cl/program/execute/scalar-arithmetic-uint.cl > b/tests/cl/program/execute/scalar-arithmetic-uint.cl > index 195641621..7c4beabca 100644 > --- a/tests/cl/program/execute/scalar-arithmetic-uint.cl > +++ b/tests/cl/program/execute/scalar-arithmetic-uint.cl > @@ -77,6 +77,1165 @@ arg_in: 1 uint 0 > arg_in: 2 uint 77 > arg_out: 0 buffer uint[1] 0 > > +[test] > +name: 0 udiv24 num > +kernel_name: udiv24 > +global_size: 355 0 0 > + > +arg_out: 0 buffer uint[355] \ > + 4194304 4194303 4194302 4194301 4194300 \ > + 2097152 2097151 2097151 2097150 2097150 \ > + 1398101 1398101 1398100 1398100 1398100 \ > + 1048576 1048575 1048575 1048575 1048575 \ > + 1048576 1048575 1048575 1048574 1048574 \ > +1 1 1 1 1 \ > +1 2 2 2 2 \ > +1 1 1 1 1 \ > +1 1 1 1 1 \ > +3 3 3 3 3 \ > + 4194303 2097151 1048575524287262143 \ > + 128643216 8 \ > + 7373737373 \ > +0 0 0 0 0 \ > +1 0 0 0 0 \ > +0 1 2 0 0 \ > +5 1 1 1 0 \ > +812 0 025 \ > + 14 0 1 1 0 \ > +0 2 1 1 0 \ > +1 1 2 0 1 \ > +1 2 2 1 3 \ > +0 1 0 0 1 \ > + 11 0 1 0 0 \ > +1 071 0 5 \ > +0 0 1 0 0 \ > +1 0 4 0 0 \ > +0 1 013 0 \ > +1 1 0 1 3 \ > +3 0 0 2 4 \ > +1 1 3 0 0 \ > +1 0 1 0 1 \ > +2 1 0 1 1 \ > +0 3 0 7 0 \ > +0 1 2 1 5 \ > +0 2 2 0 0 \ > +3 0 0 0 1 \ > +0 0 0 3 0 \ > +1 0 2 0 0 \ > +0 0 1 0 1 \ > +0 0 0 1 0 \ > +3 1 2 4 0 \ > +1 3 0 1 0 \ > +0 2 0 2 0 \ > +1 2 1 1 3 \ > +6 216 2 1 \ > +1 1 0 1 1 \ > +1 1 0 1 0 \ > +1 1 0 0 0 \ > +1 0 0 1 0 \ > +0 0 1 1 0 \ > +2 16102 3 2 460 \ > + 189 1470016 1973 3 \ > + 3407 24316 7 7 \ > + 30 916 4 4 4 \ > +7 2 3 111 2 \ > + 35428 2 420 \ > +225 8 10252 \ > +4 12707 457 44616 \ > + 390 2 2 484 4 \ > + 452 2 6129 12115 \ > +141023224 7 2 \ > + 344591 7801 203 3415 \ > + 3526 3216 343514 2 \ > +15272 106 3995 231 4 \ > + 1199354 2 7 \ > + 4039 6376 403 114 1007 \ > +2 138263149 3 \ > +299 8 220 \ > + 981 2 8 403 418 \ > +1554414 793 2 461 > + > +arg_in: 1 buffer uint[355] \ > + 4194304 4194303 4194302 4194301 4194300 \ > + 4194304 4194303 4194302 4194301 4194300 \ > + 4194304 4194303 4194302 4194301
[Piglit] [Bug 99649] When testlist contains non-existing (removed) test, piglit excepts out
https://bugs.freedesktop.org/show_bug.cgi?id=99649 arkadiusz.hi...@intel.comchanged: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from arkadiusz.hi...@intel.com --- Patch adding --ignore-missing which changes piglit behavior so that missing subtests are considered "notrun" is now merged (94f0eface8a876db0a6a0fe0a83c19a0bd1e1eed). The default behavior of exploding with an exception is preserved without the switch. Thanks! -- You are receiving this mail because: You are the QA Contact for the bug.___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v3] framework: Add --ignore-missing option
On Mon, Aug 14, 2017 at 10:21:13AM -0700, Dylan Baker wrote: > Quoting Arkadiusz Hiler (2017-08-14 05:09:01) > > Currently, if a test from provided testlist fails to be discovered by > > the framework, piglit blows up with an exception. > > > > This is both good - for consistency/early errors - and bad - for > > handling some CI/automation scenarios (e.g autobisecting the tests). > > > > So let's keep the current default, but allow some flexibility with the > > new option that reports the missing tests as 'notrun'. > > > > v2: > > - change switch name to 'ignore', as skip is too suggestive > > - use DummyTest to get 'notrun' result instead of warnings > > > > v3: don't use OPTIONS > > > > bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99649 > > Cc: Dylan Baker> > Cc: Tomi Sarvela > > Cc: Martin Peres > > Signed-off-by: Arkadiusz Hiler > > --- > > framework/profile.py | 10 +++--- > > framework/programs/run.py | 12 > > framework/test/base.py| 12 > > 3 files changed, 31 insertions(+), 3 deletions(-) > > > > diff --git a/framework/profile.py b/framework/profile.py > > index a625318..cf0e298 100644 > > @@ -314,7 +315,10 @@ class TestProfile(object): > > if self.forced_test_list: > > opts = collections.OrderedDict() > > for n in self.forced_test_list: > > -opts[n] = self.test_list[n] > > +if self.options['ignore_missing'] and n not in > > self.test_list: > > +opts[n] = DummyTest(name=n, result=status.NOTRUN) > > name and result are not keyword arguments, they're positional, so please write > it like this instead: > opts[n] = DummyTest(n, status.NOTRUN) > > As long as this passes the unit test suite with the above changed, > Reviewed-by: Dylan Baker % tox > with_patches % git checkout HEAD~ % tox > without_patches % diff -u <(grep -v PYTHONHASHSEED with_patches) <(grep -v PYTHONHASHSEED without_patches) | sprunge http://sprunge.us/VZDN Exactly identical pass rate and the same tests are failing. I guess that's a pass? :-) > Thanks for fixing that for me. Glad to see you back in action. v4 with your r-b is comming in a second and thanks for the review! -- Cheers, Arek ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit