summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* util: Fix build for C++ compilers.Michal Krol2010-08-202-0/+16
|
* gallium: hook up reference count debugging codeLuca Barbieri2010-08-201-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the ability to produce a log file containing all reference count changes, and object creation/destruction, on Gallium objects. The data allows to answer these crucial questions: 1. This app is exhausting all my memory due to a resource leak: where is the bug? 2. Which resources is this app using at a given moment? Which parts of the code created them? 3. What kinds of resources does this app use? 4. How fast does this app create and destroy resources? Which parts of the code create resources fast? The output is compatible with the one produced by the similar facility in Mozilla Firefox, allowing to use Mozilla's tools to analyze the data. To get the log file: export GALLIUM_REFCNT_LOG=<file> To get function names and source lines in the log file: tools/addr2line.sh <file> To process the log file, see: http://www.mozilla.org/performance/refcnt-balancer.html
* auxiliary: add reference count debugging codeLuca Barbieri2010-08-202-0/+185
|
* u_debug_symbol: add symbol name cachingLuca Barbieri2010-08-202-1/+43
| | | | | Without this, any form of logging that dumps stack traces continuously will spend a lot of time resolving symbol names.
* u_debug_symbol: add support for getting symbol names from glibcLuca Barbieri2010-08-201-0/+23
|
* u_debug_symbol: support getting a string without outputLuca Barbieri2010-08-202-14/+27
|
* auxiliary: add functions to describe gallium objectsLuca Barbieri2010-08-202-0/+53
|
* u_staging: improve interfaceLuca Barbieri2010-08-202-11/+7
|
* auxiliary: support using PIPE_TEXTURE_RECT internallyLuca Barbieri2010-08-202-34/+81
| | | | | | | | | | Currently Gallium internals always use PIPE_TEXTURE_2D and normalized coordinates to access textures. However, PIPE_TEXTURE_2D is not always supported for NPOT textures, and PIPE_TEXTURE_RECT requires unnormalized coordinates. Hence, this change adds support for both kinds of normalization.
* u_staging: use PIPE_TEXTURE_RECTLuca Barbieri2010-08-201-1/+1
|
* u_blitter: use TGSI_TEXTURE_RECTLuca Barbieri2010-08-201-1/+1
| | | | | This seems to make sense, although I suspect the semantics of TGSI_TEXTURE_RECT need to be closely reviewed.
* gallium: make all checks for PIPE_TEXTURE_2D check for PIPE_TEXTURE_RECT tooLuca Barbieri2010-08-204-3/+8
| | | | | | | Searched for them with: git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D' Behavior hasn't been changed.
* u_blitter: fix a memory leakMarek Olšák2010-08-191-0/+1
|
* util: Remove check_os_katmai_support.Vinson Lee2010-08-161-119/+1
| | | | | | | | | | | | | | | | | check_os_katmai_support checks that the operating system running on a SSE-capable processor supports SSE. This is necessary for unpatched 2.2.x and earlier kernels. 2.4.x and later kernels support SSE. check_os_katmai_support will disable SSE capabilities for 32-bit x86 operating systems for which there is no code path. Currently, this function handles Linux, Windows, and several BSDs. Mac OS, Cygwin, and Solaris are several operating systems with no code paths. Rather than add code for the unhandled operating systems, remove this function altogether. This will fix SSE detection on all recent 32-bit x86 operating systems. This completely breaks functionality on unpatched 2.2.x and earlier kernels, although there are likely no Gallium3D users on such operating systems.
* gallium: Make printing info on debug builds default offJakob Bornecrantz2010-08-152-2/+2
| | | | | | | This commit silences the printing off most of the debug information when running debug builds. The big culprits are: the tgsi sanity checker that gets run on all shaders on debug; all the options; and finaly the cpu caps printer.
* u_cpu_detect: remove arch and little_endianLuca Barbieri2010-08-142-30/+1
| | | | | This logic duplicates the one in p_config.h, so remove it and adjust the only two places that were using it.
* Revert "u_blitter: unify clear_depth_stencil and flush_depth_stencil"Marek Olšák2010-08-122-0/+48
| | | | This reverts commit de4784e36505316c2a5ab34cc5b371d17f38d3c5.
* u_blitter: unify clear_depth_stencil and flush_depth_stencilMarek Olšák2010-08-122-48/+0
| | | | No need to enable depth test for clear.
* u_staging: remove useless inline keywordLuca Barbieri2010-08-111-1/+1
|
* auxiliary: Make u_staging.c MSVC compatible.Vinson Lee2010-08-111-3/+5
| | | | Fixes MSVC build.
* auxiliary: fix util_framebuffer_copyLuca Barbieri2010-08-111-2/+4
| | | | | | | | | util_framebuffer_copy was attempting to copy all elements of the source framebuffer state. However, this breaks if the user does not zero initialize the structure. Instead, only copy the elements up to nr_cbufs, and clear elements up to dst->nr_cbufs, if the destination was larger than the source.
* util: copy the u_staging commit message to the codeMarek Olšák2010-08-111-1/+9
|
* auxiliary: support for transfers using staging resourcesLuca Barbieri2010-08-112-0/+122
| | | | | | | | | | | Direct3D 10/11 has no concept of transfers. Applications instead create resources with a STAGING or DYNAMIC usage, copy between them and the real resource and use Map to map the STAGING/DYNAMIC resource. This util module allows to implement Gallium drivers as a Direct3D driver would be implemented: transfers allocate a resource with PIPE_USAGE_STAGING, and copy the data between it and the real resource with resource_copy_region.
* u_surfaces: add util_surfaces_peekLuca Barbieri2010-08-111-0/+13
| | | | Used to find out if a surface exists without creating one.
* u_surfaces: use cso_hash instead of util_hash_tableLuca Barbieri2010-08-112-53/+31
| | | | | Using cso_hash directly is the right thing since util_hash_table adds useless overhead and is harder to use for this application.
* u_surfaces: fix surface leak due to off by oneLuca Barbieri2010-08-111-1/+1
|
* auxiliary: make primitive splitter assert on unimplemented adjacency primsLuca Barbieri2010-08-111-1/+4
| | | | | They are unimplemented, even though the framework makes it possible to implement them well, and nv50 needs them.
* auxiliary: fix u_split_prim naming conventionLuca Barbieri2010-08-111-3/+3
| | | | Current practice is to start identifiers with "util_" instead of "u_".
* auxiliary: move Ben Skeggs' primitive splitter to common codeLuca Barbieri2010-08-111-0/+102
| | | | | | | | | | | | | | | | | | | | | This is a simple framework that handles splitting primitives in an abstract way. The user has to specify the primitive start, start index and count. Then, it can ask the primitive splitter to "draw" a chunk of the primitive, staying under a given vertex/index budget. The primitive splitter will then call user-supplied functions to emit a range of vertices/indices, as well as switch the edgeflag on or off. This is particularly useful for hardware that either has limits on the vertex count field, or where vertices are pushed on a FIFO or temporary buffer of limited size. Note that unlike other splitters, it does not manipulate data in any way, and merely asks a callback to do so, in vertex intervals.
* util: Add util_format_srgb().José Fonseca2010-08-101-0/+38
| | | | To convert RGB -> SRGB format.
* util: Move _mm_shuffle_epi8() to u_sse.h.José Fonseca2010-08-091-0/+29
| | | | It's bound to be useful elsewhere.
* gallium: remove stray semicolonsBrian Paul2010-08-061-1/+1
|
* util: Add option to not dump cpu capsJakob Bornecrantz2010-08-051-17/+22
|
* r300g: implement hyper-z support. (v4)Dave Airlie2010-08-052-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | This implements fast Z clear, Z compression, and HiZ support for r300->r500 GPUs. It also allows cbzb clears when fast Z clears are being used for the ZB. It requires a kernel with hyper-z support. Thanks to Marek Olšák <[email protected]>, who started this off, and Alex Deucher at AMD for providing lots of hints. v2: squashed zmask ram size fix] squashed r300g/blitter: fix Z readback when compressed] v3: rebase around texture changes in master - .1 fix more bits v4: migrated to using u_mm in r300_texture to manage hiz/zmask rams consistently disabled HiZ when using OQ flush z-cache before turning hyper-z off update hyper-z state on dsa state change store depthclearvalue across cbzb clears and replace it afterwards. Signed-off-by: Dave Airlie <[email protected]>
* gallium/draw: forgot about PIPE_PRIM_LINE_STRIP_ADJACENCYZack Rusin2010-08-031-0/+1
|
* gallium/util: add extra primitives to the trimmerZack Rusin2010-08-031-0/+13
|
* util: Fix unpacking of R8G8Bx_SNORM format.Michal Krol2010-08-021-3/+12
| | | | | Apparently, we must always use integers to perform calculations, otherwise the results won't match D3D's CxV8U8 definition.
* util: Fix the range of util_draw_elements_instanced.Chia-I Wu2010-07-301-2/+0
| | | | Keep min_index and max_index at their defaults (0 and ~0).
* util: more helpers for old draw codeKeith Whitwell2010-07-302-25/+141
|
* util: add uint version of pack_z_stencilKeith Whitwell2010-07-291-0/+47
| | | | Useful for packing mask values.
* util: Don't include xmmintrin.h.José Fonseca2010-07-291-1/+0
| | | | Unnecessary.
* gallium: Use unified pipe_context::draw_vbo.Chia-I Wu2010-07-291-1/+1
| | | | Update u_draw_quad, st/vega, and st/mesa to use pipe_context::draw_vbo.
* gallium: Implement draw_vbo and set_index_buffer for all drivers.Chia-I Wu2010-07-291-0/+30
| | | | | | | | | | | | | | | Some drivers define a generic function that is called by all drawing functions. To implement draw_vbo for such drivers, either draw_vbo calls the generic function or the prototype of the generic function is changed to match draw_vbo. Other drivers have no such generic function. draw_vbo is implemented by calling either draw_arrays and draw_elements. For most drivers, set_index_buffer does not mark the state dirty for tracking. Instead, the index buffer state is emitted whenever draw_vbo is called, just like the case with draw_elements. It surely can be improved.
* util: fix unused function warning on non-x86Brian Paul2010-07-261-0/+3
|
* util: fix CPU detection on OS Xnobled2010-07-261-6/+6
| | | | | | s/PIPE_OS_DARWIN/PIPE_OS_APPLE, since there is no PIPE_OS_DARWIN. Acked-by: Vinson Lee <[email protected]>
* util: fix another mutex leak in mempoolMarek Olšák2010-07-261-2/+1
| | | | By fixing one, I introduced another. Crap.
* util: fix mutex leaks in mempoolMarek Olšák2010-07-261-1/+2
|
* util: Add PIPE_OS_CYGWIN to u_network.Vinson Lee2010-07-231-1/+1
|
* util: mempool: initialize last block's magic number in a pageMarek Olšák2010-07-201-0/+1
|
* util: remove the dummy field in mempoolMarek Olšák2010-07-192-14/+4
| | | | It should allocate less memory now.