[Piglit] [PATCH] vulkan/vkrunner: Use the new alternative names for setting uniforms

2019-02-19 Thread Neil Roberts
Since VkRunner commit 6b1d2f51efad6, there are now alternative names for the commands for setting push constants and UBO data. These names are a bit less confusing so this patch converts all of the VkRunner test scripts to use them. --- .../face-forward-double.vk_shader_test| 80

[Piglit] [PATCH] vulkan: Prefix group names for VkRunner tests with “vulkan”

2018-11-13 Thread Neil Roberts
This will make it easier to distinguish tests written for Vulkan. It makes a bit of an inconsistency because the GL and CL tests don’t have any prefix. Ideally maybe we would add a prefix for those too, but changing the test names at this late stage would probably cause a lot of hassle. Adding

[Piglit] [PATCH] vulkan/shader_draw_parameters: Add a test for gl_BaseVertex

2018-11-08 Thread Neil Roberts
gl_BaseVertex has slightly different semantics under Vulkan and GL so this is worth testing. --- .../base-vertex.vk_shader_test| 66 +++ 1 file changed, 66 insertions(+) create mode 100644 tests/vulkan/shader_draw_parameters/base-vertex.vk_shader_test diff --git

[Piglit] [PATCH] vulkan: Add tests for block layout location calculations

2018-11-08 Thread Neil Roberts
All but one of these are currently broken on anv. See: https://patchwork.freedesktop.org/series/40797/ --- .../block-layout-location.vk_shader_test | 117 + ...lock-member-layout-location.vk_shader_test | 68 ++ ...block-mixed-layout-location.vk_shader_test | 120

[Piglit] [PATCH] vulkan: Add a test for the OpFUnord* comparisons

2018-11-08 Thread Neil Roberts
These are unique to SPIR-V so they are interesting to test. --- .../unordered-comparison.vk_shader_test | 780 ++ 1 file changed, 780 insertions(+) create mode 100644 tests/vulkan/shaders/unordered-comparison.vk_shader_test diff --git

[Piglit] [PATCH] vulkan: Add tests for interpolateAt*

2018-11-08 Thread Neil Roberts
For a while there was a bug in anv which meant that the interpolate functions wouldn’t work if the thing being interpolated contained a vertex component selector. Adding these tests will help make sure we don’t regress that. See: https://patchwork.freedesktop.org/patch/237095/ ---

Re: [Piglit] [PATCH] vulkan: test cases for large local arrays

2018-11-08 Thread Neil Roberts
Looks good to me  Reviewed-by: Neil Roberts - Neil Alejandro Piñeiro writes: > Equivalent to the GLSL tests added with the series "Test cases for > large GLSL local arrays". Quoting from the cover-letter of that > series: > >"Drivers typically need sp

[Piglit] [PATCH 3/4] framework/test: Use relative paths in the filename for VkRunnerTest

2018-11-07 Thread Neil Roberts
Previously the filename was the full path to the test. This would break if the filename was serialized and installed to a different location. The code is based on what is done for ASMParserTest. However I have a suspicion that this won’t work for running generated tests from an out-of-tree build.

[Piglit] [PATCH 1/4] Cmake: Install vk_shader_test files

2018-11-07 Thread Neil Roberts
--- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7d23fee1..b416cacb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -537,7 +537,7 @@ install ( install ( DIRECTORY tests DESTINATION

[Piglit] [PATCH 4/4] framework: Add support for serializing VkRunner tests

2018-11-07 Thread Neil Roberts
--- framework/profile.py| 4 +++- tests/CMakeLists.no_api.txt | 11 +++ tests/find_static_tests.py | 5 - tests/serializer.py | 7 ++- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/framework/profile.py b/framework/profile.py index

[Piglit] [PATCH 2/4] framework/test: Set the filename property on VkRunnerTest

2018-11-07 Thread Neil Roberts
This will be retrieved when generating the XML profile for the VkRunner tests. --- framework/test/piglit_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py index c80e355d1..4d3008139 100644 ---

[Piglit] [PATCH 0/4] Support serialization of VkRunner tests

2018-11-07 Thread Neil Roberts
As requested by Dylan in the review for the patch series to add VkRunner as an external dependency¹, this series adds the missing serialization support. 1. https://lists.freedesktop.org/archives/piglit/2018-November/025336.html Neil Roberts (4): Cmake: Install vk_shader_test files framework

[Piglit] [PATCH v4] framework: Add a vulkan tests profile

2018-11-05 Thread Neil Roberts
This searches for files named *.vk_shader_test in the tests/vulkan directory and runs them with VkRunner. VkRunner is executed as an external dependency. It is found either with the vkrunner:bin config option, by setting the PIGLIT_VKRUNNER_BINARY environment variable, or just in the search path.

[Piglit] [PATCH v2 0/2] Vulkan testing with VkRunner

2018-11-03 Thread Neil Roberts
for the build system. Neil Roberts (2): framework: Add a vulkan tests profile vulkan: Add some tests for glsl450 builtin functions using doubles framework/test/piglit_test.py | 17 tests/vulkan.py | 33 +++ .../face-forward-double.vk_shader_test

[Piglit] [PATCH v3 1/2] framework: Add a vulkan tests profile

2018-11-03 Thread Neil Roberts
This searches for files named *.vk_shader_test in the tests/vulkan directory and runs them with VkRunner. VkRunner is executed as an external dependency. It is found either in the path or by setting the PIGLIT_VKRUNNER_BINARY environment variable. v2: Move VkShaderTest to piglit_test.py and

[Piglit] [PATCH 2/2] vulkan: Add some tests for glsl450 builtin functions using doubles

2018-11-03 Thread Neil Roberts
--- .../face-forward-double.vk_shader_test| 88 +++ .../glsl450/frexp-double.vk_shader_test | 61 + .../glsl450/isinf-double.vk_shader_test | 81 + .../glsl450/reflect-double.vk_shader_test | 55

Re: [Piglit] [PATCH 1/2] multisample-accuracy: Add an error margin for lit/unlit pixels

2018-07-24 Thread Neil Roberts
ry hits each pixel and count it that way rather than relying on downsampling a high-res test image. Regards, - Neil > -Mark > > Neil Roberts writes: > >> The unlit and totally_lit stats are supposed to count the pixels where >> either a primitive completely covers the pixel

Re: [Piglit] [PATCH 0/8] Vulkan testing with VkRunner

2018-04-26 Thread Neil Roberts
Neil Roberts <nrobe...@igalia.com> writes: > Eventually we could probably get a lot of testing fairly cheaply by > modifying some of the generated_tests scripts to also generate Vulkan > tests. It might even be worth semi-automatically converting existing > GL shader tests using

[Piglit] [PATCH v2] framework: Add a vulkan tests profile

2018-04-06 Thread Neil Roberts
This searches for files named *.vk_shader_test in the tests/vulkan directory and runs them with VkRunner. Reviewed-by: Dylan Baker v2: Move VkShaderTest to piglit_test.py and rename to VkRunnerTest. Add future imports. Remove unused import. ---

[Piglit] [PATCH] vkrunner: Add the script used to generate vr-format-table.h

2018-04-06 Thread Neil Roberts
Note that the script is not run automatically as part of the build process and instead vr-format-table.h is checked into git. --- I’ve split the script out to make it easier to review. Thanks for the feedback Dylan. tests/vulkan/vkrunner/make-formats.py | 137 ++

Re: [Piglit] [PATCH 0/8] Vulkan testing with VkRunner

2018-04-05 Thread Neil Roberts
The sixth patch seems to have gotten stuck in the moderator queue for being too big. In the meantime I’ve also pushed a branch here: https://github.com/Igalia/piglit/commits/nroberts/vkrunner - Neil Neil Roberts <nrobe...@igalia.com> writes: > This series sets up a framework for testi

[Piglit] [PATCH 7/8] framework: Add a vulkan tests profile

2018-04-04 Thread Neil Roberts
This searches for files named *.vk_shader_test in the tests/vulkan directory and runs them with VkRunner. --- framework/test/vk_shader_test.py | 39 +++ tests/vulkan.py | 30 ++ 2 files changed, 69 insertions(+)

[Piglit] [PATCH 8/8] vulkan: Add some tests for glsl450 builtin functions using doubles

2018-04-04 Thread Neil Roberts
--- .../glsl450/face-forward-double.vk_shader_test | 88 ++ tests/vulkan/glsl450/frexp-double.vk_shader_test | 61 +++ tests/vulkan/glsl450/isinf-double.vk_shader_test | 81 tests/vulkan/glsl450/reflect-double.vk_shader_test | 55

[Piglit] [PATCH 5/8] framework: Add a Vulkan platform

2018-04-04 Thread Neil Roberts
This defaults to building only on Linux as with the GLES platforms because later patches add code using fork/exec which will need porting to compile on Windows. --- CMakeLists.txt | 7 +++ cmake/piglit_util.cmake| 2 +- cmake/target_api/CMakeLists.txt

[Piglit] [PATCH 4/8] util: Move the half float functions from util-gl to util

2018-04-04 Thread Neil Roberts
They will be equally useful on Vulkan. --- tests/util/piglit-util-gl.c | 90 - tests/util/piglit-util-gl.h | 29 --- tests/util/piglit-util.c| 89 tests/util/piglit-util.h| 28

[Piglit] [PATCH 0/8] Vulkan testing with VkRunner

2018-04-04 Thread Neil Roberts
/ Neil Roberts (8): util: Add a PIGLIT_STRINGIFY macro util: Add a piglit_fatal utility util: Add a libutil_vulkan library util: Move the half float functions from util-gl to util framework: Add a Vulkan platform Import VkRunner framework: Add a vulkan tests profile vulkan: Add some tests

[Piglit] [PATCH 2/8] util: Add a piglit_fatal utility

2018-04-04 Thread Neil Roberts
This prints a formatted error and then aborts. --- tests/util/piglit-util.c | 16 tests/util/piglit-util.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c index ed7d21c95..a79db3fb7 100644 --- a/tests/util/piglit-util.c

[Piglit] [PATCH 1/8] util: Add a PIGLIT_STRINGIFY macro

2018-04-04 Thread Neil Roberts
--- tests/util/piglit-util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h index 0a5eab810..3dfb5d6c5 100644 --- a/tests/util/piglit-util.h +++ b/tests/util/piglit-util.h @@ -162,6 +162,8 @@ piglit_register_subtests(const char *names[]);

[Piglit] [PATCH 3/8] util: Add a libutil_vulkan library

2018-04-04 Thread Neil Roberts
This is currently no different from libutil but it is added anyway to match the other APIs. --- tests/util/CMakeLists.vulkan.txt | 15 +++ tests/util/piglit-util-vulkan.c | 1 + 2 files changed, 16 insertions(+) create mode 100644 tests/util/CMakeLists.vulkan.txt create mode

[Piglit] [PATCH] Fix probing for tests based on arb_uniform_buffer_object/rendering

2018-02-01 Thread Neil Roberts
These tests set up either UBOs or SSBOs containing different values in order to render squares with different colors, sizes and rotations. However the test was only probing the center pixel of the square so it wouldn’t actually matter if the rotation or size was wrong. The rotation is the only

[Piglit] [PATCH 2/2] shader_draw_parameters: Also test using an indirect draw

2017-11-10 Thread Neil Roberts
The test can now take an extra argument ‘indirect’ which will cause it to emit the draw calls via an indirect buffer. This is useful to test at least on i965 because emitting the gl_BaseVertex takes a different path in that case. --- tests/all.py | 10 +-

[Piglit] [PATCH 1/2] shader_draw_parameters: Also test using glDrawArrays with first > 0

2017-11-10 Thread Neil Roberts
The ‘first’ parameter should not affect the value of gl_BaseVertex put it should be added to gl_VertexID. This patch adds an extra rectangle to the drawn area to test a non-zero ‘first’ parameter. This is worth testing because Mesa is currently getting this wrong. ---

Re: [Piglit] [PATCH v2] shaders: Test using a bound program after an unsuccessful relink

2017-11-03 Thread Neil Roberts
Oops, I used the wrong message ID in --in-reply-to. That’s what I get for trying to be too clever with git-send-email. Sorry about that. Regards, - Neil Neil Roberts <nrobe...@igalia.com> writes: > Timothy Arceri <tarc...@itsqueeze.com> writes: > >> Thanks for the

[Piglit] [PATCH v2] shaders: Test using a bound program after an unsuccessful relink

2017-11-03 Thread Neil Roberts
Timothy Arceri writes: > Thanks for the test! The idea is great, the only problem I see is > that the minimum GL version seems too high. This test would not run > on the i915 driver which is a problem IMO. Can you lower the > requirements? Good point. Here is a v2 that

[Piglit] [PATCH] shaders: Test using a bound program after an unsuccessful relink

2017-11-02 Thread Neil Roberts
If a bound program is relinked unsuccessfully it is supposed to keep the executable and the program state such as the uniforms. This adds a test for that which updates a uniform, does a failed relink and verifies that a render succeeds with the new uniform value. This is currently causing a

[Piglit] [PATCH] arb_shader_ballot: Fix the test values for gl_SubGroupG{e, t}MaskARB

2017-10-31 Thread Neil Roberts
The previous comparison values were calculated by shifting ~0 by the invocation index. This would end up including bits higher than gl_SubGroupSizeARB. --- .../arb_shader_ballot/execution/fs-builtin-variables.shader_test | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [Piglit] [PATCH] arb_sample_shading: ensure number of samples is at least one

2016-02-18 Thread Neil Roberts
Oh I didn't notice you'd written this test when I replied to your message on mesa-dev. Looks good to me. Reviewed-by: Neil Roberts <n...@linux.intel.com> - Neil Ilia Mirkin <imir...@alum.mit.edu> writes: > From the ARB_sample_shading spec: > >"gl_NumSamples

Re: [Piglit] [PATCH] arb_fb_no_attach: Test with an odd sample count

2016-02-04 Thread Neil Roberts
Ilia Mirkin writes: >> + "imageStore(img,\n" >> + " ivec2(gl_FragCoord.xy),\n" >> + " uvec4(gl_NumSamples));\n" > > Could I convince you to use ssbo instead? Not only is it supported by > nouveau [unlike

[Piglit] [PATCH v2] arb_fb_no_attach: Test with an odd sample count

2016-02-04 Thread Neil Roberts
Adds a test that creates a framebuffer with no attachments and sets the default sample count to 3. It then verifies that GL_SAMPLES for the fbo is at least 3 and GL_SAMPLE_BUFFERS is 1. It also checks the value of gl_NumSamples in the shader by writing to an SSBO with the value to verify that it

[Piglit] [PATCH] arb_fb_no_attach: Test with an odd sample count

2016-02-03 Thread Neil Roberts
Adds a test that creates a framebuffer with no attachments and sets the default sample count to 3. It then verifies that GL_SAMPLES for the fbo is at least 3. It also checks the value of gl_NumSamples in the shader by doing an image store with the value to verify that it has the same value.

[Piglit] [PATCH] Test that cubemaps with non-matching faces are incomplete

2016-01-21 Thread Neil Roberts
This creates a cubemap where one of the faces either has a different size or a different format from the other faces and then checks that it is incomplete by rendering with it and veryifying that the sampler returns solid black. The format test currently fails on Mesa. --- tests/all.py

[Piglit] [PATCH v2] Test calling glViewport while using EGL_KHR_surfaceless_context

2015-12-10 Thread Neil Roberts
The i965 driver currently has a bug where if no window system surface is bound then it will crash when glViewport is called. This patch adds a test case which just sets up a simple context and binds it with no surface before calling glViewport. As far as I can tell this is the first explicit test

Re: [Piglit] [PATCH] Test calling glViewport while using EGL_KHR_surfaceless_context

2015-12-10 Thread Neil Roberts
Ian Romanick writes: >> As far as I can tell this is the first test for surfaceless contexts >> so it also adds the directory and the test group. > > There are a couple other tests that use surfaceless contexts > (tests/egl/spec/egl-1.4/egl-terminate-then-unbind-context.c

[Piglit] [PATCH] egl: Use piglit_require_egl_extension

2015-12-10 Thread Neil Roberts
Previously there were a couple of places directly searching for extensions in EGL_EXTENSIONS via strstr. This doesn't check the terminator for the extension name properly and there is already a helper function for this so we might as well use it. --- tests/egl/egl-util.c

[Piglit] [PATCH] Test calling glViewport while using EGL_KHR_surfaceless_context

2015-12-08 Thread Neil Roberts
The i965 driver currently has a bug where if no window system surface is bound then it will crash when glViewport is called. This patch adds a test case which just sets up a simple context and binds it with no surface before calling glViewport. As far as I can tell this is the first test for

Re: [Piglit] [PATCH 3/4] Add a fast clear test for non-MSRT surfaces

2015-12-01 Thread Neil Roberts
"Pohjolainen, Topi" <topi.pohjolai...@intel.com> writes: > On Tue, Dec 01, 2015 at 02:18:59PM +, Neil Roberts wrote: >> "Pohjolainen, Topi" <topi.pohjolai...@intel.com> writes: >> >> >> + if (

Re: [Piglit] [PATCH 4/4] Test blending a fast clear color with GL_FRAMEBUFFER_SRGB enabled

2015-12-01 Thread Neil Roberts
"Pohjolainen, Topi" <topi.pohjolai...@intel.com> writes: > On Wed, Nov 25, 2015 at 06:11:53PM +0100, Neil Roberts wrote: >> On SKL in the i965 driver there is some special handling of the fast >> clear optimisation when GL_FRAMEBUFFER_SRGB is enabled bec

Re: [Piglit] [PATCH 3/4] Add a fast clear test for non-MSRT surfaces

2015-12-01 Thread Neil Roberts
"Pohjolainen, Topi" writes: >> +if (single_sample) { >> +glTexParameteri(tex_target, >> +GL_TEXTURE_MAG_FILTER, >> +GL_NEAREST); >> +glTexParameteri(tex_target, >> +

[Piglit] [PATCH] fbo-depth-array: Fix reporting the piglit_result

2015-11-30 Thread Neil Roberts
test_once was ignoring the return value of draw_and_test_layer so the test would report a pass even if it failed. Reported-by: Marek Olšák --- Oops, sorry about that. Thanks for reporting it.

Re: [Piglit] [PATCH 1/4] mulitsample-fast-clear: Test enabling GL_FRAMEBUFFER_SRGB

2015-11-27 Thread Neil Roberts
"Pohjolainen, Topi" writes: >> glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo); >> piglit_draw_rect(offset * 16 * 2.0f / piglit_width - 1.0f, > > This is a question regarding the existing logic. Earlier the test > calls

[Piglit] [PATCH 2/4] multisample-fast-clear: Test out-of-range values

2015-11-25 Thread Neil Roberts
The test colors now include negative values and values greater than one. Instead of rendering the results into the window system buffer a floating point texture is now created so that it can store values that haven't been clamped to [0,1]. --- .../spec/ext_framebuffer_multisample/fast-clear.c |

[Piglit] [PATCH 4/4] Test blending a fast clear color with GL_FRAMEBUFFER_SRGB enabled

2015-11-25 Thread Neil Roberts
On SKL in the i965 driver there is some special handling of the fast clear optimisation when GL_FRAMEBUFFER_SRGB is enabled because the hardware can't cope with the fast clear buffer in that case and the color buffer needs to be resolved. This test just tries varies different clear colors and

[Piglit] [PATCH 3/4] Add a fast clear test for non-MSRT surfaces

2015-11-25 Thread Neil Roberts
ext_framebuffer_multisample-fast-clear can now take a parameter on the command line to make it test a single-sample buffer instead. This is worth testing at least on i965 because fast clears are handled differently when multisampling is not used. --- tests/all.py

[Piglit] [PATCH 1/3] Add a fast clear test for non-MSRT surfaces

2015-11-25 Thread Neil Roberts
This is similar to ext_framebuffer_multisample-fast-clear except that it tests a regular single-sampled texture. This is worth testing at least on i965 because fast clears are handled differently when multisampling is not used. --- tests/all.py| 5 + tests/fbo/CMakeLists.gl.txt

[Piglit] [PATCH 3/3] Test blending a fast clear color with GL_FRAMEBUFFER_SRGB enabled

2015-11-25 Thread Neil Roberts
On SKL in the i965 driver there is some special handling of the fast clear optimisation when GL_FRAMEBUFFER_SRGB is enabled because the hardware can't cope with the fast clear buffer in that case and the color buffer needs to be resolved. This test just tries varies different clear colors and

Re: [Piglit] [PATCH 3/3] Test blending a fast clear color with GL_FRAMEBUFFER_SRGB enabled

2015-11-25 Thread Neil Roberts
Neil Roberts <n...@linux.intel.com> writes: > +g(['fast-clear-blend']) Oops, this should be 'arb_framebuffer_srgb-fast-clear-blend'. I've fixed this locally. - Neil ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freede

Re: [Piglit] [PATCH 4/4] ext_shader_samples_identical: Simple fragment shader rendering test

2015-11-19 Thread Neil Roberts
Ian Romanick writes: > +# Group EXT_shader_samples_identical > +with profile.group_manager( > +PiglitGLTest, > +grouptools.join('spec', 'EXT_shader_samples_identical')) as g: > +g(['ext_shader_samples_identical', '2']) > +

Re: [Piglit] [PATCH] ext_framebuffer_multisample: Ensure type_param is initialized.

2015-11-15 Thread Neil Roberts
Looks good to me, thanks. Reviewed-by: Neil Roberts <n...@linux.intel.com> Regards, - Neil Vinson Lee <v...@freedesktop.org> writes: > Fixes "uninitialized scalar variable" defect reported by Coverity. > > Signed-off-by: Vinson Lee <v...@fr

[Piglit] [PATCH v2 2/2] Stress test the fast clear optimisation with multisample buffers

2015-11-12 Thread Neil Roberts
On Gen7+ in the i965 driver of Mesa there is an optimisation so that when the color buffer is cleared with certain allowable colors a separate smaller buffer is used to keep track of which pixels are using this clear color and the clear color is stored outside the buffer in the surface state. That

[Piglit] [PATCH 1/2] fbo-formats: Fix the base internal format for GL_RGB_SNORM

2015-11-12 Thread Neil Roberts
--- tests/fbo/fbo-formats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h index 655d149..d73e282 100644 --- a/tests/fbo/fbo-formats.h +++ b/tests/fbo/fbo-formats.h @@ -274,7 +274,7 @@ static const struct format_desc

Re: [Piglit] [PATCH 2/2] arb_shader_stencil_export: Compare all values

2015-11-06 Thread Neil Roberts
Ben Widawsky writes: > - glReadPixels(0, 0, 3, 1, GL_STENCIL_INDEX, GL_FLOAT, p); > + glReadPixels(0, 0, 256, 256, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, p); > piglit_present_results(); > > /* we hardcode 129 in the shader */ > - if (p[0] !=

Re: [Piglit] [PATCH 1/2] arb_shader_stencil_export: move to standard location

2015-11-06 Thread Neil Roberts
Ben Widawsky writes: > diff --git a/tests/spec/arb_shader_stencil_export/CMakeLists.gl.txt > b/tests/spec/arb_shader_stencil_export/CMakeLists.gl.txt > new file mode 100644 > index 000..86d55a9 > --- /dev/null > +++

[Piglit] [PATCH] Don't require the same format for mulitisample blits

2015-11-04 Thread Neil Roberts
uj.pho...@gmail.com> + * Neil Roberts <n...@linux.intel.com> */ #include "piglit-test-pattern.h" @@ -50,24 +58,70 @@ PIGLIT_GL_TEST_CONFIG_BEGIN PIGLIT_GL_TEST_CONFIG_END const int pattern_width = 256; const int pattern_height = 256; -Fbo src_fbo, dst_fbo; +Fbo src_fbo, d

[Piglit] [PATCH] Demonstrate a bug with fast clears on MS FBOs with missing comps

2015-11-04 Thread Neil Roberts
There is currently a bug with the i965 driver in Mesa with the fast clear optimisation when there are missing components in the framebuffer. If the texture that was rendered to is later sampled it will use the fast clear color without overriding the missing components to 0 or 1. This patch adds a

[Piglit] [PATCH] fbo-depth-array: Don't create an enormous color render target

2015-10-29 Thread Neil Roberts
When the -fbo option is given to the fbo-depth-array test it tries to render to a range of different depth/stencil buffer sizes with dimensions of up to 8192. It verifies the rendering was correct by binding the depth or stencil buffer as a texture source, rendering the texture into the Piglit

[Piglit] [PATCH 2/2] multisample-accuracy: Relax the accuracy threshold

2015-10-23 Thread Neil Roberts
With 16x MSAA on the i965 driver the accuracy test was failing. It is possible to fix it by shifting the position of the supersampling grid in the reference image down and left by 1/16th of a pixel so that the multisample positions used in the hardware coincide with those of the supersampling

[Piglit] [PATCH 1/2] multisample-accuracy: Add an error margin for lit/unlit pixels

2015-10-23 Thread Neil Roberts
The unlit and totally_lit stats are supposed to count the pixels where either a primitive completely covers the pixel or no primitive touches it at all. However this is effectively only determined by checking whether any primitive has intersected one of the supersample positions of the reference

Re: [Piglit] [PATCH] multisample-accuracy: Shift the reference image by 1/32th of a pixel

2015-10-23 Thread Neil Roberts
Neil Roberts <n...@linux.intel.com> writes: > This fixes false negatives for hardware using the sampling positions > described by D3D on 16x MSAA. Please see the comment explaining the > issue. > --- > tests/spec/ext_framebuffer_multisample/common.cpp | 37 > +

[Piglit] [PATCH] multisample-accuracy: Shift the reference image by 1/32th of a pixel

2015-10-22 Thread Neil Roberts
This fixes false negatives for hardware using the sampling positions described by D3D on 16x MSAA. Please see the comment explaining the issue. --- tests/spec/ext_framebuffer_multisample/common.cpp | 37 --- tests/spec/ext_framebuffer_multisample/common.h | 3 +- 2 files

[Piglit] [PATCH] Fix fragcoord tests to check for the pixel center

2015-10-08 Thread Neil Roberts
Preivously the frag coord tests were effectively trying to assert that the results for gl_FragCoord were aligned to whole numbers, ie that it reports the bottom left edge of the pixel. However by default gl_FragCoord actually reports the center of the pixel, so the bottom left pixel would be

[Piglit] [PATCH] texelFetch: Fix the divisors when testing MSAA with > 10 samples

2015-09-14 Thread Neil Roberts
Previously the test was trying to convert a sample number to the range [0,1] by dividing by 10.0. This doesn't work when testing 16x MSAA because it ends up with values greater than 1.0 which get clamped. This patch makes it divide by miplevels so that it will work whatever the number of samples

Re: [Piglit] [PATCH] point-vertex-id: Fix memory leak.

2015-08-06 Thread Neil Roberts
Looks good to me. Reviewed-by: Neil Roberts n...@linux.intel.com - Neil Vinson Lee v...@freedesktop.org writes: Fix resource leak defect reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/general/point-vertex-id.c | 2 ++ 1 file changed, 2 insertions

[Piglit] [PATCH] Test interpolateAtSample with dynamically nonuniform values

2015-07-23 Thread Neil Roberts
Adds a test which is similar to interpolateAtSample-different except that it draws a triangle which covers more than one fragment and makes sure to use a different sample ID for each fragment so that it won't be dynamically uniform. The GLSL spec doesn't mention that the sample ID has to be

[Piglit] [PATCH] Test that interpolateAtSample returns different results

2015-07-21 Thread Neil Roberts
Adds a new test for interpolateAtSample which captures the results from the function with each different sample value and ensures that they are all different. This can be done either with a constant or non-constant value depending on whether a command line argument is given. The other tests for

[Piglit] [PATCH] point-vertex-id: Test using an instanced attribute

2015-07-14 Thread Neil Roberts
Adds an option to use an instanced attribute so that it can be tested in combination with glPolygonMode. This demonstrates a bug on the Mesa i965 driver on BDW which was reported as bug #91292. The ‘divisor’ argument can be added in addition to any of the other arguments so that all of the

[Piglit] [PATCH] point-vertex-id: Additionally test with gl_InstanceID

2015-07-13 Thread Neil Roberts
The point-vertex-id test was originally created to test gl_VertexID in combination with glPolygonMode(GL_POINT) because of a bug with the i965 driver in Mesa. The same bug exists with gl_InstanceID and the code for BDW has some extra complications in this case so I think it's worth extending the

Re: [Piglit] [PATCH] sampler_array_indexing: also check that texture coordinates work

2015-06-18 Thread Neil Roberts
Looks good to me. Thanks for doing that. Reviewed-by: Neil Roberts n...@linux.intel.com Regards, - Neil Timothy Arceri t_arc...@yahoo.com.au writes: Previously the shaders were using a checkerboard texture with identical colours for each part of the grid. That meant that it didn't actually

Re: [Piglit] [PATCH] arb_gpu_shader5: test indexing of samplers inside structs

2015-06-15 Thread Neil Roberts
Hi, I've just pushed this patch which changes the other sampler_array_indexing tests so that the textures are not just a solid colour. The idea is that that way it will ensure that the texture coordinates are being used correctly.

[Piglit] [PATCH] Test sampling functions with constant zero arguments

2015-04-30 Thread Neil Roberts
+ * 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: + *Neil Roberts n...@linux.intel.com + * + */ + +/** @file zero-tex-coord.c + * + * Tests various texture

[Piglit] [PATCH] copyteximage: Fix the z coordinate used for rendering 3D textures

2015-02-19 Thread Neil Roberts
The copyteximage test tries to render each layer of a 3D texture by rendering a quad with the same z value in the texture coordinates for each vertex. It was picking this value by just dividing the layer number by the depth of the texture. I think this is wrong because it will effectively point to

[Piglit] [PATCH piglit v2] texsubimage: Test GL_ARB_texture_cube_map_array

2015-01-08 Thread Neil Roberts
If texsubimage is passed cube_map_array on the command line it will try updating a subregion of a cube map array. All of the faces of all of the layers of the texutre are rendered using a special vertex shader to modify the texture coordinates so that they pick a particular face based on the z

[Piglit] [PATCH piglit] shaders: Test using an int vertex attrib value that looks like NaN

2015-01-07 Thread Neil Roberts
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

Re: [Piglit] [PATCH] arb_direct_state_access: Simplified texturesubimage test.

2014-12-22 Thread Neil Roberts
to it use the regular glTexImage*(...,NULL) functions first. It would also make sense to squash this patch into the first patch instead of pushing both versions. Assuming those changes are made, Reviewed-by: Neil Roberts n...@linux.intel.com Regards, - Neil Laura Ekstrand la...@jlekstrand.net writes

[Piglit] [PATCH piglit 2/2] texsubimage: Test GL_ARB_texture_cube_map_array

2014-12-18 Thread Neil Roberts
If texsubimage is passed cube_map_array on the command line it will try updating a subregion of a cube map array. All of the faces of all of the layers of the texutre are rendered using a special vertex shader to modify the texture coordinates so that they pick a particular face based on the z

[Piglit] [PATCH piglit 1/2] texsubimage: Add tests for array textures

2014-12-18 Thread Neil Roberts
If the 'array' command line option is passed to the texsubimage test it will now try updating subregions of 1D and 2D array textures. This requires a shader to render. --- tests/all.py | 1 + tests/texturing/texsubimage.c | 122 +- 2

Re: [Piglit] [PATCH 02/24] arb_direct_state_access: glTextureSubImage*D test.

2014-12-18 Thread Neil Roberts
Today I pushed some patches to the original version of this test which change it quite a lot. Previously it updated a sub-region of the texture with the exact same contents as were already in the texture so an implementation that did nothing on glTexSubImage[123]D would actually pass the test. It

[Piglit] [PATCH piglit 3/3] texsubimage: Update the textures with different values

2014-12-17 Thread Neil Roberts
Previously the test was updating sub regions of the test texture with the same values that were already in the texture. Therefore an implementation that does nothing on glTexSubImage2D would pass which doesn't seem very useful. This patch makes it create two reference images with different values.

[Piglit] [PATCH piglit 2/3] texsubimage: Render all of the images of a 3D texture

2014-12-17 Thread Neil Roberts
Previously when testing a 3D texture the test would just draw a single image with the width and height of the texture and the z coordinates set to span across the depth. This wouldn't end up drawing all of the texels in the texture so instead it will now render all of the images in a vertical

[Piglit] [PATCH piglit] Don't test floats with the form ‘1f’

2014-11-26 Thread Neil Roberts
There is nothing in the GLSL spec which says you can have a float literal without an exponent or a decimal point even if you add the ‘f’ suffix. This patch replaces that literal with some other variations that should be accepted according to the spec. ---

[Piglit] [PATCH piglit] Test doing a meta operation while there is an occlusion query

2014-11-25 Thread Neil Roberts
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: + *Neil Roberts n...@linux.intel.com

[Piglit] [PATCH piglit] Add a test using gl_VertexID with glPolygonMode(GL_POINT)

2014-10-23 Thread Neil Roberts
This currently exposes a bug in the i965 driver. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84677 --- tests/all.py| 1 + tests/general/CMakeLists.gl.txt | 1 + tests/general/point-vertex-id.c | 154 3 files changed, 156

[Piglit] [PATCH piglit] Add a test for GLX_ARB_context_flush_control

2014-10-13 Thread Neil Roberts
+ * 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: + *Neil Roberts n...@linux.intel.com + * + */ + +/** @file glx-context-flush-control.c + * + * Tests

[Piglit] [PATCH piglit] Time the performance difference with GLX_ARB_context_flush_control

2014-10-10 Thread Neil Roberts
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + *Neil Roberts n...@linux.intel.com + * + */ + +/** @file glx-context-flush-control-performance.c + * + * Creates a pair of contexts each with its own window and renders to + * both of them

Re: [Piglit] [PATCH] glx: Add a test for GLX_ARB_context_flush_control

2014-09-30 Thread Neil Roberts
Hi, I had a look at this patch because I'm about to post patches to Mesa to implement the extension. It would be good to get this patch in before the patches land in Mesa but I think it currently has some issues. The test probes for a pixel value immediately after calling glXSwapBuffers but as

Re: [Piglit] [PATCH piglit v2] teximage-color: Fix un_to_float for 32-bit builds

2014-09-18 Thread Neil Roberts
Ilia Mirkin imir...@alum.mit.edu writes: Just bikeshedding here, but isn't the common way of doing this to just have (1ULL bits) - 1 ? Yes, that's probably more clear. One advantage of doing the shift in the other direction is if we ever end up supporting textures with 64-bit ints then we

[Piglit] [PATCH piglit] teximage-color: Use UINT64_C() instead of ul for a 64-bit constant

2014-09-17 Thread Neil Roberts
The un_to_float function was trying to get the maximum value given a number of bits by shifting ~0ul by the number of bits. For the GL_UNSIGNED_INT type this function was also being used to get a maximum value for a 32-bit quantity. However on a 32-bit build this would mean that it is shifting a

[Piglit] [PATCH piglit v2] teximage-color: Fix un_to_float for 32-bit builds

2014-09-17 Thread Neil Roberts
Actually I think this might be a slightly cleaner way to do the shift because it doesn't depend on any particular size of unsigned int and there are fewer ~s. - Neil --- 8 --- (use git am --scissors to automatically chop here) The un_to_float function was trying to get the

Re: [Piglit] [PATCH piglit v2] teximage-color: Fix un_to_float for 32-bit builds

2014-09-17 Thread Neil Roberts
Hi Ken, Ken Phillis Jr kphilli...@gmail.com writes: - unsigned int max = ~(~0ul bits); + unsigned int max = ~0u (sizeof max * 8 - bits); why not use, sizeof(unsigned int)? the call sizeof max may not always work depending on compiler Could you explain which compilers “sizeof

[Piglit] [PATCH piglit] fbo-integer-precision-clear: Use value that would be an invalid float

2014-08-14 Thread Neil Roberts
This changes one of the values of the integer clear color to 0x7f817f81. If this were interpreted as a float value then it would be a signalling NaN. If this passes through an x87 register then the store instruction will convert it to a quiet NaN by setting bit 22. The integer value would then be

[Piglit] [PATCH piglit 7/6] Add a test for all of the modes of the two half-float formats of BPTC

2014-07-31 Thread Neil Roberts
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: + *Neil Roberts n...@linux.intel.com + * + */ + +/** @file bptc-modes.c + * + * Tests a BPTC-compressed half-float texture

  1   2   >