summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests/unit
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Make sure we return is_unorm/is_snorm for compressed formats.Eric Anholt2019-01-251-0/+65
| | | | | | | | | | | | | | | The util helpers were looking for a non-void channels in a non-mixed format and returning its snorm/unorm state. However, compressed formats don't have non-void channels, so they always returned false. V3D wants to use util_format_is_[su]norm for its border color clamping workarounds, so fix the functions to return the right answer for these. This now means that we ignore .is_mixed. I could retain the is_mixed check, but it doesn't seem like a useful feature -- the only code I could find that might care is freedreno's blit, which has some notes about how things are wonky in this area anyway. Reviewed-by: <Roland Scheidegger [email protected]>
* gallium: Enable unit tests as actual meson unit tests.Eric Anholt2019-01-251-4/+8
| | | | | | | | These tests don't need swrast, so we can always enable them when build_tests is set. Most of them run to successful completion quickly (.9s on my SKL). Reviewed-by: <Roland Scheidegger [email protected]>
* gallium/tests: Don't ignore S3TC errors.Jose Fonseca2018-07-241-5/+0
| | | | | | Now we do full S3TC decompression they should no longer fail. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/tests: Fix assignment of EXTRA_DISTMatt Turner2018-05-091-3/+1
| | | | Fixes: 6754c2e83d79 ("autotools: Include new meson files")
* autotools: Include new meson files18.1-branchpointDylan Baker2018-04-201-0/+2
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* meson: build gallium unit testsDylan Baker2018-04-181-0/+31
| | | | | | | | v2: - gate unit tests on swrast being enabled (Eric A) v3: - rebase on libtrace being merged with gallium auxiliary Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v2)
* gallium: move ddebug, noop, rbug, trace to auxiliary to improve build timesMarek Olšák2018-04-131-1/+0
| | | | which also simplifies the build scripts.
* Revert "gallium: build ddebug, noop, rbug, trace as part of auxiliary"Roland Scheidegger2018-02-071-0/+1
| | | | | | This reverts commit 6f82b8d8d0a986aac28e7bec47fc313fb950475c. This broke scons build, and reportedly clover with autotools/meson too.
* gallium: build ddebug, noop, rbug, trace as part of auxiliaryMarek Olšák2018-02-071-1/+0
| | | | | | | Building gallium is faster by 7.5 seconds on a 4core/8thread 3GHz CPU. (gallium build time is reduced by 15% when building only radeonsi) Non-recursive makefiles are great!
* util: move os_time.[ch] to src/utilNicolai Hähnle2017-11-091-1/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util: move pipe_barrier into src/util and rename to util_barrierNicolai Hähnle2017-11-091-6/+6
| | | | | | | | | The #if guard is probably not 100% equivalent to the previous PIPE_OS check, but if anything it should be an over-approximation (are there pthread implementations without barriers?), so people will get either a good implementation or compile errors that are easy to fix. Reviewed-by: Marek Olšák <[email protected]>
* gallium: Remove util_format_s3tc_init()Matt Turner2017-10-021-2/+0
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: Remove util_format_s3tc_enabledMatt Turner2017-10-021-5/+0
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* u_format_test: Ignore S3TC errors.Jose Fonseca2017-05-221-0/+25
| | | | | | | | | | This prevents spurious failures when libtxc-dxtn-s2tc is installed. Note: lp_test_format doesn't need any change since we were already ignoring S3TC failures there. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Rhys Kidd <[email protected]>
* gallium/util: replace pipe_thread_create() with u_thread_create()Timothy Arceri2017-03-121-1/+1
| | | | | | | They do the same thing we just moved the function to be accessible to all of Mesa. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_thread_wait() with thrd_join()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | Replace done using: find ./src -type f -exec sed -i -- \ 's:pipe_thread_wait(\([^)]*\)):thrd_join(\1, NULL):g' {} \; Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove PIPE_THREAD_ROUTINE()Timothy Arceri2017-03-071-1/+2
| | | | | | | | | | | | | This was made unnecessary with fd33a6bcd7f12. This was mostly done with: find ./src -type f -exec sed -i -- \ 's:PIPE_THREAD_ROUTINE(\([^,]*\), \([^)]*\)):int\n\1(void \*\2):g' {} \; With some small manual tidy ups. Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_thread with thrd_tTimothy Arceri2017-03-071-1/+1
| | | | | | | | pipe_thread was made unnecessary with fd33a6bcd7f12. V2: fix compile error in u_queue.c Reviewed-by: Marek Olšák <[email protected]>
* gallium: fix more occurences of u_hash.hMarek Olšák2016-11-221-1/+1
| | | | this fixes compile failures since 86514d84e0beec47c82da4888db12bf07f33cb83
* Treewide: Remove Elements() macroJan Vesely2016-05-171-2/+2
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/tests: Update UTIL_FORMAT_MAX_* defines.Jose Fonseca2016-04-191-0/+4
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Add a "check" target to run all unit tests.Jose Fonseca2016-04-141-7/+5
| | | | | | | | | Except: - u_cache_test -- too long - translate_test -- unreliable (it's probably testing corner cases that translate module doesn't care about.) Reviewed-by: Roland Scheidegger <[email protected]>
* test/unit: Make translate_test invoke translate_create by default.Jose Fonseca2016-04-141-3/+4
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* test/unit: Make pipe_barrier_test actually check correct bahavior.Jose Fonseca2016-04-141-7/+50
| | | | | | | | So it can run unattended. Also make it silent by default. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: Add scons files to distribution.Matt Turner2014-12-121-0/+2
|
* gallium/tests: automake: link against libmesautil.laEmil Velikov2014-08-051-0/+1
| | | | | | | Or the build will fail due to unresolved symbols. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* gallium: Move sRGB <-> RGB handling to libmesautilJason Ekstrand2014-08-041-1/+1
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* automake: introduce GALLIUM_COMMON_LIB_DEPSEmil Velikov2014-04-051-3/+1
| | | | | | | | | Rather than copying the core four dependencies all over gallium, introduce the above variable to avoid all the duplication. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76848 Tested-by: Vinson Lee <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallium: Use C11 thread abstractions.José Fonseca2014-01-231-1/+1
| | | | | | | Note that PIPE_ROUTINE now returns an int. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* gallium/tests: fix the translate testZack Rusin2013-06-281-4/+4
|
* gallium/tests/unit: Convert to automakeAndreas Boll2013-01-102-49/+34
|
* gallium/tests: update .gitignore filesAndreas Boll2012-11-211-0/+6
|
* tests: Use printf instead of debug_printf in u_format_compatible_test.Vinson Lee2012-10-251-1/+1
| | | | | | | | | | | Use printf instead of debug_printf to be consistent with print statements in rest of unit tests. This also fixes the lack of print output with the MinGW build of u_format_compatible_test. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tests: Updated tests to properly handle NaN for half floats.James Benton2012-06-292-7/+31
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* translate_test: add support for half floatsBrian Paul2012-06-061-0/+8
| | | | | | Fixes assertion reported in https://bugs.freedesktop.org/show_bug.cgi?id=44519 but there's still failing cases.
* gallium: rename ZS stencil type to UINT (v2)Dave Airlie2011-10-111-12/+12
| | | | | | | | | | these are never USCALED, always UINT in reality. taken from some work by Christoph Bumiller v2: fixup formatting of table + tabs Signed-off-by: Dave Airlie <[email protected]>
* tests/unit: Fix include styleKai Wasserbäch2011-08-291-5/+5
| | | | | | | | | | | As explained in the thread starting at [0], the internal include style should be »#include "path/to/header.h"« for non-system includes. [0] <http://news.gmane.org/find-root.php?message_id=%3c4E5802BE.6020206%40vmware.com%3e> Signed-off-by: Kai Wasserbäch <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* gallium: s/bool/boolean/Brian Paul2011-06-081-2/+2
|
* tests: Use elts in translate_test.José Fonseca2011-04-011-8/+14
|
* scons: Add aliases for unit tests.José Fonseca2011-04-011-4/+4
|
* scons: Fix immediate Python exceptions with SCons on SunOS.Vinson Lee2011-03-081-1/+1
| | | | The build still fails.
* scons: Revamp how to specify targets to build.José Fonseca2010-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | Use scons target and dependency system instead of ad-hoc options. Now is simply a matter of naming what to build. For example: scons libgl-xlib scons libgl-gdi scons graw-progs scons llvmpipe and so on. And there is also the possibility of scepcified subdirs, e.g. scons src/gallium/drivers If nothing is specified then everything will be build. There might be some rough corners over the next days. Please bare with me.
* util: Flush stdout on util_format.José Fonseca2010-09-221-0/+8
|
* util: Helper function to determined whether two formats can be memcpy'ed.José Fonseca2010-09-053-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | These are the non-trivial conversions that this function recognizes, which was produced by u_format_compatible_test.c: b8g8r8a8_unorm -> b8g8r8x8_unorm a8r8g8b8_unorm -> x8r8g8b8_unorm b5g5r5a1_unorm -> b5g5r5x1_unorm b4g4r4a4_unorm -> b4g4r4x4_unorm l8_unorm -> r8_unorm i8_unorm -> l8_unorm i8_unorm -> a8_unorm i8_unorm -> r8_unorm l16_unorm -> r16_unorm z24_unorm_s8_uscaled -> z24x8_unorm s8_uscaled_z24_unorm -> x8z24_unorm r8g8b8a8_unorm -> r8g8b8x8_unorm a8b8g8r8_srgb -> x8b8g8r8_srgb b8g8r8a8_srgb -> b8g8r8x8_srgb a8r8g8b8_srgb -> x8r8g8b8_srgb a8b8g8r8_unorm -> x8b8g8r8_unorm r10g10b10a2_uscaled -> r10g10b10x2_uscaled r10sg10sb10sa2u_norm -> r10g10b10x2_snorm State trackers and pipe drivers should be updated to take advantage of this knowledge, e.g., in surface_copy.
* translate_test: Fix compilation with MSVC.Vinson Lee2010-08-121-1/+2
|
* translate_test: fix compilation on non-POSIX platformsLuca Barbieri2010-08-121-5/+19
| | | | Use a kludgy function based on rand() instead of drand48()
* translate_test: improveLuca Barbieri2010-08-121-6/+60
| | | | | | | 1. Generate random data specifically for float and doubles, so that they end up in [0, 1] range 2. Don't test useless conversions like SCALED <-> NORM 3. Poison the buffers before testing
* scons: Fix freebsd8 build.Vinson Lee2010-08-111-1/+4
|
* translate_test: fix segfault on x86-64Luca Barbieri2010-08-111-2/+6
|
* translate_test: fix, reindent, and improveLuca Barbieri2010-08-111-137/+204
| | | | | | | 1. Fix the segfault due to the reverted commit using the new interface 2. Reindent to Mesa 3 spaces style 3. Improve output and return success/failure with error code 4. Add much better support for testing translate_sse