summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* gallium/util: get h264 level based on number of max references and resolutionLeo Liu2015-04-281-0/+36
| | | | | | | | v2: add commments for limitation of max references numbers, and what the caculation is based Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* softpipe: fix another stencil-as-float issueRoland Scheidegger2015-04-271-2/+2
| | | | | | | | | Hopefully this is the last one now (for texture X32_S8X24_UINT views). +4 piglits. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90167 Reviewed-by: Brian Paul <[email protected]>
* u_tile: fix warnings about incompatible casts.Dave Airlie2015-04-081-3/+3
| | | | Signed-off-by: Dave Airlie <[email protected]>
* u_tile: fix stencil texturing tests under softpipeDave Airlie2015-04-081-6/+6
| | | | | | | | | arb_stencil_texturing-draw failed under softpipe because we got a float back from the texturing function, and then tried to U2F it, stencil texturing returns ints, so we should fix the tiling to retrieve the stencil values as integers not floats. Signed-off-by: Dave Airlie <[email protected]>
* util/debug: Update MgwHelp link, drop BfdHelp link.Jose Fonseca2015-03-311-10/+2
|
* gallium/util: remove u_linkageIlia Mirkin2015-03-262-216/+0
| | | | | | | | Does not appear to be used in tree. Coverity spotted some errors in the bitmask stuff, but the whole thing appears to be unused. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/util: Use HAVE___BUILTIN_FFS* macros.Jonathan Gray2015-03-241-2/+16
| | | | | | | | | Make use of the builtin ffs macros and split out ffsll to a seperate block. Needed for at least OpenBSD which does not have ffsll in libc. Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: convert slab macros to inline functionsBrian Paul2015-03-131-2/+11
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* Fix invalid extern "C" around header inclusion.Mark Janes2015-03-051-6/+5
| | | | | | | | | | | System headers may contain C++ declarations, which cannot be given C linkage. For this reason, include statements should never occur inside extern "C". This patch moves the C linkage statements to enclose only the declarations within a single header. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: add debug_print_usage_enum() debug helperBrian Paul2015-02-272-0/+22
| | | | Signed-off-by: Brian Paul <[email protected]>
* gallium/util: fix 'statement with no effect' warningBrian Paul2015-02-271-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* include,auxiliary: Remove support for MSVC older then 2008.Jose Fonseca2015-02-262-28/+1
| | | | | | | | | | MSVC 2008 (shipped with Windows SDK 7.0.7600) is the oldest we need to support. At least on llvmpipe, gallium/auxiliary, and util modules. For the remaining modules (particular all OpenGL specific code) can be built with MSVC 2013. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: add debug_print_bind_flags() debug helperBrian Paul2015-02-262-0/+36
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: move math-related function into new c99_math.h fileBrian Paul2015-02-231-1/+1
| | | | | | | | | | | | The alternative would be to include math.h in c99_compat.h but that seems heavy-handed. This patch also replaces INLINE with inline in the c99 math function wrappers. Fixes MSVC build. Acked-by: Matt Turner <[email protected]>
* gallium: Use util_cpu_to_le{16,32} in many more places.Matt Turner2015-02-233-353/+79
| | | | | | | | | | | | | ... and util_le{16,32}_to_cpu. I think I've used the right ones for describing the actual operation performed (even though they're both just "byte-swap this if I'm on big-endian"). The Linux Kernel has typedefs __le32/__be32 and friends that static analysis tools can use to check that byte-orderings are correct. It might be interesting to apply that here as well. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: Use HAVE___BUILTIN_* macros.Matt Turner2015-02-231-6/+5
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Move C99 MSVC compatibility code from u_math.h to c99_compat.h.Matt Turner2015-02-231-143/+0
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* util: move pipe_prim_names array into u_prim_name()Brian Paul2015-02-231-24/+21
| | | | | | Also, wrapping the array in #ifdef DEBUG / #endif doesn't seem necessary. Reviewed-by: Jose Fonseca <[email protected]>
* util: rewrite debug_print_transfer_flags() using debug_dump_flags()Brian Paul2015-02-231-28/+13
| | | | | | Add add missing PIPE_TRANSFER_PERSISTENT, PIPE_TRANSFER_COHERENT flags. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: Don't include unused debug functions from u_math.hEric Anholt2015-02-201-1/+0
| | | | | | | It introduces references to gallium util/ symbols which means we don't get to include it from outside-of-gallium code. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: indentation fixBrian Paul2015-02-191-3/+3
|
* gallium: add ETC2 format supportIlia Mirkin2015-02-185-111/+90
| | | | | | | No actual decoding is added, similar faking mechanism to bptc. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_tests: test a NULL buffer sampler viewMarek Olšák2015-02-062-13/+42
| | | | Reviewed-by: Glenn Kennard <[email protected]>
* gallium/u_tests: test a NULL constant bufferMarek Olšák2015-02-061-0/+57
| | | | | | | | | This expects (0,0,0,0), though it can be changed to something else or allow more than one set of values to be considered correct. This is currently the radeonsi behavior. Reviewed-by: Glenn Kennard <[email protected]>
* gallium/u_tests: test a NULL texture sampler viewMarek Olšák2015-02-061-17/+85
| | | | v2: allow one of the two values
* gallium/u_tests: restructure the only test, refactor out reusable codeMarek Olšák2015-02-061-31/+79
| | | | Reviewed-by: Glenn Kennard <[email protected]>
* gallium: run gallium tests if GALLIUM_TESTS=1 is setMarek Olšák2015-02-062-3/+10
| | | | Reviewed-by: Glenn Kennard <[email protected]>
* gallium/util: Don't implement u_bit_scan64 on MSVC.Jose Fonseca2015-02-041-0/+2
| | | | | | | | | | As ffsll doesn't exist in MSVC yet, and u_bit_scan64 is only used by radeonsi which is never built with MSVC. This is just a stop-gap fix to unbreak MSVC build until we refactor these mathematical portability wrappers into src/util. Trivial.
* gallium/util: Define ffsll on MinGW.Jose Fonseca2015-02-041-0/+1
| | | | | | Trivial. (Fixing MSVC will be far less so, as _BitScanForward64 is only supported on x64.)
* gallium/u_pstipple: add ability to specify a fixed texture unitMarek Olšák2015-02-042-8/+20
| | | | | | | E.g. r600g can use slot 17, which is outside of the API range. Reviewed-by: Glenn Kennard <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/util: add u_bit_scan64Marek Olšák2015-02-041-0/+7
| | | | | | | Same as u_bit_scan, but for uint64_t. Reviewed-by: Glenn Kennard <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/util: Don't use __builtin_clrsb in util_last_bit().Matt Turner2015-02-031-4/+0
| | | | | | | | Unclear circumstances lead to undefined symbols on x86. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=536916 Cc: [email protected] Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: Replace u_simple_list.h with util/simple_list.hEric Anholt2015-01-283-201/+2
| | | | | | | The code was exactly the same, except util/ has c++ guards and a struct simple_node declaration. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: make sure cache line size is not zeroLeonid Shatz2015-01-051-1/+5
| | | | | | | | | | The "normal" detection (querying clflush size) already made sure it is non-zero, however another method did not. This lead to crashes if this value happened to be zero (apparently can happen in virtualized environments at least). This fixes https://bugs.freedesktop.org/show_bug.cgi?id=87913 Cc: "10.4" <[email protected]>
* gallium/util: fix crash with daz detection on x86Roland Scheidegger2015-01-051-1/+1
| | | | | | | | | | The code used PIPE_ALIGN_VAR for the variable used by fxsave, however this does not work if the stack isn't aligned. Hence use PIPE_ALIGN_STACK function decoration to fix the segfault which can happen if stack alignment is only 4 bytes. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=87658. Cc: "10.4" <[email protected]>
* gallium: remove support for GCC older than 4.1.0Timothy Arceri2014-12-171-4/+4
| | | | | | | Signed-off-by: Timothy Arceri <[email protected]> Reviewed-By: Jose Fonseca <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* util: add missing closing brace for __cplusplusBrian Paul2014-12-121-0/+6
|
* util: Unbreak usage of assert()/debug_assert() inside expressions.José Fonseca2014-12-121-1/+1
| | | | | | | | | f0ba7d897d1c22202531acb70f134f2edc30557d made debug_assert()/assert() unsafe for expressions, but only now that u_atomic.h started to rely on them for Windows that this became an issue. This fixes non-debug builds with MSVC. Reviewed-by: Brian Paul <[email protected]>
* cso: put cso_release_all into cso_destroy_contextMarek Olšák2014-12-101-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2014-12-081-8/+4
| | | | | | | See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* freedreno/a3xx: fix alpha-blending on RGBX formatsIlia Mirkin2014-12-061-0/+25
| | | | | | | Expert debugging assistance provided by Chris Forbes. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* util: Move u_atomic.h to src/util.Matt Turner2014-12-011-401/+0
| | | | | | To be shared outside of Gallium. Reviewed-by: Jose Fonseca <[email protected]>
* util/u_snprintf: Don't redefine HAVE_STDINT_H as 0.José Fonseca2014-11-261-1/+1
| | | | | | | | | We now always guarantee availability of stdint.h on MSVC -- if MSVC doesn't supply one we use our own. Cc: "10.4" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Prefer atomic intrinsics to inline assembly.Matt Turner2014-11-241-2/+2
| | | | | | | | | | | | | Cuts a little more than 1k of .text size from i915g. This was previously done in commit 5f66b340 and subsequently reverted in commit 3661f757 after bug 30514 was filed. I believe the cause of bug 30514 wasn't anything related to cross compiling, but rather that the toolchain used defaulted to -march=i386, and i386 doesn't have the CMPXCHG or XADD instructions used to implement the intrinsics. So we reverted a patch that improved things so that we didn't break compilation for a platform that never could have worked anyway.
* st/mesa: add a fallback for clear_with_quad when no vs_layerIlia Mirkin2014-11-172-0/+76
| | | | | | | | | | | | | | | | | Not all drivers can set gl_Layer from VS. Add a fallback that passes the instance id from VS to GS, and then uses the GS to set the layer. Tested by adding quad_buffers |= clear_buffers; clear_buffers = 0; to the st_Clear logic, and forcing set_vertex_shader_layered in all cases. No piglit regressions (on piglits with 'clear' in the name). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: "10.4 10.3" <[email protected]>
* gallium/auxiliary: add contained and rect checks (v6)Christoph Bumiller2014-11-182-0/+136
| | | | | | | | | | | | | v3: thanks to Brian, improved coding style, also glennk helped spot few things (unsigned -> int, two constify) v4: thanks Ilia improved function, dropped u_box_clip_3d v5: incorporated rest of Gregor proposed changes,clean ups v6: u_box_clip_2d simplify proposed by Ilia Mirkin Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* gallium/auxiliary: add inc and dec alternative with return (v4)Christoph Bumiller2014-11-181-0/+52
| | | | | | | | | | | | | | | At this moment we use only zero or positive values. v2: Implement it for also for Solaris, MSVC assembly and enable for other combinations. v3: Replace MSVC assembly by assert + warning during compilation v4: remove inc and dec with return for MSVC assembly Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* gallium: remove unused pipe_viewport_state::translate[3] and scale[3]Marek Olšák2014-11-163-6/+0
| | | | Almost all drivers ignore them.
* tgsi/ureg: simplify code for declaring propertiesMarek Olšák2014-11-161-1/+1
| | | | Tested-by: Nick Sarnie <[email protected]>
* gallium/util: add a test for TGSI_PROPERTY_VS_WINDOW_SPACE_POSITIONMarek Olšák2014-11-162-0/+307
| | | | | | Not testable by OpenGL. Required by Nine. This is an example of how to implement a piglit-like test using gallium only.