Re: [Piglit] [PATCH] arb_gpu_shader_int64: Test extracting individual bytes from 64-bit values
Thanks Ian. Reviewed-by: Matt Turner ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] egl: doesn't allow egl to create a forward-compatible context with req ver < 3
Hello, Thanks for the patch. I notice that there are a lot of whitespace errors in this patch. I would fix them myself when I commit, but I have some questions that might require other changes. They should be pretty apparent. On Thu, Oct 11, 2018 at 4:35 AM wrote: > > From: Andrii Simiklit > > EGL_KHR_create_context spec says: >"The default values for EGL_CONTEXT_MAJOR_VERSION_KHR and > EGL_CONTEXT_MINOR_VERSION_KHR are 1 and 0 respectively." > > requesting a forward-compatible context for OpenGL > versions less than 3.0 will generate an error. > > "* If an OpenGL context is requested and the values for attributes > EGL_CONTEXT_MAJOR_VERSION_KHR and EGL_CONTEXT_MINOR_VERSION_KHR, > when considered together with the value for attribute > EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, specify an OpenGL > version and feature set that are not defined, than an > EGL_BAD_MATCH error is generated. > > The defined versions of OpenGL at the time of writing are OpenGL > 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.1, 3.2, 4.0, 4.1, > 4.2, and 4.3. Feature deprecation was introduced with OpenGL > 3.0, so forward-compatible contexts may only be requested for > OpenGL 3.0 and above. Thus, examples of invalid combinations of > attributes include: > > - Major version < 1 or > 4 > - Major version == 1 and minor version < 0 or > 5 > - Major version == 2 and minor version < 0 or > 1 > - Major version == 3 and minor version < 0 or > 2 > - Major version == 4 and minor version < 0 or > 3 > - Forward-compatible flag set and major version < 3 > > Because the purpose of forward-compatible contexts is to allow > application development on a specific OpenGL version with the > knowledge that the app will run on a future version, context > creation will fail if > EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR is set and the > context version returned cannot implement exactly the requested > version." > > Additionally this patch checks and an independence of the attributes order in > list. > > Signed-off-by: Andrii Simiklit > --- > .../valid-flag-forward-compatible-gl.c| 70 +++ > 1 file changed, 57 insertions(+), 13 deletions(-) > > diff --git > a/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c > b/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c > index 42feb54d6..ea00ef595 100644 > --- a/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c > +++ b/tests/egl/spec/egl_khr_create_context/valid-flag-forward-compatible-gl.c > @@ -23,16 +23,30 @@ > #include "piglit-util-egl.h" > #include "common.h" > > -int gl_version; > +int gl_version = 0; > > -static bool try_flag(int flag) > +static bool try_flag(int req_version, int flag) This function has become strange, both returning a bool and also calling piglit_report_result(PIGLIT_FAIL). > { > - const EGLint attribs[] = { > - EGL_CONTEXT_FLAGS_KHR, flag, > - EGL_NONE > - }; > + bool oresult = true; What does the 'o' mean here? Why not just call it result? > + const unsigned vidx = req_version < 0 ? 0 : (req_version == 0) ? 1 : > 2; > + const bool is_forward_compatible = > + (0 != (flag & > EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR)); > > - ctx = eglCreateContext(egl_dpy, cfg, EGL_NO_CONTEXT, attribs); > + const EGLint attribs[][5] = { > + /*req_version-before-case*/ > + { EGL_CONTEXT_MAJOR_VERSION_KHR, abs(req_version), > + EGL_CONTEXT_FLAGS_KHR, flag, > + EGL_NONE }, > + /*no-req_version-case*/ > + { EGL_CONTEXT_FLAGS_KHR, flag, > + EGL_NONE }, > + /*req_version-after-case-*/ > + { EGL_CONTEXT_FLAGS_KHR, flag, > + EGL_CONTEXT_MAJOR_VERSION_KHR, abs(req_version), > + EGL_NONE } > + }; > + assert(vidx < 3); > + ctx = eglCreateContext(egl_dpy, cfg, EGL_NO_CONTEXT, attribs[vidx]); > if (ctx != NULL) { > /* Get GL version in order to know whether we can test > * EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR. > @@ -47,6 +61,18 @@ static bool try_flag(int flag) > > gl_version = piglit_get_gl_version(); > } > + if (abs(req_version) < 3 && is_forward_compatible) { > + /* The EGL_KHR_create_context spec says: > +* > + * requesting a forward-compatible context for OpenGL > + * versions less than 3.0 will generate an error
Re: [Piglit] [PATCH 1/2] glsl-1.10 / glsl-1.20: Don't use ortho in variable indexing tests.
On Tue, Jun 12, 2018 at 11:38 AM, Ian Romanick wrote: > On 06/11/2018 11:22 PM, Jordan Justen wrote: >> From: Matt Turner >> >> Using ortho makes shrinking the window size much more difficult, which >> makes running tests in simulation take much longer. >> >> Ref: https://lists.freedesktop.org/archives/piglit/2013-November/008298.html >> [jordan.l.jus...@intel.com: convert from shell script to mako] >> Signed-off-by: Jordan Justen >> Cc: Kenneth Graunke >> --- >> .../templates/gen_variable_index_read_tests/helpers.mako | 7 ++- >> .../gen_variable_index_write_tests/fs.shader_test.mako | 3 --- >> .../templates/gen_variable_index_write_tests/helpers.mako | 4 ++-- >> .../gen_variable_index_write_tests/vs.shader_test.mako | 3 --- >> 4 files changed, 4 insertions(+), 13 deletions(-) >> >> diff --git >> a/generated_tests/templates/gen_variable_index_read_tests/helpers.mako >> b/generated_tests/templates/gen_variable_index_read_tests/helpers.mako >> index 155eb8c4e..3ca306daf 100644 >> --- a/generated_tests/templates/gen_variable_index_read_tests/helpers.mako >> +++ b/generated_tests/templates/gen_variable_index_read_tests/helpers.mako >> @@ -179,9 +179,6 @@ void main() >> <%def name="emit_test_vectors(params)" filter="dedent"> >><%block filter="newlines"> >>[test] >> - clear color 0.5 0.5 0.5 0.5 >> - clear >> - ortho >>% if params.mode == 'uniform' and params.glsl_version == 110 and >> params.test_array_dim == 0: >> uniform ${params.cxr_type} m ${matrix_data(1, params.matrix_dim, >> delim=' ')} >>% endif >> @@ -220,8 +217,8 @@ void main() >>x = x_base + 15 * column - 10 >>y = 15 * row - 10 >> %> >> -draw rect ${x} ${y} 10 10 >> -probe rgb ${x + 5} ${y + 5} 0.0 1.0 0.0 >> +draw rect -1 -1 2 2 >> +probe all rgb 0.0 1.0 0.0 > > It's a little surprising that this helps performance. If I'm reading > this correctly, this test tries to draw a bunch of 10x10 blocks for each > test. This is getting replaced with redrawing the whole window. This > also weakens the test. Since there's no clear between draws, if every > draw after the first does nothing, the test will incorrectly pass. As I said 5 years ago, this patch is not intended to improve performance. It's to make shrinking window sizes simpler, which is itself intended to improve performance. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 00/35] Serialize profiles into XML at build time
On Tue, May 8, 2018 at 7:07 AM, Michel Dänzerwrote: > On 2018-05-07 06:49 PM, Michel Dänzer wrote: >> On 2018-05-07 06:44 PM, Dylan Baker wrote: >>> Quoting Tomi Sarvela (2018-05-07 01:20:46) piglit/framework$ diff -c profile.py.orig profile.py *** profile.py.orig 2018-05-07 19:11:37.649994643 +0300 --- profile.py 2018-05-07 19:11:46.880994608 +0300 *** *** 584,591 # more code, and adding side-effects test_list = (x for x in test_list if filterby(x)) ! pool.imap(lambda pair: test(pair[0], pair[1], profile, pool), ! test_list, chunksize) def run_profile(profile, test_list): """Run an individual profile.""" --- 584,591 # more code, and adding side-effects test_list = (x for x in test_list if filterby(x)) ! pool.map(lambda pair: test(pair[0], pair[1], profile, pool), ! test_list, chunksize) def run_profile(profile, test_list): """Run an individual profile.""" Tomi >>> >>> Juan, can you test this patch and see if it resolves your issue as well? >>> I'm not >>> sure why this is fixing things, but if it does I'm happy to merge it and >>> deal >>> with any performance problems it introduces later. >> >> FWIW, this patch doesn't fix the gpu profile running a lot fewer tests >> now than it did before 9461d92301e72807eba4776a16a05207e3a16477. I'm >> also using -x. > > I just bisected another problem to > 9461d92301e72807eba4776a16a05207e3a16477: The xts-render profile doesn't > work anymore. Most of the time, it doesn't even start: > > [000/480] > Traceback (most recent call last): > File "./piglit", line 178, in > main() > File "./piglit", line 174, in main > sys.exit(runner(args)) > File "/home/daenzer/src/piglit-git/piglit/framework/exceptions.py", line > 51, in _inner > func(*args, **kwargs) > File "/home/daenzer/src/piglit-git/piglit/framework/programs/run.py", line > 370, in run > backend.finalize({'time_elapsed': time_elapsed.to_json()}) > File "/home/daenzer/src/piglit-git/piglit/framework/backends/json.py", line > 163, in finalize > assert data['tests'] > AssertionError > > Sometimes, it doesn't fail like this, but only runs between 0 and another > number < 480 of tests. Very rarely, it manages to run all tests. > > (I'm using python 3.6 now) > > > Dylan, since a number of issues have been reported to have started with > this commit, and you don't seem to have an idea what's wrong with it, > can you revert it and anything depending on it for the time being? I'll > be happy to test against the issues I've run into when you're ready to > try again. Do you think that is a good workflow? (Serious question) Dylan's patches were on the list for three weeks and I think only one person (Rafael) tested them. It doesn't make sense to me to significantly increase the burden on the person writing the code (by reverting all the patches when a problem is found) in exchange for a promise to test the patches... which you or anyone else could have done during the three weeks Dylan was practically begging for testers. It's frustrating for me, just as an observer, to see that not even the people who have so loudly complained about the lack of this very feature could be bothered to try it out. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] shaders: Use 3-source operations as conditions
Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_shader_ballot: Fix the test values for gl_SubGroupG{e, t}MaskARB
Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] arb_shader_group_vote: Add simple vertex shader tests
--- .../arb_shader_group_vote/vs-all-const.shader_test | 33 .../vs-all-uniform.shader_test | 35 ++ .../arb_shader_group_vote/vs-any-const.shader_test | 33 .../vs-any-uniform.shader_test | 35 ++ .../arb_shader_group_vote/vs-eq-const.shader_test | 33 .../vs-eq-uniform.shader_test | 35 ++ 6 files changed, 204 insertions(+) create mode 100644 tests/spec/arb_shader_group_vote/vs-all-const.shader_test create mode 100644 tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test create mode 100644 tests/spec/arb_shader_group_vote/vs-any-const.shader_test create mode 100644 tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test create mode 100644 tests/spec/arb_shader_group_vote/vs-eq-const.shader_test create mode 100644 tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test diff --git a/tests/spec/arb_shader_group_vote/vs-all-const.shader_test b/tests/spec/arb_shader_group_vote/vs-all-const.shader_test new file mode 100644 index 0..b7020144f --- /dev/null +++ b/tests/spec/arb_shader_group_vote/vs-all-const.shader_test @@ -0,0 +1,33 @@ +[require] +GL >= 3.2 +GLSL >= 1.50 +GL_ARB_shader_group_vote + +[vertex shader] +#extension GL_ARB_shader_group_vote: enable + +in vec4 piglit_vertex; +out vec4 color; + +void main() +{ + gl_Position = piglit_vertex; + + if (!allInvocationsARB(false)) +color = vec4(0.0, 1.0, 0.0, 1.0); + else +color = vec4(1.0, 0.0, 0.0, 1.0); +} + +[fragment shader] +in vec4 color; +out vec4 frag_color; + +void main() +{ + frag_color = color; +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test b/tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test new file mode 100644 index 0..75ecd6f05 --- /dev/null +++ b/tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test @@ -0,0 +1,35 @@ +[require] +GL >= 3.2 +GLSL >= 1.50 +GL_ARB_shader_group_vote + +[vertex shader] +#extension GL_ARB_shader_group_vote: enable + +uniform bool val; +in vec4 piglit_vertex; +out vec4 color; + +void main() +{ + gl_Position = piglit_vertex; + + if (!allInvocationsARB(val)) +color = vec4(0.0, 1.0, 0.0, 1.0); + else +color = vec4(1.0, 0.0, 0.0, 1.0); +} + +[fragment shader] +in vec4 color; +out vec4 frag_color; + +void main() +{ + frag_color = color; +} + +[test] +uniform int val 0 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_shader_group_vote/vs-any-const.shader_test b/tests/spec/arb_shader_group_vote/vs-any-const.shader_test new file mode 100644 index 0..c173b3e15 --- /dev/null +++ b/tests/spec/arb_shader_group_vote/vs-any-const.shader_test @@ -0,0 +1,33 @@ +[require] +GL >= 3.2 +GLSL >= 1.50 +GL_ARB_shader_group_vote + +[vertex shader] +#extension GL_ARB_shader_group_vote: enable + +in vec4 piglit_vertex; +out vec4 color; + +void main() +{ + gl_Position = piglit_vertex; + + if (anyInvocationARB(true)) +color = vec4(0.0, 1.0, 0.0, 1.0); + else +color = vec4(1.0, 0.0, 0.0, 1.0); +} + +[fragment shader] +in vec4 color; +out vec4 frag_color; + +void main() +{ + frag_color = color; +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test b/tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test new file mode 100644 index 0..e52bcc998 --- /dev/null +++ b/tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test @@ -0,0 +1,35 @@ +[require] +GL >= 3.2 +GLSL >= 1.50 +GL_ARB_shader_group_vote + +[vertex shader] +#extension GL_ARB_shader_group_vote: enable + +uniform bool val; +in vec4 piglit_vertex; +out vec4 color; + +void main() +{ + gl_Position = piglit_vertex; + + if (anyInvocationARB(val)) +color = vec4(0.0, 1.0, 0.0, 1.0); + else +color = vec4(1.0, 0.0, 0.0, 1.0); +} + +[fragment shader] +in vec4 color; +out vec4 frag_color; + +void main() +{ + frag_color = color; +} + +[test] +uniform int val 1 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_shader_group_vote/vs-eq-const.shader_test b/tests/spec/arb_shader_group_vote/vs-eq-const.shader_test new file mode 100644 index 0..549b158a8 --- /dev/null +++ b/tests/spec/arb_shader_group_vote/vs-eq-const.shader_test @@ -0,0 +1,33 @@ +[require] +GL >= 3.2 +GLSL >= 1.50 +GL_ARB_shader_group_vote + +[vertex shader] +#extension GL_ARB_shader_group_vote: enable + +in vec4 piglit_vertex; +out vec4 color; + +void main() +{ + gl_Position = piglit_vertex; + + if (allInvocationsEqualARB(true) && allInvocationsEqualARB(false)) +color = vec4(0.0, 1.0, 0.0, 1.0); + else +color = vec4(1.0, 0.0, 0.0, 1.0); +} + +[fragment shader] +in vec4 color; +out vec4 frag_color; + +void main() +{ + frag_color = color; +} + +[test] +draw rect -1 -1 2 2 +probe
[Piglit] [PATCH 1/2] arb_shader_group_vote: Prefix tests with "cs-"
Going to add tests for other shader stages. --- tests/spec/arb_shader_group_vote/{all.shader_test => cs-all.shader_test} | 0 tests/spec/arb_shader_group_vote/{any.shader_test => cs-any.shader_test} | 0 tests/spec/arb_shader_group_vote/{eq.shader_test => cs-eq.shader_test} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename tests/spec/arb_shader_group_vote/{all.shader_test => cs-all.shader_test} (100%) rename tests/spec/arb_shader_group_vote/{any.shader_test => cs-any.shader_test} (100%) rename tests/spec/arb_shader_group_vote/{eq.shader_test => cs-eq.shader_test} (100%) diff --git a/tests/spec/arb_shader_group_vote/all.shader_test b/tests/spec/arb_shader_group_vote/cs-all.shader_test similarity index 100% rename from tests/spec/arb_shader_group_vote/all.shader_test rename to tests/spec/arb_shader_group_vote/cs-all.shader_test diff --git a/tests/spec/arb_shader_group_vote/any.shader_test b/tests/spec/arb_shader_group_vote/cs-any.shader_test similarity index 100% rename from tests/spec/arb_shader_group_vote/any.shader_test rename to tests/spec/arb_shader_group_vote/cs-any.shader_test diff --git a/tests/spec/arb_shader_group_vote/eq.shader_test b/tests/spec/arb_shader_group_vote/cs-eq.shader_test similarity index 100% rename from tests/spec/arb_shader_group_vote/eq.shader_test rename to tests/spec/arb_shader_group_vote/cs-eq.shader_test -- 2.13.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] framework: Don't stop resume because no tests are left to be run
On Tue, Jul 11, 2017 at 10:27 AM, Dylan Bakerwrote: > It's completely possible that if piglit resume is run with the -n flag > (don't retry incomplete tests), that piglit resume could be invoked with > no tests left to run. In this case it makes sense to let piglit resume > just finalize the backend and produce a unified result. > > Signed-off-by: Dylan Baker > cc: Martin Peres > --- > framework/programs/run.py | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/framework/programs/run.py b/framework/programs/run.py > index 508bc05c4..ef268f722 100644 > --- a/framework/programs/run.py > +++ b/framework/programs/run.py > @@ -35,6 +35,7 @@ import six > > from framework import core, backends, exceptions, options > from framework import dmesg > +from framework import exceptions exceptions looks like it's imported a few lines above. Is this intentional? ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] Rounding mode in Piglit
On Tue, Jun 27, 2017 at 3:43 AM, tournier.eliewrote: > Hello list, > > The GLSL spec said "The rounding mode cannot be set and is undefined" > but in Piglit, we implicitly define a rounding mode. > Indeed, in some test like > "generated_tests/spec/arb_gpu_shader_fp64/execution/conversion/vert-conversion-explicit-double-uint.shader_test", > we check if uint(1.9467) == 1. > Depending on the rounding mode, we can have uint(1,9467) = 1 or > uint(1,9467) = 2. > > Is it normal or should we change the tests to allow these 2 values? The rounding mode is undefined, but the GLSL spec explicitly says (in 5.4.1 Conversion and Scalar Constructors): When constructors are used to convert any floating-point type to an integer type, the fractional part of the floating-point value is dropped. It is undefined to convert a negative floating-point value to an uint. So uint(1.9467) is always 1u. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] arb_shading_language_420pack: check different binding points
Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Add nv_image_formats tests
> + } > +} > + > +static bool > +run_test(const struct image_format *image_format) > +{ > + GLuint src, dst, prog; > + char *fs_source; > + > + glGenTextures(1, ); > + glBindTexture(GL_TEXTURE_2D, src); > + glTexStorage2D(GL_TEXTURE_2D, 1, image_format->format, WIDTH, HEIGHT); > + glBindImageTexture(0, src, 0, GL_FALSE, 0, > + GL_READ_ONLY, image_format->format); > + > + if (format_is_norm16(image_format->format)) { > + if (!piglit_is_extension_supported("GL_EXT_texture_norm16")) { > + piglit_check_gl_error(GL_INVALID_VALUE); > + return true; > + } > + } > + piglit_check_gl_error(GL_NO_ERROR); > + > + glGenTextures(1, ); > + glBindTexture(GL_TEXTURE_2D, dst); > + glTexStorage2D(GL_TEXTURE_2D, 1, image_format->format, WIDTH, HEIGHT); > + glBindImageTexture(0, dst, 0, GL_FALSE, 0, > + GL_WRITE_ONLY, image_format->format); > + piglit_check_gl_error(GL_NO_ERROR); > + > + fs_source = NULL; > + if (asprintf(_source, > +"#version 310 es\n" > +"#extension GL_NV_image_formats : require\n" > +"\n" > +"layout(%s) readonly uniform highp %s2D img_src;\n" > +"layout(%s) writeonly uniform highp %s2D img_dst;\n" > +"\n" > +"void main() {\n" > +" %s v = imageLoad(img_src, ivec2(gl_FragCoord));\n" > +" imageStore(img_dst, ivec2(gl_FragCoord), v);\n" > +"}", > +image_format->name, > +glsl_image_type_name(image_format->format), > +image_format->name, > +glsl_image_type_name(image_format->format), > +glsl_type_name(image_format->format)) < 0) > + return false; > + > + prog = piglit_build_simple_program( > + "#version 310 es\n" > + "\n" > + "in vec4 piglit_vertex;\n" > + "void main() {\n" > + " gl_Position = piglit_vertex;\n" > + "}", > + fs_source); > + free(fs_source); > + > + glUseProgram(prog); > + > + piglit_draw_rect(-1, -1, 1, 1); > + > + return true; > +} > + > +#define subtest(status, guard, result, ...) do {\ > +enum piglit_result _status = (!(guard) ? PIGLIT_SKIP : \ guard is always true, which is weird. But I see that the subtest macro was copied from tests/spec/arb_shader_image_load_store/common.h > + (result) ? PIGLIT_PASS : \ > + PIGLIT_FAIL); \ > +\ > +piglit_report_subtest_result(_status, __VA_ARGS__); \ > +\ > +if (_status == PIGLIT_FAIL) \ > +*status = PIGLIT_FAIL; \ > +} while (0) > + > +void > +piglit_init(int argc, char **argv) > +{ > + enum piglit_result status = PIGLIT_PASS; > + unsigned i; > + > +piglit_require_extension("GL_NV_image_formats"); > + > + for (i = 0 ; i < ARRAY_SIZE(image_formats); ++i) { > + subtest(, true, run_test(_formats[i]), > + "copy-%s", image_formats[i].name); > + } > + > +piglit_report_result(status); > +} > + > +enum piglit_result > +piglit_display(void) > +{ > +return PIGLIT_FAIL; > +} > -- > 2.10.2 Looks good to me. Reviewed-by: Matt Turner <matts...@gmail.com> Remember to close bug 98480 when this lands :) ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_compute_variable_group_size: Add GL_ARB_compute_variable_group_size requirement
On Mon, Oct 17, 2016 at 6:04 PM, Ian Romanickwrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick I actually sent and committed this patch earlier today. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_compute_variable_group_size: add ARB_compute_shader enables
On Mon, Oct 17, 2016 at 12:38 PM, Nicolai Hähnlewrote: > From: Nicolai Hähnle > > Without those, many of the tests started failing now that Mesa explicitly > checks for the compute shader enable in the compiler. > --- The strange thing is that ARB_compute_shader doesn't say anything about an #extension GL_ARB_compute_shader. I suppose it's just an oversight. I'll commit my patch, since it should just add the dependency on GL_ARB_compute_variable_group_size with Samuel's feedback incorporated. I have no problem with this patch. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_compute_variable_group_size: Fix require section.
On Mon, Oct 17, 2016 at 12:54 PM, Samuel Pitoisetwrote: > > > On 10/17/2016 09:45 PM, Samuel Pitoiset wrote: >> >> Thanks for fixing this. >> >> Reviewed-by: Samuel Pitoiset > > > Actually, we need to check for both ARB_compute_shader and > ARB_compute_variable_group_size since > https://cgit.freedesktop.org/mesa/mesa/commit/?id=8785a8ff8948385a913e9bd75e8cdd1092bd750f. Strange. Shouldn't a [compute shader] section (or requiring GL_ARB_compute_variable_group_size) be sufficient? I'll make the change regardless. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_compute_variable_group_size: Fix require section.
--- .../linker/mixed_fixed_variable_local_work_size.shader_test | 2 +- .../linker/no_local_size_specified.shader_test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/spec/arb_compute_variable_group_size/linker/mixed_fixed_variable_local_work_size.shader_test b/tests/spec/arb_compute_variable_group_size/linker/mixed_fixed_variable_local_work_size.shader_test index d660d56..32088ad 100644 --- a/tests/spec/arb_compute_variable_group_size/linker/mixed_fixed_variable_local_work_size.shader_test +++ b/tests/spec/arb_compute_variable_group_size/linker/mixed_fixed_variable_local_work_size.shader_test @@ -7,7 +7,7 @@ [require] GL >= 3.3 GLSL >= 3.30 -GL_ARB_compute_shader +GL_ARB_compute_variable_group_size [compute shader] #version 330 diff --git a/tests/spec/arb_compute_variable_group_size/linker/no_local_size_specified.shader_test b/tests/spec/arb_compute_variable_group_size/linker/no_local_size_specified.shader_test index 6371c29..92a1646 100644 --- a/tests/spec/arb_compute_variable_group_size/linker/no_local_size_specified.shader_test +++ b/tests/spec/arb_compute_variable_group_size/linker/no_local_size_specified.shader_test @@ -7,7 +7,7 @@ [require] GL >= 3.3 GLSL >= 3.30 -GL_ARB_compute_shader +GL_ARB_compute_variable_group_size [compute shader] #version 330 -- 2.7.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 5/5] gl-1.0: Add a scissored depth clear test that uses negative x, y.
Exposes a bug in i965, fixed by i965: fix noop_scissor range issue on width/height --- tests/all.py | 1 + tests/spec/gl-1.0/CMakeLists.gl.txt| 1 + .../spec/gl-1.0/scissor-depth-clear-negative-xy.c | 89 ++ 3 files changed, 91 insertions(+) create mode 100644 tests/spec/gl-1.0/scissor-depth-clear-negative-xy.c diff --git a/tests/all.py b/tests/all.py index a57256f..ab392c7 100644 --- a/tests/all.py +++ b/tests/all.py @@ -967,6 +967,7 @@ with profile.group_manager( g(['gl-1.0-scissor-clear']) g(['gl-1.0-scissor-copypixels']) g(['gl-1.0-scissor-depth-clear']) +g(['gl-1.0-scissor-depth-clear-negative-xy']) g(['gl-1.0-scissor-many']) g(['gl-1.0-scissor-offscreen']) g(['gl-1.0-scissor-polygon']) diff --git a/tests/spec/gl-1.0/CMakeLists.gl.txt b/tests/spec/gl-1.0/CMakeLists.gl.txt index e79f0cb..97f988f 100644 --- a/tests/spec/gl-1.0/CMakeLists.gl.txt +++ b/tests/spec/gl-1.0/CMakeLists.gl.txt @@ -33,6 +33,7 @@ piglit_add_executable (gl-1.0-scissor-bitmap scissor-bitmap.c) piglit_add_executable (gl-1.0-scissor-clear scissor-clear.c) piglit_add_executable (gl-1.0-scissor-copypixels scissor-copypixels.c) piglit_add_executable (gl-1.0-scissor-depth-clear scissor-depth-clear.c) +piglit_add_executable (gl-1.0-scissor-depth-clear-negative-xy scissor-depth-clear-negative-xy.c) piglit_add_executable (gl-1.0-scissor-many scissor-many.c) piglit_add_executable (gl-1.0-scissor-offscreen scissor-offscreen.c) piglit_add_executable (gl-1.0-scissor-polygon scissor-polygon.c) diff --git a/tests/spec/gl-1.0/scissor-depth-clear-negative-xy.c b/tests/spec/gl-1.0/scissor-depth-clear-negative-xy.c new file mode 100644 index 000..e481ff9 --- /dev/null +++ b/tests/spec/gl-1.0/scissor-depth-clear-negative-xy.c @@ -0,0 +1,89 @@ +/* + * Copyright © 2009, 2016 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. + * + * Authors: + *Eric Anholt <e...@anholt.net> + *Matt Turner <matts...@gmail.com> + * + */ + +/** @file + * + * Tests that glScissor properly affects glClear(GL_DEPTH_BUFFER_BIT) when + * x or y is negative. + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 10; + + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL; + +PIGLIT_GL_TEST_CONFIG_END + +enum piglit_result +piglit_display(void) +{ + GLboolean pass = GL_TRUE; + static float green[] = {0.0, 1.0, 0.0, 0.0}; + static float blue[] = {0.0, 0.0, 1.0, 0.0}; + + /* whole window green -- depth fail will be this. */ + glClearColor(0.0, 1.0, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + /* Clear depth to 0 (fail) */ + glClearDepth(0.0); + glClear(GL_DEPTH_BUFFER_BIT); + + /* Clear depth quad the size of the fb at -16, -16 to be drawn blue. */ + glEnable(GL_SCISSOR_TEST); + glScissor(-16, -16, piglit_width, piglit_height); + glClearDepth(1.0); + glClear(GL_DEPTH_BUFFER_BIT); + + /* Now draw a quad midway between 0.0 and 1.0 depth so only that +* scissored depth clear will get rasterized. +*/ + glEnable(GL_DEPTH_TEST); + glDisable(GL_SCISSOR_TEST); + glDepthFunc(GL_LESS); + glColor4fv(blue); + piglit_draw_rect(0, 0, piglit_width, piglit_height); + + pass &= piglit_probe_rect_rgb(0, 0, piglit_width - 16, piglit_height - 16, blue); + + pass &= piglit_probe_rect_rgb(piglit_width - 16, 0, 16, piglit_height, green); + pass &= piglit_probe_rect_rgb(0, piglit_height - 16, piglit_width - 16, 16, green); + + piglit_present_results(); + + return pass ? PIGLIT_PASS : PIGLIT_FAIL; +} + +void +piglit_init(int
[Piglit] [PATCH 3/5] gl-1.0: Call piglit_ortho_projection from piglit_init.
In some cases we called it from piglit_display, and in others we had it open-coded in a reshape function. --- tests/spec/gl-1.0/scissor-bitmap.c| 2 +- tests/spec/gl-1.0/scissor-clear.c | 17 + tests/spec/gl-1.0/scissor-copypixels.c| 3 +-- tests/spec/gl-1.0/scissor-depth-clear.c | 17 + tests/spec/gl-1.0/scissor-many.c | 17 + tests/spec/gl-1.0/scissor-offscreen.c | 3 +-- tests/spec/gl-1.0/scissor-stencil-clear.c | 11 +-- 7 files changed, 7 insertions(+), 63 deletions(-) diff --git a/tests/spec/gl-1.0/scissor-bitmap.c b/tests/spec/gl-1.0/scissor-bitmap.c index 001072f..b200bf2 100644 --- a/tests/spec/gl-1.0/scissor-bitmap.c +++ b/tests/spec/gl-1.0/scissor-bitmap.c @@ -157,7 +157,6 @@ piglit_display() int start_x, start_y; struct probes probes; GLboolean pass = GL_TRUE; - piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); memset(, 0, sizeof(probes)); @@ -305,4 +304,5 @@ void piglit_init(int argc, char **argv) { glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); } diff --git a/tests/spec/gl-1.0/scissor-clear.c b/tests/spec/gl-1.0/scissor-clear.c index 2872581..dbc5c0a 100644 --- a/tests/spec/gl-1.0/scissor-clear.c +++ b/tests/spec/gl-1.0/scissor-clear.c @@ -71,23 +71,8 @@ piglit_display(void) return pass ? PIGLIT_PASS : PIGLIT_FAIL; } - -static void reshape(int width, int height) -{ - piglit_width = width; - piglit_height = height; - - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glOrtho(0.0, width, 0.0, height, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - void piglit_init(int argc, char **argv) { - reshape(piglit_width, piglit_height); + piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); } diff --git a/tests/spec/gl-1.0/scissor-copypixels.c b/tests/spec/gl-1.0/scissor-copypixels.c index 568ac81..74da945 100644 --- a/tests/spec/gl-1.0/scissor-copypixels.c +++ b/tests/spec/gl-1.0/scissor-copypixels.c @@ -73,8 +73,6 @@ piglit_display(void) int dst_x = piglit_width / 2 + 10, dst_y; int dst_w = 10, dst_h = 10; - piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); - /* whole window red */ glClearColor(1.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); @@ -115,4 +113,5 @@ piglit_display(void) void piglit_init(int argc, char **argv) { + piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); } diff --git a/tests/spec/gl-1.0/scissor-depth-clear.c b/tests/spec/gl-1.0/scissor-depth-clear.c index ac1de02..4bd17ea 100644 --- a/tests/spec/gl-1.0/scissor-depth-clear.c +++ b/tests/spec/gl-1.0/scissor-depth-clear.c @@ -89,23 +89,8 @@ piglit_display(void) return pass ? PIGLIT_PASS : PIGLIT_FAIL; } - -static void reshape(int width, int height) -{ - piglit_width = width; - piglit_height = height; - - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glOrtho(0.0, width, 0.0, height, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - void piglit_init(int argc, char **argv) { - reshape(piglit_width, piglit_height); + piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); } diff --git a/tests/spec/gl-1.0/scissor-many.c b/tests/spec/gl-1.0/scissor-many.c index d581416..14762e3 100644 --- a/tests/spec/gl-1.0/scissor-many.c +++ b/tests/spec/gl-1.0/scissor-many.c @@ -69,23 +69,8 @@ piglit_display(void) return pass ? PIGLIT_PASS : PIGLIT_FAIL; } - -static void reshape(int width, int height) -{ - piglit_width = width; - piglit_height = height; - - glViewport(0, 0, width, height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glOrtho(0.0, width, 0.0, height, -1.0, 1.0); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - void piglit_init(int argc, char **argv) { - reshape(piglit_width, piglit_height); + piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); } diff --git a/tests/spec/gl-1.0/scissor-offscreen.c b/tests/spec/gl-1.0/scissor-offscreen.c index 96abf59..8f96180 100644 --- a/tests/spec/gl-1.0/scissor-offscreen.c +++ b/tests/spec/gl-1.0/scissor-offscreen.c @@ -50,8 +50,6 @@ piglit_display(void) static const GLfloat window_color[] = { 1.0f, 1.0f, 1.0f, 1.0f }; GLboolean pass = GL_TRUE; - piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); - /* Clear to white */ glClearColor(1.0f, 1.0f, 1.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); @@ -81,4 +79,5 @@ piglit_display(void) void piglit_init(int argc, char**argv) { + piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); } diff
[Piglit] [PATCH 2/5] gl-1.0: Remove @file names.
Some were wrong, and Pekka noted that we can simply leave them out and Doxygen will do the right thing. --- tests/spec/gl-1.0/scissor-bitmap.c| 2 +- tests/spec/gl-1.0/scissor-clear.c | 2 +- tests/spec/gl-1.0/scissor-copypixels.c| 2 +- tests/spec/gl-1.0/scissor-depth-clear.c | 2 +- tests/spec/gl-1.0/scissor-many.c | 2 +- tests/spec/gl-1.0/scissor-offscreen.c | 2 +- tests/spec/gl-1.0/scissor-stencil-clear.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/spec/gl-1.0/scissor-bitmap.c b/tests/spec/gl-1.0/scissor-bitmap.c index 0a8e756..001072f 100644 --- a/tests/spec/gl-1.0/scissor-bitmap.c +++ b/tests/spec/gl-1.0/scissor-bitmap.c @@ -25,7 +25,7 @@ * */ -/** @file scissor-bitmap.c +/** @file * * Tests that clipping of glBitmap to the backbuffer works correctly, whether * it's to window boundaries or glScissor. diff --git a/tests/spec/gl-1.0/scissor-clear.c b/tests/spec/gl-1.0/scissor-clear.c index 5ec0495..2872581 100644 --- a/tests/spec/gl-1.0/scissor-clear.c +++ b/tests/spec/gl-1.0/scissor-clear.c @@ -25,7 +25,7 @@ * */ -/** @file scissor-clear.c +/** @file * * Tests that glScissor properly affects glClear(GL_COLOR_BUFFER_BIT)(). */ diff --git a/tests/spec/gl-1.0/scissor-copypixels.c b/tests/spec/gl-1.0/scissor-copypixels.c index 1f43f42..568ac81 100644 --- a/tests/spec/gl-1.0/scissor-copypixels.c +++ b/tests/spec/gl-1.0/scissor-copypixels.c @@ -25,7 +25,7 @@ * */ -/** @file scissor-copypixels.c +/** @file * * Tests that glScissor properly affects glCopyPixels(). */ diff --git a/tests/spec/gl-1.0/scissor-depth-clear.c b/tests/spec/gl-1.0/scissor-depth-clear.c index 9832270..ac1de02 100644 --- a/tests/spec/gl-1.0/scissor-depth-clear.c +++ b/tests/spec/gl-1.0/scissor-depth-clear.c @@ -25,7 +25,7 @@ * */ -/** @file scissor-copypixels.c +/** @file * * Tests that glScissor properly affects glClear(GL_DEPTH_BUFFER_BIT). */ diff --git a/tests/spec/gl-1.0/scissor-many.c b/tests/spec/gl-1.0/scissor-many.c index 17eb232..d581416 100644 --- a/tests/spec/gl-1.0/scissor-many.c +++ b/tests/spec/gl-1.0/scissor-many.c @@ -25,7 +25,7 @@ * */ -/** @file many-scissors.c +/** @file * * Tests drawing to each individual pixel in the drawable using glScissor. * diff --git a/tests/spec/gl-1.0/scissor-offscreen.c b/tests/spec/gl-1.0/scissor-offscreen.c index c9b953b..96abf59 100644 --- a/tests/spec/gl-1.0/scissor-offscreen.c +++ b/tests/spec/gl-1.0/scissor-offscreen.c @@ -25,7 +25,7 @@ * */ -/** @file scissor-offscreen.c +/** @file * * Test case for setting a scissor that is entirely offscreen. This * should clip everything but under current Mesa master with i965 it diff --git a/tests/spec/gl-1.0/scissor-stencil-clear.c b/tests/spec/gl-1.0/scissor-stencil-clear.c index fb12309..2ad0fbf 100644 --- a/tests/spec/gl-1.0/scissor-stencil-clear.c +++ b/tests/spec/gl-1.0/scissor-stencil-clear.c @@ -25,7 +25,7 @@ * */ -/** @file scissor-stencil-clear.c +/** @file * * Tests that glScissor properly affects glClear of the stencil buffer. */ -- 2.7.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/5] gl-1.0: Move scissor tests here.
--- tests/all.py | 16 tests/general/CMakeLists.gl.txt| 8 tests/spec/gl-1.0/CMakeLists.gl.txt| 8 tests/{general => spec/gl-1.0}/scissor-bitmap.c| 0 tests/{general => spec/gl-1.0}/scissor-clear.c | 0 tests/{general => spec/gl-1.0}/scissor-copypixels.c| 0 tests/{general => spec/gl-1.0}/scissor-depth-clear.c | 0 tests/{general => spec/gl-1.0}/scissor-many.c | 0 tests/{general => spec/gl-1.0}/scissor-offscreen.c | 0 tests/{general => spec/gl-1.0}/scissor-polygon.c | 0 tests/{general => spec/gl-1.0}/scissor-stencil-clear.c | 0 11 files changed, 16 insertions(+), 16 deletions(-) rename tests/{general => spec/gl-1.0}/scissor-bitmap.c (100%) rename tests/{general => spec/gl-1.0}/scissor-clear.c (100%) rename tests/{general => spec/gl-1.0}/scissor-copypixels.c (100%) rename tests/{general => spec/gl-1.0}/scissor-depth-clear.c (100%) rename tests/{general => spec/gl-1.0}/scissor-many.c (100%) rename tests/{general => spec/gl-1.0}/scissor-offscreen.c (100%) rename tests/{general => spec/gl-1.0}/scissor-polygon.c (100%) rename tests/{general => spec/gl-1.0}/scissor-stencil-clear.c (100%) diff --git a/tests/all.py b/tests/all.py index e110f59..276f5a8 100644 --- a/tests/all.py +++ b/tests/all.py @@ -859,14 +859,6 @@ with profile.group_manager( g(['readpix-z']) g(['roundmode-getintegerv'], run_concurrent=False) g(['roundmode-pixelstore'], run_concurrent=False) -g(['scissor-bitmap'], run_concurrent=False) -g(['scissor-clear'], run_concurrent=False) -g(['scissor-copypixels'], run_concurrent=False) -g(['scissor-depth-clear'], run_concurrent=False) -g(['scissor-many'], run_concurrent=False) -g(['scissor-offscreen'], run_concurrent=False) -g(['scissor-polygon']) -g(['scissor-stencil-clear'], run_concurrent=False) g(['select', 'gl11'], 'GL_SELECT - no test function', run_concurrent=False) g(['select', 'depth'], 'GL_SELECT - depth-test enabled', run_concurrent=False) @@ -971,6 +963,14 @@ with profile.group_manager( g(['gl-1.0-logicop']) g(['gl-1.0-no-op-paths']) g(['gl-1.0-simple-readbuffer']) +g(['gl-1.0-scissor-bitmap'], run_concurrent=False) +g(['gl-1.0-scissor-clear'], run_concurrent=False) +g(['gl-1.0-scissor-copypixels'], run_concurrent=False) +g(['gl-1.0-scissor-depth-clear'], run_concurrent=False) +g(['gl-1.0-scissor-many'], run_concurrent=False) +g(['gl-1.0-scissor-offscreen'], run_concurrent=False) +g(['gl-1.0-scissor-polygon']) +g(['gl-1.0-scissor-stencil-clear'], run_concurrent=False) with profile.group_manager( PiglitGLTest, diff --git a/tests/general/CMakeLists.gl.txt b/tests/general/CMakeLists.gl.txt index 3a46fb0..ceec9f0 100644 --- a/tests/general/CMakeLists.gl.txt +++ b/tests/general/CMakeLists.gl.txt @@ -99,14 +99,6 @@ piglit_add_executable (read-front read-front.c) piglit_add_executable (readpix-z readpix-z.c) piglit_add_executable (roundmode-getintegerv roundmode-getintegerv.c) piglit_add_executable (roundmode-pixelstore roundmode-pixelstore.c) -piglit_add_executable (scissor-bitmap scissor-bitmap.c) -piglit_add_executable (scissor-clear scissor-clear.c) -piglit_add_executable (scissor-copypixels scissor-copypixels.c) -piglit_add_executable (scissor-depth-clear scissor-depth-clear.c) -piglit_add_executable (scissor-many scissor-many.c) -piglit_add_executable (scissor-offscreen scissor-offscreen.c) -piglit_add_executable (scissor-polygon scissor-polygon.c) -piglit_add_executable (scissor-stencil-clear scissor-stencil-clear.c) piglit_add_executable (select select.c) piglit_add_executable (stencil-drawpixels stencil-drawpixels.c) piglit_add_executable (stencil-twoside stencil-twoside.c) diff --git a/tests/spec/gl-1.0/CMakeLists.gl.txt b/tests/spec/gl-1.0/CMakeLists.gl.txt index 219b9b1..e79f0cb 100644 --- a/tests/spec/gl-1.0/CMakeLists.gl.txt +++ b/tests/spec/gl-1.0/CMakeLists.gl.txt @@ -29,6 +29,14 @@ piglit_add_executable (gl-1.0-rastercolor rastercolor.c) piglit_add_executable (gl-1.0-readpixsanity readpix.c) piglit_add_executable (gl-1.0-readpixels-oob readpixels-oob.c) piglit_add_executable (gl-1.0-rendermode-feedback rendermode-feedback.c) +piglit_add_executable (gl-1.0-scissor-bitmap scissor-bitmap.c) +piglit_add_executable (gl-1.0-scissor-clear scissor-clear.c) +piglit_add_executable (gl-1.0-scissor-copypixels scissor-copypixels.c) +piglit_add_executable (gl-1.0-scissor-depth-clear scissor-depth-clear.c) +piglit_add_executable (gl-1.0-scissor-many scissor-many.c) +piglit_add_executable (gl-1.0-scissor-offscreen scissor-offscreen.c) +piglit_add_executable (gl-1.0-scissor-polygon scissor-polygon.c) +piglit_add_executable (gl-1.0-scissor-stencil-clear scissor-stencil-clear.c) piglit_add_executable (gl-1.0-simple-readbuffer simple-readbuffer.c) piglit_add_executable
[Piglit] [PATCH 4/5] gl-1.0: Run scissor tests concurrently.
--- tests/all.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/all.py b/tests/all.py index 276f5a8..a57256f 100644 --- a/tests/all.py +++ b/tests/all.py @@ -963,14 +963,14 @@ with profile.group_manager( g(['gl-1.0-logicop']) g(['gl-1.0-no-op-paths']) g(['gl-1.0-simple-readbuffer']) -g(['gl-1.0-scissor-bitmap'], run_concurrent=False) -g(['gl-1.0-scissor-clear'], run_concurrent=False) -g(['gl-1.0-scissor-copypixels'], run_concurrent=False) -g(['gl-1.0-scissor-depth-clear'], run_concurrent=False) -g(['gl-1.0-scissor-many'], run_concurrent=False) -g(['gl-1.0-scissor-offscreen'], run_concurrent=False) +g(['gl-1.0-scissor-bitmap']) +g(['gl-1.0-scissor-clear']) +g(['gl-1.0-scissor-copypixels']) +g(['gl-1.0-scissor-depth-clear']) +g(['gl-1.0-scissor-many']) +g(['gl-1.0-scissor-offscreen']) g(['gl-1.0-scissor-polygon']) -g(['gl-1.0-scissor-stencil-clear'], run_concurrent=False) +g(['gl-1.0-scissor-stencil-clear']) with profile.group_manager( PiglitGLTest, -- 2.7.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] general: Correct some @file names.
On Thu, Sep 1, 2016 at 12:01 AM, Pekka Paalanen <ppaala...@gmail.com> wrote: > On Wed, 31 Aug 2016 13:05:31 -0700 > Matt Turner <matts...@gmail.com> wrote: > >> --- >> tests/general/scissor-depth-clear.c | 2 +- >> tests/general/scissor-many.c| 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/tests/general/scissor-depth-clear.c >> b/tests/general/scissor-depth-clear.c >> index 9832270..b07e2e8 100644 >> --- a/tests/general/scissor-depth-clear.c >> +++ b/tests/general/scissor-depth-clear.c >> @@ -25,7 +25,7 @@ >> * >> */ >> >> -/** @file scissor-copypixels.c >> +/** @file scissor-depth-clear.c >> * >> * Tests that glScissor properly affects glClear(GL_DEPTH_BUFFER_BIT). >> */ >> diff --git a/tests/general/scissor-many.c b/tests/general/scissor-many.c >> index 17eb232..9892b6f 100644 >> --- a/tests/general/scissor-many.c >> +++ b/tests/general/scissor-many.c >> @@ -25,7 +25,7 @@ >> * >> */ >> >> -/** @file many-scissors.c >> +/** @file scissors-many.c >> * >> * Tests drawing to each individual pixel in the drawable using glScissor. >> * > > Hi, > > why not simply remove the file name from the @file command? > > "If the file name is omitted (i.e. the line after \file is left blank) > then the documentation block that contains the \file command will > belong to the file it is located in." Thanks. I wasn't aware of that. I'll send a new patch. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] general: Add a scissored depth clear test that uses negative x, y scissors.
On Wed, Aug 31, 2016 at 2:21 PM, Dylan Baker <dy...@pnwbakers.com> wrote: > Quoting Matt Turner (2016-08-31 13:05:32) >> --- >> tests/general/CMakeLists.gl.txt | 1 + >> tests/general/scissor-depth-clear-negative-xy.c | 104 >> >> 2 files changed, 105 insertions(+) >> create mode 100644 tests/general/scissor-depth-clear-negative-xy.c > > Presumably add this to all.py as well. Doh. Thanks. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] general: Add a scissored depth clear test that uses negative x, y scissors.
--- tests/general/CMakeLists.gl.txt | 1 + tests/general/scissor-depth-clear-negative-xy.c | 104 2 files changed, 105 insertions(+) create mode 100644 tests/general/scissor-depth-clear-negative-xy.c diff --git a/tests/general/CMakeLists.gl.txt b/tests/general/CMakeLists.gl.txt index 3a46fb0..a5badb9 100644 --- a/tests/general/CMakeLists.gl.txt +++ b/tests/general/CMakeLists.gl.txt @@ -103,6 +103,7 @@ piglit_add_executable (scissor-bitmap scissor-bitmap.c) piglit_add_executable (scissor-clear scissor-clear.c) piglit_add_executable (scissor-copypixels scissor-copypixels.c) piglit_add_executable (scissor-depth-clear scissor-depth-clear.c) +piglit_add_executable (scissor-depth-clear-negative-xy scissor-depth-clear-negative-xy.c) piglit_add_executable (scissor-many scissor-many.c) piglit_add_executable (scissor-offscreen scissor-offscreen.c) piglit_add_executable (scissor-polygon scissor-polygon.c) diff --git a/tests/general/scissor-depth-clear-negative-xy.c b/tests/general/scissor-depth-clear-negative-xy.c new file mode 100644 index 000..47202ca --- /dev/null +++ b/tests/general/scissor-depth-clear-negative-xy.c @@ -0,0 +1,104 @@ +/* + * Copyright © 2009, 2016 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. + * + * Authors: + *Eric Anholt <e...@anholt.net> + *Matt Turner <matts...@gmail.com> + * + */ + +/** @file scissor-depth-clear-negative-xy.c + * + * Tests that glScissor properly affects glClear(GL_DEPTH_BUFFER_BIT) when + * x or y is negative. + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 10; + + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL; + +PIGLIT_GL_TEST_CONFIG_END + +enum piglit_result +piglit_display(void) +{ + GLboolean pass = GL_TRUE; + static float green[] = {0.0, 1.0, 0.0, 0.0}; + static float blue[] = {0.0, 0.0, 1.0, 0.0}; + + /* whole window green -- depth fail will be this. */ + glClearColor(0.0, 1.0, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + /* Clear depth to 0 (fail) */ + glClearDepth(0.0); + glClear(GL_DEPTH_BUFFER_BIT); + + /* Clear depth quad the size of the fb at -16, -16 to be drawn blue. */ + glEnable(GL_SCISSOR_TEST); + glScissor(-16, -16, piglit_width, piglit_height); + glClearDepth(1.0); + glClear(GL_DEPTH_BUFFER_BIT); + + /* Now draw a quad midway between 0.0 and 1.0 depth so only that +* scissored depth clear will get rasterized. +*/ + glEnable(GL_DEPTH_TEST); + glDisable(GL_SCISSOR_TEST); + glDepthFunc(GL_LESS); + glColor4fv(blue); + piglit_draw_rect(0, 0, piglit_width, piglit_height); + + pass &= piglit_probe_rect_rgb(0, 0, piglit_width - 16, piglit_height - 16, blue); + + pass &= piglit_probe_rect_rgb(piglit_width - 16, 0, 16, piglit_height, green); + pass &= piglit_probe_rect_rgb(0, piglit_height - 16, piglit_width - 16, 16, green); + + piglit_present_results(); + + return pass ? PIGLIT_PASS : PIGLIT_FAIL; +} + + +static void reshape(int width, int height) +{ + piglit_width = width; + piglit_height = height; + + glViewport(0, 0, width, height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glOrtho(0.0, width, 0.0, height, -1.0, 1.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +void +piglit_init(int argc, char **argv) +{ + reshape(piglit_width, piglit_height); +} -- 2.7.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] general: Correct some @file names.
--- tests/general/scissor-depth-clear.c | 2 +- tests/general/scissor-many.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/general/scissor-depth-clear.c b/tests/general/scissor-depth-clear.c index 9832270..b07e2e8 100644 --- a/tests/general/scissor-depth-clear.c +++ b/tests/general/scissor-depth-clear.c @@ -25,7 +25,7 @@ * */ -/** @file scissor-copypixels.c +/** @file scissor-depth-clear.c * * Tests that glScissor properly affects glClear(GL_DEPTH_BUFFER_BIT). */ diff --git a/tests/general/scissor-many.c b/tests/general/scissor-many.c index 17eb232..9892b6f 100644 --- a/tests/general/scissor-many.c +++ b/tests/general/scissor-many.c @@ -25,7 +25,7 @@ * */ -/** @file many-scissors.c +/** @file scissors-many.c * * Tests drawing to each individual pixel in the drawable using glScissor. * -- 2.7.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 00/11] Add tests for MESA_shader_integer_functions
The series is Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 4/4] generators/gen_extensions_defined.py: fix ARB_gpu_shader5
All four are Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_shading_language_420pack: Make compatible with 4.30.
4.30 removes gl_FragColor. In debugging bug 96320, I found it useful to replace gl_FragColor with a user-defined varying so that the tests could be run under GLSL 4.30. --- .../execution/aggregate-dynamic-initializer-matrix.shader_test | 3 ++- .../execution/aggregate-dynamic-initializer-sized-array.shader_test | 3 ++- .../execution/aggregate-dynamic-initializer-struct.shader_test | 3 ++- .../aggregate-dynamic-initializer-unsized-array.shader_test | 3 ++- .../execution/aggregate-initializer-matrix.shader_test | 3 ++- .../execution/aggregate-initializer-sized-array.shader_test | 3 ++- .../execution/aggregate-initializer-struct.shader_test | 3 ++- .../execution/aggregate-initializer-unsized-array.shader_test | 3 ++- .../execution/const-var-non-constant-expr.shader_test | 3 ++- .../execution/implicit-return-type-conversion.shader_test | 4 +++- .../execution/length-matrix.shader_test | 6 -- .../execution/length-vector.shader_test | 6 -- .../execution/scalar-swizzle.shader_test| 4 +++- 13 files changed, 32 insertions(+), 15 deletions(-) diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test index 7b923e8..478767e 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test @@ -44,9 +44,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test index 8191ceb..deb9bbd 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test @@ -51,9 +51,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test index a04a2fa..0fce9c6 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test @@ -73,9 +73,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test index 5300f49..8f6d5c1 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test @@ -53,9 +53,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test index f5da4c9..bb6a543 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test @@ -39,9 +39,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test index 5ac422d..df28262 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test @@ -47,9 +47,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +
Re: [Piglit] [PATCH] Delete spec/glsl-1.10/compiler/literals/invalid-float-suffix-*.vert.
Acked-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] multisample/formats: Check for spec-complient integer resolves
width, 0, > + pattern_width * 2, pattern_height, > + GL_COLOR_BUFFER_BIT, GL_NEAREST); > + } else { > + /* Draw test and reference images, and read them into memory > */ > + test_renderer.set_piglit_tolerance(); > + ref_renderer.draw(); > + float *ref_image = ref_renderer.read_image(GL_RGBA); > + > + /* Compute the expected image from the reference image */ > + float *expected_image = > + compute_expected_image(ref_image, > + format->base_internal_format); > + > + /* Check that the test image was correct */ > + unsigned num_components = > + piglit_num_components(format->base_internal_format); > + float tolerance[4]; > + piglit_compute_probe_tolerance(format->base_internal_format, > + tolerance); > + pass = piglit_compare_images_color(0, 0, pattern_width, > + pattern_height, > + num_components, tolerance, > + expected_image, > test_image); > + > + > + /* Show both the test and expected images on screen so that > +* the user can diagnose problems. Pass image_count = 0 to > +* display image without any offset applied to raster > position. > +*/ > + glViewport(0, 0, piglit_width, piglit_height); > + piglit_visualize_image(test_image, > format->base_internal_format, > + pattern_width, pattern_height, > + 0 /* image_count */, > + false /* rhs */); > + piglit_visualize_image(expected_image, > + format->base_internal_format, > + pattern_width, pattern_height, > + 0 /* image_count */, > + true /* rhs */); > + > + free(ref_image); > + free(expected_image); > + } > > /* Finally, if any error occurred, count that as a failure. */ > pass = piglit_check_gl_error(GL_NO_ERROR) && pass; > > free(test_image); > - free(ref_image); > - free(expected_image); > > return pass ? PIGLIT_PASS : PIGLIT_FAIL; > } > @@ -613,13 +710,30 @@ piglit_init(int argc, char **argv) > > fbo_formats_init_test_set(test_set, > GL_TRUE /* print_options */); > + > + bool is_integer = (test_sets[test_index].basetype == GL_INT); > + > test_pattern_vec4 = new ColorGradientSunburst(GL_UNSIGNED_NORMALIZED); > test_pattern_vec4->compile(); > - if (piglit_get_gl_version() >= 30) { > + if (is_integer) { > + piglit_require_gl_version(30); > + piglit_require_extension("GL_ARB_texture_multisample"); > + > test_pattern_ivec4 = new ColorGradientSunburst(GL_INT); > test_pattern_ivec4->compile(); > test_pattern_uvec4 = new > ColorGradientSunburst(GL_UNSIGNED_INT); > test_pattern_uvec4->compile(); > + > + int_resolve_check.prog = > + piglit_build_simple_program(int_resolve_check_vs, > + int_resolve_check_fs); > + glUseProgram(int_resolve_check.prog); > + int_resolve_check.u_resolve = > + glGetUniformLocation(int_resolve_check.prog, > "resolve"); > + int_resolve_check.u_msaa = > + glGetUniformLocation(int_resolve_check.prog, "msaa"); > + int_resolve_check.u_samples = > + glGetUniformLocation(int_resolve_check.prog, > "samples"); > } > } > > -- Both are Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/8] shader_runner: support integer textures
On Wed, Apr 6, 2016 at 6:10 PM, Nicolai Hähnlewrote: > From: Nicolai Hähnle > > --- > tests/shaders/shader_runner.c | 17 + > tests/util/piglit-util-gl.c | 35 +++ > tests/util/piglit-util-gl.h | 1 + > 3 files changed, 53 insertions(+) > > diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c > index 8d2a9bd..206258c 100644 > --- a/tests/shaders/shader_runner.c > +++ b/tests/shaders/shader_runner.c > @@ -3102,6 +3102,23 @@ piglit_display(void) > GL_UNSIGNED_NORMALIZED); > if (!piglit_is_core_profile) > glEnable(GL_TEXTURE_2D); > + } else if (sscanf(line, "texture integer %d ( %d", , ) > == 2) { > + GLenum int_fmt; > + int b, a; > + int num_scanned = > + sscanf(line, > + "texture integer %d ( %d , %d ) ( %d, > %d ) %31s", > + , , , , , s); > + if (num_scanned < 6) { > + fprintf(stderr, > + "invalid texture integer command!\n"); > + piglit_report_result(PIGLIT_FAIL); > + } > + > + int_fmt = piglit_get_gl_enum_from_name(s); > + > + glActiveTexture(GL_TEXTURE0 + tex); > + piglit_integer_texture(int_fmt, w, h, b, a); > } else if (sscanf(line, "texture miptree %d", ) == 1) { > glActiveTexture(GL_TEXTURE0 + tex); > piglit_miptree_texture(); > diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c > index dbdfb13..e8a47c5 100644 > --- a/tests/util/piglit-util-gl.c > +++ b/tests/util/piglit-util-gl.c > @@ -2494,6 +2494,41 @@ piglit_rgbw_texture(GLenum internalFormat, int w, int > h, GLboolean mip, > } > > /** > + * Generates a texture with the given integer internal format. > + * Pixel data will be filled as R = x, G = y, B = b, A = a. > + */ > +GLuint piglit_integer_texture(GLenum internalFormat, int w, int h, int b, > int a) Returns GLuint, but there's no return in the function, and the call site doesn't use the result. I think you meant to make this void. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] arb_gpu_shader5: Test ldexp(0.0f, non-zero-exp).
--- .../execution/built-in-functions/fs-ldexp.shader_test | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-ldexp.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-ldexp.shader_test index 0b07b2b..785eee5 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-ldexp.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-ldexp.shader_test @@ -47,6 +47,13 @@ uniform ivec4 given_exponent 0 0 0 0 draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 +# Basic tests with x = 0. +uniform vec4 expected_float 0.0 0.0 0.0 0.0 +uniform vec4 given_float 0.0 0.0 0.0 0.0 +uniform ivec4 given_exponent 1 100 -1 -100 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 + # Basic tests. uniform vec4 expected_float 0.49 1.0 25.0 100 uniform vec4 given_float 0.98 0.5 0.78125 0.78125 -- 2.7.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] version-mixing: gl_FragColor built-in is not available in core profile >= 4.20
On Tue, Apr 12, 2016 at 6:00 PM, Nicolai Hähnlewrote: > From: Nicolai Hähnle > > ... so just use an explicit out declaration unconditionally for such versions. > --- > tests/shaders/version-mixing.c | 25 - > 1 file changed, 24 insertions(+), 1 deletion(-) > > diff --git a/tests/shaders/version-mixing.c b/tests/shaders/version-mixing.c > index 1948c9e..b349d46 100644 > --- a/tests/shaders/version-mixing.c > +++ b/tests/shaders/version-mixing.c > @@ -104,6 +104,24 @@ static const char *interstage_fs = > " gl_FragColor = vec4(0.0);\n" > "}\n"; > > +/* Section 1.2.1 (Summary of Changes from Version 4.10) of the OpenGL > + * Shading Language 4.20 spec says: > + * > + * Move these previously deprecated features to be only in the > + * compatibility profile: > + * ... > + * * The built-in variabls gl_FragColor and gl_FragData. Typo: variables ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] getteximage-formats: Add option to clear texture before rendering
On Thu, Feb 11, 2016 at 9:11 AM, Topi Pohjolainenwrote: > Demonstrates a bug in Intel color resolve logic. If rendering to > texture is preceded by fast clear subsequent reads from the > texture require the underlying color buffer to be resolved. In > case of mipmap generation Intel driver needs to reallocate the > underlying buffer to fit the subsequent levels. However, copy of > the original level zero to newly allocated buffer is delayed until > the driver is about to generate level one using level zero as > source. This causes a color resolve of the original level zero. > Both the generation of level one and the resolve are meta > operations, and the latter will interfere with the sampler > settings of the former. > > Signed-off-by: Topi Pohjolainen > CC: Ian Romanick > --- > tests/all.py | 1 + > tests/texturing/getteximage-formats.c | 16 +--- > 2 files changed, 14 insertions(+), 3 deletions(-) > > diff --git a/tests/all.py b/tests/all.py > index 2912d1f..8938bfc 100644 > --- a/tests/all.py > +++ b/tests/all.py > @@ -2987,6 +2987,7 @@ with profile.group_manager( > g(['fbo-storage-completeness']) > g(['fbo-storage-formats']) > g(['getteximage-formats', 'init-by-rendering']) > +g(['getteximage-formats', 'init-by-clear-and-render']) > g(['ext_framebuffer_multisample-fast-clear', 'single-sample'], >'fbo-fast-clear') > add_fbo_stencil_tests(g, 'GL_STENCIL_INDEX1') > diff --git a/tests/texturing/getteximage-formats.c > b/tests/texturing/getteximage-formats.c > index 715d5df..320683f 100644 > --- a/tests/texturing/getteximage-formats.c > +++ b/tests/texturing/getteximage-formats.c > @@ -50,6 +50,7 @@ static const char *TestName = "getteximage-formats"; > static const GLfloat clearColor[4] = { 0.4, 0.4, 0.4, 0.0 }; > static GLuint texture_id; > static GLboolean init_by_rendering; > +static GLboolean init_by_clearing_first; > > #define TEX_SIZE 128 > > @@ -83,7 +84,7 @@ make_texture_image(GLenum intFormat, GLubyte > upperRightTexel[4]) > > memcpy(upperRightTexel, tex[TEX_SIZE-1][TEX_SIZE-1], 4); > > - if (init_by_rendering) { > + if (init_by_rendering || init_by_clearing_first) { > /* Initialize the mipmap levels. */ > for (i = TEX_SIZE, j = 0; i; i >>= 1, j++) { > glTexImage2D(GL_TEXTURE_2D, j, intFormat, i, i, 0, > @@ -102,6 +103,11 @@ make_texture_image(GLenum intFormat, GLubyte > upperRightTexel[4]) > return GL_FALSE; > } > > + if (init_by_clearing_first) { > + glClearColor(1, 0, 0, 1); > + glClear(GL_COLOR_BUFFER_BIT); > + } > + > glViewport(0, 0, TEX_SIZE, TEX_SIZE); > > glWindowPos2iARB(0, 0); > @@ -365,6 +371,7 @@ test_format(const struct test_desc *test, > GLfloat expected[4], pix[4], tolerance[4]; > GLboolean pass = GL_TRUE; > > + glClearColor(clearColor[0], clearColor[1], clearColor[2], > clearColor[3]); > glClear(GL_COLOR_BUFFER_BIT); > > /* The RGBA_DXT1 formats seem to expose a Mesa/libtxc_dxtn bug. > @@ -536,6 +543,11 @@ piglit_init(int argc, char **argv) > puts("The textures will be initialized by rendering " > "to them using glDrawPixels."); > break; > + } else if (strcmp(argv[i], "init-by-clear-and-render") == 0) { > + init_by_clearing_first = GL_TRUE; > + puts("The textures will be initialized by rendering " > +"to them using glCear and glDrawPixels."); Just noticed the typo in some test output: glCear. Oops. ___ 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älliwrote: > 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, ); > + eglQuerySurface(state->egl_dpy, surf, EGL_HEIGHT, ); > + > + glEnable(GL_TEXTURE_2D); > + > + eglMakeCurrent(state->egl_dpy,
Re: [Piglit] [ANNOUNCE] python 3 is here... and python 2 is staying
On Mon, Feb 8, 2016 at 3:12 PM, Dylan Bakerwrote: > I just pushed patches to hybridize the framework to use either python > 3.3+ or 2.7. > > Everything should keep working as normal. Unless you have python 3.x, > then you'll need to rerun CMake to pick up the changes. There's still a handful of *.py files with #!/usr/bin/env python2: generated_tests/random_ubo-arb_uniform_buffer_object.py:#!/usr/bin/env python2 generated_tests/random_ubo.py:#!/usr/bin/env python2 generated_tests/random_ubo_trim.py:#!/usr/bin/env python2 piglit-print-commands.py:#!/usr/bin/env python2 piglit-resume.py:#!/usr/bin/env python2 piglit-run.py:#!/usr/bin/env python2 piglit-summary-html.py:#!/usr/bin/env python2 piglit-summary.py:#!/usr/bin/env python2 self-tests/test-installed-piglit-script-imports-correct-framework-module:#!/usr/bin/env python2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [Mesa-dev] [PATCH] Add (un)packHalf tests which don't fail on GCN
On Thu, Feb 4, 2016 at 10:50 AM, Marek Olšákwrote: > From: Marek Olšák > > This is a subset of the generated tests which are known to fail > on everything except CPU emulation (AFAIK). > --- This is really awful. Committing a generated test, but with unknown bits chopped out is gross. If it were me, I'd want to understand why my hardware behaved differently -- not just hack up *different* tests and claim victory. FWIW, the generated tests pass on all Intel hardware exposing ARB_shading_language_packing. Gen7+ has native half-float support, and Gen6 uses the lowering code in lower_packing_builtins.cpp to turn the built-ins into a pile of instructions. If you can identify how AMD hardware behaves differently and can prove that the generator needs to be relaxed or something, that's cool. But as is, I hate this patch. I can't find anything in the AMD docs (I looked at GCN3) about half-precision support, so I can't check my theory that AMD hardware rounds towards zero instead of to-nearest/even like Intel. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_enhanced_layouts: tests for duplicate layout identifiers
On Thu, Jan 14, 2016 at 6:32 PM, Timothy Arceri <timothy.arc...@collabora.com> wrote: > Test results: > Nvidia GeForce 840M - NVIDIA 352.41 > > The results from the Nvidia binary are a little all over the place with these > tests, most of the tests with arb_enhanced_layouts enabled fail but > if the GLSL version is changed to 4.20 they pass. > The only tests that pass with arb_enhanced_layouts enabled are the > global tests but that seems to be because they do not detect the duplicates > and fail the negative tests. > > Cc: Matt Turner <matts...@gmail.com> Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH V2] arb_shading_language_420pack: test multiple layout qualifiers on the same line
On Wed, Jan 13, 2016 at 9:45 PM, Timothy Arceriwrote: > While the spec is taking about multiple layout qualifiers we interpret that > to mean layout-qualifier-names can also occur multiple times within > a single layout qualifier. > > In Section 4.4 (Layout Qualifiers) of the GLSL 4.40 spec it clarifies this: > >"More than one layout qualifier may appear in a single declaration. >Additionally, the same layout-qualifier-name can occur multiple times >within a layout qualifier or across multiple layout qualifiers in the >same declaration" > > The results from the Nvidia binary are a little all over the place with these > tests, most of the tests with arb_shading_language_420pack enabled fail but > if the GLSL version is changed to 4.20 they pass. > The only tests that pass with arb_shading_language_420pack enabled are the > global tests but that seems to be because they do not detect the duplicates > and fail the negative tests. > > V2: fix version mismatch in location tests, and prefix variable with out > in global tests > --- You seem to be interpreting this as a clarification on the earlier spec text rather than as a behavioral change based on NVIDIA's acceptance when using #version 420. I don't necessarily agree -- their drivers are known to accept out-of-spec shaders. In fact (as I'm sure you know) ARB_enhanced_layouts, explicitly expands the paragraph cited to contain new text about layout-qualifier-names. I think this indicates an actual behavioral change and not a clarification meant to be applied to earlier shader versions. I think the tests have value, but I think that they should be testing ARB_enhanced_layouts instead of 420pack. > ...e-qualifier-in-single-declaration-420-pack.vert | 22 + > ...ualifier-in-single-declaration-no-420-pack.vert | 21 > ...n-qualifier-in-single-declaration-420-pack.vert | 33 +++ > ...ualifier-in-single-declaration-no-420-pack.vert | 32 ++ > ...iple-stream-in-single-declaration-420-pack.geom | 36 > ...e-stream-in-single-declaration-no-420-pack.geom | 35 > ...ream-in-single-global-declaration-420-pack.geom | 38 > ++ > ...m-in-single-global-declaration-no-420-pack.geom | 37 + > ...e-qualifier-in-single-declaration-420-pack.geom | 25 ++ > ...ualifier-in-single-declaration-no-420-pack.geom | 24 ++ > ...fier-in-single-global-declaration-420-pack.geom | 27 +++ > ...r-in-single-global-declaration-no-420-pack.geom | 37 + > 12 files changed, 367 insertions(+) > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-420-pack.vert > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-no-420-pack.vert > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-420-pack.vert > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-qualifier-in-single-declaration-no-420-pack.vert > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-420-pack.geom > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-declaration-no-420-pack.geom > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-420-pack.geom > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-in-single-global-declaration-no-420-pack.geom > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-420-pack.geom > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-declaration-no-420-pack.geom > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-420-pack.geom > create mode 100644 > tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-stream-multiple-qualifier-in-single-global-declaration-no-420-pack.geom > > diff --git > a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-420-pack.vert > > b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-location-multiple-qualifier-in-single-declaration-420-pack.vert > new file mode 100644 > index 000..9551476 > --- /dev/null > +++ >
[Piglit] Ideas for testing ARB_shader_group_vote?
I think I've finished the implementation of ARB_shader_group_vote [1] for i965/fs [2], but I haven't come up with any ideas for testing it. Please give me some ideas. :) [1] https://www.opengl.org/registry/specs/ARB/shader_group_vote.txt [2] git://people.freedesktop.org/~mattst88/mesa arb_shader_group_vote ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_gpu_shader5: Test corner cases of bitfieldInsert/bitfieldExtract.
--- The previous submission had some things commented out by mistake, and incorrectly tested that for = 32, = 0 that bitfieldInsert() returned instead of . .../fs-bitfieldExtract.shader_test | 18 +- .../fs-bitfieldInsert.shader_test | 22 -- .../vs-bitfieldExtract.shader_test | 18 +- .../vs-bitfieldInsert.shader_test | 20 +++- 4 files changed, 73 insertions(+), 5 deletions(-) diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test index 2912a69..67d7a34 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test @@ -46,7 +46,7 @@ vertex/float/2 [test] # Corner case: bits == 0 -> result == 0 uniform int bits 0 -uniform int offset 0 +uniform int offset 32 uniform int test_signed 1 uniform ivec4 iextract 0 0 0 0 @@ -107,3 +107,19 @@ uniform uvec4 uextract 0xF 0x0 0x1 0x3 uniform uvec4 uinput 0x000F 0xF000 0x0001C000 0x00038000 draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 + +# Copy the whole integer +uniform int bits 32 +uniform int offset 0 + +uniform int test_signed 1 +uniform ivec4 iextract 3203386110 3735928559 2343432205 3741239934 +uniform ivec4 iinput 3203386110 3735928559 2343432205 3741239934 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform int test_signed 0 +uniform uvec4 uextract 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +uniform uvec4 uinput 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test index f0e7ab9..67add07 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test @@ -48,7 +48,7 @@ vertex/float/2 [test] # Corner case: bits == 0 -> result == base uniform int bits 0 -uniform int offset 0 +uniform int offset 32 uniform int test_signed 1 uniform ivec4 iinsert 2147483647 15 7 3 @@ -64,7 +64,7 @@ uniform uvec4 uresult 42 56 72 97 draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 -# Test overwriting set bits in . +## Test overwriting set bits in . uniform int bits 4 uniform int offset 16 @@ -107,3 +107,21 @@ uniform uvec4 ubase 0xF 0xF 0xF 0xF uniform uvec4 uresult 0x000E000F 0x0009000F 0x0004000F 0x0001000F draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 + +# Copy the whole integer +uniform int bits 32 +uniform int offset 0 + +uniform int test_signed 1 +uniform ivec4 iinsert 3203386110 3735928559 2343432205 3741239934 +uniform ivec4 ibase 0 0 0 0 +uniform ivec4 iresult 3203386110 3735928559 2343432205 3741239934 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform int test_signed 0 +uniform uvec4 uinsert 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +uniform uvec4 ubase 0 0 0 0 +uniform uvec4 uresult 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test index 10ce5a0..35c7fc4 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test @@ -50,7 +50,7 @@ vertex/float/2 [test] # Corner case: bits == 0 -> result == 0 uniform int bits 0 -uniform int offset 0 +uniform int offset 32 uniform int test_signed 1 uniform ivec4 iextract 0 0 0 0 @@ -111,3 +111,19 @@ uniform uvec4 uextract 0xF 0x0 0x1 0x3 uniform uvec4 uinput 0x000F 0xF000 0x0001C000 0x00038000 draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 + +# Copy the whole integer +uniform int bits 32 +uniform int offset 0 + +uniform int test_signed 1 +uniform ivec4 iextract 3203386110 3735928559 2343432205 3741239934 +uniform ivec4 iinput 3203386110 3735928559 2343432205 3741239934 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform int test_signed 0 +uniform uvec4 uextract 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +uniform uvec4 uinput 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test
[Piglit] [PATCH] arb_gpu_shader5: Test corner cases of bitfieldInsert/bitfieldExtract.
--- .../fs-bitfieldExtract.shader_test | 18 +- .../built-in-functions/fs-bitfieldInsert.shader_test | 20 +++- .../vs-bitfieldExtract.shader_test | 18 +- .../built-in-functions/vs-bitfieldInsert.shader_test | 20 +++- 4 files changed, 72 insertions(+), 4 deletions(-) diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test index 2912a69..67d7a34 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldExtract.shader_test @@ -46,7 +46,7 @@ vertex/float/2 [test] # Corner case: bits == 0 -> result == 0 uniform int bits 0 -uniform int offset 0 +uniform int offset 32 uniform int test_signed 1 uniform ivec4 iextract 0 0 0 0 @@ -107,3 +107,19 @@ uniform uvec4 uextract 0xF 0x0 0x1 0x3 uniform uvec4 uinput 0x000F 0xF000 0x0001C000 0x00038000 draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 + +# Copy the whole integer +uniform int bits 32 +uniform int offset 0 + +uniform int test_signed 1 +uniform ivec4 iextract 3203386110 3735928559 2343432205 3741239934 +uniform ivec4 iinput 3203386110 3735928559 2343432205 3741239934 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform int test_signed 0 +uniform uvec4 uextract 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +uniform uvec4 uinput 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test index f0e7ab9..dbd8ffa 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-bitfieldInsert.shader_test @@ -48,7 +48,7 @@ vertex/float/2 [test] # Corner case: bits == 0 -> result == base uniform int bits 0 -uniform int offset 0 +uniform int offset 32 uniform int test_signed 1 uniform ivec4 iinsert 2147483647 15 7 3 @@ -107,3 +107,21 @@ uniform uvec4 ubase 0xF 0xF 0xF 0xF uniform uvec4 uresult 0x000E000F 0x0009000F 0x0004000F 0x0001000F draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 + +# Copy the whole integer +uniform int bits 32 +uniform int offset 0 + +uniform int test_signed 1 +uniform ivec4 iinsert 0 0 0 0 +uniform ivec4 ibase 3203386110 3735928559 2343432205 3741239934 +uniform ivec4 iresult 3203386110 3735928559 2343432205 3741239934 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 +# +#uniform int test_signed 0 +#uniform uvec4 uinsert 0 0 0 0 +#uniform uvec4 ubase 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +#uniform uvec4 uresult 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +#draw arrays GL_TRIANGLE_FAN 0 4 +#probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test index 10ce5a0..35c7fc4 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldExtract.shader_test @@ -50,7 +50,7 @@ vertex/float/2 [test] # Corner case: bits == 0 -> result == 0 uniform int bits 0 -uniform int offset 0 +uniform int offset 32 uniform int test_signed 1 uniform ivec4 iextract 0 0 0 0 @@ -111,3 +111,19 @@ uniform uvec4 uextract 0xF 0x0 0x1 0x3 uniform uvec4 uinput 0x000F 0xF000 0x0001C000 0x00038000 draw arrays GL_TRIANGLE_FAN 0 4 probe all rgba 0.0 1.0 0.0 1.0 + +# Copy the whole integer +uniform int bits 32 +uniform int offset 0 + +uniform int test_signed 1 +uniform ivec4 iextract 3203386110 3735928559 2343432205 3741239934 +uniform ivec4 iinput 3203386110 3735928559 2343432205 3741239934 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 + +uniform int test_signed 0 +uniform uvec4 uextract 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +uniform uvec4 uinput 0xBEEFCAFE 0xDEADBEEF 0x8BADF00D 0xDEFECA7E +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test index f4ccae6..56af3b4 100644 --- a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-bitfieldInsert.shader_test @@ -52,7 +52,7 @@ vertex/float/2 [test] # Corner case: bits == 0 -> result == base uniform int bits 0 -uniform int offset 0
Re: [Piglit] [PATCH 0/4] Clean ups that were sitting in my tree
This series is also Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/5] ext_texture_array: Allow compressed test to run with GL_EXT_texture_compression_dxt1
This series is Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es-3.00: Verify various UTF-8 clarifications from Khronos
On Wed, Dec 2, 2015 at 8:42 AM, Ian Romanick <i...@freedesktop.org> wrote: > From: Ian Romanick <ian.d.roman...@intel.com> > > Further discussion in Khronos has determined that UTF-8 in unused > preprocessor defines as well. > > See Khronos internal bug #14939. > > Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> > --- > .../glsl-es-3.00/compiler/utf8-unused-define.vert | 26 + > .../glsl-es-3.00/compiler/utf8-used-define.vert| 27 > ++ > 2 files changed, 53 insertions(+) > create mode 100644 tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert > create mode 100644 tests/spec/glsl-es-3.00/compiler/utf8-used-define.vert > > diff --git a/tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert > b/tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert > new file mode 100644 > index 000..69cde74 > --- /dev/null > +++ b/tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert > @@ -0,0 +1,26 @@ > +#version 300 es > + > +/* [config] I was surprised to see #version before the [config] block, but we do seem to do that some other places (but basically only in ES tests...) Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v4] glsl-4.50: add a test for helper invocations
On Tue, Nov 24, 2015 at 11:27 PM, Matt Turner <matts...@gmail.com> wrote: > On Thu, Nov 12, 2015 at 2:55 PM, Glenn Kennard <glenn.kenn...@gmail.com> > wrote: >> Tested on r600g implementation >> >> Signed-off-by: Glenn Kennard <glenn.kenn...@gmail.com> >> --- > > I used this to test the i965 implementation as well. Please push it. I've now pushed it. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v4] glsl-4.50: add a test for helper invocations
On Thu, Nov 12, 2015 at 2:55 PM, Glenn Kennardwrote: > Tested on r600g implementation > > Signed-off-by: Glenn Kennard > --- I used this to test the i965 implementation as well. Please push it. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/6] shader_runner: Don't call glDeleteProgram on an ARB program.
On Wed, Nov 11, 2015 at 4:53 PM, Kenneth Graunke <kenn...@whitecape.org> wrote: > On Tuesday, November 10, 2015 10:46:19 PM Matt Turner wrote: >> I don't feel good about this check, but it is done elsewhere in the same >> file ("prog == 0"). >> --- >> tests/shaders/shader_runner.c | 8 ++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c >> index 4597b46..bb17381 100644 >> --- a/tests/shaders/shader_runner.c >> +++ b/tests/shaders/shader_runner.c >> @@ -3081,8 +3081,12 @@ piglit_display(void) >> if (piglit_automatic) { >> free_subroutine_uniforms(); >> /* Free our resources, useful for valgrinding. */ >> - glDeleteProgram(prog); >> - glUseProgram(0); >> + if (prog != 0) { >> + glDeleteProgram(prog); >> + glUseProgram(0); >> + } else { >> + glDeleteProgramsARB(1, ); >> + } >> } >> >> return pass ? PIGLIT_PASS : PIGLIT_FAIL; >> > > Wow. Nasty. > > Both link_and_use_shaders() [GLSL] and compile_and_bind_program() [ARB] > set prog to a non-zero value. So at first glance this seems utterly bunk. > However, compile_and_bind_program() creates a local "GLuint prog" variable > that shadows the global one, so it never actually sets this. Heh. > > I was about to say this was correct. > > However, I don't see anything actually initializing the global prog > variable to 0...so won't this be using an uninitialized value? (As > would the existing code you patterned this after?) Sorry for the late reply -- I apparently didn't read your reply carefully enough initially. Globals in C are automatically initialized to 0. Given that, I think this is okay. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/6] shader_runner: Check feature support before querying GL_MAX_*.
On Wed, Nov 11, 2015 at 4:47 PM, Kenneth Graunke <kenn...@whitecape.org> wrote: > On Tuesday, November 10, 2015 10:46:18 PM Matt Turner wrote: >> Otherwise, these will generate an error (to be noticed sometime later >> when glGetError() is called), often resulting in a test failure. >> --- >> tests/shaders/shader_runner.c | 18 -- >> 1 file changed, 12 insertions(+), 6 deletions(-) >> >> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c >> index 32ac7bd..4597b46 100644 >> --- a/tests/shaders/shader_runner.c >> +++ b/tests/shaders/shader_runner.c >> @@ -3111,12 +3111,18 @@ piglit_init(int argc, char **argv) >> if (piglit_get_gl_version() >= 32) >> glGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, >> _max_vertex_output_components); >> - glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, >> - _max_fragment_uniform_components); >> - glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, >> - _max_vertex_uniform_components); >> - glGetIntegerv(GL_MAX_VARYING_COMPONENTS, >> - _max_varying_components); >> + if (piglit_get_gl_version() >= 20 || >> + piglit_is_extension_supported("GL_ARB_fragment_shader")) >> + glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, >> + _max_fragment_uniform_components); >> + if (piglit_get_gl_version() >= 20 || >> + piglit_is_extension_supported("GL_ARB_vertex_shader")) >> + glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, >> + _max_vertex_uniform_components); > > Above this, we call piglit_require_GLSL()...it seems like that > ought to be causing us to skip in this case. Maybe we don't > return early enough? We talked about this on IRC, but for the mailing list: The problem is that piglit_require_GLSL() says "all okay" if you have GL 2.0 or (GL_ARB_shader_objects and GL_ARB_shading_language_100), and R200 exposes both of those extensions, even though it doesn't expose the actual extensions you need for shading... ARB_fragment_shader or ARB_vertex_shader. And moreover, since we support fragment program and vertex program shader_tests, we don't actually want to be requiring GLSL anyway. I'll work on sorting that out, but I think t his patch is good as is (with the GL_ARB_geometry_shader4 change). ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.
On Tue, Oct 20, 2015 at 12:16 AM, Juliet Fruwrote: > Hi Brian, > > I have been working on the "gl_Position not written check" > (tests/spec/glsl-1.10/linker/) test from glean to shader_test files. Here is > what I have so far. I'm sure there may be some errors since this test does > not have the fragment shader aspects. I am not very familiar with > shader_test files. I will appreciate if you could correct this sample test > so I could submit the patch and move on to the others. Hi Juliet, I was going to port the fragment/vertex program (tfragprog1.cpp, tvertprog1.cpp) tests in glean to regular shader_test files, but I don't want to collide with anything you're doing. I haven't seen anything from you in more than three weeks, so I think your project might be complete? Can you confirm your status? Thanks, Matt ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] ext_texture_swizzle: remove requirement for GL_ARB_texture_rg
Reviewed-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/6] shader_runner: Check feature support before querying GL_MAX_*.
On Wed, Nov 11, 2015 at 6:44 AM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Wed, Nov 11, 2015 at 1:46 AM, Matt Turner <matts...@gmail.com> wrote: >> Otherwise, these will generate an error (to be noticed sometime later >> when glGetError() is called), often resulting in a test failure. >> --- >> tests/shaders/shader_runner.c | 18 -- >> 1 file changed, 12 insertions(+), 6 deletions(-) >> >> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c >> index 32ac7bd..4597b46 100644 >> --- a/tests/shaders/shader_runner.c >> +++ b/tests/shaders/shader_runner.c >> @@ -3111,12 +3111,18 @@ piglit_init(int argc, char **argv) >> if (piglit_get_gl_version() >= 32) >> glGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, >> _max_vertex_output_components); >> - glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, >> - _max_fragment_uniform_components); >> - glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, >> - _max_vertex_uniform_components); >> - glGetIntegerv(GL_MAX_VARYING_COMPONENTS, >> - _max_varying_components); >> + if (piglit_get_gl_version() >= 20 || >> + piglit_is_extension_supported("GL_ARB_fragment_shader")) >> + glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, >> + _max_fragment_uniform_components); >> + if (piglit_get_gl_version() >= 20 || >> + piglit_is_extension_supported("GL_ARB_vertex_shader")) >> + glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, >> + _max_vertex_uniform_components); >> + if (piglit_get_gl_version() >= 30 || >> + piglit_is_extension_supported("GL_EXT_geometry_shader4")) > > I'll admit to not having gone to check the specs, but you almost > certainly mean GL_EXT_gpu_shader4 here, no? I don't think so. I just looked at what defines GL_MAX_VARYING_COMPONENTS{,_EXT} in GL/glext.h and it's GL 3.0 or GL_EXT_geometry_shader4. GL_EXT_geometry_shader4's spec confirms it, and GL_EXT_gpu_shader4 does not define MAX_VARYING_COMPONENTS. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/6] shader_runner: Don't call glDeleteProgram on an ARB program.
I don't feel good about this check, but it is done elsewhere in the same file ("prog == 0"). --- tests/shaders/shader_runner.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 4597b46..bb17381 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -3081,8 +3081,12 @@ piglit_display(void) if (piglit_automatic) { free_subroutine_uniforms(); /* Free our resources, useful for valgrinding. */ - glDeleteProgram(prog); - glUseProgram(0); + if (prog != 0) { + glDeleteProgram(prog); + glUseProgram(0); + } else { + glDeleteProgramsARB(1, ); + } } return pass ? PIGLIT_PASS : PIGLIT_FAIL; -- 2.4.9 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 3/6] arb_vertex_program: Remove unnecessary fragment programs.
These just performed actions the fixed-function processing would have done. Removing them allows these tests to execute on hardware that supports ARB_vertex_program but not ARB_fragment_program (like R200). --- tests/spec/arb_vertex_program/arl.shader_test | 6 -- tests/spec/arb_vertex_program/big-param.shader_test | 6 -- tests/spec/arb_vertex_program/dataflow-bug.shader_test | 6 -- .../vp-arl-constant-array-huge-offset-neg.shader_test | 6 -- .../vp-arl-constant-array-huge-offset.shader_test | 6 -- .../vp-arl-constant-array-huge-overwritten.shader_test | 6 -- .../vp-arl-constant-array-huge-relative-offset.shader_test | 6 -- .../vp-arl-constant-array-huge-varying.shader_test | 6 -- .../spec/arb_vertex_program/vp-arl-constant-array-huge.shader_test | 6 -- .../arb_vertex_program/vp-arl-constant-array-varying.shader_test| 6 -- tests/spec/arb_vertex_program/vp-arl-constant-array.shader_test | 6 -- tests/spec/arb_vertex_program/vp-arl-env-array.shader_test | 6 -- tests/spec/arb_vertex_program/vp-arl-local-array.shader_test| 6 -- tests/spec/arb_vertex_program/vp-arl-neg-array-2.shader_test| 6 -- tests/spec/arb_vertex_program/vp-arl-neg-array.shader_test | 6 -- tests/spec/arb_vertex_program/vp-constant-array-huge.shader_test| 6 -- tests/spec/arb_vertex_program/vp-constant-array.shader_test | 6 -- tests/spec/arb_vertex_program/vp-constant-negate.shader_test| 6 -- tests/spec/arb_vertex_program/vp-exp-alias.shader_test | 6 -- tests/spec/arb_vertex_program/vp-max.shader_test| 6 -- tests/spec/arb_vertex_program/vp-min.shader_test| 6 -- tests/spec/arb_vertex_program/vp-sge-alias.shader_test | 6 -- tests/spec/arb_vertex_program/vp-two-constants.shader_test | 6 -- 23 files changed, 138 deletions(-) diff --git a/tests/spec/arb_vertex_program/arl.shader_test b/tests/spec/arb_vertex_program/arl.shader_test index 5fc3eec..3ee67a7 100644 --- a/tests/spec/arb_vertex_program/arl.shader_test +++ b/tests/spec/arb_vertex_program/arl.shader_test @@ -4,7 +4,6 @@ [require] GL >= 1.3 ARB_vertex_program -ARB_fragment_program [vertex program] !!ARBvp1.0 @@ -17,11 +16,6 @@ ARL A0.x, program.local[2].x; MOVresult.color, p[A0.x]; END -[fragment program] -!!ARBfp1.0 -MOV result.color, fragment.color; -END - [test] ortho 0 1 0 1 parameter local_vp 0 (0.0, 1.0, 0.0, 1.0) diff --git a/tests/spec/arb_vertex_program/big-param.shader_test b/tests/spec/arb_vertex_program/big-param.shader_test index 07da565..3418c86 100644 --- a/tests/spec/arb_vertex_program/big-param.shader_test +++ b/tests/spec/arb_vertex_program/big-param.shader_test @@ -1,7 +1,6 @@ [require] GL >= 1.3 ARB_vertex_program -ARB_fragment_program [vertex program] !!ARBvp1.0 @@ -28,11 +27,6 @@ FLR tmp3.z, tmp2.x; MUL result.color, tmp3, 0.00390625; END -[fragment program] -!!ARBfp1.0 -MOV result.color, fragment.color; -END - [test] ortho 0 1 0 1 parameter local_vp 0 (128.250488281, 0.0, 0.0, 0.0) diff --git a/tests/spec/arb_vertex_program/dataflow-bug.shader_test b/tests/spec/arb_vertex_program/dataflow-bug.shader_test index cf6efec..e38af56 100644 --- a/tests/spec/arb_vertex_program/dataflow-bug.shader_test +++ b/tests/spec/arb_vertex_program/dataflow-bug.shader_test @@ -7,7 +7,6 @@ [require] GL >= 1.3 ARB_vertex_program -ARB_fragment_program [vertex program] !!ARBvp1.0 @@ -28,11 +27,6 @@ MAD ty, tweight.y, t, ty; ADD result.color, tx, ty; END -[fragment program] -!!ARBfp1.0 -MOV result.color, fragment.color; -END - [test] ortho 0 1 0 1 texcoord 0 (-1, 2, 0, 0) diff --git a/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset-neg.shader_test b/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset-neg.shader_test index e65da93..00fed9e 100644 --- a/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset-neg.shader_test +++ b/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset-neg.shader_test @@ -4,7 +4,6 @@ [require] GL >= 1.3 ARB_vertex_program -ARB_fragment_program [vertex program] !!ARBvp1.0 @@ -135,11 +134,6 @@ ARL A0.x, program.local[0].x; MOV result.color, vals[A0.x-1]; END -[fragment program] -!!ARBfp1.0 -MOV result.color, fragment.color; -END - [test] ortho 0 1 0 1 parameter local_vp 0 (1.0, 0.0, 0.0, 0.0) diff --git a/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset.shader_test b/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset.shader_test index 1dc9fee..3ad18d4 100644 --- a/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset.shader_test +++ b/tests/spec/arb_vertex_program/vp-arl-constant-array-huge-offset.shader_test @@ -3,7 +3,6 @@ [require] GL >=
[Piglit] [PATCH 1/6] shader_runner: Check feature support before querying GL_MAX_*.
Otherwise, these will generate an error (to be noticed sometime later when glGetError() is called), often resulting in a test failure. --- tests/shaders/shader_runner.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 32ac7bd..4597b46 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -3111,12 +3111,18 @@ piglit_init(int argc, char **argv) if (piglit_get_gl_version() >= 32) glGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, _max_vertex_output_components); - glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, - _max_fragment_uniform_components); - glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, - _max_vertex_uniform_components); - glGetIntegerv(GL_MAX_VARYING_COMPONENTS, - _max_varying_components); + if (piglit_get_gl_version() >= 20 || + piglit_is_extension_supported("GL_ARB_fragment_shader")) + glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, + _max_fragment_uniform_components); + if (piglit_get_gl_version() >= 20 || + piglit_is_extension_supported("GL_ARB_vertex_shader")) + glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, + _max_vertex_uniform_components); + if (piglit_get_gl_version() >= 30 || + piglit_is_extension_supported("GL_EXT_geometry_shader4")) + glGetIntegerv(GL_MAX_VARYING_COMPONENTS, + _max_varying_components); glGetIntegerv(GL_MAX_CLIP_PLANES, _max_clip_planes); #else glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, -- 2.4.9 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 5/6] util: Remove now unused piglit_ARBfp_pass_through.
--- tests/util/piglit-util-gl.c | 15 +-- tests/util/piglit-util-gl.h | 9 - 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c index 767767d..8dd4c8a 100644 --- a/tests/util/piglit-util-gl.c +++ b/tests/util/piglit-util-gl.c @@ -1950,24 +1950,11 @@ bool piglit_probe_buffer_doubles(GLuint buf, GLenum target, const char *label, return status; } -GLint piglit_ARBfp_pass_through = 0; int piglit_use_fragment_program(void) { - static const char source[] = - "!!ARBfp1.0\n" - "MOVresult.color, fragment.color;\n" - "END\n" - ; - piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); - if (!piglit_is_extension_supported("GL_ARB_fragment_program")) - return 0; - - piglit_ARBfp_pass_through = - piglit_compile_program(GL_FRAGMENT_PROGRAM_ARB, source); - - return (piglit_ARBfp_pass_through != 0); + return piglit_is_extension_supported("GL_ARB_fragment_program"); } void piglit_require_fragment_program(void) diff --git a/tests/util/piglit-util-gl.h b/tests/util/piglit-util-gl.h index f06438a..5a8c82b 100644 --- a/tests/util/piglit-util-gl.h +++ b/tests/util/piglit-util-gl.h @@ -298,15 +298,6 @@ extern const GLenum cube_face_targets[6]; "DP4oPos.z, mvp[2], iPos;\n"\ "DP4oPos.w, mvp[3], iPos;\n" -/** - * Handle to a generic fragment program that passes the input color to output - * - * \note - * Either \c piglit_use_fragment_program or \c piglit_require_fragment_program - * must be called before using this program handle. - */ -extern GLint piglit_ARBfp_pass_through; - static const GLint PIGLIT_ATTRIB_POS = 0; static const GLint PIGLIT_ATTRIB_TEX = 1; -- 2.4.9 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 6/6] arb_vertex_program: Use glGetProgramivARB, not glGetProgramiv.
The rest of the surrounding calls are to the proper ARB functions. --- tests/spec/arb_vertex_program/getlocal4-errors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/spec/arb_vertex_program/getlocal4-errors.c b/tests/spec/arb_vertex_program/getlocal4-errors.c index b2e7103..b2fc3d9 100644 --- a/tests/spec/arb_vertex_program/getlocal4-errors.c +++ b/tests/spec/arb_vertex_program/getlocal4-errors.c @@ -64,8 +64,8 @@ piglit_init(int argc, char **argv) prog = piglit_compile_program(GL_VERTEX_PROGRAM_ARB, source); glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prog); - glGetProgramiv(GL_VERTEX_PROGRAM_ARB, - GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB, _local); + glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, + GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB, _local); /* Check that an error is generated for going beyond max. */ glGetProgramLocalParameterfvARB(GL_VERTEX_PROGRAM_ARB, max_local, -- 2.4.9 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 4/6] shaders: Drop unnecessary fragment programs from vp-address-*.
--- tests/shaders/vp-address-01.c | 3 --- tests/shaders/vp-address-02.c | 3 --- tests/shaders/vp-address-03.c | 3 --- tests/shaders/vp-address-04.c | 3 --- tests/shaders/vp-address-05.c | 3 --- tests/shaders/vp-address-06.c | 3 --- 6 files changed, 18 deletions(-) diff --git a/tests/shaders/vp-address-01.c b/tests/shaders/vp-address-01.c index 09eeed3..be7c1d1 100644 --- a/tests/shaders/vp-address-01.c +++ b/tests/shaders/vp-address-01.c @@ -123,7 +123,6 @@ piglit_init(int argc, char **argv) (void) argv; piglit_require_vertex_program(); - piglit_require_fragment_program(); piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, @@ -161,9 +160,7 @@ piglit_init(int argc, char **argv) shader_source); } - glEnable(GL_FRAGMENT_PROGRAM_ARB); glEnable(GL_VERTEX_PROGRAM_ARB); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, piglit_ARBfp_pass_through); glClearColor(0.5, 0.5, 0.5, 1.0); } diff --git a/tests/shaders/vp-address-02.c b/tests/shaders/vp-address-02.c index 5164ba7..a04cac6 100644 --- a/tests/shaders/vp-address-02.c +++ b/tests/shaders/vp-address-02.c @@ -137,7 +137,6 @@ piglit_init(int argc, char **argv) (void) argv; piglit_require_vertex_program(); - piglit_require_fragment_program(); piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, @@ -196,9 +195,7 @@ piglit_init(int argc, char **argv) shader_source); } - glEnable(GL_FRAGMENT_PROGRAM_ARB); glEnable(GL_VERTEX_PROGRAM_ARB); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, piglit_ARBfp_pass_through); glClearColor(0.5, 0.5, 0.5, 1.0); } diff --git a/tests/shaders/vp-address-03.c b/tests/shaders/vp-address-03.c index 58caeef..88bd259 100644 --- a/tests/shaders/vp-address-03.c +++ b/tests/shaders/vp-address-03.c @@ -115,7 +115,6 @@ piglit_init(int argc, char **argv) (void) argv; piglit_require_vertex_program(); - piglit_require_fragment_program(); piglit_require_extension("GL_NV_vertex_program2_option"); piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); @@ -129,9 +128,7 @@ piglit_init(int argc, char **argv) shader_source); } - glEnable(GL_FRAGMENT_PROGRAM_ARB); glEnable(GL_VERTEX_PROGRAM_ARB); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, piglit_ARBfp_pass_through); glClearColor(0.5, 0.5, 0.5, 1.0); } diff --git a/tests/shaders/vp-address-04.c b/tests/shaders/vp-address-04.c index 14f1e6f..44401dd 100644 --- a/tests/shaders/vp-address-04.c +++ b/tests/shaders/vp-address-04.c @@ -233,7 +233,6 @@ piglit_init(int argc, char **argv) (void) argv; piglit_require_vertex_program(); - piglit_require_fragment_program(); piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, @@ -274,9 +273,7 @@ piglit_init(int argc, char **argv) } } - glEnable(GL_FRAGMENT_PROGRAM_ARB); glEnable(GL_VERTEX_PROGRAM_ARB); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, piglit_ARBfp_pass_through); glClearColor(0.5, 0.5, 0.5, 1.0); } diff --git a/tests/shaders/vp-address-05.c b/tests/shaders/vp-address-05.c index e8dfff6..483b8d7 100644 --- a/tests/shaders/vp-address-05.c +++ b/tests/shaders/vp-address-05.c @@ -118,7 +118,6 @@ piglit_init(int argc, char **argv) (void) argv; piglit_require_vertex_program(); - piglit_require_fragment_program(); piglit_require_extension("GL_NV_vertex_program2_option"); piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); @@ -132,9 +131,7 @@ piglit_init(int argc, char **argv) shader_source); } - glEnable(GL_FRAGMENT_PROGRAM_ARB); glEnable(GL_VERTEX_PROGRAM_ARB); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, piglit_ARBfp_pass_through); glClearColor(0.5, 0.5, 0.5, 1.0); } diff --git a/tests/shaders/vp-address-06.c b/tests/shaders/vp-address-06.c index 23c5ea9..a675351 100644 --- a/tests/shaders/vp-address-06.c +++ b/tests/shaders/vp-address-06.c @@ -117,7 +117,6 @@ piglit_init(int argc, char **argv) (void) argv; piglit_require_vertex_program(); - piglit_require_fragment_program(); piglit_require_extension("GL_NV_vertex_program2_option"); piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); @@ -133,9 +132,7 @@ piglit_init(int argc, char **argv) shader_source); } - glEnable(GL_FRAGMENT_PROGRAM_ARB); glEnable(GL_VERTEX_PROGRAM_ARB); -
Re: [Piglit] [PATCH v1] Porting the OpenGL shading language from Glean to Piglit.
On Wed, Oct 7, 2015 at 1:48 AM, Juliet Fruwrote: > This test replaces the original tglsl1.cpp test > --- > tests/all.py|1 + > tests/spec/gl-1.0/CMakeLists.gl.txt |1 + > tests/spec/gl-1.0/shading-lang.c| 1939 > +++ > 3 files changed, 1941 insertions(+) > create mode 100644 tests/spec/gl-1.0/shading-lang.c I don't like this at all. These tests should become shader_test files -- not just a straight port from glean to the piglit framework. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
On Tue, Oct 6, 2015 at 1:40 PM, Ian Romanick <i...@freedesktop.org> wrote: > On 10/05/2015 07:25 PM, Matt Turner wrote: >> On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanick <i...@freedesktop.org> wrote: >>> From: Ian Romanick <ian.d.roman...@intel.com> >>> >>> The rules changed from GLSL ES 1.00 to GLSL ES 3.00, so the two tests >>> expect opposite results. >>> >>> NOTE: Mesa currently fails >>> tests/spec/glsl-es-3.00/compiler/constant-sequence.vert and the related >>> GLES3 conformance test. >>> >>> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> >>> Cc: Tapani Pälli <tapani.pa...@intel.com> >>> Cc: Mark Janes <mark.a.ja...@intel.com> >>> Cc: Marta Lofstedt <marta.lofst...@intel.com> >>> --- >>> .../glsl-es-1.00/compiler/constant-sequence.vert| 17 + >>> .../glsl-es-3.00/compiler/constant-sequence.vert| 21 >>> + >>> 2 files changed, 38 insertions(+) >>> create mode 100644 tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> create mode 100644 tests/spec/glsl-es-3.00/compiler/constant-sequence.vert >>> >>> diff --git a/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> new file mode 100644 >>> index 000..f57707b >>> --- /dev/null >>> +++ b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> @@ -0,0 +1,17 @@ >>> +#version 100 >>> + >>> +/* [config] >>> + * expect_result: pass >>> + * glsl_version: 1.00 >>> + * [end config] >>> + * >>> + * While the sequnece operator is specifically disallowed as a constant >>> + * expression in GLSL ES 3.0 and later, it is allowed in GLSL ES 1.00. >> >> Yay! More pointless differences that don't actually save anyone any >> work since your compiler has to accept both #versions! > > Well... GLSL 4.30 has the same restriction. Part of the problem was > that, I believe, not all compilers actually supported sequence as > constant expressions, and allowing it means you have to support > > vec4 foo[3, 4]; > > to declare 4 element array... which is both insane and illegal in C. > >> Also typo: sequence > > R-b with that fixed? :) Sure, Reviewed-by: Matt Turner <matts...@gmail.com> (sorry, I wasn't meaning to review, just to complain :) ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanickwrote: > From: Ian Romanick > > The rules changed from GLSL ES 1.00 to GLSL ES 3.00, so the two tests > expect opposite results. > > NOTE: Mesa currently fails > tests/spec/glsl-es-3.00/compiler/constant-sequence.vert and the related > GLES3 conformance test. > > Signed-off-by: Ian Romanick > Cc: Tapani Pälli > Cc: Mark Janes > Cc: Marta Lofstedt > --- > .../glsl-es-1.00/compiler/constant-sequence.vert| 17 + > .../glsl-es-3.00/compiler/constant-sequence.vert| 21 > + > 2 files changed, 38 insertions(+) > create mode 100644 tests/spec/glsl-es-1.00/compiler/constant-sequence.vert > create mode 100644 tests/spec/glsl-es-3.00/compiler/constant-sequence.vert > > diff --git a/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert > b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert > new file mode 100644 > index 000..f57707b > --- /dev/null > +++ b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert > @@ -0,0 +1,17 @@ > +#version 100 > + > +/* [config] > + * expect_result: pass > + * glsl_version: 1.00 > + * [end config] > + * > + * While the sequnece operator is specifically disallowed as a constant > + * expression in GLSL ES 3.0 and later, it is allowed in GLSL ES 1.00. Yay! More pointless differences that don't actually save anyone any work since your compiler has to accept both #versions! Also typo: sequence ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 00/17] Remove dependency on libGLU
On Tue, Sep 22, 2015 at 8:36 AM, Ian Romanick <i...@freedesktop.org> wrote: > I went to build piglit on a fresh Fedora 22 install yesterday, and the > build stopped when libGLU could not be found. I thought, "Why is piglit > linking with libGLU?!?" For the most part, it's linking with libGLU > because it can. Patch 1 fixes that. > > There are six places in piglit that actually use functions from GLU. > The remainder of the series removes these uses. > > - polygon-offset uses gluProject. After a bit of cleaning in patches 2 > through 6, patch 7 replaces gluProject with an inline version. Patch > 8 contains code that was used to verify my implementation of > gluProject. This will *not* be pushed. > > - Several places in clean used gluErrorString. These were replaced in > patch 9 with piglit_get_gl_error_name. > > - Patch 10 replaces a call to gluOrtho2D with glOrtho. Given that > gluOrtho2D just adds two constant parameters "for you," I'm not sure > why this function ever existed in GLU. > > - Patch 11 removes an unused method that called gluBuild2DMipmaps. > > - Patch 12 replaces another call to gluBuild2DMipmaps with > glTexImage2D. The filters on the texture were configured such that > the other mipmaps were not necessary. > > - fbo-depth-sample-compare uses gluSphere to generate a sphere model. > After a bit of cleaning in patches 14 and 15, patch 16 adds a simple > sphere tessellator to replace it. > > With these changes, I was able to build piglit on a Fedora 22 system > that did not have the mesa-libGLU-devel package installed. Nice! I did a quick review and didn't spot any problems. The series, except for patch 16 which I'll trust you on, is Reviewed-by: Matt Turner <matts...@gmail.com> Patch 16 is Acked-by: Matt Turner <matts...@gmail.com> ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 16/17] fbo-depth-sample-compare: Eliminate dependency on gluSphere
On Tue, Sep 22, 2015 at 8:36 AM, Ian Romanickwrote: > From: Ian Romanick > > Signed-off-by: Ian Romanick > --- > tests/fbo/CMakeLists.gl.txt | 1 - > tests/fbo/fbo-depth-sample-compare.c | 141 > +++ > 2 files changed, 125 insertions(+), 17 deletions(-) > > diff --git a/tests/fbo/CMakeLists.gl.txt b/tests/fbo/CMakeLists.gl.txt > index d5c8778..0476b10 100644 > --- a/tests/fbo/CMakeLists.gl.txt > +++ b/tests/fbo/CMakeLists.gl.txt > @@ -8,7 +8,6 @@ include_directories( > link_libraries ( > piglitutil_${piglit_target_api} > ${OPENGL_gl_LIBRARY} > - ${OPENGL_glu_LIBRARY} > ) > > piglit_add_executable (fbo-1d fbo-1d.c) > diff --git a/tests/fbo/fbo-depth-sample-compare.c > b/tests/fbo/fbo-depth-sample-compare.c > index 7d78913..6de07d8 100644 > --- a/tests/fbo/fbo-depth-sample-compare.c > +++ b/tests/fbo/fbo-depth-sample-compare.c > @@ -1,5 +1,6 @@ > /* > * Copyright (c) 2011 VMware, Inc. > + * Copyright © 2015 Intel Corporation > * > * Permission is hereby granted, free of charge, to any person obtaining a > * copy of this software and associated documentation files (the "Software"), > @@ -39,13 +40,6 @@ > #include > #include "piglit-util-gl.h" > > -#if defined(__APPLE__) > -# include > -#else > -# include > -#endif > - > - > /** Set DEBUG to 1 to enable extra output when trying to debug failures */ > #define DEBUG 0 > > @@ -66,7 +60,6 @@ static GLuint ColorTex, DepthTex, FBO; > static GLuint ShaderProg; > static GLint Zbits; > static GLenum TexTarget = GL_TEXTURE_2D; > -static GLUquadricObj *sphereObj = NULL; > > > static void > @@ -237,13 +230,131 @@ find_uint_min_max_center(const GLuint *buf, GLuint n, > static void > draw_sphere(void) > { > - GLdouble radius = 0.95; > - GLint slices = 40; > - GLint stacks = 20; > + /* Without this enum hack, GCC complains about variable length arrays > +* below... even if you make the varaibles const. typo: variables ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] abr_gpu_shader_fp64: Verify that setting a double with glUniform*fv is an error
On Mon, Aug 31, 2015 at 8:55 PM, Ian Romanickwrote: > From: Ian Romanick > > Also verify that setting a float with glUniform*dv generates an error. > > NOTE: Mesa currently fails the matrix tests. > > Signed-off-by: Ian Romanick > Cc: Dave Airlie > --- Typo in subject: abr -> arb ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] egl-util: Define EGL_KHR_gl_colorspace symbols for older distros.
On Fri, Jul 10, 2015 at 1:22 AM, Dylan Baker baker.dyla...@gmail.com wrote: Maybe a better plan is to have the test detect that those aren't defined and skip? This allows the compile to succeed. If the feature isn't supported at runtime... that's when you skip. We've added defines to let things compile with outdated headers multiple times before: 76e74cb6, ffb56030. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] EXT_framebuffer_multisample: Make supersample_factor a constant.
Looks fine to me. Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [Mesa-dev] Request for Mentorship
On Wed, Jun 10, 2015 at 5:04 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 10 June 2015 at 23:56, Rob Clark robdcl...@gmail.com wrote: On Wed, Jun 10, 2015 at 7:28 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 5 June 2015 at 22:08, Rob Clark robdcl...@gmail.com wrote: so, maybe a bit off topic (and maybe doesn't really help with the whole finding a mentor thing).. but a sort of wish-list thing for piglit that I've had in the back of my head is something like tig for piglit. I suppose it doesn't have to necessarily be a curses based UI, it could be gui.. but a lot of times while I find myself searching through results.json to find cmdline to re-run failed tests, which is kind of time consuming. Some sort of front-end to piglit which would let me do things like filter on test status, then see output/results and if I want re-run the selected test(s) would be kind of nice. Sounds like exactly what the html test summary provides. Although I'm not sure how many people actually use it - json seems to be more popular nowadays :-) I even recall naggin' on Dylan when things broke on an occasion or two. except html is neither interactive nor fast/convenient ;-) The use case I'm thinking of is mostly driver devel/debug where I want to check if some updated version of a change I am working on fixed the regressions, and that sort of thing. (Or re-run the failed tests with some FD_MESA_DEBUG env var debug flag.) So ability to re-run individual tests (or group of tests based on filtered result status, etc) is what I'm looking for. Versus digging through .json or html to find individual cmdlines for some 100's of tests ;-) I see. I was fortunate enough to rerun only 2-3 regressing tests, rather than 100's, so html was convenient enough :) The rerun all {failing,...} tests does sound like a useful feature. -Emil Why are you guys using a thread about requesting an EVoC mentor for this? ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] shaders: Add non-trivial integer multiplication test.
--- Incorrectly setting force_sechalf = true on the first mov(8) in the patch i965/fs: Support integer multiplication in SIMD16 on Haswell. will cause there to be small amounts of noise in the image generated by this patch. .../glsl-fs-integer-multiplication.shader_test | 130 + 1 file changed, 130 insertions(+) create mode 100644 tests/shaders/glsl-fs-integer-multiplication.shader_test diff --git a/tests/shaders/glsl-fs-integer-multiplication.shader_test b/tests/shaders/glsl-fs-integer-multiplication.shader_test new file mode 100644 index 000..5b1936d --- /dev/null +++ b/tests/shaders/glsl-fs-integer-multiplication.shader_test @@ -0,0 +1,130 @@ +# Test integer multiplication where 2x2 subspans of fragments do not +# necessarily write the same color and some fragments may be disabled. +# +# In a 250x250 window, the test draws 36 250x7 rectangles. A height of 7 is +# chosen to generate 2x2 subspans with some fragments disabled. +# +# Each of these rectangles is shaded with an identical 25-step gradient, +# producing 25 columns that can be checked with probe rect rgba. +# +# This C program generates the probe rect rgba tests, modulo minor manual +# changes at the right and left boundaries of the image. +# +# +# #include math.h +# #include stdio.h +# +# int main() { +# float coord = 0.5; +# +# for (int i = 1; i 250; i += 10, coord += 1.0f) { +# int int_coord = coord * 10; +# float f = (float)int_coord / 10.0; +# +# printf(probe rect rgba (%3d, %d, %d, %d) (%.2f, %.2f, %.2f, %.2f)\n, +#i, 0, 10, 250, +#ceilf(f) / 25.0f, ceilf(f) / 25.0f, 0.0, 1.0); +# } +# +# return 0; +# } +# +# This test is designed to detect bugs in i965's integer multiplication. In +# SIMD16 mode on Gen7+ only 8 values can be multiplied at once, so the first +# 8 fragments must be handled separately from the second 8 fragments. If +# channel enables are not correct, small amounts of noise will appear in this +# test. +# +# Borrows heavily from glsl-fs-ceil.shader_test. + +[require] +GLSL = 1.10 + +[vertex shader] +void main() +{ + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; +} + +[fragment shader] +uniform int i; + +void main() +{ +int coord = int(gl_FragCoord.x) * i; +float f = float(coord) / 100.0; + +/* Divide by 25.0 to bring it into the [0, 1] range. */ +gl_FragColor = vec4(ceil(f) / 25.0, ceil(f) / 25.0, 0.0, 1.0); +} + +[test] +ortho + +uniform int i 10 + +# Draw horizontal rectangles +draw rect 0 0 250 7 +draw rect 0 7 250 7 +draw rect 0 14 250 7 +draw rect 0 21 250 7 +draw rect 0 28 250 7 +draw rect 0 35 250 7 +draw rect 0 42 250 7 +draw rect 0 49 250 7 +draw rect 0 56 250 7 +draw rect 0 63 250 7 +draw rect 0 70 250 7 +draw rect 0 77 250 7 +draw rect 0 84 250 7 +draw rect 0 91 250 7 +draw rect 0 98 250 7 +draw rect 0 105 250 7 +draw rect 0 112 250 7 +draw rect 0 119 250 7 +draw rect 0 126 250 7 +draw rect 0 133 250 7 +draw rect 0 140 250 7 +draw rect 0 147 250 7 +draw rect 0 154 250 7 +draw rect 0 161 250 7 +draw rect 0 168 250 7 +draw rect 0 175 250 7 +draw rect 0 182 250 7 +draw rect 0 189 250 7 +draw rect 0 196 250 7 +draw rect 0 203 250 7 +draw rect 0 210 250 7 +draw rect 0 217 250 7 +draw rect 0 224 250 7 +draw rect 0 231 250 7 +draw rect 0 238 250 7 +draw rect 0 245 250 7 + +# Probe vertical rectangles +probe rect rgba ( 0, 0, 1, 250) (0.00, 0.00, 0.0, 1.0) +probe rect rgba ( 1, 0, 10, 250) (0.04, 0.04, 0.0, 1.0) +probe rect rgba ( 11, 0, 10, 250) (0.08, 0.08, 0.0, 1.0) +probe rect rgba ( 21, 0, 10, 250) (0.12, 0.12, 0.0, 1.0) +probe rect rgba ( 31, 0, 10, 250) (0.16, 0.16, 0.0, 1.0) +probe rect rgba ( 41, 0, 10, 250) (0.20, 0.20, 0.0, 1.0) +probe rect rgba ( 51, 0, 10, 250) (0.24, 0.24, 0.0, 1.0) +probe rect rgba ( 61, 0, 10, 250) (0.28, 0.28, 0.0, 1.0) +probe rect rgba ( 71, 0, 10, 250) (0.32, 0.32, 0.0, 1.0) +probe rect rgba ( 81, 0, 10, 250) (0.36, 0.36, 0.0, 1.0) +probe rect rgba ( 91, 0, 10, 250) (0.40, 0.40, 0.0, 1.0) +probe rect rgba (101, 0, 10, 250) (0.44, 0.44, 0.0, 1.0) +probe rect rgba (111, 0, 10, 250) (0.48, 0.48, 0.0, 1.0) +probe rect rgba (121, 0, 10, 250) (0.52, 0.52, 0.0, 1.0) +probe rect rgba (131, 0, 10, 250) (0.56, 0.56, 0.0, 1.0) +probe rect rgba (141, 0, 10, 250) (0.60, 0.60, 0.0, 1.0) +probe rect rgba (151, 0, 10, 250) (0.64, 0.64, 0.0, 1.0) +probe rect rgba (161, 0, 10, 250) (0.68, 0.68, 0.0, 1.0) +probe rect rgba (171, 0, 10, 250) (0.72, 0.72, 0.0, 1.0) +probe rect rgba (181, 0, 10, 250) (0.76, 0.76, 0.0, 1.0) +probe rect rgba (191, 0, 10, 250) (0.80, 0.80, 0.0, 1.0) +probe rect rgba (201, 0, 10, 250) (0.84, 0.84, 0.0, 1.0) +probe rect rgba (211, 0, 10, 250) (0.88, 0.88, 0.0, 1.0) +probe rect rgba (221, 0, 10, 250) (0.92, 0.92, 0.0, 1.0) +probe rect rgba (231, 0, 10, 250) (0.96, 0.96, 0.0, 1.0) +probe rect rgba (241, 0, 9, 250) (1.00, 1.00, 0.0, 1.0) -- 2.3.6 ___ Piglit mailing list
Re: [Piglit] [PATCH V3 2/2] arb_arrays_of_arrays: compile test all basic types
On Tue, Mar 31, 2015 at 10:44 PM, Timothy Arceri t_arc...@yahoo.com.au wrote: V3: Tell piglit that GL_ARB_arrays_of_arrays is required V2: fix glsl-1.20-basic-types.vert previously it contained the glsl-4.20-basic-types.frag test Test results: Nvidia GeForce 840M - NVIDIA 346.47: pass --- I haven't confirmed that each list is precisely what those GLSL versions offer, but I like the tests. Have a Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] arb_arrays_of_arrays: change input compile tests to fragment shaders
On Tue, Mar 31, 2015 at 10:01 PM, Timothy Arceri t_arc...@yahoo.com.au wrote: Although the existing tests are valid until link time, it doesn't make much sense to test this way. --- .../compiler/input-array-array-var.frag | 15 +++ .../compiler/input-array-array-var.vert | 15 --- .../compiler/input-array-var-array.frag | 15 +++ .../compiler/input-array-var-array.vert | 15 --- .../compiler/input-var-array-array.frag | 15 +++ .../compiler/input-var-array-array.vert | 15 --- 6 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/input-array-array-var.frag delete mode 100644 tests/spec/arb_arrays_of_arrays/compiler/input-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/input-array-var-array.frag delete mode 100644 tests/spec/arb_arrays_of_arrays/compiler/input-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/input-var-array-array.frag delete mode 100644 tests/spec/arb_arrays_of_arrays/compiler/input-var-array-array.vert I'm not sure I understand the rationale. Could you explain? ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] GSoC 2015: Request for Registration for Mentorship
On Thu, Apr 2, 2015 at 10:29 AM, Brian Paul brian.e.p...@gmail.com wrote: Sorry, I've been busy too. What's the URL for the sign-up? http://www.google-melange.com/gsoc/homepage/google/gsoc2015 - Start Connection Once you've created an account, you'll have a My Dashboard link in the side menu. In that, there's a Connections link which will let you find the X.Org organization and request a connection. The administrator will add you and then on My Dashboard there will be a link to the proposals. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-1.10: Add vec4 test for gl_FrontFacing ternary usage.
Reviewed-by: Matt Turner matts...@gmail.com Are you planning to work on a i965 patch to fix this? (Did you hit this in a real application?) ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] Problem submitting patch through git send-email
On Mon, Mar 30, 2015 at 12:36 PM, Guy-Daniel Tiku guydan...@gmail.com wrote: Hi, I've worked on an patch ans I've tried over and over to submit it through the git send-email command. In the meantime, I've attached the patch to this email. Can I get some help on how to fix this problem ? Without describing the error... how can anyone help? As for the patch... I can't tell what its purpose is either since there's no commit message. It looks like it's just the output of git diff, rather than a patch you committed (git commit) and generated with git format-patch. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Skip fp-indirections if the limits exposed are totally bogus.
Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es-1.00: add constant-index-expression indexing test with struct
On Sun, Mar 29, 2015 at 9:52 PM, Tapani Pälli tapani.pa...@intel.com wrote: On 03/27/2015 06:47 PM, Matt Turner wrote: On Fri, Mar 27, 2015 at 12:27 AM, Tapani Pälli tapani.pa...@intel.com wrote: This test fails with current Mesa HEAD (6264348), see bug https://bugs.freedesktop.org/show_bug.cgi?id=84225. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- .../struct-sampler-array-index.frag| 42 ++ 1 file changed, 42 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag new file mode 100644 index 000..122a8a4 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag @@ -0,0 +1,42 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * From Appendix A of the GLSL ES 1.00 spec: + * + * GLSL ES 1.00 supports both arrays of samplers and arrays of + * structures which contain samplers. In both these cases, for + * ES 2.0, support for indexing with a constant-index-expression + * is mandated + * + * For additional complexity this test has array of structures + * that has array of samplers. + * + */ +#version 100 + +struct s_t +{ + sampler2D array[1]; array[2]. + sampler2D foo; +}; + +uniform s_t array[1]; array[2]. urgh, thanks for pointing these out + +void main() +{ + highp vec4 color; + + // case 1, sampler in array of structs + for (int i = 0; i 2; i++) { + color += texture2D(array[i].foo, vec2(0.0)); + } + + // case 2, index sampler array in array of structs + for (int i = 0; i 2; i++) { + color += texture2D(array[i].array[i], vec2(0.0)); + } I think these would be better as a doubly-nested loop. I was going to suggest using .length() instead of hardcoded upper bounds, but that's not really possible with two separate loops, the second of which assumes the two arrays are of equal size. I wanted to have clear separation because the first case actually passes and only second one fails so there is something different there, not sure if it is clear anymore when having doubly-nested loop (?) I don't have a strong preference for how you change it, but testing that the array[0].array[0] and array[1].array[1] work without testing array[0].array[1] or array[1].array[0] seems weird. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es-1.00: add test for constant-index-expression indexing
On Sun, Mar 29, 2015 at 9:36 PM, Tapani Pälli tapani.pa...@intel.com wrote: On 03/27/2015 06:44 PM, Matt Turner wrote: On Thu, Mar 26, 2015 at 11:49 PM, Tapani Pälli tapani.pa...@intel.com wrote: This test fails with current Mesa HEAD (6264348), see bug https://bugs.freedesktop.org/show_bug.cgi?id=84225. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- .../sampler-array-index.frag | 24 ++ 1 file changed, 24 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag new file mode 100644 index 000..08ed68d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag @@ -0,0 +1,24 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * From Appendix A of the GLSL ES 1.00 spec: + * + * GLSL ES 1.00 supports both arrays of samplers and arrays of + * structures which contain samplers. In both these cases, for + * ES 2.0, support for indexing with a constant-index-expression + * is mandated + * + */ +#version 100 +uniform sampler2D array[1]; I only noticed upon looking at the second test, but this is wrong. Should be array[2]. Oops, will fix + +void main() +{ + highp vec4 color; + for (int i = 0; i 2; i++) { Using array.length() here would have at least prevented the failure, even if it didn't quite do what we expected. length() is available only with glsl =1.20 Oh, I didn't realize that. That's annoying. :\ ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es-1.00: add test for constant-index-expression indexing
On Thu, Mar 26, 2015 at 11:49 PM, Tapani Pälli tapani.pa...@intel.com wrote: This test fails with current Mesa HEAD (6264348), see bug https://bugs.freedesktop.org/show_bug.cgi?id=84225. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- .../sampler-array-index.frag | 24 ++ 1 file changed, 24 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag new file mode 100644 index 000..08ed68d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag @@ -0,0 +1,24 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * From Appendix A of the GLSL ES 1.00 spec: + * + * GLSL ES 1.00 supports both arrays of samplers and arrays of + * structures which contain samplers. In both these cases, for + * ES 2.0, support for indexing with a constant-index-expression + * is mandated + * + */ +#version 100 +uniform sampler2D array[1]; + +void main() +{ + highp vec4 color; + for (int i = 0; i 2; i++) { + color += texture2D(array[i], vec2(0.0)); + } + gl_FragColor = color; +} -- 2.1.0 This looks good, but could you also add a test for an array of structures that contain samplers? Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es-1.00: add constant-index-expression indexing test with struct
On Fri, Mar 27, 2015 at 12:27 AM, Tapani Pälli tapani.pa...@intel.com wrote: This test fails with current Mesa HEAD (6264348), see bug https://bugs.freedesktop.org/show_bug.cgi?id=84225. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- .../struct-sampler-array-index.frag| 42 ++ 1 file changed, 42 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag new file mode 100644 index 000..122a8a4 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/struct-sampler-array-index.frag @@ -0,0 +1,42 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * From Appendix A of the GLSL ES 1.00 spec: + * + * GLSL ES 1.00 supports both arrays of samplers and arrays of + * structures which contain samplers. In both these cases, for + * ES 2.0, support for indexing with a constant-index-expression + * is mandated + * + * For additional complexity this test has array of structures + * that has array of samplers. + * + */ +#version 100 + +struct s_t +{ + sampler2D array[1]; array[2]. + sampler2D foo; +}; + +uniform s_t array[1]; array[2]. + +void main() +{ + highp vec4 color; + + // case 1, sampler in array of structs + for (int i = 0; i 2; i++) { + color += texture2D(array[i].foo, vec2(0.0)); + } + + // case 2, index sampler array in array of structs + for (int i = 0; i 2; i++) { + color += texture2D(array[i].array[i], vec2(0.0)); + } I think these would be better as a doubly-nested loop. I was going to suggest using .length() instead of hardcoded upper bounds, but that's not really possible with two separate loops, the second of which assumes the two arrays are of equal size. + + gl_FragColor = color; +} -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es-1.00: add test for constant-index-expression indexing
On Thu, Mar 26, 2015 at 11:49 PM, Tapani Pälli tapani.pa...@intel.com wrote: This test fails with current Mesa HEAD (6264348), see bug https://bugs.freedesktop.org/show_bug.cgi?id=84225. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- .../sampler-array-index.frag | 24 ++ 1 file changed, 24 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag new file mode 100644 index 000..08ed68d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/sampler-array-index.frag @@ -0,0 +1,24 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * From Appendix A of the GLSL ES 1.00 spec: + * + * GLSL ES 1.00 supports both arrays of samplers and arrays of + * structures which contain samplers. In both these cases, for + * ES 2.0, support for indexing with a constant-index-expression + * is mandated + * + */ +#version 100 +uniform sampler2D array[1]; I only noticed upon looking at the second test, but this is wrong. Should be array[2]. + +void main() +{ + highp vec4 color; + for (int i = 0; i 2; i++) { Using array.length() here would have at least prevented the failure, even if it didn't quite do what we expected. With *those* fixed, Reviewed-by: Matt Turner matts...@gmail.com + color += texture2D(array[i], vec2(0.0)); + } + gl_FragColor = color; +} -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v2] spec/arb_blend_func_extended: Add test for SIMD16 dual source blending
On Thu, Mar 5, 2015 at 11:49 PM, Iago Toral Quiroga ito...@igalia.com wrote: On Intel hardware at least, SIMD16 dual source rendering requires handling pixel data in two sets of 8 pixels each. Incorrect implementations may fail to map correct colors for each pixel group (for example by using the color for the first group as the color for the second group or viceversa). However, tests that render using solid colors across the entire polygon won't catch these cases (since in that case the color is the same for boths groups of pixels). This test blends using a checker board pattern where each cell is 10px wide and 10px tall. This makes it so that the two sets of 8 pixels issued during SIMD16 operation pack different color data for the pixels involved, enabling testing of correct behavior in that case. v2 (Matt Turner) - Make the test render to a window if -fbo or -auto are not present. --- tests/all.py | 2 + .../execution/CMakeLists.gl.txt| 1 + .../execution/fbo-extended-blend-pattern.c | 154 + 3 files changed, 157 insertions(+) create mode 100644 tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c diff --git a/tests/all.py b/tests/all.py index dc73c77..de08ea7 100644 --- a/tests/all.py +++ b/tests/all.py @@ -3847,6 +3847,8 @@ with profile.group_manager( g(['arb_blend_func_extended-fbo-extended-blend'], run_concurrent=False) g(['arb_blend_func_extended-fbo-extended-blend-explicit'], run_concurrent=False) +g(['arb_blend_func_extended-fbo-extended-blend-pattern'], + run_concurrent=False) with profile.group_manager( PiglitGLTest, diff --git a/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt b/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt index ebe0fa0..1db7fa1 100644 --- a/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt +++ b/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt @@ -12,4 +12,5 @@ link_libraries ( piglit_add_executable (arb_blend_func_extended-fbo-extended-blend fbo-extended-blend.c) piglit_add_executable (arb_blend_func_extended-fbo-extended-blend-explicit fbo-extended-blend-explicit.c) +piglit_add_executable (arb_blend_func_extended-fbo-extended-blend-pattern fbo-extended-blend-pattern.c) # vim: ft=cmake: diff --git a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c new file mode 100644 index 000..201adfa --- /dev/null +++ b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2014 Intel Corporation 2015? + * + * 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 fbo-extended-blend-pattern.c + * @author Iago Toral Quiroga ito...@igalia.com + * + * On Intel hardware at least, SIMD16 dual source rendering requires handling + * pixel data in two sets of 8 pixels each. Incorrect implementations may fail + * to map correct colors for each pixel group (for example by using the color + * for the first group as the color for the second group or viceversa). However, + * tests that render using solid colors across the entire polygon won't catch + * these cases (since in that case the color is the same for boths groups of + * pixels). + * + * This test blends using a checker board pattern where each cell is + * 10px wide and 10px tall. This makes it so that the two sets of 8 pixels + * issued during SIMD16 operation pack different color data for the pixels + * involved, enabling testing of correct behavior in that case. + * + * This only tests with one specific blend mode. There is no need to test + * others, since the details of SIMD16 operation
Re: [Piglit] [PATCH v2 1/2] shaders: add test to check (0 cmp x+y) optimization
On Sun, Mar 1, 2015 at 11:31 PM, Samuel Iglesias Gonsalvez sigles...@igalia.com wrote: Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- v2: * Implement it as shader_runner test tests/shaders/glsl-opt-0-cmp-xy.shader_test | 33 + 1 file changed, 33 insertions(+) create mode 100644 tests/shaders/glsl-opt-0-cmp-xy.shader_test diff --git a/tests/shaders/glsl-opt-0-cmp-xy.shader_test b/tests/shaders/glsl-opt-0-cmp-xy.shader_test new file mode 100644 index 000..57c5716 --- /dev/null +++ b/tests/shaders/glsl-opt-0-cmp-xy.shader_test @@ -0,0 +1,33 @@ +/* Test (0 cmp x+y) optimization. */ + +[require] +GLSL = 1.10 + +[vertex shader] You can use [vertex shader passthrough] and drop the vertex shader body. + +void main() +{ + gl_Position = ftransform(); +} + +[fragment shader] + +uniform float a; + +void main() +{ + if (0.0 = (a - 1.0)) + gl_FragColor = vec4(0, 1, 0, 1); + else + gl_FragColor = vec4(1, 0, 0, 1); +} + +[test] +clear color 0.5 0.5 0.5 0.5 +clear You can remove these two lines since the test is painting the whole window. Reviewed-by: Matt Turner matts...@gmail.com Thanks! ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] spec/arb_blend_func_extended: Add test for SIMD16 dual source blending
From: Iago Toral Quiroga ito...@igalia.com On Intel hardware at least, SIMD16 dual source rendering requires handling pixel data in two sets of 8 pixels each. Incorrect implementations may fail to map correct colors for each pixel group (for example by using the color for the first group as the color for the second group or viceversa). However, tests that render using solid colors across the entire polygon won't catch these cases (since in that case the color is the same for boths groups of pixels). This test blends using a checker board pattern where each cell is 10px wide and 10px tall. This makes it so that the two sets of 8 pixels issued during SIMD16 operation pack different color data for the pixels involved, enabling testing of correct behavior in that case. --- This is the same patch Iago sent, just rebased on today's all.py changes. Iago, the test doesn't seem to open a window. I expected it would render to an offscreen FBO but then blit to a window to display if -auto wasn't passed. tests/all.py | 2 + .../execution/CMakeLists.gl.txt| 1 + .../execution/fbo-extended-blend-pattern.c | 209 + 3 files changed, 212 insertions(+) create mode 100644 tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c diff --git a/tests/all.py b/tests/all.py index 61fa1e2..9dc16db 100644 --- a/tests/all.py +++ b/tests/all.py @@ -3847,6 +3847,8 @@ with profile.group_manager( g(['arb_blend_func_extended-fbo-extended-blend'], run_concurrent=False) g(['arb_blend_func_extended-fbo-extended-blend-explicit'], run_concurrent=False) +g(['arb_blend_func_extended-fbo-extended-blend-pattern'], + run_concurrent=False) with profile.group_manager( PiglitGLTest, diff --git a/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt b/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt index ebe0fa0..1db7fa1 100644 --- a/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt +++ b/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt @@ -12,4 +12,5 @@ link_libraries ( piglit_add_executable (arb_blend_func_extended-fbo-extended-blend fbo-extended-blend.c) piglit_add_executable (arb_blend_func_extended-fbo-extended-blend-explicit fbo-extended-blend-explicit.c) +piglit_add_executable (arb_blend_func_extended-fbo-extended-blend-pattern fbo-extended-blend-pattern.c) # vim: ft=cmake: diff --git a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c new file mode 100644 index 000..488c380 --- /dev/null +++ b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c @@ -0,0 +1,209 @@ +/* + * Copyright (c) 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 fbo-extended-blend-pattern.c + * @author Iago Toral Quiroga ito...@igalia.com + * + * On Intel hardware at least, SIMD16 dual source rendering requires handling + * pixel data in two sets of 8 pixels each. Incorrect implementations may fail + * to map correct colors for each pixel group (for example by using the color + * for the first group as the color for the second group or viceversa). However, + * tests that render using solid colors across the entire polygon won't catch + * these cases (since in that case the color is the same for boths groups of + * pixels). + * + * This test blends using a checker board pattern where each cell is + * 10px wide and 10px tall. This makes it so that the two sets of 8 pixels + * issued during SIMD16 operation pack different color data for the pixels + * involved, enabling testing of correct behavior in that case. + * + * This only tests with one specific blend mode. There is no need to test + * others, since the details of SIMD16 operation are
Re: [Piglit] [PATCH] spec/arb_blend_func_extended: Add test for SIMD16 dual source blending
On Thu, Mar 5, 2015 at 10:50 AM, Matt Turner matts...@gmail.com wrote: From: Iago Toral Quiroga ito...@igalia.com On Intel hardware at least, SIMD16 dual source rendering requires handling pixel data in two sets of 8 pixels each. Incorrect implementations may fail to map correct colors for each pixel group (for example by using the color for the first group as the color for the second group or viceversa). However, tests that render using solid colors across the entire polygon won't catch these cases (since in that case the color is the same for boths groups of pixels). This test blends using a checker board pattern where each cell is 10px wide and 10px tall. This makes it so that the two sets of 8 pixels issued during SIMD16 operation pack different color data for the pixels involved, enabling testing of correct behavior in that case. --- This is the same patch Iago sent, just rebased on today's all.py changes. Iago, the test doesn't seem to open a window. I expected it would render to an offscreen FBO but then blit to a window to display if -auto wasn't passed. Ugh, I apparently used the message-id of the corresponding Mesa patch in reply-to instead of the piglit test. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] varying-packing: Use logical-OR instead of if statement to set failed.
By flattening the if statements we cut 288 instructions from the fragment shader (806 - 518, or 35%), and we remove all register spilling on i965. Reduces runtime of varying-packing-simple int separate by -81.4453% +/- 0.255875% (n=483). Also consistently print 3 digits in the varying's names, to make reading/sorting simpler. --- tests/spec/glsl-1.10/execution/varying-packing/simple.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/spec/glsl-1.10/execution/varying-packing/simple.c b/tests/spec/glsl-1.10/execution/varying-packing/simple.c index 618f325..e9935c7 100644 --- a/tests/spec/glsl-1.10/execution/varying-packing/simple.c +++ b/tests/spec/glsl-1.10/execution/varying-packing/simple.c @@ -258,12 +258,12 @@ get_shader(bool is_vs, unsigned glsl_version, int num_varyings, if (varyings[i].type-base != BASE_TYPE_FLOAT) opt_flat_keyword = flat ; if (varyings[i].array_elems != 0) { - text += sprintf(text, %s%s %s var%u[%u];\n, + text += sprintf(text, %s%s %s var%03u[%u];\n, opt_flat_keyword, varying_keyword, varyings[i].type-name, i, varyings[i].array_elems); } else { - text += sprintf(text, %s%s %s var%u;\n, + text += sprintf(text, %s%s %s var%03u;\n, opt_flat_keyword, varying_keyword, varyings[i].type-name, i); } @@ -292,8 +292,8 @@ get_shader(bool is_vs, unsigned glsl_version, int num_varyings, for (l = 0; l varyings[i].type-num_rows; ++l) { text += sprintf(text, ); if (!is_vs) - text += sprintf(text, if (); - text += sprintf(text, var%u, i); + text += sprintf(text, failed = failed || ); + text += sprintf(text, var%03u, i); if (varyings[i].array_elems) text += sprintf(text, [%u], j); if (varyings[i].type-num_cols 1) @@ -304,16 +304,9 @@ get_shader(bool is_vs, unsigned glsl_version, int num_varyings, text += sprintf(text, = ); else text += sprintf(text, != ); - text += sprintf(text, %s(i + %u), + text += sprintf(text, %s(i + %u);\n, base_type_name, offset++); - if (is_vs) { - text += sprintf(text, ;\n); - } else { - text += sprintf(text, - )\n - failed = true;\n); - } } } } -- 2.0.5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] shaders: Add test for conditional mod propagation with different types.
The i965 driver has a pass that merges comparisons with zero into the instruction that generated the result. For example: addtmpx y cmp.ge.f0 null tmp 0.0 is optimized into add.ge.f0 tmpx y If the types of tmp are different in the add and cmp, comparisons against zero might not work the same. For instance if the addition is on unsigned integers, they may generate a result of 0x8000 which is -0.0 reinterpreted as a float. I think this test triggers the same bug as this bug report. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89317 --- ...s-unsigned-comparison-negative-zero.shader_test | 37 ++ 1 file changed, 37 insertions(+) create mode 100644 tests/shaders/glsl-fs-unsigned-comparison-negative-zero.shader_test diff --git a/tests/shaders/glsl-fs-unsigned-comparison-negative-zero.shader_test b/tests/shaders/glsl-fs-unsigned-comparison-negative-zero.shader_test new file mode 100644 index 000..13c224f --- /dev/null +++ b/tests/shaders/glsl-fs-unsigned-comparison-negative-zero.shader_test @@ -0,0 +1,37 @@ +[require] +GLSL = 1.30 +GL_ARB_shader_bit_encoding + +[vertex shader passthrough] + +[fragment shader] +#extension GL_ARB_shader_bit_encoding: require + +out vec4 frag_color; + +uniform uint a, b; + +void main() +{ + /* Adding a + b yields 0x8000, which when reinterpreted as a float +* is -0.0. -0.0 == +0.0 is true, but if we did the comparison against +* the unsigned value it would incorrectly be false. +*/ + if (uintBitsToFloat(a + b) == 0.0) + frag_color = vec4(0.0, 1.0, 0.0, 1.0); + else + frag_color = vec4(1.0, 0.0, 0.0, 1.0); +} + +[vertex data] +piglit_vertex/float/2 +-1.0 -1.0 + 1.0 -1.0 + 1.0 1.0 +-1.0 1.0 + +[test] +uniform uint a 0x4000 +uniform uint b 0x4000 +draw arrays GL_TRIANGLE_FAN 0 4 +probe all rgba 0.0 1.0 0.0 1.0 -- 2.0.5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 31/34] genclbuiltins.py: add MIT header
On Fri, Feb 20, 2015 at 6:18 PM, Dylan Baker baker.dyla...@gmail.com wrote: presumably this was always available under the MIT license, but I think its worthwhile to add the header. Signed-off-by: Dylan Baker dylanx.c.ba...@intel.com --- generated_tests/genclbuiltins.py | 22 -- This file was originally split from generated_tests/generate-cl-int-builtins.py, so I went to see what license it had... none as well. We should add a license there at the same time. Aaron, Tom: okay to add an MIT license header to both of these files? ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_shading_language_420pack: Remove unused variable.
Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-deriv-varyings: Fixes compilation warnings and adds extra regular subtest
On Thu, Feb 19, 2015 at 10:39 AM, Ian Romanick i...@freedesktop.org wrote: So... where did we end up with this? I just pushed a patch from the bug that makes shaders 4 and 5 actually run. Both fail, but Matt thought that the fix to Mesa was committed. Indeed, it's upstream as commit 8517e665. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] fbo: Fix broken MRT bindings test.
The code declared GLuint textures[4] and then proceeded to do things like glGenTextures(5, textures) and access textures[4]. Presumably the intention was to declare an array of size 5. --- Vinson pointed out that this test was broken a month ago... tests/fbo/fbo-mrt-new-bind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fbo/fbo-mrt-new-bind.c b/tests/fbo/fbo-mrt-new-bind.c index 8e006b5..18c36c5 100644 --- a/tests/fbo/fbo-mrt-new-bind.c +++ b/tests/fbo/fbo-mrt-new-bind.c @@ -46,7 +46,7 @@ PIGLIT_GL_TEST_CONFIG_END GLenum buffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }; GLuint fbos[3]; GLint prog0, prog1; -GLuint textures[4]; +GLuint textures[5]; void piglit_init(int argc, char **argv) @@ -56,7 +56,7 @@ piglit_init(int argc, char **argv) piglit_require_GLSL_version(130); glGenTextures(5, textures); - for (i=0; i4; i++) { + for (i = 0; i ARRAY_SIZE(textures); i++) { glBindTexture(GL_TEXTURE_2D, textures[i]); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -- 2.0.5 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 3/3] gbm: Limit libcaca size for small tests
The series looks good to me, FWIW. Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_shader_precision: set tolerance for div/assign-div
On Mon, Feb 2, 2015 at 6:04 AM, Ilia Mirkin imir...@alum.mit.edu wrote: This makes the relevant tests pass on nvc0. Signed-off-by: Ilia Mirkin imir...@alum.mit.edu --- generated_tests/gen_shader_precision_tests.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generated_tests/gen_shader_precision_tests.py b/generated_tests/gen_shader_precision_tests.py index b4664ea..0d24a80 100644 --- a/generated_tests/gen_shader_precision_tests.py +++ b/generated_tests/gen_shader_precision_tests.py @@ -58,7 +58,10 @@ tolerances = {'pow': 16.0, 'log': 3.0, 'log2': 3.0, 'sqrt': 3.0, - 'inversesqrt': 2.0} + 'inversesqrt': 2.0, + 'op-div': 2.5, + 'op-assign-div': 2.5, + } Let me make sure I understand -- we're not /changing/ the tolerances in this patch, we're just adding some missing ones? If so, what tolerances were the tests using for division? Also if so, Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 01/23] util/shader: Define nothrow variant of piglit_compile_shader_text().
On Sat, Jan 31, 2015 at 7:41 AM, Francisco Jerez curroje...@riseup.net wrote: Define a variant of piglit_compile_shader_text() that doesn't call piglit_report_result() on failure killing the program, which is quite annoying for tests that expect a compilation to fail and for tests that are structured in a number of subtests, because a single sub-test failing to compile a shader will prevent the remaining tests from running. Do we want this function because we expect certain compilations to fail (and if so, why are we trying to compile them?) or just for ease of developing a large containing many subtests? I looked at its use in 3/23 and wasn't sure of the answer. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On Fri, Jan 23, 2015 at 2:49 PM, Matěj Cepl mc...@cepl.eu wrote: What kind of functionality is backed by Mako? Could it be switched off? (or we can build new Mako 1.0.0 in EPEL-6 http://koji.fedoraproject.org/koji/taskinfo?taskID=8711312). A bunch of tests are generated at build-time using mako templates. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] gpu_shader5: Fix the GLSL version in indirect-projGradOffset-shadow
Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-1.10: Add tests for common gl_FrontFacing ternary usage.
On Thu, Jan 8, 2015 at 12:27 PM, Ilia Mirkin imir...@alum.mit.edu wrote: On Thu, Jan 8, 2015 at 3:26 PM, Matt Turner matts...@gmail.com wrote: These patterns gl_FrontFacing ? 1.0 : 1.0 gl_FrontFacing ? -1.0 : -1.0 Presumably these were meant to be ? -1 : 1 and ? 1 : -1 Indeed. Thanks! ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-1.10: Add tests for common gl_FrontFacing ternary usage.
These patterns gl_FrontFacing ? 1.0 : 1.0 gl_FrontFacing ? -1.0 : -1.0 gl_FrontFacing ? 0.0 : -1.0 are recognized and optimized by the i965 driver. --- .../fs-frontfacing-ternary-0.0-neg-1.0.shader_test | 20 .../fs-frontfacing-ternary-1.0-neg-1.0.shader_test | 20 .../fs-frontfacing-ternary-neg-1.0-1.0.shader_test | 20 3 files changed, 60 insertions(+) create mode 100644 tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-0.0-neg-1.0.shader_test create mode 100644 tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-1.0-neg-1.0.shader_test create mode 100644 tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-neg-1.0-1.0.shader_test diff --git a/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-0.0-neg-1.0.shader_test b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-0.0-neg-1.0.shader_test new file mode 100644 index 000..2ac9224 --- /dev/null +++ b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-0.0-neg-1.0.shader_test @@ -0,0 +1,20 @@ +[require] +GLSL = 1.10 + +[vertex shader passthrough + +[fragment shader] +void main() +{ + float f = gl_FrontFacing ? 0.0 : -1.0; + f = f * 0.5 + 0.75; // Remap (0.0, -1.0) - (0.75, 0.25) + gl_FragColor = vec4(0.0, f, 0.0, 1.0); +} + +[test] +draw rect -1 -1 2 1 +draw rect 1 0 -2 1 +relative probe rgba (0, 0) (0.0, 0.75, 0.0, 1.0) +relative probe rgba (1, 0) (0.0, 0.75, 0.0, 1.0) +relative probe rgba (0, 1) (0.0, 0.25, 0.0, 1.0) +relative probe rgba (1, 1) (0.0, 0.25, 0.0, 1.0) diff --git a/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-1.0-neg-1.0.shader_test b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-1.0-neg-1.0.shader_test new file mode 100644 index 000..b4e6360 --- /dev/null +++ b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-1.0-neg-1.0.shader_test @@ -0,0 +1,20 @@ +[require] +GLSL = 1.10 + +[vertex shader passthrough + +[fragment shader] +void main() +{ + float f = gl_FrontFacing ? 1.0 : -1.0; + f = f * 0.25 + 0.5; // Remap (1.0, -1.0) - (0.75, 0.25) + gl_FragColor = vec4(0.0, f, 0.0, 1.0); +} + +[test] +draw rect -1 -1 2 1 +draw rect 1 0 -2 1 +relative probe rgba (0, 0) (0.0, 0.75, 0.0, 1.0) +relative probe rgba (1, 0) (0.0, 0.75, 0.0, 1.0) +relative probe rgba (0, 1) (0.0, 0.25, 0.0, 1.0) +relative probe rgba (1, 1) (0.0, 0.25, 0.0, 1.0) diff --git a/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-neg-1.0-1.0.shader_test b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-neg-1.0-1.0.shader_test new file mode 100644 index 000..47a1eda --- /dev/null +++ b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-neg-1.0-1.0.shader_test @@ -0,0 +1,20 @@ +[require] +GLSL = 1.10 + +[vertex shader passthrough + +[fragment shader] +void main() +{ + float f = gl_FrontFacing ? -1.0 : 1.0; + f = f * -0.25 + 0.5; // Remap (-1.0, 1.0) - (0.75, 0.25) + gl_FragColor = vec4(0.0, f, 0.0, 1.0); +} + +[test] +draw rect -1 -1 2 1 +draw rect 1 0 -2 1 +relative probe rgba (0, 0) (0.0, 0.75, 0.0, 1.0) +relative probe rgba (1, 0) (0.0, 0.75, 0.0, 1.0) +relative probe rgba (0, 1) (0.0, 0.25, 0.0, 1.0) +relative probe rgba (1, 1) (0.0, 0.25, 0.0, 1.0) -- 2.0.4 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH piglit] shaders: Test using an int vertex attrib value that looks like NaN
On Wed, Jan 7, 2015 at 4:07 AM, Neil Roberts n...@linux.intel.com wrote: Adds a test which tries setting a uint attrib value to 0x7f817f81. If this value were interpreted as a float then it would look like a signalling NaN. If this is passed through an x87 register then it would get converted to a quiet NaN on store. Currently Mesa does this on 32-bit builds (possibly only with optimisations turned on) so the test fails. The code is in Mesa main so it should fail on all drivers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82668 --- This patch has been sitting as an attachment in the bug report for a while but I think it would be a good idea to land it in master. tests/all.py | 1 + tests/shaders/CMakeLists.gl.txt| 1 + tests/shaders/glsl-vs-int-attrib.c | 115 + 3 files changed, 117 insertions(+) create mode 100644 tests/shaders/glsl-vs-int-attrib.c diff --git a/tests/all.py b/tests/all.py index 051b157..c62749b 100644 --- a/tests/all.py +++ b/tests/all.py @@ -496,6 +496,7 @@ add_concurrent_test(shaders, 'useshaderprogram-bad-type') add_concurrent_test(shaders, 'useshaderprogram-bad-program') add_concurrent_test(shaders, 'useshaderprogram-flushverts-1') add_concurrent_test(shaders, 'point-vertex-id') +add_concurrent_test(shaders, 'glsl-vs-int-attrib') for subtest in ('interstage', 'intrastage', 'vs-gs'): cmdline = 'version-mixing {0}'.format(subtest) shaders[cmdline] = PiglitGLTest(cmdline, run_concurrent=True) diff --git a/tests/shaders/CMakeLists.gl.txt b/tests/shaders/CMakeLists.gl.txt index c827256..3efc6bf 100644 --- a/tests/shaders/CMakeLists.gl.txt +++ b/tests/shaders/CMakeLists.gl.txt @@ -168,5 +168,6 @@ piglit_add_executable (useshaderprogram-bad-type useshaderprogram-bad-type.c) piglit_add_executable (useshaderprogram-bad-program useshaderprogram-bad-program.c) piglit_add_executable (useshaderprogram-flushverts-1 useshaderprogram-flushverts-1.c) piglit_add_executable (version-mixing version-mixing.c) +piglit_add_executable (glsl-vs-int-attrib glsl-vs-int-attrib.c) # vim: ft=cmake: diff --git a/tests/shaders/glsl-vs-int-attrib.c b/tests/shaders/glsl-vs-int-attrib.c new file mode 100644 index 000..9668866 --- /dev/null +++ b/tests/shaders/glsl-vs-int-attrib.c @@ -0,0 +1,115 @@ +/* + * Copyright (c) 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 glsl-vs-int-attrib.c + * + * Tests that we can set an integer vertex attribute to a value that + * looks like a signalling NaN if it were interpreted as a float. If + * an implementation passes this through a floating point variable it + * might incorrectly get corrupted to a quiet NaN. + */ + +#include piglit-util-gl.h + +PIGLIT_GL_TEST_CONFIG_BEGIN + + config.supports_gl_compat_version = 20; + + config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; + +PIGLIT_GL_TEST_CONFIG_END + +/* This value looks like a signalling NaN if it were interpreted as a + * float */ +#define TEST_VALUE 0x7f817f81 + +#define STR(x) #x +#define STRINGIFY(x) STR(x) + +static const char +vertex_source[] = + #version 130\n + \n + attribute vec4 piglit_vertex;\n + attribute uint a_value;\n + \n + void\n + main()\n + {\n + if (a_value == STRINGIFY(TEST_VALUE) u)\n + gl_FrontColor = vec4(1.0, 0.0, 0.0, 1.0);\n We usually do green for pass and red for fail. With that changed, Reviewed-by: Matt Turner matts...@gmail.com + else\n + gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);\n + gl_Position = piglit_vertex;\n + }\n; + +static const float red[] = { 1.0f, 0.0f, 0.0f }; ___ Piglit mailing list
Re: [Piglit] [PATCH] util-cl: Fix non-portable sizeof.
On Tue, Dec 16, 2014 at 10:47 PM, Vinson Lee v...@freedesktop.org wrote: Fix Coverity sizeof not portable defect. Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/util/piglit-framework-cl-program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/piglit-framework-cl-program.c b/tests/util/piglit-framework-cl-program.c index d335486..f94525b 100644 --- a/tests/util/piglit-framework-cl-program.c +++ b/tests/util/piglit-framework-cl-program.c @@ -287,7 +287,7 @@ piglit_cl_program_test_run(const int argc, } else if(config-program_binary_file != NULL) { unsigned int length; size_t* lengths = malloc(sizeof(size_t) * env.context-num_devices); - unsigned char** program_binaries = malloc(sizeof(unsigned char**) * env.context-num_devices); + unsigned char** program_binaries = malloc(sizeof(unsigned char*) * env.context-num_devices); Someone explain this one to me? program_binaries is an unsigned char ** and that's what we're giving to sizeof. What's wrong with sizeof(unsigned char **)? ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] util-cl: Fix non-portable sizeof.
On Wed, Dec 17, 2014 at 11:20 AM, Ilia Mirkin imir...@alum.mit.edu wrote: On Wed, Dec 17, 2014 at 2:17 PM, Matt Turner matts...@gmail.com wrote: On Tue, Dec 16, 2014 at 10:47 PM, Vinson Lee v...@freedesktop.org wrote: Fix Coverity sizeof not portable defect. Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/util/piglit-framework-cl-program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/piglit-framework-cl-program.c b/tests/util/piglit-framework-cl-program.c index d335486..f94525b 100644 --- a/tests/util/piglit-framework-cl-program.c +++ b/tests/util/piglit-framework-cl-program.c @@ -287,7 +287,7 @@ piglit_cl_program_test_run(const int argc, } else if(config-program_binary_file != NULL) { unsigned int length; size_t* lengths = malloc(sizeof(size_t) * env.context-num_devices); - unsigned char** program_binaries = malloc(sizeof(unsigned char**) * env.context-num_devices); + unsigned char** program_binaries = malloc(sizeof(unsigned char*) * env.context-num_devices); Someone explain this one to me? program_binaries is an unsigned char ** and that's what we're giving to sizeof. What's wrong with sizeof(unsigned char **)? It's an array of (unsigned char *), not (unsigned char **). For example if it were a 1d array, you might have unsigned char *foo = malloc(sizeof(unsigned char) * num_elements) right? Of course it doesn't end up _actually_ mattering, since sizeof(char*) == sizeof(char**). -ilia Oh yes, of course. Thanks for doing my thinking for me. :) ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-deriv-varyings: Added checks for derivatives on parameters with negative or abs modifiers
Reviewed-by: Matt Turner matts...@gmail.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit