summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into vulkanKristian Høgsberg Kristensen2016-02-242-60/+3
|\
| * util: fix new gcc6 warningsRob Clark2016-02-181-1/+3
| | | | | | | | | | | | | | | | | | src/util/hash_table.h:111:23: warning: ‘_mesa_fnv32_1a_offset_bias’ defined but not used [-Wunused-const-variable] static const uint32_t _mesa_fnv32_1a_offset_bias = 2166136261u; ^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
| * util/u_atomic: Remove MSVC 2008 support.Jose Fonseca2016-02-121-59/+0
| | | | | | | | | | | | Spotted by Emil Velikov. Trivial.
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2016-02-112-2/+2
|\|
| * scons: Eliminate MSVC2008 compatibility.Jose Fonseca2016-02-111-1/+1
| | | | | | | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
| * configure: Eliminate MSVC2008 compatibility.Jose Fonseca2016-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer need to build any part of Mesa with Windows SDK 7.0.7600 or MSVC 2008. MSVC 2013 will be the oldest we support. In practice this means people are now free to declare variables in the middle of blocks, on the whole Mesa tree. Care should still be taken with variable length arrays and void pointer arithmetic. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Hella-acked-by: Ian Romanick <[email protected]>
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2016-02-055-2/+129
|\|
| * util/hash_table: add _mesa_hash_table_num_entriesNicolai Hähnle2016-02-031-0/+5
| | | | | | | | Reviewed-by: Marek Olšák <[email protected]>
| * util/hash_table: add _mesa_hash_table_clear (v4)Nicolai Hähnle2016-02-034-0/+120
| | | | | | | | | | | | v4: coding style change (Matt Turner) Reviewed-by: Ian Romanick <[email protected]> (v3)
| * util/hash_table: don't compare deleted entriesConnor Abbott2016-02-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | The equivalent of the last patch for the hash table. I'm not aware of any issues this fixes. v2: - use entry_is_deleted (Timothy) Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Connor Abbott <[email protected]>
| * util/set: don't compare against deleted entriesConnor Abbott2016-02-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we delete entries in the hash set, we mark them "deleted" by setting their key to the deleted_key, which points to a dummy deleted_key_value. When searching for an entry, we normally skip over those, but set_add() had some code for searching for duplicate entries which forgot to skip over deleted entries. This led to a segfault inside the NIR vectorization pass, since its key comparison function interpreted the memory where deleted_key_value resides as a pointer and tried to dereference it. v2: - add better commit message (Timothy) - use entry_is_deleted (Timothy) Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Connor Abbott <[email protected]>
* | util/bitset: Allow iterating over const bitsetsJason Ekstrand2016-01-181-1/+1
| |
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-12-271-0/+1
|\| | | | | | | This pulls in tessellation and the store_var changes that go with it.
| * ralloc: Fix ralloc_adopt() to the old context's last child's parent.Kenneth Graunke2015-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | I was cleverly using one iteration to obtain a pointer to the last item in ralloc's singly list child list, while also setting parents. Unfortunately, I forgot to set the parent on that last item. Cc: "11.1 11.0 10.6" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-12-105-3/+33
|\| | | | | | | | | This pulls in nir_intrinsic_load/store changes and the switch of all uniforms in i965 to bytes. This accounts for the Vulkan changes.
| * util: fix comment typoGiuseppe Bilotta2015-12-041-1/+1
| | | | | | | | | | | | | | | | Undefining the NDEBUG is relevant for release build, as they are the ones that set it. [Emil Velikov: split from previous patch] Signed-off-by: Emil Velikov <[email protected]>
| * Remove Sun CC specific code.Jose Fonseca2015-12-021-1/+1
| | | | | | | | | | Reviewed-by: Matt Turner <[email protected]> Acked-by: Alan Coopersmith <[email protected]>
| * util: Tiny optimisation for the linear→srgb conversionNeil Roberts2015-11-271-1/+1
| | | | | | | | | | | | When converting 0.0 it would be nice if it didn't do any arithmetic. Reviewed-by: Jason Ekstrand <[email protected]>
| * util: Include assert.h in macros.h.Matt Turner2015-11-241-0/+2
| |
| * util: Include <stdbool.h> in debug.h.Matt Turner2015-11-241-0/+1
| |
| * util: move brw_env_var_as_boolean() to utilRob Clark2015-11-242-0/+27
| | | | | | | | | | | | | | | | Kind of a handy function. And I'll want it available outside of i965 for common nir-pass helpers. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-11-142-0/+9
|\| | | | | | | This pulls in Matt's big compiler refactor.
| * ralloc: Set *start in ralloc_vasprintf_rewrite_tail() if str is NULL.Matt Turner2015-11-121-0/+1
| | | | | | | | | | | | | | We were leaving it undefined, even though we were writing a string to *str. Reviewed-by: Kenneth Graunke <[email protected]>
| * util: Add list_is_singular() helper functionEduardo Lima Mitev2015-11-101-0/+8
| | | | | | | | | | | | Returns whether the list has exactly one element. Reviewed-by: Matt Turner <[email protected]>
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-10-193-0/+220
|\|
| * glsl: move half<->float convertion to utilRob Clark2015-10-163-0/+220
| | | | | | | | | | | | | | | | Needed in NIR too, so move out of mesa/main/imports.c Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* | Merge ../mesa into vulkanKristian Høgsberg Kristensen2015-10-083-0/+101
|\|
| * util: Move DRI parse_debug_string() to utilKristian Høgsberg Kristensen2015-10-083-0/+101
| | | | | | | | | | | | | | | | | | | | We want to use intel_debug.c in code that doesn't link to dri common. v2: Remove unnecessary stddef.h include (Topi), use util/debug.h in all DRI driver and remove driParseDebugString() (Iago). Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-10-022-8/+2
|\|
| * util: use strnlen() in strndup() implementationsSamuel Iglesias Gonsalvez2015-09-302-8/+2
| | | | | | | | | | | | | | | | | | If the string being copied is not NULL-terminated the result of strlen() is undefined. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Neil Roberts <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* | Merge branch 'master' of ../mesa into vulkanKristian Høgsberg Kristensen2015-10-015-10/+102
|\|
| * util: Fix strndup prototype on C++.Jose Fonseca2015-09-292-1/+10
| | | | | | | | Trivial.
| * util: implement strndup for WIN32Samuel Iglesias Gonsalvez2015-09-293-0/+83
| | | | | | | | | | | | | | | | | | | | | | v2: - Add strndup.h to Makefile.sources (Emil) - Use calloc instead of malloc (Emil). - Check if allocation fails (Emil, Jose) - Add '#pragma once' and include stdlib.h to strndup.h (Jose) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 Reviewed-by: Jose Fonseca <[email protected]>
| * util: automake: rework the format_srgb.c ruleEmil Velikov2015-09-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A handful of changes/cleanups paving the way to bmake support: - Remove optional $(srcdir)/ prefix for files in the prereq list. - Drop the space after the AM_V_GEN variable. - Using $< in a non-suffix rule is a GNU make idiom. - Use $(@D) over $(dir $@). The latter is a POSIX standard. v2: Cosmetic tweaks in the commit summary. Cc: 11.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> (v1)
| * util: make mesa-sha1.c completely empty when there are no SHA1 implsIlia Mirkin2015-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | My earlier attempt to fix this missed the fact that there was a #else clause that assumes that you have openssh. This moves the whole thing under #ifdef HAVE_SHA1 which should avoid this issue. Fixes: 13bfa5201 (util: always include sha1 into the build) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91898 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
| * util: always include sha1 into the buildIlia Mirkin2015-09-063-8/+6
| | | | | | | | | | | | | | | | | | SHA1 is now used in all builds when HAVE_SHA1 is defined. Adjust src to do the same thing, rather than predicating on shader cache. Fixes: 04e201d0c02 ("mesa: change 'SHADER_SUBST' facility to work with env variables") Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-08-254-18/+87
|\|
| * util/ra: (trivial) fix c99 loop variable initializationRoland Scheidegger2015-08-191-7/+8
| | | | | | | | Fails with old msvc otherwise.
| * util: (trivial) include c99_math.h in rounding.hRoland Scheidegger2015-08-191-2/+1
| | | | | | | | Needed for rint/rintf.
| * util/ra: Make allocating conflict lists optionalJason Ekstrand2015-08-182-10/+19
| | | | | | | | | | | | | | | | | | Since i965 is now using make_reg_conflicts_transitive and doesn't need q-value computations, they are disabled on i965. They are enabled everywhere else so that they get the old behavior. This reduces the time spent in eglInitialize() on BDW by around 10-15%. Reviewed-by: Eric Anholt <[email protected]>
| * util/ra: Add a function for making all conflicts on a register transitiveJason Ekstrand2015-08-182-0/+24
| | | | | | | | Reviewed-by: Eric Anholt <[email protected]>
| * util/bitset: Add a BITSET_FOREACH_SET macroJason Ekstrand2015-08-181-0/+36
| | | | | | | | Reviewed-by: Eric Anholt <[email protected]>
* | Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-08-178-34/+141
|\|
| * ra: Delete the conflict lists in ra_set_finalizeJason Ekstrand2015-08-101-0/+5
| | | | | | | | | | | | | | They are never used after the set is finalized so there's no reason to keep them around. Reviewed-by: Matt Turner <[email protected]>
| * ra: Refactor ra_set_finalizeJason Ekstrand2015-08-101-26/+25
| | | | | | | | | | | | | | All this commit does is change an early return to an if with an else clause. Reviewed-by: Matt Turner <[email protected]>
| * util: Use LONG_MAX instead of LONG_BIT.Jose Fonseca2015-08-101-6/+7
| | | | | | | | | | | | | | | | | | | | | | More portable. Based on Roland Scheidegger's idea. Tested with roundevent_test on Linux, MinGW, and MSVC. https://bugs.freedesktop.org/show_bug.cgi?id=91591 Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Matt Turner <[email protected]>
| * scons: Build roundevent_test.Jose Fonseca2015-08-102-0/+9
| | | | | | | | Reviewed-by: Roland Scheidegger <[email protected]>
| * util: Cope with LONG_BIT not being defined on Windows.Jose Fonseca2015-08-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Neither MSVC nor MinGW defines LONG_BIT. For MSVC this was not a problem as it doesn't define __x86_64__ macro (it's GCC specific.) However on Windows long type is guaranteed to be 32bits. Also add an #error, as GCC will just warn, not throw any error, when no value is returned. Trivial.
| * util: Rename PURE to ATTRIBUTE_PURE.Jose Fonseca2015-08-091-2/+2
| | | | | | | | | | | | | | | | | | To avoid collission with windows.h's PURE macro. We could consider eventually renaming to __pure, but that would require further care, so it's left to the future. Reviewed-by: Brian Paul <[email protected]>
| * util: Use SSE intrinsics in _mesa_lroundeven{f,}.Matt Turner2015-08-041-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc actually generates this for us now that we use -fno-math-errno (which is weird, since lrintf()/lrint() don't set errno) but clang still does not. Presumably helps MSVC as well. Reduced .text size by 8.5k with gcc before -fno-math-errno. text data bss dec hex filename 4935850 195136 26192 5157178 4eb13a i965_dri.so before 4927225 195128 26192 5148545 4e8f81 i965_dri.so after Reviewed-by: Roland Scheidegger <[email protected]>