summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-09-29Print test commands before we execute themHEADmasterJon Turney1-0/+1
2018-09-27sanity: Don't add generated_tests since they are built laterJordan Justen1-0/+18
Fixes: f07e9df45 "sanity: Add various shader_runner tests" Reported-by: Mark Janes <mark.a.janes@intel.com> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2018-09-27Revert "sanity: Add various shader_runner tests"Mark Janes1-25/+0
Piglit fails to build with this commit. This reverts commit f07e9df45113d01058cc1bca794d623605c41881.
2018-09-25sanity: Add various shader_runner testsJordan Justen1-0/+25
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
2018-09-25sanity: Turn shader_test list into a tupleJordan Justen1-4/+9
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-09-20serializer: serialize new fast-skip attributesDylan Baker1-15/+16
v2: - Serialize no-process-isolation shader runner tests
2018-09-20glsl-1.10: add a 'initialization-incompatible-type-propagation' testDanylo Piliaiev3-0/+59
These tests test the case when initialising with incompatible type changed a type of the variable being initialized. While main manifestation of the issue is overly verbose and incorrect error message it did result in a crash in case of second test. v2: Splitted the test in several ones (Timothy Arceri) Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107547
2018-09-19glsl-1.10: Verify result of sign(a)*sign(b)Ian Romanick2-0/+114
These tests caught a bug in an optimized version of nir_op_fsign that I was working on for i965. I thought of a couple clever ways to optimize sign(a)*sign(b), but most of those ways would fail one or more of the tests with ±Inf. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2018-09-18glsl-1.20/fs-deref-literal-array-of-structs-with-multiple-members-large-arra ↵Nicolai Hähnle1-4/+3
y: Fix it Hard to believe that this was never noticed... Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-09-18fbo-drawbuffers-maxtargets: fix a warningNicolai Hähnle1-1/+1
Ensure that the allocated buffer is guaranteed to be big enough. Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-09-17shaders: Reproduce a bug in the i965 backend optimizerIan Romanick4-0/+350
The optimizer recently added the ability to replace a compare with a subtraction under certain circumstances. This can fail for integers. For inputs a = 0x80000000, b = 4, int(0x80000000) < 4, but int(0x80000000) - 4 overflows and results in 0x7ffffffc. That's not less than zero, so the flags get set differently than for (a < b). This really only affected the signed comparisons because the subtract would always have a signed source types, so it wouldn't be seen as a match for the compare with unsigned source types. v2: Just require GL_EXT_shader_integer_mix. Remove stray change to tests/spec/CMakeLists.txt. Both suggested by Ilia. Since this is no longer a "stock" GLSL 1.30 test, move to tests/shaders/. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: Matt Turner <mattst88@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2018-09-11tests: Added a new GTF-GL test profile for the Khronos CTS runnerAndres Gomez1-0/+95
Cc: Mark Janes <mark.a.janes@intel.com> Cc: Dylan Baker <dylanx.c.baker@intel.com> Cc: Juan A. Suarez Romero <jasuarez@igalia.com> Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-09-11tests: Added a new GTF-GLES test profile for the Khronos CTS runnerAndres Gomez1-0/+82
Cc: Mark Janes <mark.a.janes@intel.com> Cc: Dylan Baker <dylanx.c.baker@intel.com> Cc: Juan A. Suarez Romero <jasuarez@igalia.com> Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-09-11cl: Add test for call stack realignmentMatt Arsenault1-0/+93
v2: Use uintptr_t v3: Formatting v4: More uintptr_t Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
2018-09-07Add tests for GL_AMD_depth_clamp_separateSagar Ghuge6-0/+373
v2: 1) Use correct coding style (Ian Romanick) 2) Refactor code (Ian Romanick) 3) Merge DEPTH_CLAMP_NEAR_AMD and DEPTH_CLAMP_FAR_AMD state check in single file (Ian Romanick) 4) Add missing piglit_require_extension method (Marek Olask) Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Tested-by: Marek Olšák <marek.olsak@amd.com>
2018-09-05shader_runner: Take spirv_replaces_glsl into account for current_configMichel Dänzer1-2/+2
Without this, validate_current_gl_context never returns true if spirv_replaces_glsl == true, resulting in repeatedly calling recreate_gl_context indefinitely after the first subtest. Fixes: 0baf4e2708c "shader_runner/spirv: support loading SPIR-V shaders" Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2018-09-05egl_khr_create_context: Proper invalid attributes for EGL 1.5Miguel A. Vico3-2/+35
When EGL_KHR_create_context was originally written, EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR was an invalid attribute for OpenGL ES. After moving the extension to core EGL 1.5, the aforementioned attribute was made valid for both OpenGL and OpenGL ES. Check whether the EGL version is lower than 1.5 before checking EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR is an invalid attribute. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> [Eric: trivial rename of the function to add `_at_least`] Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-04arb_vertex_array_object: Add test for deleting object zeroIan Romanick3-0/+73
As of commit 781a78914c7, this test fails with: arb_vertex_array-delete-object-0: src/mesa/main/hash.c:240: _mesa_HashRemove_unlocked: Assertion `key' failed. Aborted (core dumped) Marek already has a patch on the Mesa list for this issue. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-09-01glsl-1.10: Put an if-statement in a macro in the false path of an ifdefIan Romanick1-0/+18
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107772 Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Cc: Eero Tamminen <eero.t.tamminen@intel.com> Cc: Mark Janes <mark.a.janes@intel.com>
2018-08-30cl: Add tests for calls with special inputsMatt Arsenault1-0/+136
Also fixes apparently missing coverage for special input arguments not passed in registers. Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2018-08-30cl: Add test for respecting byval alignment in call setupMatt Arsenault1-0/+36
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2018-08-29arb_fragment_shader_interlock: Additional compile testsIan Romanick16-0/+761
The negative tests in this group require some inference from various specs. A spec bug has been submitted against the GL_ARB_fragment_shader_interlock spec. Currently none of the negative tests produce the expected result on Mesa. v2: Add test for switch-statements. Noticed by Jason. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-08-29arb_fragment_shader_interlock: Simple compiler testsIan Romanick4-0/+83
Currently none of the negative tests produce the expected result on Mesa. There are other cases called out by the spec as things you cannot do, but it's not clear what the expected result is in those cases (compile- or link-time error, undefined rendering, GPU hang, house fire, etc.). Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-08-30glsl-1.10: add some preprocessor stringification testsTimothy Arceri2-0/+22
>From Section 3.3. (Preprocessor) of the GLSL 4.60 spec: "The following operators are also available: defined ## ... Any directive not listed above will cause a compile-time error." Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-08-29arb_tessellation_shader: add GL_EXT_shader_integer_mix on [require]Alejandro Piñeiro1-0/+1
Needed by the tessellation evaluation shader. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-08-29glsl-1.30: add linker test for inter stage in/out vars usageVadym Shovkoplias1-0/+33
This test exposes a Mesa GLSL linker bug. The test fails with the following error message: error: fragment shader input `foo' has no matching output in the previous stage Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105731
2018-08-28util: stop overallocating shader memoryEric Engestrom1-1/+1
Fixes: 606e40b2659ad7fc4ae8e "util: Add utilities to handle shader_test files" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2018-08-23util: avoid leaking memory when caller doesn't ask for itEric Engestrom1-5/+4
It doesn't happen anywhere right now, but a caller could say it doesn't want the source, only its size, and in that case we would just leak that memory. Let's only actually allocate it when the caller wants it and will take ownership of that memory. Suggested-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-08-23egl: fix uninitialised counterEric Engestrom1-1/+1
CovID: 1438468 (UNINIT) Fixes: e49d4479d6cabce970bb9 egl: Add basic EGL_MESA_device_software test" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-08-23egl: fix uninitialised counterEric Engestrom1-1/+1
CovID: 1438470 (UNINIT) Fixes: 6c08c9fab326a526b41e1 "egl: Add basic EGL_EXT_device_drm test" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-08-23util: fix memory leakEric Engestrom1-0/+1
CovID: 1438469 (RESOURCE_LEAK) Fixes: 606e40b2659ad7fc4ae8e "util: Add utilities to handle shader_test files" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-08-23arb_gpu_shader5: fix memory leakEric Engestrom1-1/+3
CovID: 1438471 (RESOURCE_LEAK) Fixes: 7ec9b1734b66ee41c2700 "arb_gpu_shader5: Add support for testing spirv with XFB streams" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2018-08-21egl_ext_device_enumeration: check the populate call to eglQueryDevicesEmil Velikov1-0/+5
The first call gives us the number of devices, while the second populates the user provided array. Check that the second call returns at least one device. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl Add new test of EGL_EXT_platform_deviceEmil Velikov5-0/+294
Since the functionality is more or less identical to EGL_MESA_platform_surfaceless, the test with a copy of it. Changes, as listed in the test itself, include: - s/MESA_platform_surfaceless/EXT_platform_device/g - entrypoint handling - eglQueryDeviceStringEXT, eglQueryDevicesEXT and eglGetPlatformDisplayEXT - custom GetDisplay, based on eglQueryDevicesEXT - couple of s/PIGLIT_SKIP/PIGLIT_FAIL/ v2: Use eglQueryDeviceStringEXT to get a DRM backed device (Mathias) v3: PIGLIT_SKIP when missing a DRM device in get_device_display (Mathias) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl_mesa_platform_surfaceless: plug some memory leaksEmil Velikov1-1/+4
Plug the memory leaks in the PASS case. It might be worth doing the same throughout, although that is too invasive for what I have time for. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl: Add basic EGL_EXT_device_drm testEmil Velikov5-0/+267
Cover the new token and the interactions with EGL_EXT_platform_device. Pay attention to Issue 1 of the spec, the fd ownership and ensure we query back the same EGLDevice. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl_ext_device_query: plug memory leaksEmil Velikov1-4/+16
Call eglTerminate, otherwise we'll end up with massive leaks reported in Valgrind. Fairly useful when checking if the EGL implementation is leak-free. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl_ext_device_query: return PIGLIT_WARN when eglGetDisplay failsEmil Velikov1-1/+1
In the unlikely case that the function fails, we want some feedback about the issue. It's not a failure per-se, but we don't want to silently continue. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl_ext_device_query: drop unused major/minor from eglInitializeEmil Velikov1-2/+1
The arguments are optional. Since we don't care about the version, use NULL instead. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl: Add basic EGL_MESA_device_software testEmil Velikov5-0/+145
The extension doesn't do anything useful but report a device ext. string. Ensure that such a device does not attempt to expose DRM specifics - nearly missed that during development. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21egl_ext_device_query: check for eglQueryDeviceStringEXT EGL_BAD_DEVICE_EXTEmil Velikov1-0/+4
The function returns EGL_BAD_DEVICE_EXT when an invalid device is used. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-08-21arb_gl_spirv: adding basic va64 testAlejandro Piñeiro1-0/+136
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21util/vbo: Accept integer attribute namesNeil Roberts1-3/+25
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21arb_enhanced_layouts: Test doublesNeil Roberts3-19/+184
v2: use shader_test file with the spirv assembly, instead of include a SPIR-V binary binaries (Alejandro Piñeiro) v3: rename .shader_test file to .shader_source (format is still the same that shader_test files) (Timothy Arceri) Signed-off-by: Neil Roberts <nroberts@igalia.com> Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com> Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21arb_enhanced_layouts: Test XFB layout qualifiers via SPIR-VNeil Roberts8-160/+786
v2: use shader_test file with the spirv assembly, instead of include two SPIRV binaries (Alejandro Piñeiro) v3: rename .shader_test file to .shader_source (format is still the same that shader_test files) (Timothy Arceri) Signed-off-by: Neil Roberts <nroberts@igalia.com> Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com> Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21arb_gpu_shader5: Add support for testing spirv with XFB streamsNeil Roberts3-33/+303
v2: use shader_test file with the spirv assembly, instead of include two SPIRV binaries (Alejandro Piñeiro) v3: rename .shader_test file to .shader_source (format is still the same that shader_test files) (Timothy Arceri) Signed-off-by: Neil Roberts <nroberts@igalia.com> Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com> Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21util: Add utilities to handle shader_test filesAlejandro Piñeiro3-0/+200
This method would allow to use source files in the common shader_test format by tests that are not the shader_runner. This is useful if we want to implement a custom test based on the info at shader_test, but without adding that custom support to shader_runner. And it is specially useful for custom tests that we want to test on GLSL and SPIR-V. It is worth to note that although the method loads "shader_test" files, for those custom tests make more sense to call them "shader_source" files, as for those, the file would work as just the source. v2: fix memory leak (Antia Puentes) Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21util: Add a utility to assemble SPIR-V sourcesNeil Roberts3-39/+46
Adds piglit_assemble_spirv which invokes spirv-as to assemble a SPIR-V source. The function is based on a static helper function that was in shader_runner. Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21arb_gl_spirv: add test that mixes atomic counters with a normal uniformAlejandro Piñeiro2-0/+394
Under ARB_gl_spirv, most uniforms require a explicit location. There are some exceptions like atomic counters. In that case, some drivers like mesa, still sets internally a location for those. This test purpose is checking that mixing "normal" uniforms with uniforms without location works properly, or at least in a basic case. Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-08-21arb_gl_spirv: add tests for atomic counter operations in CSAntia Puentes3-0/+732
Tests the atomic counter operations and layout qualifiers offset and binding described in the ARB_shader_atomic_counters specification in a CS with local_size_x, y, z equal to 3, 2 and 1 respectively. Includes 3 tests: atomic_uint, arrays of atomic_uint and AOA of atomic_uints. Acked-by: Timothy Arceri <tarceri@itsqueeze.com>